Archive
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.
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.
Fixing vmware-tools vmhgfs on newer Linux kernels (probably anything >= 2.6.36)
If you’re trying to install vmware-tools inside a linux guest and get the dreaded
super.c:73: error: unknown field ‘clear_inode’ specified in initializer
error while compiling vmhgfs for shared folder support (which I use a lot), this will help (thanks to Anjo from German VMWare Forums):
- unpack
/usr/lib/vmware-tools/modules/source/vmhgfs.tarto somewhere - open
vmhgfs-only/super.cin your favorite text editor - edit from
#ifndef VMW_USE_IGET_LOCKED .read_inode = HgfsReadInode, #endif .clear_inode = HgfsClearInode, .put_super = HgfsPutSuper, .statfs = HgfsStatfs, };
to (note .clear_inode -> .evict_inode)
#ifndef VMW_USE_IGET_LOCKED .read_inode = HgfsReadInode, #endif .evict_inode = HgfsClearInode, .put_super = HgfsPutSuper, .statfs = HgfsStatfs, };
- repack
vmhgfs.tarincluding editedsuper.c - execute
vmware-config-tools.pl - profit
ext2read now supports ext4 with extents
Finally! The ext2read application now supports ext4 extents – which makes me finally able to get access to my Linux partition from my Windows-XP-employer partition again. Awesome. Read Only, but that’s fine by me. I just hate doing some work at home, forgetting to put it into my Dropbox and then having to do the reboot-savetonet-reboot-juggle. Work XP is encrypted/usb disabled/younameit. /rant. So thanks ext2read!
“reset high speed USB device using ehci_hcd and address 3″, your syslog and what fixed it for me
If you use external USB drives (be it SD-Cards, Hard Disk or Thumbs) and your drive(s) seem to hang from time to time while spitting out ”[...] reset high speed USB device using ehci_hcd and address 3 [...]” in your syslogs, the following fixed it for me.
My one little 320GB 2.5″ external Western Digital USB hard drive had this issue, while the big ones didn’t – seems like it is somehow related to being powered by the bus itself or using a dedicated power supply. Anyway, the drive seemed to hang on large file transactions (like copying a big file) and then the kernel had to reset it, announcing it via the syslog. Very annoying, especially because SMB transfers always got interrupted and went totally foobar. The fix was quite simple. max_sectors for the drive was set to its default 240 value, which the drive choked on for no apparent reason whatsoever. Issuing a quick
echo 128 > /sys/block/sdc/device/max_sectors
fixed it. YMMV. Of course replace sdc with the actual node of your drive.
Switching your default Sans/Sans Serif/Monospace Fonts
EDIT: Updated post for ChromeOS fonts and Arial/Verdana/Times New Roman/Courier New replacement.
When I recently switched to the totally awesome and space saving Droid Fonts (monospaced version is extremely nice for programming and shell stuff), courtesy of Google, I had to find a way to have my Ubuntu system translate every request for the default Sans/Sans Serif/Monospace fonts to their respective Droid versions. Not wanting to tamper with the system wide configuration files (I think those forward to the Dejavu family of fonts, nice, but not so cool on small screens), I just used the excellent per-user configuration system. Just dump this snippet as .fonts.conf into your $HOME directory.
<!--?xml version="1.0"?>--> <!--DOCTYPE fontconfig SYSTEM "fonts.dtd">--> <!-- ~/.fonts.conf for per-user font configuration --> <fontconfig> <alias> <family>serif</family> <prefer> <family>Droid Serif</family> </prefer> </alias> <alias> <family>sans-serif</family> <prefer> <family>Droid Sans</family> </prefer> </alias> <alias> <family>monospace</family> <prefer> <family>Droid Sans Mono</family> </prefer> </alias> </fontconfig>
Enjoy the difference!
So simple, yet useful…
… it almost hurts. Read this post by Andrew Jamison about making directories and automatically cwd’ing to it – once you read it, you know you always needed it!
# mkdir, cd into it
mkcd () {
mkdir -p "$*" && cd "$*"
}
Put into your .bashrc – profit!
DeMuxing and ReMuxing M2TS/MP4/FLV to MKV under –insert-your-preferred-unixoid-os-here–
Sometimes I get some video files in mp4, flv or even m2ts containers. Since I am a big, big fan of the mkv container format, I usually remux those files. When I first tried to find a solution for this using Linux, Google spit out everything and the kitchen sink, but not the most obvious choices: use ffmpeg or mplayer.
To demux with ffmpeg:
ffmpeg -i input.{mp4,flv,m2ts} -vcodec copy out.{h264,m2v} -acodec copy out.{aac,mp3}
|
AFAIK mplayer involves two steps to demux video and audio separately:
mplayer -dumpvideo -dumpfile out.{h264,m2v} input.{mp4,flv,m2ts}
mplayer -dumpaudio -dumpfile out.{aac,mp3} input.{mp4,flv,m2ts}
|
There are probably a gazillion ways more (mencoder comes to mind) to achieve the demuxed material and if the input files contain more than one video and one audio stream, you might have to – personally I never was in such a scenario – dig up ffmpeg’s manual about stream selection. Which actually is pretty easy to do.
Once you got your streams demuxed, use the most excellent mkvtoolnix suite to remux them into a mkv container (note: mmg is your friend here). As you will be most likely adding elementary streams, mkvmerge won’t be able to automatically determine the correct fps. Just manually enter them, ffmpeg or mplayer should have spit them out in the demuxing process. Here you can also add subtitles and w/e your heart desires into the container.
out.{h264,m2v} input.{mp4,flv,m2ts}
Using Dropbox in a KDE environment
Even though the Dropbox Service I seriously can’t live without anymore is basically designed to work with Nautilus and therefore Gnome, it works very well in a KDE environment.
Register with the service and then
cd $HOME # download dropbox x86 wget -O dropbox_x86.tar.gz http://www.getdropbox.com/download?plat=lnx.x86 # or, if you are running x86_64 wget -O dropbox_x86_64.tar.gz http://www.getdropbox.com/download?plat=lnx.x86_64 # unpack it tar xfvz dropbox_<x86 or x86_64>.tar.gz # start dropboxd - the initial Wizard will be coming up to enter you account data .dropbox-dist/dropboxd # put the Dropbox daemon into your autostart, so it begins its job once KDE comes up ln -s $HOME/.dropbox-dist/dropboxd $HOME/.kde/Autostart/dropboxd |
Note to self: if (syslog.contains(‘device descriptor read/64, error -62′) && syslog.contains(‘unable to enumerate USB device on port whatever’)) {
before debugging for like two hours and then thinking your USB harddrive is broken – check whether the damn cable is actually functioning and fully connected. Then keep wanting the two hours of your life back. /rant off }
Lotus Notes 8.5 install under Sabayon Linux 5.0
Interestingly painless…
- Download the .deb version of the Notes client from IBM
- tar xfv <downloaded_archive>
- unpack the Notes client and Sametime with
ar x ibm_lotus_notes-8.5.i586.debandar x ibm_lotus_sametime-8.5.i586.debinto separate directories - unpack
data.tar.gzandcontrol.tar.gzin both directories (tar xfvz <archive>) - elevate your ego to higher levels (aka become root)
- move the files in
optfrom the respective Notes client and Sametime directories to/opt - in the Notes client directory, open
postinst. Around line 254 comment out some lines and add one so it looks like this: - execute
postinstin both directories - start Notes and *cough* enjoy *cough*
# If on a Debian system, check to see if we have previously written an
# upgrade marker. If so, then set the action to "upgrade". This is to
# handle the fact that even on an upgrade, a Debian postinst script action
# is "configure", which doesn't give us an ability to distinguish initial
# install and upgrade functions that we need to perform.
#if [ -e /etc/debian_version ]; then
# if [ -e /tmp/ibm_lotus_notes.upgrade ]; then
# DPKG_ACTION="upgrade"
# rm -f /tmp/ibm_lotus_notes.upgrade
# else
# DPKG_ACTION="$1"
# fi
#fi
# ADD THIS LINE
DPKG_ACTION="configure"
This of course only applies to the Gnome Edition of Sabayon. Your mileage may vary when using the KDE Edition – will probably have to install lots of Gnome packages and their dependencies.
Sabayon Linux 5.0 Gnome Default Desktop
… is looking really great.
Just installed on my new company Lenovo T500 and so far really, really liking it. Multimedia capabilities by default are awesome, Wireless is working (I am still wondering why I had such troubles with a stock Gentoo install and the really well supported Intel 5100AGN), Font rendering is sweet. And after all, it is a Gentoo derivative, which makes it awesome by all means. Oh, I am using the Gnome edition.
… has a modification time in the future
… absolutely everytime I install Gentoo on a machine I run into this inconvenience – on first reboot it nags loudly about modification times in the future. Rightly so, but quite annoying.
touch /etc/{conf.d,init.d}/* && touch /etc/rc.conf
and it’s gone on next boot.
Thank you IBM!
… for making Notes 8.5 Beta 1 available in .deb packages. Works beautifully (well, it’s still ye’olde sluggish Notes, but hey…), looks good, good font rendering, no ‘beta-related’ crashes so far. I love you for that. Srsly. No more using that broken crap installer.
… I still hate you for creating/buying Notes tho.
Autohinting for bold Fonts sucks…
… so turn it off. It seems my struggle for a really nice, good looking, crispy font configuration is never ending. But hey, guess that’s what I somehow love.
<match target="font" > <test compare="more" name="weight" > <const>medium</const> </test> <edit mode="assign" name="autohint" > <bool>false</bool> </edit> </match>
in ~/.fonts.conf will do the trick and turn off the Autohinter for bolded fonts. Sometimes they now kinda funny when in really small sizes, but you will get around looking them all blurry and crammed together in ‘normal’, bigger sizes. Matter of personal taste I guess.
Edit: Never mind, I turned autohinting for bold fonts back to on. Seems like setting subpixel-hinting to rgb totally fixed my issues. My bad for having it set to none all the time. :/ I’m done with fonts for now.
