Ubuntu – “Startup Applications” not working

command linestartup-applications

I have a simple one line command which works perfectly in terminal, but does not work in the "Startup Applications" app thing.

The line of code is : xmodmap /home/seph/Code/Ubuntu\ Scripts/Xmodmap

It's not that much of a hassle to copy it from "Startup Applications" and paste it into terminal, but I don't really get why it isn't working. I followed someone else's instructions to do it in the first place, so maybe I did something wrong? In any case, wouldn't it be the obvious and logical assumption that it just types whatever you put in it into Terminal?

Best Answer

  • Commands, especially those related to keyboard, mouse, and touchpad settings, or xrandr commands, often need the desktop to be fully loaded. If you run them simply at login (using Startup Applications), they often run too soon and break.

    Therefore, you need to introduce a little time break before your actual command runs. Use the following command instead to add to Startup Applications:

    /bin/bash -c "sleep 15 && xmodmap /home/seph/Code/Ubuntu\ Scripts/Xmodmap"

    Open the dash → Startup Applications → Add, and add the command.

    That should do the trick.

  • Related Question