You are not logged in.

#1 2011-05-02 09:56:56

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

[Solved] Apps in /home/user/bin won't run

As per subject.
To run such command I have to give full path of /home/user/bin/app because simple app is not being recognized.

Last edited by Lockheed (2011-05-02 12:18:53)

Offline

#2 2011-05-02 10:20:23

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: [Solved] Apps in /home/user/bin won't run

/home/user/bin is in you PATH? (echo $PATH), if not put something like this in you env vars (e.g. in .bashrc)

export PATH="/home/user/bin:$PATH"

Offline

#3 2011-05-02 10:30:36

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: [Solved] Apps in /home/user/bin won't run

Unless you have a good reason to put your own binary directory at the front, you should put it at the back. That way if someone gains access to your user and puts some malicious binary named the same thing as something you "sudo" a lot, they will not gain root access. If it's at the back, then system binaries take precedence.

Offline

#4 2011-05-02 11:12:02

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: [Solved] Apps in /home/user/bin won't run

Well, obviously "user" in the path is just replacement of my username, lets say the real location of my bins is /home/smith009/bin

I am not really sure what either of us suggested to do. Can you rephrase?

Offline

#5 2011-05-02 11:52:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Apps in /home/user/bin won't run

Lockheed wrote:

Well, obviously "user" in the path is just replacement of my username, lets say the real location of my bins is /home/smith009/bin

I am not really sure what either of us suggested to do. Can you rephrase?

kazuo suggested you run

export PATH="/home/user/bin:$PATH"

and try again. Of course you need to change to the real path, e.g. /home/smith009/bin.

Lockheed suggested to change it to

export PATH="$PATH:/home/user/bin"

Offline

#6 2011-05-02 11:56:41

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: [Solved] Apps in /home/user/bin won't run

Works awesome. Thanks!

Offline

#7 2011-05-02 12:04:13

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Apps in /home/user/bin won't run

You need to put that line into .bashrc or whatever you keep your aliases etc. so it runs every time you start your system.

Don't forget to mark the thread as [SOLVED].

Offline

Board footer

Powered by FluxBB