Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I want to auto-start all screenlets in unity environment only as it also auto-start in Gnome-shell too (as it is not working well in gnome-shell), i,e, i want to only edit one file not all screenlet items files startup aaplications
as i have a lot of sceenlets on my desktop My-Desktop
And i know how to auto-start an application from this site.

share|improve this question
What are you talking about.I know how to auto-start an application in a certain environment, but each screenlet item have an auto-start element so i want to control them all not every item alone.and i haven't tried any thing yet(because i don't know what to do, so i ask). – Black Block Nov 29 '11 at 22:43
☹ seem impossible ☹ – Black Block Dec 1 '11 at 20:50

1 Answer 1

up vote 4 down vote accepted

I don't think its possible to edit just one file - you'll need to edit all the screenlet files - it seems all screenlets in the autostart folder are named [something]Screenlet.desktop

You could use a simple script such as this which would append OnlyShowIn=Unity to all screenlet files in the users autostart folder

To use, copy and paste the following into a file in your home folder called hidescreenlets

Then run the script using:

bash ~/hidescreenlets

If you add more screenlets, just rerun the script.




if  [ ! -d  $dir ] ; then
  echo "cannot find $dir"

cd $dir

files=`find -name "*Screenlet.desktop"`
for file in $files ; do
  srch=`grep -i "OnlyShowIn=Unity" $file`
  #echo $file "$srch"
  if [ "$srch" == "" ] ; then
     echo "OnlyShowIn=Unity" >> $file
     #echo $file "$srch"

backing up

If you are feeling nervous... either use Nautilus to backup the ~/.config/autostart folder to another folder or you can achieve the same via the following:

mkdir ~/backupscreenlets
cp ~/.config/autostart/* ~/backupscreenlets

Look at the contents of ~/backupscreenlets - it will have the same files as ~/.config/autostart

If you then want your original files:

cp ~/backupscreenlets/* ~/.config/autostart
share|improve this answer
Did you try it and works for you ???(i am afraid to make a mistake and make a failure in something) – Black Block Dec 3 '11 at 20:14
yes I did - I've added a backup instruction if you are feeling nervous... and you are quite right not to run random stuff written on the internet :). Follow the backup instruction - and you will be able to return to day 1 state anytime you want to. – fossfreedom Dec 3 '11 at 20:56
Thanks i will try – Black Block Dec 3 '11 at 21:37

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.