1

I have written a small python script in Ubuntu 13.10, that when run opens 4 terminals and displays some useful information, is it possible for me to get this to run automatically after I login, I have tried a couple of methods but they all involve it running at start up and this wont leave the terminals displayed.

1 Answer 1

4

Bootup:

$ crontab -e

Add:

@boot cd /home/user/; python script.py

Login:

Edit one of these files:

  • nano /etc/profile.d/myscript.sh
  • ~/.bash_login

And add:

cd /home/user; python script.py

Graphical login:

nano ~/.xinitrc

Add:

eval(cd /home/user; python script.py) &

Ubuntu-Gnome specific login:

nano ~/.gnomerc
Sign up to request clarification or add additional context in comments.

1 Comment

His Ubuntu probably uses gnome, so mentioning .gnomerc would complete your answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.