Qt4 apps Look and Feel on Gnome

There are so many applications that depend on qt in my system (among others skype, vlc, opera, picard and virtualbox) that I decided to remove all the statically-compiled-against packages and just install the library and normal packages; this gave me also the chance to find a better way to integrate qt apps in a gnome-based desktop environment.
The problems that I noticed were that all the fonts looked really tiny and the overall look of the application was kinda poor, so I took a look at the binaries included in the qt package:
arkham ~ $ pacman -Ql qt | grep bin qt /usr/bin/ qt /usr/bin/assistant qt /usr/bin/assistant_adp qt /usr/bin/designer qt /usr/bin/linguist qt /usr/bin/lrelease qt /usr/bin/lupdate qt /usr/bin/moc qt /usr/bin/pixeltool qt /usr/bin/qcollectiongenerator qt /usr/bin/qdbus qt /usr/bin/qdbuscpp2xml qt /usr/bin/qdbusviewer qt /usr/bin/qdbusxml2cpp qt /usr/bin/qhelpconverter qt /usr/bin/qhelpgenerator qt /usr/bin/qmake qt /usr/bin/qt3to4 qt /usr/bin/qtconfig qt /usr/bin/rcc qt /usr/bin/uic qt /usr/bin/uic3
I tried with qtconfig and it solved the fonts problem, but the default styles still looked really bad; luckily, I found a project called QGtkStyle, that lets you use a gtk-rendered qt style, thus giving a native appearence for qt apps running on gnome. To install it, make sure to have qt4.4 and gtk2 installed correctly, then:
svn co "svn://labs.trolltech.com/svn/styles/gtkstyle" cd gtkstyle/ qmake && make sudo make install
or
yaourt -S qgtkstyle-svn
Now, from the qtconfig menu you can choose a new style called GTK, and I can assure you that this one looks really nice. Have fun
Colored Man Pages
To improve your productivity when you’re reading long pages of fine manuals (aka when you’re doing some healthy RTFM), it is a very nice trick to add some colour in the terminal, so you can jump quickly from section to section or find the name of that sneaky option with a glance…
Add to your ~/.bashrc:
export LESS_TERMCAP_mb=$'E[01;31m' export LESS_TERMCAP_md=$'E[01;31m' export LESS_TERMCAP_me=$'E[0m' export LESS_TERMCAP_se=$'E[0m' export LESS_TERMCAP_so=$'E[01;44;33m' export LESS_TERMCAP_ue=$'E[0m' export LESS_TERMCAP_us=$'E[01;32m'
And
source ~/.bashrc
Mplayer and Nautilus “Open with”
Nautilus “Open with” option and Mplayer don’t seem to behave correctly when the file we want to open contains spaces. The dirty hack to solve it is:
su vi /usr/share/applications/mplayer.desktop
And replace “Exec=gmplayer %U” with “Exec=gmplayer %F”
MIA: Firefox titlebar icon
I just installed firefox3 beta and I realized that the little icon in upper right corner of the application (the titlebar) had just disappeared leaving a pretty sad spot in my eyesight.
After symlinking a hundred of different images in $FIREFOX_DIR and /usr/share/pixmaps I finally discovered the right one:
cd /opt/mozilla/lib/firefox-3.0/ mkdir -p chrome/icons/default/ cp icons/default.xpm chrome/icons/default/default.xpm
If the same problem happens while you’re using the normal Firefox just change /opt/mozilla/lib/firefox-3.0 into /usr/lib/firefox
