Thursday, June 9, 2011

Get KDE4.6 applications smooth again !

Since KDE4.6, some of KDE applications can be very ...
very slow sometimes (kate, konqueror, dolphin).

One of the workaround is too specify another Qt graphical system, for instance using raster:
kate --graphicssystem raster
dolphin --graphicssystem raster

Wednesday, June 8, 2011

Configure easily themes of GTK+ applications, QT4 applications ...

It's not always immediate to configure Themes of Desktop Environment, GTK+ applications and Qt4 applications separately.
For Desktop environment, there is usually embedded tools.

For GTK+ applications, we can use the gtk-chtheme tool.
Under RedHat-like GNU/Linux, it can be installed with the package of the same name:
yum install gtk-chtheme
Each user wanted to configure his GTK+ applications theme can then use this tool.

For Qt4 applications, we can use the qt-config tool.
Under RedHat-like GNU/Linux, it can be installed like that:
yum install qtconfig-qt4
Each user wanted to configure his Qt4 applications theme can then use this tool.

Lots of themes can be found on OpenDesktop.

Friday, June 3, 2011

Control your GNU/Bash Prompt

With GNU/Bash, it is easy to control your prompt, defining PS1 (and optionally PS2 to PS4) environment variable.

For better legibility or whatever reason, you may want to
add further information or colors to prompt.
For instance you can see this page, and this one.

But it is very important to escape special characters dedicated to colors.
For instance, this prompt will NOT work:
export PS1="\e[0;32m\t\e[0m \u@\h:\e[0;36m\W\e[0m$ "

With this prompt, GNU/Bash will NOT work properly while breaking lines (for instance if its length if greater than limit) or while moving to begin/end of them.
To work, it is needed to add escaped bracket between each color escaped characters; this is a working prompt with colors (starting with date and time, and then usual information: user name, host and relative path):
export PS1="\[\e[0;32m\]\t\[\e[0m\] \u@\h:\[\e[0;36m\]\W\[\e[0m\]$ "

To persist your GNU/Bash prompt, you can add this in a GNU/Bash startup file (e.g. $HOME/.bashrc).