You are not logged in.
Hello
I've exported my ~/bin directory to $PATH's, but commands I execute in Xmonad's shell prompt is not working. For example, I have "winxp.sh" in ~/bin/winxp.sh, but typing "winxp.sh" in the prompt window results in /bin/sh: winxp: command not found.
Is it possible to run these scripts, using the Xmonad shell prompt? They work fine in my terminal obviously.
Thanks
Last edited by valvet (2010-11-04 10:19:45)
Offline
Where did you do the export? The PATH needs to be exported in a process from which x/xmonad gets started, e.g. your login shell. Try adding it to ~./profile or ~/.bash_profile (whichever you're using). Then relogin and and the PATH should be set for xmonad, too.
Offline
Where did you do the export? The PATH needs to be exported in a process from which x/xmonad gets started, e.g. your login shell. Try adding it to ~./profile or ~/.bash_profile (whichever you're using). Then relogin and and the PATH should be set for xmonad, too.
Hi hbekel
I export it in .bashrc, likea so
export PATH=$PATH:/home/michael/bin
Relogging does not change anything, xmonad wise.. I can run any script in ~/bin from my terminal fine, but not in the Xmonad prompt.
Offline
how are you starting x?
Currently from inittab, as it did not make a difference starting it either manual, or when logging in:
x:5:once:/bin/su michael -l -c '/usr/bin/startx -- -nolisten tcp -br -deferglyphs 16 >/dev/null 2>&1'
Before I did it from .bashrc (when logging into tty1).
.xinitrc
# start terminal emulation daemon
urxvtd -q -o -f &
# http://wiki.archlinux.org/index.php/Per_Application_Transparency
#xcompmgr &
#devilspie -a &
# set keyboard language, and enable restart X
setxkbmap dk -option terminate:ctrl_alt_bksp &
# set the cursor
xsetroot -cursor_name left_ptr
# disable anoying pc speaker.. it beeps after resume (s2ram -f)
xset -b
# set wallpaper
#sh /home/michael/.fehbg &
nitrogen --restore &
# hide mouse when not needed
unclutter -idle 5 &
# start dzen2 scripts
./dev/dzen2/scripts/rtop.sh &
./dev/dzen2/scripts/rbottom.sh &
./dev/dzen2/scripts/lbottom.sh &
# terminal
sleep 1
{
urxvtc &
# urxvtc -e "newsbeuter" &
}
# start xmonad
exec ck-launch-session dbus-launch --exit-with-session xmonad
Offline
Create a text configuration file in your home directory called ".profile":
$ touch .profile
Open .profile in your favorite text editor and edit it by adding the following:
export PATH=$PATH:/home/michael/bin
Save the changes to .profile then open your .bashrc file and add the following line at the end:
source /home/michael/.profile
Save the changes then log out and log back in. Your ~/bin file should now be in PATH.
Offline
The problem is not that my bin folder is not being sourced.. as I wrote, I can run things fine from my terminal - but not from Xmonad's shell prompt.
Offline
Ok the great users of #xmonad fixed it.. all you had to do, is export the path BEFORE launching xmonad.. eg., not from the bashrc, but from .xinitrc or whatever.
Offline
Told you so in my first post... using .xinitrc works, but it's not really the proper place for this. Note that .bashrc is not equivalent to .profile, which is the main cause for your problem. See man bash, section INVOCATION for details.
Offline
Told you so in my first post... using .xinitrc works, but it's not really the proper place for this. Note that .bashrc is not equivalent to .profile, which is the main cause for your problem. See man bash, section INVOCATION for details.
Yeah I just read it again, I thought that the .profile etc. were equivalent to .bashrc - that's why I diden't try it out. Thanks :-)
Offline
Just for anyone else coming by this thread:
brisbin33 wrote:how are you starting x?
Currently from inittab, as it did not make a difference starting it either manual, or when logging in:
x:5:once:/bin/su michael -l -c '/usr/bin/startx -- -nolisten tcp -br -deferglyphs 16 >/dev/null 2>&1'
#xmonad is correct that you must export PATH before starting xmonad (logically).
on my main box, i startx at the end of my .bashrc; PATH is exported ahead of it so everything works. on my htpc however, i use the inittab method but slightly different:
x:5:respawn:/bin/su xbmc -l -c "/bin/bash --login -c startx >/dev/null 2>&1"
using `bash --login` means .bashrc would be sourced and set PATH correctly too. i agree with hbekel that .xinitrc is not the place to export a custom PATH.
//github/
Offline