LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 03-19-2004, 10:32 AM   #1
saurya_s
Member
 
Registered: Nov 2003
Location: Oxford
Distribution: Mandrake
Posts: 158

Rep: Reputation: 30
Desktop shortcut for running programs


Hi all
I run some program thru konsole. Can I have desktop shortcut for that. I thried to make alink to application thru KDE but apparently it is not working?
How can I do that?
SS
 
Old 03-19-2004, 03:51 PM   #2
cb_linus
Member
 
Registered: Dec 2003
Location: UK
Distribution: Gentoo
Posts: 81

Rep: Reputation: 15
It should be possible to write a text file that can be set to launch with Konsole automatixcally.To create a file that launches Neverwinter Nights I could do this:

open a console, cd to the directory to where the command will be run and type:

cat > nwnStart.sh *to create a file, name it *.sh the .sh extension will make sure it runs as a shel script*
cd /home/nwn *the directory where the program to be run is (may be optional)*
./nwn *command to run the program*
ctrl+d *hold down ctrl+d* to get back to normal command line*

Now you just have to create a sym link to the desktop. You can either clcik'n'drag or try something like:

ln -s /home/nwn/nwnStart.sh /home/desktop/<username>/<linkname>

You may have to do su before any of this depending on what the permissions in the current directory.

If the file doesn't execute do su and make sure to change the relevent permissions, for example:
su
*******
chmod 777 nwnStart.sh *read/write/execute permission to all users*

This should work fine

Another example (done in a shell):

su
*******
cd /home
cat > xineStart.sh
xine
ctrl+d
chmod 777 xineStart.sh
ln -s /home/xineStart.sh /home/<username>/desktop/xine

-Chris
 
Old 03-19-2004, 03:56 PM   #3
cb_linus
Member
 
Registered: Dec 2003
Location: UK
Distribution: Gentoo
Posts: 81

Rep: Reputation: 15
I'm sure there's another way of doing this - one in which the link doesn't look like a shell script but Mandrake doesn't seem to let me atm (I *have* managed this in the past - with 9.2 though)


Last edited by cb_linus; 03-19-2004 at 03:57 PM.
 
Old 03-19-2004, 04:00 PM   #4
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 53
Does it have to be through console? I mean, to run xterm and have that load a program you use:
Code:
xterm -e program_to_run
In fact, try that with konsole, I imagine it takes a lot of the same parameters as xterm.
 
Old 03-19-2004, 04:01 PM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Adding an icon to the desktop in KDE is simple. All you need to do is to just right click on the desktop, then click Create New / Link to Application. Fill in the name you want to use for the shortcut, then click the (generic) icon image on the left hand side of the box. That will allow you to choose whatever icon you want - most likely you will want to click "Other icons", then browse for the directory that contains your app's icon (eg, it may be located in /usr/share/pixmaps or whatever). Anyway, the final step is to click on the Execute tab, then click on Browse and select the app's executable. -- J.W.
 
Old 03-19-2004, 04:05 PM   #6
mmurch01
Member
 
Registered: Jan 2004
Location: Michigan
Distribution: Redhat 9
Posts: 102

Rep: Reputation: 15
I was fiddling around with the desktop options in KDE yesterday and happened across an option to enable desktop shortcuts. Give that a try, it worked for me.
 
Old 03-19-2004, 05:48 PM   #7
saurya_s
Member
 
Registered: Nov 2003
Location: Oxford
Distribution: Mandrake
Posts: 158

Original Poster
Rep: Reputation: 30
Thanks guys
making a link was what I tried but it didn't work till i logged out and logined again.
Cheers
SS
 
  


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
Shortcut to Desktop? Gerardoj Linux - Software 3 09-29-2003 04:29 PM
shortcut keys and programs - gnome skibud2 Red Hat 8 09-25-2003 07:03 PM
Shortcut for xterm programs stwhite Linux - General 1 03-28-2001 02:36 PM


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