Home > Uncategorized > autostart script when login into gnome

autostart script when login into gnome

I wrote simple script to create autostart.sh file in HOME directory and configure gnome to exec this file when user login into gnome.

Simple download this file and run :

chmod +x intallAutoStartGnome

./intallAutoStartGnome

now we can add autostart commands to the  autostart.sh in home directory.

in example add this command to run pidgin on login:

pidgin &

Don’t forget to add ‘&’ at end of the command line. (without quotes)

Advertisements
Categories: Uncategorized Tags: , ,
  1. wwwauthor
    November 27, 2010 at 5:09 pm

    cute script lol …

    just a thought, if you wish others to use it.
    Exec=/home/$LOGNAME/autostart.sh

    try this..
    ———–
    #!/bin/bash
    #InstallAutoStartGnome
    deskentry=”~/.config/autostart/autostarthome.desktop”
    deskscript=”~/autostart.sh”

    exec 6>&1
    exec > $deskentry

    printf “[Desktop Entry]\n”
    printf “Name=autostart home\n”
    printf “Comment=exec autostart.sh in home directory\n”
    printf “Exec=/home/$LOGNAME/autostart.sh\n”
    printf “Icon=/usr/share/pixmaps/gnome-term.png\n”
    printf “Type=Application\n”
    printf “Categories=Utility;\n”
    printf “StartupNotify=true\n”
    printf “X-GNOME-Autostart-enabled=true\n”

    exec 1>&6 6>&-
    chmod 700 $deskscript

    exec 7>&1
    exec > $deskscript

    printf “#! /bin/bash\n”
    printf “# add ‘&’ at end of the command line. (without quotes) to send process into background\n”
    printf “# example uncomment the command below to run pidgin on login:\n”
    printf “# pidgin &\n”
    printf “\n”

    exec 1>&6 6>&-
    chmod 700 $deskentry

    printf “Installation Finished.”

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: