Change gtk theme in Gentoo even if not using Gnome

Do your friends make fun of you because their “gtk apps look better” ? How many times have you heard about that damn “clearlooks theme“. Time for revenge then!

Just emerge gtk-theme-switch and run switch2 on the command line. Select your favorite theme…restart your gtk apps…and enjoy! Now can have that damn “clearlooks theme” too. 🙂

After you’ve finished you can emerge -C gtk-theme-switch

Btw, if you are looking for some nice fluxbox themes have a look at boxwhore

Fixing openoffice crash with font drop down menu

Lately my openoffice installation suffered from severe crashes. Anytime I wanted to pick a font from the drop down menu it crashed. It didn’t matter if it was oowriter2 or oocalc2 or whatever, it just crashed. I dedided that today was the day to fix this, so I started checking how OpenOffice reads the fonts of the system and created its font menu.

My first thought was that it read the fonts from my xorf.conf. So I started messing up with those. I ended up by cleaning some fontpaths I did not use any more but that was no fix for OpenOffice. Then it was time to start cleaning up the fontpaths that I had kept. My /usr/share/fonts/TTF/ dir was kinda large…so I started moving fonts from that dir to another named /usr/share/fonts/TTF-old/ and tried to keep inside /usr/share/fonts/TTF/ only the fonts I thought were good enough to keep. After a few X server restarts…the problem was gone. No more crashes.

But there was something weird going on at the same time. My xorg.conf only included the /usr/share/fonts/TTF/ fontpath and not /usr/share/fonts/TTF-old/, still though some fonts from /usr/share/fonts/TTF-old/ appeared inside the ooffice2 font drop-down menu. I started searching around and found that /etc/fonts/fonts.conf included the whole /usr/share/fonts/ path. That meant that many applications read the fonts from /usr/share/fonts/TTF-old/ too!
I removed /usr/share/fonts/ path from fonts.conf and replaced it with the fontpaths I use in xorg.conf too.

The result ? Everything works smoothly now. I can even see (or imagine) a small perfomance gain in some applications now that I don’t have that many fonts loaded.

Simplified popup of current song playing in xmms

In a previous post of mine I described how to use gtkdialog to display a nice popup of the current song playing in xmms. Well…there is a faster way to do it..and here it is:

xmessage -center -buttons ok:0 -default ok `xmmsctrl print "%T (%m of %M)%n"`

xmessage is an small application that comes with your xorg. So no extra packages are required.

It is kinda ugly…but still does the job. Choose whatever you prefer.

Πώς να μην πληρώνετε ΕΡΤ στο λογαριασμο της ΔΕΗ αν δεν θέλετε

Μια αρκετά ενδιαφέρουσα κίνηση -> ΕΡΤ και ΔΕΗ. Πως μπορείτε να μην πληρώνετε αναγκαστικά.

Με ενδιαφέρει αρκετά μιας και δεν έχω τηλεόραση και ούτε θέλω να έχω. Ακόμα και να είχα, γιατί να πληρώνω για την ΕΡΤ παραπάνω χρήματα αφού και στα κρατικά κανάλια υπάρχουν πλέον διαφημίσεις ? Ας υπάρξει φόρος ανά τηλεόραση όπως σε άλλες χώρες, για όποιους διαθέτουν τηλεόραση.

Θα περιμένω να δω πως κινούνται οι διαδικασίες των υπολοίπων και αν δεν αντιμετωπίσουν πρόβλημα με την γραφειοκρατία, θα προχωρήσω και εγώ σε αντίστοιχη κίνηση.

Αυτό είναι και το πρώτο μου post στα Ελληνικά…

Fluxbox feature request: NextWindow cycles through iconified windows as well

That’s one of the few things fluxbox is missing…NextWindow (usually alt+tab) does not cycle through iconified windows. It should at least “hightlight” them while they are on the iconbar and be able to raise them back to normal if you want somehow.

Please support this request here:

NextWindow: Include Iconified Option

