LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 04-16-2003, 11:35 AM   #1
JCScoobyRS
Member
 
Registered: Dec 2002
Location: It's a Secret
Distribution: Gentoo
Posts: 79

Rep: Reputation: 15
Symbolic Link in Menu


I want to be able to add links to start up programs into the Progamming portion of the main menu in KDE and to do this, I have to create a symbolic link (I think) in this directory:

/var/lib/menu/Applications/kde/Programming

How would I do this? I've never done this and when I view the files in there, I have items like:

.directory (I figured out this is basically for language)
gnome-glade-2.desktop
gnu-emacs.desktop
kdevelop.desktop

I don't understand the naming convention nor to I know how to create a link that will start up a program. Can someone help me understand this? I know how to use the ln function BUT I don't know if that is what I need to accomplish this. I'd also want to give the link an icon. Thanks, Jeremy
 
Old 04-16-2003, 11:45 AM   #2
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
well I don't use kde so I can't help you exactly but to make a link here's what you do... (from a command prompt)
$ ln -s /full/path/to/program name_of_link

note: the 'name_of_link' is usually just the name of the program...
example:
$ ln -s /usr/X11R6/bin/xmms xmms

this will create a link in my present directory (/home/jason) called xmms.
such that when I type /home/jason/xmms it is the same as typing /usr/X11R6/bin/xmms

hth
 
Old 04-16-2003, 11:48 AM   #3
JCScoobyRS
Member
 
Registered: Dec 2002
Location: It's a Secret
Distribution: Gentoo
Posts: 79

Original Poster
Rep: Reputation: 15
Ok...what is the ".desktop" for and if I create a sym link, will I be able to edit it's values with a Text Editor like the ones mentioned before? Thanks, Jeremy
 
Old 04-16-2003, 12:23 PM   #4
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
if I remember correctly (I did dabble with kde a little when I was first getting started) the *.desktop files are text files that define icons (typically on your desktop). These files will contain info like shortcut name, icon, and executable... to make sure its a text file first at a prompt type:
$ file filename.desktop

this should tell you if its plain text... if it is type:
$ cat filename.desktop

this will show you what the contents of the file are... happy hunting...
 
Old 04-16-2003, 12:40 PM   #5
JCScoobyRS
Member
 
Registered: Dec 2002
Location: It's a Secret
Distribution: Gentoo
Posts: 79

Original Poster
Rep: Reputation: 15
I don't think that I understand. Can someone tell me how to create an entry in the Programming menu of KDE for a program with an icon? Thanks, Jeremy
 
Old 04-16-2003, 02:11 PM   #6
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
Re: Symbolic Link in Menu

Quote:
Originally posted by JCScoobyRS

gnome-glade-2.desktop
gnu-emacs.desktop
kdevelop.desktop
with gnome-glade; gnu-emacs; and kdevelop in your 'Programming' directory... what items do you see in your Start/Programming menu?
Is there a one-to-one relation between the menu options and the .desktop files?
if there is then in the 'Programming' directory copy one of the desktop files with this command:

cp kdevelop.desktop new_proggie.desktop

then edit new_proggie.desktop with whatever your favorite editor is so that it points to whatever program you want it to point to.

then restart KDE.
 
Old 04-16-2003, 02:17 PM   #7
JCScoobyRS
Member
 
Registered: Dec 2002
Location: It's a Secret
Distribution: Gentoo
Posts: 79

Original Poster
Rep: Reputation: 15
Here is kdeveloper.desktop:

Code:
[Desktop Entry]
Encoding=UTF-8
BinaryPattern=kdevelop;
Type=Application
Exec=kdevelop -caption "%c" %i %m %u
MimeType=application/x-kdevelop-project;
Icon=kdevelop
DocPath=kdevelop/index.html
Terminal=0
Name=KDevelop 2.1.3
Name[de]=KDevelop 2.1.3
Name[fr]=KDevelop 2.1.3
Comment=IDE for C++/Qt/KDE
X-Desktop-File-Install-Version=0.3
Categories=Application;Development;X-Red-Hat-Base;
Can someone help me interpret this so I can create one of my own? Thanks, Jeremy
 
Old 04-16-2003, 02:29 PM   #8
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
here check this out... this looks like its a better way to do it than what I'm proposing...
http://www-oss.fnal.gov/projects/fer...menu.full.html

here's another one 2:
http://www.kde.org/documentation/use...-programs.html

hope that helps,
jason
 
Old 04-16-2003, 02:42 PM   #9
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 64
What I do is just right click on the kmenu, and you will see 'menu editor'.
Click on the section you want it in, then click 'new item', type in the name of the program, then type the path to the program where it says 'command', then click on the box to the right, and choose your icon. Don't forget to hit 'apply'
 
Old 04-16-2003, 05:28 PM   #10
JCScoobyRS
Member
 
Registered: Dec 2002
Location: It's a Secret
Distribution: Gentoo
Posts: 79

Original Poster
Rep: Reputation: 15
Well, I tried to create a copy of one of the existing files and modify it and some of it worked BUT it's not the smae type of file as the other ones. Anyone got anymore ideas? Thanks, Jeremy
 
Old 04-17-2003, 06:55 AM   #11
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 56
Kmenu editor is the correct way to add an entry to the kmenu.
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is a Symbolic Link? little_penguin Linux - Software 2 05-14-2005 09:27 AM
Symbolic link? jasone Linux - Newbie 4 05-06-2005 07:55 AM
symbolic link ilnli Slackware 6 01-04-2005 05:05 PM
help with a symbolic link mykrob Linux - Software 6 11-22-2004 10:01 AM
symbolic link jsetter Linux - Newbie 4 11-22-2004 07:18 AM


All times are GMT -5. The time now is 11:17 PM.

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