Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] gmrun ignores $PATH
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
FrostyX
n00b
n00b


Joined: 13 Mar 2012
Posts: 56
Location: Czech Republic

PostPosted: Sat Sep 14, 2013 12:04 am    Post subject: [SOLVED] gmrun ignores $PATH Reply with quote

Hello everyone,
recently this problem appeared on my laptop. I have some scripts in my ~/.bin/ directory. This directory is on beginning of my $PATH so gmrun used to run them with no problem, but now it complains. Look at this:

Code:
$[FrostyX  ~]-> echo $PATH
/home/frostyx/.bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.7.3:/usr/games/bin


Code:
$[FrostyX  ~]-> pwd
/home/frostyx
$[FrostyX  ~]-> foo
That's my foo!


But in gmrun
Code:
foo

prints ERROR: No such file or directory

Trust me, that foo file exists
Code:
$[FrostyX  ~]-> ls -l ~/.bin/ |grep foo
-rwxr-xr-x 1 frostyx frostyx     34 Sep 14 01:52 foo


Can you please help me fix it?
Thank you, FrostyX


Last edited by FrostyX on Sun Sep 15, 2013 7:20 am; edited 2 times in total
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Sat Sep 14, 2013 6:55 am    Post subject: Reply with quote

1) When did this start happening?

2) What changed?
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
FrostyX
n00b
n00b


Joined: 13 Mar 2012
Posts: 56
Location: Czech Republic

PostPosted: Sat Sep 14, 2013 1:29 pm    Post subject: Reply with quote

I didnt know if it might be related with slim, but now I know it.

Few days ago I started using slim instead of startx. There is my configuration

Code:
$[FrostyX  ~]-> ls -l .xsession
lrwxrwxrwx 1 frostyx frostyx 24 Sep 10 01:27 .xsession -> /etc/X11/Sessions/xmonad


I know there shouldn't be ck-launch-session when using slim, but mounting disks, network and these stuff in thunar didnt work, so ..

Code:
$[FrostyX  ~]-> cat .xsession
#!/bin/sh
#/usr/bin/xmonad


#autostart=$HOME/.xmonad/autostart.sh
#exec sh -c ". $autostart; exec /usr/bin/xmonad"


wm="xmonad"
autostart=$HOME/.xmonad/autostart.sh
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session sh -c ". $autostart; exec $wm"


When I do /etc/init.d/xdm stop and startx then $PATH in gmrun works fine. When I do startx, my .xinitrc is used.

Code:
$[FrostyX  ~]-> cat .xinitrc
#!/bin/bash


#wm="awesome"
wm="xmonad"


if [ $wm == "xmonad" ]; then
   #~/.xmonad/autostart.sh &
   autostart=$HOME/.xmonad/autostart.sh
else
   autostart=/dev/null
fi

exec ck-launch-session dbus-launch --sh-syntax --exit-with-session sh -c ". $autostart; exec $wm"
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Sat Sep 14, 2013 3:23 pm    Post subject: Reply with quote

Where does your path get set for ~/.bin? It can be set from any of a number of places.

From what you are saying, it sounds like ~/.bin is being set from a place that starts from a console login, but not from an xdm login. Does that make sense?
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
FrostyX
n00b
n00b


Joined: 13 Mar 2012
Posts: 56
Location: Czech Republic

PostPosted: Sat Sep 14, 2013 3:37 pm    Post subject: Reply with quote

I think it makes sense. I set my $PATH in my .bashrc

Code:
$[FrostyX  ~]-> cat .bashrc |grep PATH
PATH=$HOME/.bin:$PATH
export PATH


When I use startx first I log into TTY (so .bashrc is "used"). When I use slim, init starts it cause I did
Code:
sudo rc-update add xdm default

so no .bashrc was used before slim started.

I thought it doesnt matter, cause result is the same - but probably it isnt.
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Sat Sep 14, 2013 3:53 pm    Post subject: Reply with quote

You could put your path export in your ~/.xinitrc file, and have it run when you login.

I was looking at the slim manual, and it has the login_cmd option which, by default runs the .xinitrc file.

http://slim.berlios.de/manual.php

HTH
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
FrostyX
n00b
n00b


Joined: 13 Mar 2012
Posts: 56
Location: Czech Republic

PostPosted: Sat Sep 14, 2013 10:39 pm    Post subject: Reply with quote

You had right, but I put the $PATH settings into .xsession instead of .xinitrc. Now it works exactly how I want.

Thank you very much, Knute.

I am marking this topic as [Solved].
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Sat Sep 14, 2013 11:04 pm    Post subject: Reply with quote

You are very welcome. I'm glad that I could help.
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum