You are not logged in.

#26 2009-10-16 02:23:09

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: running programs from ~/bin [Solved]

Nooooooooooo!

Oh well /usr/bin/ it is then.

Offline

#27 2009-10-16 06:21:10

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: running programs from ~/bin [Solved]

bernarcher wrote:

Ok, I googled a bit for

xfrun4 "failed to execute child process"

It appears this is an old problem with xfrun4 which does not properly use the PATH settings. See for instance this bug report.

Sorry, I have no idea how to proceed, then. sad

Try gmrun instead. It's a better run dialog.

Offline

#28 2009-10-16 10:29:15

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497
Website

Re: running programs from ~/bin [Solved]

have you placed the '#! /bin/bash' in the first line of your script ??


If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.

Offline

#29 2009-10-16 11:31:00

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: running programs from ~/bin [Solved]

Xyne wrote:

That doesn't work because of the single quotes (bash doesn't interpolate variables inside single quotes). Use double quotes:

fwiw, you meant 'expand', not 'interpolate'


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#30 2009-10-16 11:31:44

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: running programs from ~/bin [Solved]

Dieter@be: Nope. They are both correct.

Last edited by Peasantoid (2009-10-16 11:32:24)

Offline

#31 2009-10-16 11:41:43

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: running programs from ~/bin [Solved]

Peasantoid wrote:

Dieter@be: Nope. They are both correct.

oh thanks. didn't know that cool


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#32 2009-10-16 13:58:05

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: running programs from ~/bin [Solved]

*wiping the slate clean*
- never mind - I was just being sarcastic ....

Last edited by perbh (2009-10-16 14:00:11)

Offline

#33 2009-10-16 14:15:53

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: running programs from ~/bin [Solved]

iphitus wrote:
bernarcher wrote:

Ok, I googled a bit for

xfrun4 "failed to execute child process"

It appears this is an old problem with xfrun4 which does not properly use the PATH settings. See for instance this bug report.

Sorry, I have no idea how to proceed, then. sad

Try gmrun instead. It's a better run dialog.

Doesn't work either. It gives me "ERROR: No such file or directory"

quarkup wrote:

have you placed the '#! /bin/bash' in the first line of your script ??

Yes of course.

Offline

#34 2009-10-16 15:49:06

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: running programs from ~/bin [Solved]

That's weird, gmrun works quite fine on my system with non-standard paths.

Edit:

From the terminal enter gmrun. From the gmrun screen that appears enter bash -c 'echo $PATH' and tell us what appears in the terminal. Single quotes in this case is fine. smile

Last edited by fsckd (2009-10-16 15:56:38)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#35 2009-10-16 15:53:13

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: running programs from ~/bin [Solved]

Now, just for interest: Give bashrun a try. It is largely configurable, btw (see man bashrun).
And it really should know of the proper path. On the other hand, gmrun should do so as well.

What comes to mind as well: You did reboot lately, didn't you?

Last edited by bernarcher (2009-10-16 15:53:41)


To know or not to know ...
... the questions remain forever.

Offline

#36 2009-10-16 16:46:54

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: running programs from ~/bin [Solved]

Did someone mention bashrun? wink

Note that bashrun doesn't source .bashrc. But it will know of any exported environment variable it inherits from the environment it was called from. This means that if you just export the above path in your bashrc, then bashrun will know about it only when you start it from another non-login bash session, which will have sourced your .bashrc already. If you launch bashrun using your windowmanager (e.g. via a keybinding or menu), then make sure that your windowmanager's environment also contains said PATH.

For example, If you log in on the linux console and then use startx, keep in mind that upon login, the profile files will be sourced, and not your bashrc. You may simply want to source ~/.bashrc from ~/.profile to make sure the PATH is always in your environment. Or set the PATH in ~/.profile, were it belongs if it's meant to be part of the environment for all programs.

For bashrun, either make sure the PATH is exported from the environment you launch it from, or add a PATH to ./config/bashrun/rc, or simply source your bashrc from that file... I'd suggest to use ~/.profile in case you wish your PATH to be seen by every program you launch after logging in (at least for a text login, i don't know whether graphical login managers source ~/.profile or what methods they provide to set up the environment)

This should apply to other launchers as well, since I see no reason for them to source your .bashrc. It's bash's own rcfile after all, and a C program will have trouble "sourcing" any shell code at all. They take the PATH from the environment, like any other program, so you have to make sure it's there.

Last edited by hbekel (2009-10-16 16:58:11)

Offline

#37 2009-10-16 21:03:45

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: running programs from ~/bin [Solved]

fsckd wrote:

From the terminal enter gmrun. From the gmrun screen that appears enter bash -c 'echo $PATH' and tell us what appears in the terminal. Single quotes in this case is fine. smile

[kevin]~$ gmrun
/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/kevin/bin

bernarcher wrote:

Now, just for interest: Give bashrun a try. It is largely configurable, btw (see man bashrun).

Edit: nvm

bernarcher wrote:

What comes to mind as well: You did reboot lately, didn't you?

Yes. Is that bad or good?

Last edited by anonymous_user (2009-10-16 21:05:10)

Offline

#38 2009-10-16 21:14:17

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: running programs from ~/bin [Solved]

hbekel wrote:

For example, If you log in on the linux console and then use startx, keep in mind that upon login, the profile files will be sourced, and not your bashrc. You may simply want to source ~/.bashrc from ~/.profile to make sure the PATH is always in your environment. Or set the PATH in ~/.profile, were it belongs if it's meant to be part of the environment for all programs.

For bashrun, either make sure the PATH is exported from the environment you launch it from, or add a PATH to ./config/bashrun/rc, or simply source your bashrc from that file... I'd suggest to use ~/.profile in case you wish your PATH to be seen by every program you launch after logging in (at least for a text login, i don't know whether graphical login managers source ~/.profile or what methods they provide to set up the environment)

Thank you thank you a million times thank you!

My problem is solved! You guys rock!

Offline

#39 2009-10-16 22:06:10

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: running programs from ~/bin [Solved]

anonymous_user wrote:

My problem is solved! You guys rock!

Just curious, how did you solve it? Does it also work in xfrun4 now?

Personally, instead of using a ~/.profile for every user, I simply put this in my /etc/profile:

if [[ UID -ne 0 ]]; then
    PATH="$PATH:$HOME/bin"
    export PATH
fi

So that $HOME/bin gets added for all users except root by default. This should be placed at the end of the file (after all scripts in /etc/profile.d have been proccessed) to make sure $HOME/bin is at the end of the PATH when /etc/profile is done.

Offline

#40 2009-10-16 22:12:23

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: running programs from ~/bin [Solved]

I created the ~/.profile file and put in export PATH="$PATH:$HOME/bin"

And yes it works with xfrun4 now.

Offline

Board footer

Powered by FluxBB