0

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

Richárd Fejes
  • 67
  • 2
  • 2
  • 6
  • Make a script and add it to startup applications, it will fire up every time you start your computer – Alen Aug 07 '13 at 07:32

2 Answers2

0

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.

Koushik
  • 11
  • 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 07 '13 at 08:01
0

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.

Roman Raguet
  • 9,533
  • 2
  • 41
  • 41