Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-30-2005, 01:15 PM   #1
Registered: Mar 2004
Location: Kansas
Distribution: Debian!
Posts: 39

Rep: Reputation: 15
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
Old 01-30-2005, 03:10 PM   #2
Registered: Aug 2003
Location: Charlotte, North Carolina
Distribution: Red Hat (and look-alike), SUSE (when drunk), Slackware (when mad)
Posts: 148

Rep: Reputation: 16
Have you rpm'ed the latest java enviroment from
Old 01-31-2005, 10:24 PM   #3
Registered: Mar 2004
Location: Kansas
Distribution: Debian!
Posts: 39

Original Poster
Rep: Reputation: 15
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,


Last edited by giosue_c; 01-31-2005 at 11:15 PM.
Old 02-18-2005, 10:47 AM   #4
LQ Newbie
Registered: Feb 2005
Distribution: LFS-5.1.1
Posts: 1

Rep: Reputation: 0
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
Old 02-25-2005, 02:48 PM   #5
Registered: Mar 2004
Location: Kansas
Distribution: Debian!
Posts: 39

Original Poster
Rep: Reputation: 15
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment variables setting... simjii SUSE / openSUSE 4 11-19-2005 07:50 PM
Need help setting environment variables. cottonmouth Linux - Newbie 3 12-09-2004 04:54 PM
Setting Environment Variables farzan Linux - Newbie 2 08-07-2004 09:13 AM
setting environment variables durden2.0 Linux - Newbie 5 07-15-2003 01:57 PM
setting environment variables rezza Linux - Distributions 2 04-09-2003 08:21 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration