Archive

Archive for the ‘linux’ Category

Remux .m4v (and probably others) to .mkv

January 19, 2012 2 comments

Easy.

ffmpeg|avconv -i input.m4v -vcodec copy -acodec copy out.mkv

So easy this post is actually done here.

Categories: linux Tags: ,

Friends don’t let friends use id3v2…

November 22, 2011 1 comment

… use eyed3 for your command line tagging/display needs instead. Seriously, if you write id3v2.4 tags (which I guess most taggers do nowadays), id3v2 unfortunately doesn’t see/support them.

Categories: linux Tags: ,

See everything and the kitchen sink about your harddrive

November 3, 2011 Leave a comment

Ever wondered what specifications your harddisk/SSD actually has? hdparm is your best friend here. I wondered whether my Corsair SSD actually had TRIM supported/enabled, and this is what sudo hdparm -I /dev/sda (of course, replace /dev/sda with w/e your desired device node is) got me:
Read more…

Ubuntu / PERL locale errors/warnings

October 31, 2011 Leave a comment

You get this?

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = “en_US.UTF-8″,
LC_ALL = “en_US.UTF-8″,
LANG = “en_US.UTF-8″
are supported and installed on your system.

Use this!

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

Worked for me. Of course, replace en_US with w/e your primary language is.

Categories: ubuntu, unix Tags: , ,

NoMachine NX, Ubuntu and the XSession

October 27, 2011 1 comment

If you get the dreaded

'Cannot run /etc/X11/xdm/Xsession ...'

when requesting a new session on an Ubuntu server, this – at least for me – fixed it:

sudo mkdir /etc/X11/xdm && sudo ln -s /etc/X11/Xsession /etc/X11/xdm/Xsession
Categories: ubuntu, unix Tags: , ,

Switching your default Sans/Sans Serif/Monospace Fonts 2.5

And another update on my quest to a great .fonts.conf configuration, update from my updated-original post.

All stuff still applies, but newer freetype/fontconfig builds now support the Byte Code Interpreter, which provides a truly great font experience in combination with good fonts (*cough* hint: ChromeOS Fonts *cough*). My updated .fonts.conf is as follows (enabled BCI, enabled Sub-Pixel Rendering, enabled LCDFilter):

<?xml version="1.0"?>
<!--?xml version="1.0"?>-->
<!--DOCTYPE fontconfig SYSTEM "fonts.dtd">-->
<!-- ~/.fonts.conf for per-user font configuration -->
<fontconfig>
  <!-- Alias commonly used default names -->
  <!-- serif, sans-serif, sans and monospace -->
  <!-- to the ChromeOS fonts -->
  <alias>
    <family>serif</family>
    <prefer>
      <family>Tinos</family>
    </prefer>
  </alias>
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>Arimo</family>
    </prefer>
  </alias>
  <alias>
    <family>sans</family>
    <prefer>
      <family>Arimo</family>
    </prefer>
  </alias>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>Cousine</family>
    </prefer>
  </alias>
  <!-- Replace Arial, Times New Roman, Verdana and Courier New -->
  <!-- with their counterparts. Strong binding used to override -->
  <!-- distribution defaults -->
  <match target="pattern" name="family">
    <test name="family" qual="any">
      <string>Arial</string>
    </test>
    <edit name="family" mode="assign" binding="strong">
      <string>Arimo</string>
    </edit>
  </match>
  <match target="pattern" name="family">
    <test name="family" qual="any">
      <string>Times New Roman</string>
    </test>
    <edit name="family" mode="assign" binding="strong">
      <string>Tinos</string>
    </edit>
  </match>
  <match target="pattern" name="family">
    <test name="family" qual="any">
      <string>Verdana</string>
    </test>
    <edit name="family" mode="assign" binding="strong">
      <string>Arimo</string>
    </edit>
  </match>
  <match target="pattern" name="family">
    <test name="family" qual="any">
      <string>Courier New</string>
    </test>
    <edit name="family" mode="assign" binding="strong">
      <string>Cousine</string>
    </edit>
  </match>
  <match target="pattern" name="family">
    <test name="family" qual="any">
      <string>Courier</string>
    </test>
    <edit name="family" mode="assign" binding="strong">
      <string>Cousine</string>
    </edit>
  </match>
  <match target="font">
    <!--    BCI Hinting     -->
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="hintstyle" mode="assign">
      <const>hintfull</const>
    </edit>
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
    <!--    Auto Hinting, BCI works better for me 
        Your mileage may vary 
-->
    <!--
        <edit name="autohint" mode="assign">
                <bool>true</bool>
            </edit> 
        <edit name="hintstyle" mode="assign">
                <const>hintmedium</const>
            </edit>
-->
    <!--    Turn off Autohinting for bold fonts -->
    <!--
    <match> 
        <test name="weight" compare="more">
                <const>medium</const>
                </test>
        <edit name="autohint" mode="assign">
                <bool>false</bool>
               </edit>
       </match>
-->
  </match>
</fontconfig>

I am now truly satisfied on my Arch Linux box – while Ubuntu might have the best font experience out of the box, an equal experience on any decent modern distribution is just a configuration file and some great fonts away.

Categories: archlinux, linux, uncategorized Tags: ,

SELinux, vsftpd and you

Setting up some new RHEL 6 servers I came across the odd need of enabling ftp access to /tftpboot on those machines came up. SELinux didn’t really like that idea and denied access, which by default is a very good idea. Diabling SELinux is of course no option at all.

It is pretty well known and documented that setsebool -P ftp_home_dir=1 allows access to system users’ home directories. But what about other directories outside of /home? audit2allow to the rescue!

# audit2allow -a
============== ftpd_t ==============
#!!!! This avc can be allowed using the boolean 'allow_ftpd_full_access'

allow ftpd_t tftpdir_rw_t:dir { write remove_name add_name };
#!!!! This avc can be allowed using the boolean 'allow_ftpd_full_access'

allow ftpd_t tftpdir_rw_t:file { write create unlink append };

Basically this little known, but invaluable helper goes through your audit.log and tells you what can be done to avoid those denies; in this case

setsebool -P allow_ftpd_full_access=1

therefore allows vsftpd to write to any system directory the currently logged in user can get access to.

Categories: fedora, red hat Tags: , , , ,
%d bloggers like this: