Tuesday, May 8, 2012

startup in precise

In Unity in Ubuntu 12.04 (Precise), if you go to the upper-right corner and click on the Session Menu icon, you'll see "Startup Applications..." in the drop-down menu:



By default, Startup Applications only shows the applications that you've added here. The other apps that are set to autostart don't appear in the list, which is kinda silly.



You can get most of the other autostart apps to show up in the list by running the following commands:

$ cd /etc/xdg/autostart/
$ sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop



To go back to the default, you'd run:

$ cd /etc/xdg/autostart/
$ sudo sed --in-place 's/NoDisplay=false/NoDisplay=true/g' *.desktop

Note that you definitely want to make sure you're in the /etc/xdg/autostart directory before running those sed commands.

Some of the apps in /etc/xdg/autostart will still not show up in Startup Applications in Unity. Looking in that directory, a comparison of, for example, bluetooth-applet-unity.desktop and bluetooth-applet.desktop shows why; the former has the line “OnlyShowIn=Unity;” and the latter has:

OnlyShowIn=GNOME;XFCE;

You can make an individual app show up in Startup Applications by going to /etc/xdg/autostart and editing the app's .desktop file to change "NoDisplay=true" to "NoDisplay=false." You can stop the app from autostarting by removing its .desktop file, but that might not be a good idea.

If you use Startup Applications to add an autostart app, there'll be a .desktop file placed in ~/.config/autostart.

No comments: