Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to write bash shell script in Ubuntu 11.10 Linux distro, that will get executed automatically on logging into the system. But I am not able to figure out that what to write in script that by it will get automatically executed on logging in.

share|improve this question
add comment

2 Answers

If you want it to be global, modify

 /etc/profile 

or add a script to

 /etc/profile.d

If you want it to be user-specific, modify

 /home/$USER/.profile
share|improve this answer
add comment

Just add the bash script to the Startup applications.

In the command field, enter

bash /full/path/to/bash/script.sh/
share|improve this answer
    
How do you add "bash /.../script.sh" to the Startup applications from the command line? –  aleb Feb 1 '13 at 20:02
    
@aleb Who said anything about adding to Startup app from command line? I am just describing the way to do it using the GUI. If you want to try using command line, add a .desktop file in /home/$USER/.config/autostart. –  jokerdino Feb 2 '13 at 10:00
add comment

Your Answer

 
discard

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.