I'm using Ubuntu Mate with XMonad. I can't seem to understand how to run something at startup after the login.
I want some programs like Firefox to run when I login to my desktop.
Now let's say I just want to run a simple script:
The file is set as executable.
I've tried many things. Startup Applications from Ubuntu Mate settings are obviously not working on xmonad.
The second thing I've tried was putting the command at the end of my .xsessionrc file, after xmonad is executed. My .xsessionrc file:
#!/bin/bash xrdb -merge .Xresources stalonetray & feh --bg-scale /usr/share/backgrounds/cosmos/sombrero.jpg & udiskie & xfce4-power-manager & xrandr --auto --output HDMI-1 --primary --left-of VGA-1 & # Firefox PulseAudio fix pulseaudio --start --exit-idle-time=-1 & compton -bCG --active-opacity 1.0 --shadow-ignore-shaped & if [ -x /usr/bin/nm-applet ] ; then nm-applet --sm-disable & fi exec xmonad exec /home/juser/.xmonad/autostart.sh #THIS IS NOT WORKING
The desktop starts successfully but my script is not executed.
Another thing that doesn't work is to use SpawnOnce inside xmonad.hs file. Something like that ( I've pasted my entire file here: https://pastebin.com/yUXjbgva ):
... import XMonad.Util.SpawnOnce myConfig = docks defaultConfig ... , startupHook = myStartupHook ... myStartupHook = do spawnOnce "/home/juser/.xmonad/autostart.sh" ...
My script is simply ignored same as in previous example. So I gave up on SpawnOnce directive.
Do I have any other options? What am I doing wrong?