The SithWM FAQ.

BadWindow

O Great Sith Master, please help this humble apprentice,
I loaned my computer to a friend an now I'm getting this weird error message when I try to start applications:
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x2000082
....
    
Ah, a "friend", well, my humble apprentice, I see your "friend" has been toying with the light side of the Force, he has been running KDE or Gnome or some other Jedi WM. This is just another example of their mind tricks, I will give you a remedy for this situation first:
$ xprop -root -remove _NET_SUPPORTING_WM_CHECK
    
So what have these "knights" been up to here? Well apparently they've set a number of properties on the root-window, and with their usual hand-waving they have convinced certain applications that they need these properties.

There's a number of properties starting with _NET_ you might want to make a perl script to remove them all.

And, yes, a sith apprentice may use perl without any danger of straying to the light side. But please my young apprentice, tell your friends to stay away from the likes of KDE, that is not the way to the true power of the Force.

Coke Zero

O Great Sith Master, please help this humble apprentice,
I've got this friend who wants to be a sith master, yet he's drinking the new Coke Zero, is this the correct drink for a sith master?


Ah, yet another of those "friends", well, my humble apprentice, take a look... eer, show your "friend" this and he will know that Cherry Coke is the right stuff for a sith master.

Some might think Vanilla Coke would do the trick - but hey, we're not that evil! .. or, are we?

Starting X

O Great Sith Master, please help this humble apprentice,
How do I start X?


Well, my humble apprentice, I'm very glad you asked that question, because the Jedi have spread many lies on this issue.

First, my humble apprentice, you don't need gdm or xdm or whatever they call those non-evil instruments they have devised, a true sith logs in on the console were he ...

But, O Great Sith Master, how will I then be able to start X?

Don't interrupt me, my not so humble apprentice, lest I shall put a fearsome quota on you. All will be revealed to you in its own time. You may use xinit, this is appropriate for an apprentice, your .xinitrc should then look like:

#!/bin/sh
until xsetroot -solid '#36444f';do sleep 1;done
xmodmap -e 'clear Lock'
xrdb $HOME/.Xdefault
if xsetroot -display :0.1 -solid '#36444f'
then
  AUXDIS=:0.1
else
  AUXDIS=:0
fi
export AUXDIS
exec sithwm
exec xterm -display $AUXDIS -C

    
There's an extra exec at the end there so that we will have something should sithwm not be installed. There's also a purpose to putting the first xsetroot in a loop, more on that later.

There's still some issues here, the way xinit starts X is that it starts the X server process, waits a bit, runs the .xinitrc script and then kills the X server process when the script is finished. Can't you just see the Jedi heresies here? This means that there's an whole process wasted, and you stand the risk of having X quit on you. A true sith master starts his X with this script:

#!/bin/sh
DISPLAY=:0 ; export DISPLAY
X -noreset -v &
sh $HOME/.xinitrc &
sleep 30

    
And here the true purpose of the until-loop around xsetroot in your .xinitrc reveals itself, now it will wait until the X server is operative before it starts. The sleep holds on to the console for a while so you can inspect messages from the X server before the console is released.

Weird text pieces in tab-view.

O Great Sith Master, pl..... dammit, I can't be bothered with this sith nonsense anymore ..



As you can see on the screenshot, some weird text pops up in the tab view in where other applications would have icons, what's going on?

This is actually intended behaviour, and I'm willing to admit that it is weird.
  1. When no icon is available - sithwm just uses the window itself as icon.
  2. If the icon is too large to fit in the space available sithwm picks out a piece of the icon (or window) and displays it.
  3. Sithwm doesn't draw any frame around the icon.
When we combine all this we get the weird behaviour that you see. A solution here might be to provide a default icon for all windows, and maybe have the possibility to configure this trough the 'app' functionality.
Darth Olr
Last modified: Tue Apr 10 13:02:30 CEST 2012