Welcome to the new Linux Foundation Forum!

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

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

Comments

  • mfillpotmfillpot Posts: 2,180
    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.
  • Thanks ! Instead I wrote out my script and gave it a quick shortcut . ^^
  • benben Posts: 135
    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 :-)
Sign In or Register to comment.