I wanted to make a script which ran automatically on login so I put it into the file ~/bash.profile
, but it didn't run. When I put it in bashrc, it ran on opening a terminal.
What I was doing in the script was accessing a file in the pictures folder.
I just added ./script.sh
in ~/.bash_profile
. How to make it run on login?
I'm using Unity on Ubuntu 11.10.
~/.bash_profile
AFAIK. – user13742 Feb 24 '12 at 18:58chmod +x script.sh
in case you haven't. – user13742 Feb 24 '12 at 19:04~/.bash_profile
always runs when you log in in text mode (if your login shell is bash), but depending on the distribution and desktop environment, it may or may not run when you log into the GUI. How do you log in (e.g. gdm, kdm, text console, …), what desktop environment or session mananger do you use (e.g. Gnome, KDE,.xsession
, …), and under what distribution (e.g. Ubuntu 11.10, Fedora Core 15, OpenBSD 5.0, …)? – Gilles 'SO- stop being evil' Feb 24 '12 at 19:14