You are not logged in.

#1 2008-10-30 05:29:30

ernesto
Member
Registered: 2008-10-30
Posts: 21

[solved]GNOME 2.24 $PATH rage

I have this in my .bashrc

PS1="\[\033[1;33m\][\[\033[0;31m\]\u@\h\[\033[1;33m\]]\[\033[1;34m\]\w:\[\033[0m\] " 
export PS1
PATH=$PATH:/usr/local/bin:/opt/kde/bin
export PATH

I also have my .bash_profile sourcing .bashrc

The problem I'm having is GNOME refuses to launch anything in /usr/local/bin & /opt/kde/bin unless you specify the full path (as in, /usr/local/bin/whatever), complaining "no such file or directory" despite the directories being in my PATH. The variable is fine; if I open gnome-terminal or just a plain old login shell I can launch everything from there.

Ideas?

Last edited by ernesto (2008-10-30 18:26:11)

Offline

#2 2008-10-30 10:19:09

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,545

Re: [solved]GNOME 2.24 $PATH rage

"GNOME" refuses to launch anything from there? You mean from menus? Or gksu? Something else?

Offline

#3 2008-10-30 10:31:45

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [solved]GNOME 2.24 $PATH rage

Are you using GDM ? Because I think that when I used GDM it also screwed around with the PATH, If I remember correctly.
Try using slim or starting gnome from the console. Maybe this is GDM related...


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#4 2008-10-30 11:12:04

ernesto
Member
Registered: 2008-10-30
Posts: 21

Re: [solved]GNOME 2.24 $PATH rage

Ranguvar wrote:

"GNOME" refuses to launch anything from there? You mean from menus? Or gksu? Something else?

From the menus, from the run application dialog, from deskbar, ... I can only launch apps located in those directories if I type in the full path, I don't have this problem when launching from the terminal. GNOME & Co. simply aren't honouring my PATH variable, I don't remember ever having this problem before.

Offline

#5 2008-10-30 11:22:33

ernesto
Member
Registered: 2008-10-30
Posts: 21

Re: [solved]GNOME 2.24 $PATH rage

moljac024 wrote:

Are you using GDM ? Because I think that when I used GDM it also screwed around with the PATH, If I remember correctly.
Try using slim or starting gnome from the console. Maybe this is GDM related...

Hmm. Looks like it is GDM, works fine when I just use startx from  the console. Did you ever diagnose what about it was causing the problem or did you just switch?

I need a display manager because I like to play with OpenGL and have developed a nasty habbit of freezing X, or just completely slow down the system, so I sometimes need to alt+sysrq+k or kill -9 -1 and if I  execute it from a console launched X session all I get is a black screen for some reason.

Last edited by ernesto (2008-10-30 11:23:22)

Offline

#6 2008-10-30 12:47:40

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: [solved]GNOME 2.24 $PATH rage

try putting your $PATH in /etc/profile


☃ Snowman ☃

Offline

#7 2008-10-30 13:08:06

jordz
Member
Registered: 2006-02-01
Posts: 248

Re: [solved]GNOME 2.24 $PATH rage

I was trying the same thing in gnome. I read something about a .gnomerc and sourcing .bashrc there, but that didn't work for me.
I tried to override the default totem options. I put a file called totem in my ~/.bin and added ~/.bin like this: $PATH=~/.bin:$PATH

#!/bin/bash
/usr/bin/totem-gstreamer --no-existing-session "$@"

But that didn't work for me.. For a terminal it works ofcourse. I just pointed the shortcut in the menu to my totem file.
Let us know if you find a solution! smile

