LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

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

Rep: Reputation: 15
Setting Environment Variables for KDE launchers


Hi,

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
dtournas
Member
 
Registered: Aug 2003
Location: Charlotte, North Carolina
Distribution: Red Hat (and look-alike), SUSE (when drunk), Slackware (when mad)
Posts: 148

Rep: Reputation: 15
Have you rpm'ed the latest java enviroment from http://www.java.com?
 
Old 01-31-2005, 10:24 PM   #3
giosue_c
Member
 
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,

josh

Last edited by giosue_c; 01-31-2005 at 11:15 PM.
 
Old 02-18-2005, 10:47 AM   #4
geekboy642
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
Code:
exec startkde
If there isn't, stop.
Otherwise add a line before that one, like this one:
Code:
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:
Code:
#!/bin/sh

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
giosue_c
Member
 
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.
 
  


Reply


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/Novell 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


All times are GMT -5. The time now is 10:35 AM.

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