Linux.com

Home Linux Community Forums Linux Distributions Ubuntu Is there a way to configure my computer to run a..

Is there a way to configure my computer to run a..

Link to this post 15 Feb 11

Is there a way to configure Linux Mint (I put it in this section coz it is nearly identical to Ubuntu) to run a command automatically as soon as I log in ?

It would make my life 97667876 times easier , instead of typing it out in the terminal every time I boot up my computer ..

Link to this post 15 Feb 11

If bash is your default shell you can add your script to the .bashrc file in your home directory. This will launch that files whenever a shell is opened as your user, which means that the script will also run whenever a new terminal is opened.

Or you you enter the startup options for the user account to tell it to run the script whenever you login through the gui.

Link to this post 15 Feb 11

Thanks ! Instead I wrote out my script and gave it a quick shortcut . ^^

Link to this post 15 Feb 11

Another way to start something after your login is to use .xinitrc file, if you use XWindow.
.xinitrc is executed only after a graphical login (XWindow), .bashrc is executed even if you login from SSH.
Is up to you to decide where you want to add something, if you don't care about a remote login you may use .bashrc

I differentiate it because I login to my work desktop even through ssh, something is run automatically when I login with a remote shell (shell customizations and so on), something is run when I login from the XWindow console (Firefox, Pidgin, Evolution for example)

Ben :-)

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board