LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-31-2004, 02:34 PM   #1
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 379

Rep: Reputation: 37
Setting up shortcut to app on desktop


I've recently installed db2 on slackware and want to run the various apps by clicking an icon on the kde desktop - a simple task I know.

I can run the shell script db2cc from konsole which in turn runs the following -

db2javit -j:CC -i: -l: -o:"-Xmx128m -Xms32m" -a:"$*"

When I run the shell script from an icon on the desktop the following two lines get written to .xsession-errors

DB2JAVIT : RC = 9501
DB2INSTANCE : -2029059916


I originally got this error when I ran from konsole because I hadn't included the path to the java library and/or hadn't exported the correct variables when starting my session. My .bashrc is now correct as I can run all the commands from within konsole.

I've always assumed that the paths etc. exported by my .bashrc are available to any application that I try to run from an icon on the desktop. Am I wrong in that assumption?

How can I get the shortcut to the db2cc application on the desktop to work. I can create shortcuts to other applications on the desktop without problem i.e. mozilla.

Thanks in anticipation.
 
Old 05-31-2004, 03:41 PM   #2
At0mic_PC
Member
 
Registered: Jul 2003
Location: Mississippi
Distribution: Slack9.1
Posts: 159

Rep: Reputation: 30
Can you make an alias out of the thing and put that in your .bashrc?

alias dothisstuff='db2javit -j:CC -i: -l: -o:"-Xmx128m -Xms32m" -a:"$*"'

Don't know if it will work or not.
 
Old 06-01-2004, 03:30 AM   #3
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 379

Original Poster
Rep: Reputation: 37
Thanks for the reply.

I tried alias - same result.

I then added

. .bashrc

to the db2cc script and it worked!


I then experimented a bit and found out that -

1.
environment variables set in .bash_profile AREN'T available after logon either though the script has been actioned;

2.
environment variables set in .bashrc ARE available after logon in konsole;

3.
environment variables set in .bashrc AREN'T available after logon in when starting an app from the KDE desktop

The only one of the above that makes any sense to me is number 2.

Can anyone clear up my misuderstanding?

AK
 
Old 06-01-2004, 02:46 PM   #4
At0mic_PC
Member
 
Registered: Jul 2003
Location: Mississippi
Distribution: Slack9.1
Posts: 159

Rep: Reputation: 30
I guess the .bashrc hasn't been accessed yet. Maybe make a script that starts and stops a term on login?
 
  


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
Desktop Shortcut Magic02 Linux - Newbie 1 07-03-2005 03:48 PM
Problem running console app in X with no terminal (as a desktop shortcut) kornerr Linux - General 1 02-04-2005 12:08 AM
desktop shortcut? Sean2 Mandriva 3 12-11-2003 08:13 PM
Shortcut to Desktop? Gerardoj Linux - Software 3 09-29-2003 04:29 PM
create a icon shortcut for my app in blackbox yenonn Linux - Software 7 08-16-2003 04:30 AM


All times are GMT -5. The time now is 09:04 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