You were right, it's because of ubuntu. Starting x with gdm not startx. I tried it on 2 other distros and there is no problem with this. On PCLOS I had to do it another way though, by making a script in /usr/local/bin and setting it in the xfce rc, but it worked. As of now I have ubuntu 5.10 the most nicely tweaked besides this problem. I'd still like to know how to do it on it. Anyone running ubuntu for a while now know it's behaviors? How do I change gdm to startx and would there be any problems doing so?
KDM also does not obey my ~/.xinitrc script.
I'm guessing it's just the way graphical login managers work. X is already started so there's no point in running 'startx'.
Infact startx is just a shell script that calls 'xinit' which is what actually processes ~/.xinitrc. I dunno why, but graphical mangers seem to not like using xinit, and do everything themselves.
For GDM, /etc/gdm/PreSession/ and /etc/gdm/PostSession/ hold shell scripts which are executed before or after a session is setup. From /etc/gdm/gdm.conf:
# Note that a post login script is run before a PreSession script.
# It is run after the login is successful and before any setup is
# run on behalf of the user
So stick a shell script in one of those directories (PostSession).