Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

So I'd like to add always a folder to the Path. I'm not a huge linux wizard but I think I would need to always write the "export PATH=$PATH:(directory)" line when I log in. But I need this to be on when I'm starting up, and I don't want to bother with Terminal everytime. So looking into it a little, I found that i should add that to .bash_profile even though I'm not sure what it is or where it's located. In the home directory there's only a .bashrc file. Hope you can help me, thanks

share|improve this question

marked as duplicate by Radu Rădeanu, Eliah Kagan, Eric Carvalho, Warren Hill, Seth Aug 8 '13 at 17:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Make a script and add it to startup applications, it will fire up every time you start your computer –  Alen Aug 7 '13 at 7:32

2 Answers 2

up vote 0 down vote accepted

Add path to variable $PATH

As your comment says... you are running Lubuntu. Then to add a new Path to your $PATH you can try this:

1) Open a Terminal and type:

  • gksudo leafpad /etc/environment

(The /etc/environment file contains variables specifying the basic environment for all processes)

enter image description here

2) In my case I added the path :/home/user/bin after /usr/local/games

enter image description here

So the content of my PATH is:

  • PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/user/bin"

3) Then just logout and login to see the changes.

Add script to startup

1) Open a Terminal and type.

  • gksudo leafpad /etc/xdg/lxsession/Lubuntu/autostart

Then you can add a command.

My case is "test" script: @bash /home/virtual/Desktop/test

enter image description here

2) Then just logout and login to see the changes.

share|improve this answer

Have a look under System > Preferences > Startup Applications. Be sure you mention the path correctly, provide a name and description for the script.

That should do it.

share|improve this answer
    
I doesn't seem to find it. I'm using Lubuntu. I pressed the "start menu" and from there "Preferences" but from there, there's no trace of Startup Applications –  Richárd Fejes Aug 7 '13 at 8:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.