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:

# ~/.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"
  unset f

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? :(

  • At least rfkill needs root privileges, if I'm not mistaken. Are you sure rfkill block bluetooth works on your system with user rights?
    – Marco
    Dec 10, 2012 at 21:47
  • Are these commands producing any errors? Could it be that they're working, but something later in your session startup overrides these settings? Try launching just an xterm instead of a window manager, while you're testing that. Dec 10, 2012 at 23:23
  • @Gilles I tried starting only xterm (I replaced exec awesome with exec xterm) but I am presented with a completely blank terminal with no errors...
    – Joshua
    Dec 10, 2012 at 23:40
  • @Marco rfkill does indeed require root privileges, but I assumed that .xinitrc was run as root. If I can't rfkill in .xinitrc, where should I run it?
    – Joshua
    Dec 10, 2012 at 23:42
  • @Joshua You should be able to type commands in this terminal. The .xinitrc is 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. Dec 10, 2012 at 23:45

2 Answers 2


Urgh...the underlying problem was really trivial.

rfkill requires root privileges, so it wouldn't run properly.

The reason my xinput commands didn't work was because of a typo in the device name. It should be "TrackPoint" not "Trackpoint". xinput just silently failed.

Damn it, that took way longer than I'm proud of.

  • How did you fix rfkill with root provileges? Dec 2, 2015 at 20:50
  • @KarlMorrison IIRC I ended up blacklisting the Bluetooth module in /etc/modprobe.conf or /etc/modprobe.d/bluetooth.conf instead of using rfkill.
    – Joshua
    Dec 18, 2015 at 23:40

Look at ~/.xsession-errors. The output of .xinitrc is redirected there, so any errors that are encountered should show up there and will help you debugging your script.

  • There is no such file for me. I tried to find it as well...
    – Joshua
    Dec 10, 2012 at 23:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .