View previous topic :: View next topic |
Author |
Message |
FrostyX n00b

Joined: 13 Mar 2012 Posts: 59 Location: Czech Republic
|
Posted: Sat Sep 14, 2013 12:04 am Post subject: [SOLVED] gmrun ignores $PATH |
|
|
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
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 |
|
 |
Knute Guru


Joined: 28 Jun 2004 Posts: 362 Location: Fargo, ND
|
Posted: Sat Sep 14, 2013 6:55 am Post subject: |
|
|
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 |
|
 |
FrostyX n00b

Joined: 13 Mar 2012 Posts: 59 Location: Czech Republic
|
Posted: Sat Sep 14, 2013 1:29 pm Post subject: |
|
|
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 |
|
 |
Knute Guru


Joined: 28 Jun 2004 Posts: 362 Location: Fargo, ND
|
Posted: Sat Sep 14, 2013 3:23 pm Post subject: |
|
|
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 |
|
 |
FrostyX n00b

Joined: 13 Mar 2012 Posts: 59 Location: Czech Republic
|
Posted: Sat Sep 14, 2013 3:37 pm Post subject: |
|
|
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 |
|
 |
Knute Guru


Joined: 28 Jun 2004 Posts: 362 Location: Fargo, ND
|
Posted: Sat Sep 14, 2013 3:53 pm Post subject: |
|
|
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 |
|
 |
FrostyX n00b

Joined: 13 Mar 2012 Posts: 59 Location: Czech Republic
|
Posted: Sat Sep 14, 2013 10:39 pm Post subject: |
|
|
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 |
|
 |
Knute Guru


Joined: 28 Jun 2004 Posts: 362 Location: Fargo, ND
|
Posted: Sat Sep 14, 2013 11:04 pm Post subject: |
|
|
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 |
|
 |
|