bash, ~/.bashrc and PATH
houghi at houghi.org
houghi at houghi.org
Sat Mar 22 18:30:12 CET 2014
On Sat, Mar 22, 2014 at 03:19:23PM +0100, Ulrich Goebel wrote:
> Hi,
>
> I made a python-application, which starts shell-programs (os.system("xelatex
> ..."). In the ~/.bashrc I set the PATH to my (local) path for xelatex. As
> expected, all works fine as long as I start my application from a "normal"
> terminal.
>
> But if I try to start it from the panel, it fails. What I did is: I made a
> starter an give the full path to my application, checking the "run in
> terminal". So my application starts fine - but not the os.system("xelatex
> ...").
>
> To find the reason, I let my application just in its first line do
> os.system("env | grep PATH"). That shows that in the first case the PATH is
> set as given in ~/.bashrc but is not in the second case.
>
> What to do?
Do you use lightdm? Then you need to add/edit ~/.xsessionrc
This is the few first lines of mine:
houghi at penne : cat .xsessionrc
#!/bin/bash
#Launch a bunch of stuff in X
#Set the path
PATH="$HOME/bin:$PATH"
#Set the X pointers
xmodmap -e "pointer = 1 11 3 4 5 6 7 10 2 8 9 12 13 14 15 16 17 18 19 20
21 22 23 24"
xset -dpms
xset s off
setxkbmap -option compose:caps
<snip>
If you run something else, it might be a different file.
Make it executable and you can do anything in it as a scipt.
For those interested: xmodmap changes what each button on my mouse is.
That way I can use the buttons I like to change the volume, without
firefox (iceweasel) using them in their own way. I added the folowing
lines to ~/.xbindkeysrc
#A little bit louder now
"amixer set Master 5+"
b:10
#A little bit softer now
"amixer set Master 5-"
b:11
xset is so the screen is always on and there is no screen saver.
The setxkbmap line makes the CAPSLOCK key the compose key, giving it some
usefullnes:
http://www.hermit.org/Linux/ComposeKeys.html
«¹₂»¢©#çə€ and so on.
houghi
--
This is written under the inluence of the following:
> Artist : The Byrds
> Song : I Am A Pilgrim
> Album : Sweetheart of the Rodeo
More information about the Xfce
mailing list