Skip to content

stealin' cookies

alice$ echo $DISPLAY
localhost:11.0

alice$ xhost +
access control disabled, clients can connect from any host

alice$ su - bob
bob$ DISPLAY=localhost:11.0 xclock
X11 connection rejected because of wrong authentication.
The reason for that is that X11 is using a magic cookie to authenticate against the specified X server. And we want that sweet bastard:
bob$ sudo cp ~alice/.Xauthority .
bob$ DISPLAY=localhost:11.0 xclock
Yes, it's that easy. But seem to forget things like this too often - now it's here, forever. And ever ;)

lighttpd & symlinks

My Lighttpd/FGCI/PHP installation sometimes has difficulties with php scripts which are really symlinks. Now, to be honest I have not fully debugged this issue yet, but sparse error messages like "No input file specified" and blaming PHP are not really helpful when no workaround is in sight. Some said that setting broken-scriptfilename would help, which was been introduced in 2005, but with lighttpd-1.5, the whole fast-cgi setup has been changed quite a bit and this option is not applicable any more. To be fair, there's even a FAQ entry for this particular error message, but it was not as straightforward as it looked like:
>  You forgot to add '''cgi.fix_pathinfo=1 to your php.ini''' file
....tried that, with no effect.
> If open_basedir is set, make sure the requested file 
is below one of the directories which is specified there.
check!
 > If you are running PHP with different permissions than lighttpd
nope.
 > Make sure you did not set doc_root or userdir in php.ini, or if you have 
set it, make sure it has the correct value
....there are different vhosts here, each having a different server.document-root set, but only one php.ini where I could set doc_root. However, php.ini/user_dir value was unset - when I set it to the same value as userdir.path in lighttpd, at least the symlinks below the ~user directories were working again! Of course, one could have different values for userdir.path (or is this a global option?), but I guess having a single userdir.path value is much more feasible than having just one server.document-root set.

PST8PDT

$ TZ=GMT date
Tue Oct 28 18:07:16 GMT 2008
$ TZ=MET date
Tue Oct 28 19:07:17 MET 2008
$ TZ=MEST date
Tue Oct 28 20:07:18 MEST 2008
$ TZ=PST8PDT date
Tue Oct 28 11:07:19 PDT 2008
Soon we'll have a time difference of 9 hours again, although it does not make a difference from a practical pov and I wish someone would stop this madness...

Update: yet another story (in German) covering this nonsense....

name-{san,sama,kun,chan} - learn something new everyday

I always wondered why Japanese people sometimes add strange suffixes to names or surnames. And I wonder why I had to go to Yahoo! to find the (hopefully correct) answer:
Keep in mind that a Japanese speaker may not be entirely sure which is your given
name and which is your surname. -san can be attached to either. You should use the
Japanese person's surname unless you come to consider that person a friend. -san
doesn't really "mean" anything. It is a suffix attached to a person's name to
indicate respect, roughly like "Mr./Mrs/Miss" -- but not quite. There are other
suffixes for  other occasions and people: -sama for very important people, -kun 
for close male friends, -chan for kids and people you want to be very familiar with.

n rules to sort them all

Ah, this is something I always wanted to have for my MUA of choice, but never dared to ask: per folder sorting rules. It's as easy as:
  > Yes, press M S R O and configure this, or if you have enabled
  > [X] Enable Take Rules
  > then simply press "T" in the folder you want to use and then from the menu
  > in the bottom, select "O".
...and how intuitive ;-)

How to disable the Spotlight icon

After disabling Spotlight in MacOSX, the Spotlight icon in the menu bar was still there, taking up precious space on my 12" PowerBook G4. Here's how to disable the icon as well:
  sudo chmod 0 /System/Library/CoreServices/Search.bundle/
  pkill -9 SystemUIServer
And, while we're at it - again the procedure to disable the Dashboard:
  defaults write com.apple.dashboard mcx-disabled -boolean YES
Enable with "NO" again and start "Dashboard" from /Applications.