Changing resolution to a TFT monitor connected with DVI

I had a slight problem with my new TFT monitor (LG L1970H-BF). When connected with a DVI cable I couldn’t get refresh rates of more than 60Hz. The monitor specifically says that it support up to 1280×1024@75Hz. But my xorg.conf refused to work, the resolution was stuck on 1280×1024 @ 60Hz…that’s what the monitor showed whatever I tweaked in xorg.conf.

Then I found this very very usefull utility: gtf. What this does small utility does is create proper Modelines for your xorg.conf because DDC is sometimes problematic in it’s automatic mode detection. This utility though managed to create a perfect modeline for my monitor.

Now with this line:

Modeline "1280x1024_75.00" 138.54 1280 1368 1504 1728 1024 1025 1028 1069 -HSync +Vsync

I have the resolution that I want. Me and my monitor are a lot happier now 🙂

Btw, the following lines might be helpfull too for some others:

Option "NoDDC" "1"
Option "IgnoreEDID" "on"
Option "MergedFB" "off"

Cheers 🙂

Popup of current song playing in xmms

I am a regular user of xmms. I like it because the interface is so simple, because it has tons of plugins for almost anything one can imagine, and because you can control it from the command line.

What I wanted to do was make it able to display the current song on the screen, but only when I want it to. I know there’s an xosd plugin that can display various information on the screen, but it does it every time the song changes. I want that to appear only when I press some key combination.

So I started checking out what I could do. I ended up with gtkdialog, which is a very nice and VERY easy to use programmable interface for displaying custom gtkwindows. It was a matter of 1 minute to create a simple popup with a simple Label and an “OK” button to clear the popup.
Then I needed a program to be able to manipulate and display info about current song in xmms. That was xmmsctrl.

Now time to combine them together with a simple bash script named gtk-xmms-title:


#! /bin/bash
TITLE=`xmmsctrl print "%T (%m of %M)%n"`
export MAIN_DIALOG='
<vbox>
<text>
<label>'$TITLE' </label>
</text>
<hbox>
<button ok></button>
</hbox>
'
gtkdialog --program MAIN_DIALOG

Then I made the script executable and moved it to /usr/bin/. The final touch was to add a keyboard shortcut to my .fluxbox/keys


Mod1 F12 :ExecCommand gtk-xmms-title

Activating Mail/Home/Search buttons in fluxbox

I am an owner of a Microsoft Basic Keyboard Black. Yes, I know it’s not the best…but it’s pretty ok for it’s money. As soon as I find some decent amount of money I am going to get this beauty: Cherry CyMotion Master Linux 🙂

Anyway…as you can see my MS keyboard has three buttons in the top…Mail, Web/Home and Search. I was looking forward to using them in linux too, so I started searching. Gentoo Wiki was again the source for what I was looking…
So check this out: http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys

After setting up .xmodmap, it was time to make fluxbox use them. And here’s my part of .fluxboys/keys referring to those 3 “new” keys.


None XF86Mail :ExecCommand mrxvt --loginShell
None XF86HomePage :ExecCommand /usr/bin/firefox -P test
None XF86Search :ExecCommand nedit
Mod4 XF86Mail :ExecCommand xmms --rew
Mod4 XF86HomePage :ExecCommand xmms --play-pause
Mod4 XF86Search :ExecCommand xmms --fwd
Mod1 XF86Mail :ExecCommand amixer sset PCM 2-
Mod1 XF86HomePage :ExecCommand amixer sset "Audigy Analog/Digital Output Jack" toggle
Mod1 XF86Search :ExecCommand amixer sset PCM 2+

I am now able to lauch applications, jump forward and backward tunes in xmms and control the volume of my Audigy2.
Unfortunately I couldn’t find a switch to mute Audigy2 and the only “hack”I cound find was to toggle the digital output switch. Since I don’t have digital and analog output together, if I change the switch the sound get muted.

Have fun with your keys 🙂