-   Linux - Software (
-   -   Setting Environment Variables for KDE launchers (

giosue_c 01-30-2005 02:15 PM

Setting Environment Variables for KDE launchers

I have just wasted a couple hours searching for a solution to the following problem. I have created an application lancher for Eclipse. It doesn't launch because there is no java environment variable set. Where can you setup the environment for applications launched through KDE?

thanks in advance

dtournas 01-30-2005 04:10 PM

Have you rpm'ed the latest java enviroment from

giosue_c 01-31-2005 11:24 PM

Well, i'm running debian, but no I haven't done the debian equivalent to rpm's. I like to stick to official packages whenever I can and there are no official java .deb packages. Licensing issues. In java's case I just use the sun binaries. I'm still stuck though. I need a KDE guru to come through for me! Just to give this thread some substance I'll mention something I have tried. I read somewhere that by editing the startkde script /usr/bin/startkde and changing the first line to be #!/bin/sh --login or something like that, all my problems would be solved. Well, first off, that seems like a hack. Secondly it didn't work anyway. So what gives. There has to be a way for one to set the Environment variables for programs launched by a window manager, and if not there has to be a good explanation for why..

thanks though dtournas,


geekboy642 02-18-2005 11:47 AM

In your user directory, there should be a file called .xprofile with permissions 0700.
In that file, there should be a line that reads

exec startkde
If there isn't, stop.
Otherwise add a line before that one, like this one:

export JAVADIR=/my/java/directory/here
Restart X(Ctrl-Alt-BkSp for preference), and try your Java app again.

What's also good--and will work even if you have no .xprofile file--is to make a shell script for any Java app you want to run, like this:


export JAVADIR=/my/java/directory/here
java -jar my_java_program.jar

Just make sure you chmod u+x your shell script, and leave it in a directory in your path. ;)

-- da Geek

giosue_c 02-25-2005 03:48 PM

i don't have that file you mentioned.

a shell script would be a easy fix for this, but I know this can be done. The frustrating thing is that i fixed this once on my machine at work, but I can't remember what file i changed. I think it was somewhere under /etc...

thanks anyway.

All times are GMT -5. The time now is 01:13 AM.