2
I am running the MATE desktop on Arch Linux, and I have a bash script that I run which:
- Configures MATE to work with multiple monitors
- Connects the PC to the internet
- Changes my mouse speed
I have to manually execute this script every time I login graphically. How can I do this automatically? I have tried the following:
- Putting the script in a
~/.profile
file. Nothing happened. - Putting the script in a
~/.initrc
file. Nothing happened. - Putting the script in a
~/.xsession
file. Nothing happened. - systemd won't work because, as far as I can tell, it tries to execute the script functions too early. It must be executed only once the user has logged in, not during startup.
Edit: The script require root privledges aswell!
I don't run mate - but something similar to KDE's autostart module might be handy. http://superuser.com/a/809799/10165 is an example of me doing a xrandr script with autostart. Mate might call it startup applications. I don't have a mate desktop to test it on and to post a full answer, so if anyone does, and wants to post an answer with this I'm cool.
– Journeyman Geek – 2016-07-17T04:08:13.457@JourneymanGeek Funny enough my script also does the same
xrandr
commands that you laid out in your question. – Spenser Truex – 2016-07-17T17:18:41.810@JourneymanGeek After using the MATE autostart application I am sorry to report that I must manually put in the root password when I startup. – Spenser Truex – 2016-07-19T05:01:55.873
you can give sudo permissions for a single command too. That might be a better idea. And since it works, post it as an answer – Journeyman Geek – 2016-07-20T00:28:32.367