Best way to add a bash script to startup

I am running Manjaro GNOME and I was wondering what the best way start a script on startup is. I’ve spent around an half hour trying different methods and googling only to have nothing that I tried worked so I figured I would ask the experts.

A side note is that the way I used to add startup applications on Ubuntu with the “startup applications” app doesn’t seem possible since I get an error when I try to enable the gnome extension that is responsible for that.


create a .desktop file which executes your script and place it inside ~/.config/autostart/

How would I go about launching a bash script this way? It doesn’t seem that straightforward.

Have you had a look at the general structure of a .desktop file?
In /usr/share/applications are more than 100 examples …
The “Exec=…” is the full path to your script
If you have it in your $PATH then just the name will be enough.

… it needs to be made executable …

After much struggle I finally got it running! I documented my entire solution so that someone else can follow the steps so hopefully it helps someone!

My solution was putting a file in /home/.config/autostart named customstartup.desktop with the contents

[Desktop Entry]

I also used chmod +x ./ to “make it executable” as you said.

I just run everything inside of that startup script that that links to, it’s not perfect but it works. I still wish there was a GUI for Manjaro to do all this like in Ubuntu though xD

1 Like

I think that program would be gnome-session-properties from the AUR.
In Ubuntu it is called gnome-startup-applications.

… the little differences

Wow thank you! This is exactly what I was looking for but couldn’t find!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.