You are not logged in.

#1 2016-07-13 15:26:48

Avinash_24
Member
Registered: 2016-07-04
Posts: 16

[SOLVED] How to start a custom script on gnome startup?

I have Arch linux with GNOME DE. I wanted to execute a script when GNOME starts up. I tried creating [name].desktop file in ~/.config/autostart/ like this,
[Desktop Entry]
Type=Application
Exec=/home/admin/myscript.sh
Hidden=false
X-GNOME-Autostart-enabled=true
Name=myscript
Comment=custom script

But it doesnt get executed. However if I mention any standard application like gedit in Exec, it works. But a custom script is not working. How to do this ?

Last edited by Avinash_24 (2016-07-14 12:37:45)

Offline

#2 2016-07-13 16:20:57

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: [SOLVED] How to start a custom script on gnome startup?

Ensure you know the contents of your script, and exactly what it does. Then, go ahead and make your script executable with chmod +x myscript.sh. For the record, if you're going to be doing any sort of shell scripting, knowledge of chmod (modifying permissions) is a must! smile


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#3 2016-07-14 12:37:29

Avinash_24
Member
Registered: 2016-07-04
Posts: 16

Re: [SOLVED] How to start a custom script on gnome startup?

JohnBobSmith wrote:

Ensure you know the contents of your script, and exactly what it does. Then, go ahead and make your script executable with chmod +x myscript.sh. For the record, if you're going to be doing any sort of shell scripting, knowledge of chmod (modifying permissions) is a must! smile

Thank You smile I understood now and the problem has been solved. smile

Offline

Board footer

Powered by FluxBB