Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • Thanks for the answer and tips... I tried this, and it seems one of my startup commands is working with this method, but with a small exception. I'm using: bash -c "sleep 20; specific_command". However, two other startup commands are reverting back to their "default" that were set upon installation. And, still, the setxkbmap command still is not working if the others use the sleep command (or are executed in the shell, as you've suggested). Commented Feb 24, 2017 at 19:12
  • Hmm, maybe there's some missing settings or the wrong pwd? I tried a .desktop file that echos some commands in bash to a file, and the env is basically the same as in a terminal, but without the TERM= and it runs in ~/.config/autostart while set has different SHELLOPTS & TERM=dumb and a lot of functions aren't there. Could try redirecting stdout & stderr to files if there's any messages that might be helpful, or running the bash -c "stuff" in a terminal has very similar settings & easier to see the output.
    – Xen2050
    Commented Feb 25, 2017 at 21:10
  • 1
    PS that "setxkbmap caps:none" takes some clearing & re-setting footwork to fix capslock again, I don't use setxkbmap regularly so I'm not sure why it wouldn't work. Also did you mean the two other startup commands aren't keeping the new settings / new Exec= line? I thought you mean they were running with default settings, but if the .desktop file's not saving properly try editing it while logged into a different account, even a live iso, etc, some of my settings don't "stay changed" if I'm logged in, especially desktop settings
    – Xen2050
    Commented Feb 25, 2017 at 23:36
  • Thanks @Xen2050 for the extra information. What do you use to disable Caps Lock? I think you are right in general, as after a couple reboots, when I thought things were working, I see my darn Caps Lock key lit... Currently, the only reproducible way I've accomplished something workable is to sleep the setxkbmap caps:none until after the other commands. But this is bad, as the Caps Lock key is functional when I'm logging in (seems to be disabled seconds after logging in, eg, login shell), which is part of the reason why I want it disabled in the first place. Commented Feb 26, 2017 at 17:27
  • My caps lock starts "off" and I don't do anything special to disable it, actually had to read the man page & fiddle around a while to get my caps lock button working again after I pasted the "caps:none" command without really knowing what it would do (it looked safe enough ;-) You might want to run the command earlier, before logging in, this Q's has a few ways to run things at startup askubuntu.com/questions/228304/…
    – Xen2050
    Commented Feb 27, 2017 at 15:17