I am trying to run some bash commands in my .xinitrc script, but the window manager starts without these commands running properly.
I run Arch Linux with the window manager is called "awesome", and I start it with startx. This is the entirety of my ~/.xinitrc file:
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
xinput set-int-prop "TPPS/2 IBM Trackpoint" "Evdev Wheel Emulation" 8 1
xinput set-int-prop "TPPS/2 IBM Trackpoint" "Evdev Wheel Emulation Button" 8 2
xinput set-int-prop "TPPS/2 IBM Trackpoint" "Evdev Wheel Emulation Timeout" 8 200
xinput set-int-prop "TPPS/2 IBM Trackpoint" "Evdev Wheel Emulation Axes" 8 6 7 4 5
rfkill block bluetooth
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec awesome
As you may have noticed, I'm trying to shut down my Bluetooth and activate trackpoint scrolling on my laptop. Each of those xinput and rfkill commands work when entered manually, but nothing happens when I run startx.
What on earth is the problem here? :(

rfkillneeds root privileges, if I'm not mistaken. Are you surerfkill block bluetoothworks on your system with user rights? – Marco Dec 10 '12 at 21:47exec awesomewithexec xterm) but I am presented with a completely blank terminal with no errors... – Joshua Dec 10 '12 at 23:40rfkilldoes indeed require root privileges, but I assumed that.xinitrcwas run as root. If I can'trfkillin.xinitrc, where should I run it? – Joshua Dec 10 '12 at 23:42.xinitrcis your session initialization file, it most assuredly is not executed as root. If you want something to be executed as root, it should be in the system startup, not in your session's startup. – Gilles Dec 10 '12 at 23:45