LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   KDE KMenu $PATH (http://www.linuxquestions.org/questions/linux-desktop-74/kde-kmenu-%24path-564080/)

theriddle 06-23-2007 11:22 PM

KDE KMenu $PATH
 
How do I set the $PATH as used in the KMenu? I tried setting it in all the usual places (/etc/profile ~/.bash_profile /etc/X11/Xsession /etc/kde/kdm/kdmrc).

Where is it? :confused: :confused:



PS: The only reason I need to set it was because I'm setting up Kgtk (http://www.kde-apps.org/content/show.php?content=36077).

Neverendingo 06-24-2007 05:29 AM

have you tried ~/.bashrc?
it depends on your system, on my system it is the above mentioned one. if it is not there, you can attack the current systems $PATH, no matter, where it is set.
"export PATH=/<whateveryouwant>:$PATH"
should do the trick.

theriddle 06-24-2007 12:10 PM

Nope, it doesn.t work.
:cry: :cry: :cry:

Neverendingo 06-24-2007 12:31 PM

what does "echo $PATH" tell you?

theriddle 06-24-2007 12:55 PM

[CODE]
/usr/local/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin:/usr/games:/home/michael/bin
[\/CODE]
...but I know KDE isn't using this, because the programs in /usr/local aren't being used in favor of /usr.
:(

pixellany 06-24-2007 01:45 PM

Quote:

Originally Posted by theriddle
[CODE]
/usr/local/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin:/usr/games:/home/michael/bin
[\/CODE]
...but I know KDE isn't using this, because the programs in /usr/local aren't being used in favor of /usr.
:(

Are you saying that bash will use something in /usr rather that something in /usr/local??? My system does not have anything in /usr--only directories.

By definition, the system uses the path specified in $PATH. Note that $PATH can be different for different users. To check root's path, do "su -" to put you in root's environment, then echo $PATH.

theriddle 06-24-2007 09:04 PM

Quote:

Are you saying that bash will use something in /usr rather that something in /usr/local??? My system does not have anything in /usr--only directories.
No. I meant /usr/bin and /usr/local/bin

Quote:

By definition, the system uses the path specified in $PATH. Note that $PATH can be different for different users. To check root's path, do "su -" to put you in root's environment, then echo $PATH.
su passes the regular users environment to root's shell.

Code:

/usr/local/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin:/usr/games:/home/michael/bin
When I log in as root [Ctrl-Alt-1] I get this.

Code:

/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/root/bin
:study: :study:

Neverendingo 06-25-2007 01:02 AM

no, you forgot the "su -", that's important, so that nothing is passed from the regular user. but just as info.
back to your question. what happens, if you link e.g. gimp to /usr/local/bin, as it is described on kde-apps.org, and you do "which gimp"?

theriddle 06-25-2007 10:19 AM

su - gives me
Code:

/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
as the $PATH.
which gimp returns /usr/local/bin/gimp as root and as me.

Running gimp from the 'run' dialog uses the right one, but it doesn't from the menu.
:confused: :confused: :confused:

bigrigdriver 06-25-2007 11:17 AM

Sounds like you need to edit the Kde menu to edit the path to the executable. The application is kmenuedit. It's GUI and you need root authority to edit the menu.

The sequence goes like this.

1) as normal user, from the command line, issue the command 'xhost +localhost'.

2) 'su -' to su to root with the root environment.

3) kmenuedit. That starts the menu editor. On the left side of the dialogue box is the menu tree. On the right are the properties you can edit.

Navigate through the menu until you find the Gimp. Click on it to select it. On the left, edit the 'Command' field. If it only shows the executable name 'gimp', then add the path to the executable you want to run to the left end (i.e. change gimp to /usr/local/bin/gimp, or wherever the executable is located).

4) save and exit kmenuedit.

5) exit su.

6) xhost -localhost.

Neverendingo 06-25-2007 03:30 PM

Don't know if this is handled different under Gentoo, but it is not necessary to edit the Kmenu as root.
Simply click with the right-button on the menu, click on kmenuedit or something like that( don't know the english translation for that) and edit the entry for the program, like my previous spreaker did.

Greetings,
Ingo

Neverendingo 06-25-2007 03:37 PM

Sorry, but i don't think, that you need to edit it as root, that's not necessary and not the best to do. Simply edit it as your normal user. I don't think that this is handled different on Fedora than on other systems.

Greetings,
Ingo

EDIT: Please delete this post, as i didn't know my previous post would be visible...

theriddle 06-25-2007 11:07 PM

I would've done that before if it wasn't so slow (fedora's system-config-*), but I guess I'll have to do that. :(

Birdman48 08-31-2012 08:19 AM

ok, so how do I find the working path to my application (GIMP)?
 
I see HOW to edit KDE Menu Editor - now what's the path to my application.? I want to be able to launch GIMP from an icon on the desktop folder.


All times are GMT -5. The time now is 05:22 AM.