I think you need to look in /etc/profile and/or /etc/profile.d/*, I don't know if kde puts a script there for your $PATH?

Last edited by jordz (2008-10-30 13:10:43)

Offline

#8 2008-10-30 13:33:48

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [solved]GNOME 2.24 $PATH rage

ernesto wrote:
moljac024 wrote:

Are you using GDM ? Because I think that when I used GDM it also screwed around with the PATH, If I remember correctly.
Try using slim or starting gnome from the console. Maybe this is GDM related...

Hmm. Looks like it is GDM, works fine when I just use startx from  the console. Did you ever diagnose what about it was causing the problem or did you just switch?

I need a display manager because I like to play with OpenGL and have developed a nasty habbit of freezing X, or just completely slow down the system, so I sometimes need to alt+sysrq+k or kill -9 -1 and if I  execute it from a console launched X session all I get is a black screen for some reason.

Never diagnosed it. Maybe try exporting your $PATH in ~/.profile, or ~/.bash_profile or /etc/profile.
If you manually export the PATH while in GNOME does it recognize it then ? If so, then maybe you could add a script for exporting PATH and have it auto-started with GNOME. But that's really ugly, still it's better than nothing until GDM gets its act together...


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#9 2008-10-30 14:05:06

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: [solved]GNOME 2.24 $PATH rage

ernesto wrote:

I have this in my .bashrc

PS1="\[\033[1;33m\][\[\033[0;31m\]\u@\h\[\033[1;33m\]]\[\033[1;34m\]\w:\[\033[0m\] " 
export PS1
PATH=$PATH:/usr/local/bin:/opt/kde/bin
export PATH

I also have my .bash_profile sourcing .bashrc

The problem I'm having is GNOME refuses to launch anything in /usr/local/bin & /opt/kde/bin unless you specify the full path (as in, /usr/local/bin/whatever), complaining "no such file or directory" despite the directories being in my PATH. The variable is fine; if I open gnome-terminal or just a plain old login shell I can launch everything from there.

Ideas?

Bashrc probably isn't read unless you open a terminal...  This is what you can do -- save the following:

export PATH=$PATH:/usr/local/bin:/opt/kde/bin

as /etc/profile.d/custompath.sh, make the file executable and logout/login.  Scripts in /etc/profile.d are sourced by /etc/profile file, so this is probably the cleanest way to add path to the profile in Arch.

Offline

#10 2008-10-30 18:25:40

ernesto
Member
Registered: 2008-10-30
Posts: 21

Re: [solved]GNOME 2.24 $PATH rage

Well,  a bit of a bulldog moment. Was just about try your suggestion but I noticed there was already a script in /etc/profile.d that supposed to be exporting the KDE directory, after a moment of confusion I ran ls -l and confirmed it didn't have x. I added /usr/local/bin to /etc/profile

Last edited by ernesto (2008-10-30 18:28:06)

Offline

#11 2008-10-30 18:40:02

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: [solved]GNOME 2.24 $PATH rage

ernesto wrote:

Well,  a bit of a bulldog moment. Was just about try your suggestion but I noticed there was already a script in /etc/profile.d that supposed to be exporting the KDE directory, after a moment of confusion I ran ls -l and confirmed it didn't have x. I added /usr/local/bin to /etc/profile

That will work as well -- the downside of your solution is that the file /etc/profile is included in the filesystem package, so each time this package is updated you'll have to deal with merging pacnew files in order to keep the file up to date while keeping your cusomization...  If you use my method this isn't an issue.

Offline

#12 2008-10-30 19:02:09

ernesto
Member
Registered: 2008-10-30
Posts: 21

Re: [solved]GNOME 2.24 $PATH rage

fwojciec wrote:
ernesto wrote:

Well,  a bit of a bulldog moment. Was just about try your suggestion but I noticed there was already a script in /etc/profile.d that supposed to be exporting the KDE directory, after a moment of confusion I ran ls -l and confirmed it didn't have x. I added /usr/local/bin to /etc/profile

That will work as well -- the downside of your solution is that the file /etc/profile is included in the filesystem package, so each time this package is updated you'll have to deal with merging pacnew files in order to keep the file up to date while keeping your cusomization...  If you use my method this isn't an issue.

You win smile Thanks.

Offline

Board footer

Powered by FluxBB