LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Adding to the K-Menu (https://www.linuxquestions.org/questions/linux-newbie-8/adding-to-the-k-menu-417633/)

Ray2047 02-20-2006 12:44 PM

Adding to the K-Menu
 
[OS = Debian-Sarge]

How do you determine the "Command" to put in the Kmenu editor when adding a program?

I had Opera 8.51. I managed to add a working "command" to the menu by using the browse icon and it now seems a bit of dumb luck. I uninstalled 8.51 and installed 8.5 (static). I can't get it to run from the K menu. The original run command that worked was just the full name of the file. I tried changing it to the full name for the new one but no luck.

Trying to reverse engineer I tried looking at other entries on the Kmenu but could find no consistent theme. Is the "Command" for a program specific to the program? If so what's the easiest way to determine it? Is there a more general way to do it such as a path to the executable? If so how do I find the executable?

Not sure if it is related or not related. When I first installed Opera 5.1 I could start it from Run with the command "Opera" but after about three days that stopped working. The static version I just installed has never started from Run. I get the error message “... could not find Opera Executable”. I have to start it from terminal by typing Opera.

Also probably unrelated but when Googeling this I found several mentions that all Deb packages automatically show up on the Debian menu but it isn't there either even though I installed it with the package manager.

Thanks in Advance

David the H. 02-20-2006 03:02 PM

The K-menu command is the same string you use when starting it from a terminal. If you can start it with just the application name there, then is should work in the menu also. If not, then you may need to add the full path name to the command line.

As for the command line not working, it sounds like it somehow got from your PATH. How exactly are you starting it? Do you have to cd to the Opera directory first or type the full path name? If so, then you should be able to get it working again by creating a new symlink to the Opera executable in your /usr/bin folder.

Try typing "whereis opera" in the terminal to see just where the program is installed.

Ray2047 02-20-2006 03:56 PM

Quote:

Try typing "whereis opera" in the terminal
Here is the out put: /usr/bin/opera /usr/lib/opera /usr/X11R6/bin/opera /usr/bin/X11/opera /usr/share/opera /usr/share/man/man1/opera.1.gz

I opened USR/bin in Konqueror and found Opera. Unlike some others it has no link listed. I assume that this is the problem. How do I add a link?

David the H. 02-20-2006 04:11 PM

Not everything in /usr/bin is a symlink. Many of them are the actual executables. A link only exists if the actual file is in a different directory not in your PATH. The PATH is the list of directories the shell searches when you type a command, BTW. /usr/bin is almost always in the PATH, so many programs just link there as an easy way to make sure the system can find them.

Try using "file /usr/bin/opera" to see what kind of file it actually is.

In any case, since it's seems to be there, and it's in your PATH, that doesn't seem to be the problem. It must lie somewhere else along the line. I'm afraid I don't know how to help you with that.

You might try uninstalling everything using the purge option and then reinstalling it again (be sure to back up your profile settings first). That might set everything back properly.

"/user/bin/opera" in the command line or the KMenu command should work to launch it in any case.

Ray2047 02-20-2006 05:08 PM

Well I couldn't let it rest while waiting for an answer. <G> What I really wanted was an easy way to start it. Your first post led me to the exicutable and after a Eureka moment and a bit of experimenting I found I could drag it on to the taskbar. Then I tried using usr/bin/opera as the command in Kmenu and again bingo. Next I'll probably asign it a hotkey and delete from the task bar. Thanks for nudging me toward the solution.

Edit: OOps now it doesn't seem to work from the Kmenu.


All times are GMT -5. The time now is 05:08 PM.