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
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.”