LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Symbolic Link in Menu (http://www.linuxquestions.org/questions/linux-general-1/symbolic-link-in-menu-55320/)

JCScoobyRS 04-16-2003 12:35 PM

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

jpbarto 04-16-2003 12:45 PM

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

JCScoobyRS 04-16-2003 12:48 PM

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

jpbarto 04-16-2003 01:23 PM

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

JCScoobyRS 04-16-2003 01:40 PM

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

jpbarto 04-16-2003 03:11 PM

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.

JCScoobyRS 04-16-2003 03:17 PM

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

jpbarto 04-16-2003 03:29 PM

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

bulliver 04-16-2003 03:42 PM

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'

JCScoobyRS 04-16-2003 06:28 PM

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

Aussie 04-17-2003 07:55 AM

Kmenu editor is the correct way to add an entry to the kmenu.


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