Ubuntu: “Startup Applications” not working



Question:

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?


Solution:1

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 log in (using Startup Applications), they often run too soon and break.

Therefore, you need to build- in a little break before the command should run. Use the following command instead to add to Startup Applications:

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

Chooes Dash > Startup Applications > Add, and add the command.

That should do the trick.


Solution:2

Add this code snippet into a .conf file in ~/.config/upstart/:

start on startup  task  exec xmodmap /home/seph/Code/Ubuntu\ Scripts/Xmodmap  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »