Run commands on startup
Hi, I'm wondering if someone can help me understand a problem I'm having? I run Arch with Cinnamon as my DE. I have a couple of commands I run at startup (feh, setxkbmap for my compose key) which I'd like to be able to run automatically. I've tried including them in my .xinitrc after the exec cinnamon-session command (because it doesn't make logical sense to set the background before cinnamon is running, and I have had problems trying it in the past lol) and that doesn't work, because as I understand it, exec cinnamon-session is continuously running. Following that, I've also tried following the instructions on the Arch wiki and here to create an Autostart file, which hasn't worked either. It seems like there's no way to do this in Cinnamon, then, and I'll have to keep running the commands myself - but I don't know any other Arch+Cinnamon users and I'd love for some help confirming my suspicions! Thank you!
About this post
- Posted
- Archived
- Score
- 2 · 75% up
- Kind
- Text
- ID
- hlxtew
6 comments
It doesn't make sense to put it after an exec because then it will never get run.
Feh doesn't set the background in a DE/WM, it sets the background of the X display, which is why it works even if you run it before the DE/WM.
That's what I figured, thanks!
I seem to remember that somewhere in the menu of Cinnamon there is Startup applications or similar through which you can launch an application or a custom command.
Okay this is wicked, definitely playing around with it, I think it's exactly what I want. Thanks so much!
autostart should work (haven't used it myself, but articles about cinnamon covers them). IIRC there is also a startup applications part in the cinnamon settings that might be useful to you.
If putting your commands before the exec line in the
.xinitrcjust doesn't work, there is also the super hacky option of spawning a subshell with a delay in the.xinitrc. I'm not recommending this avenue, but it's a silly optionHave u installed xorg-init? create a .xprofile in ~/ and put these in it. Could work.