Hi, all:
I have a script ("xset s off") which prevents a laptop from freezing when going into (or coming out of?) idle induced suspend mode. When I added it to the "Startup Applications" it ended up installed only in my primary user account. How can I install it so it works in all user accounts on this machine -- other than manually installing the same script over and over in each account like a mule? (a mule with hands;-)
Thanks.
How to add a script in Startup Applications to all accounts?
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
How to add a script in Startup Applications to all accounts?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
- Spearmint2
- Level 16
- Posts: 6900
- Joined: Sat May 04, 2013 1:41 pm
- Location: Maryland, USA
Re: How to add a script in Startup Applications to all accou
I can guess. Put it in a root owned folder like bin, lib, or sbin and add it to the startup programs list.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
Re: How to add a script in Startup Applications to all accou
I think, noob that I am, I need a little elaboration. *sheepish grin*
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
- Spearmint2
- Level 16
- Posts: 6900
- Joined: Sat May 04, 2013 1:41 pm
- Location: Maryland, USA
Re: How to add a script in Startup Applications to all accou
If you have an executable file or script you want all to have access to, don't have it under /home folder.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
Re: How to add a script in Startup Applications to all accou
Put it in the /etc/xdg/autostart folder. This is the system-wide equivalent to every user autostart folder (~/.config/autostart). The user autostart folder is the one populated with .desktop files when you add/edit something with "Preferences/Startup applications".
- Spearmint2
- Level 16
- Posts: 6900
- Joined: Sat May 04, 2013 1:41 pm
- Location: Maryland, USA
Re: How to add a script in Startup Applications to all accou
somewhere near paris
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
Re: How to add a script in Startup Applications to all accou
Thanks, eanfrid! Following your lead, I browsed to /home/dirkoir/.config/autostart where I found a single file named: xset.desktop
Looking inside the file, it contained:
That would seem to be the script. Neat! Now, if I copy it to /etc/xdg/autostart, I will also need to change it's owner and group privileges from dirkoir to root, right?
(Afterwards, I suppose I can and should delete my own personal dirkoir-only autostart script which would now be redundant. Too bad the GUI tool only works on a per-user basis. If it weren't restricted that way, the GUI tool would make global adjustments easier to find and manage.)
Looking inside the file, it contained:
Code: Select all
[Desktop Entry]
Type=Application
Exec=xset s off
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Prevent Screen Blanking
Name=Prevent Screen Blanking
Comment[en_US]=Hopefully I can leave laptop unattended now.
Comment=Hopefully I can leave laptop unattended now.
X-GNOME-Autostart-Delay=0
(Afterwards, I suppose I can and should delete my own personal dirkoir-only autostart script which would now be redundant. Too bad the GUI tool only works on a per-user basis. If it weren't restricted that way, the GUI tool would make global adjustments easier to find and manage.)
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Re: How to add a script in Startup Applications to all accou
Nope. The reason it's "nope" is because you can't copy it to /etc/xdg/autostart as dirkoir.Now, if I copy it to /etc/xdg/autostart, I will also need to change it's owner and group privileges from dirkoir to root, right?
You need to do this as sudo:
Code: Select all
sudo cp /home/dirkoir/.config/autostart/xset.desktop /etc/xdg/autostart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: How to add a script in Startup Applications to all accou
Haha, the thought had recently occurred to me, too. (guess, I must be learning)
I guess, I could do it via the GUI, too: gksu nemo
I guess, I could do it via the GUI, too: gksu nemo
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon