Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm gathering commands to build a post-installation script, and I want to have the script automagically add certain apps to the Startup Applications list as if I had added them manually, such as the GNOME Login sound, and Xscreensaver. Any ideas?

share|improve this question

You don't need to do anything with post-install scripts for this. You simply need to provide the correct .desktop file for your app, following the Freedesktop Autostart Spec. This will enable autostart of the app.

share|improve this answer
Well, is there any way to make the script generate a .desktop file for each app that I want to autostart? – StrangeCrunchy1 Apr 17 '13 at 0:39
Figured it out...I copied the code from an existing .desktop file and modified it for each app I wanted to add, using echo to create the .desktop files from within the script...I can't believe the answer was so simple. – StrangeCrunchy1 Apr 17 '13 at 7:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.