You are not logged in.

1

Friday, June 18th 2004, 5:20pm

Where is the default right-click desktop menu defined?

I have just upgraded to Fedora Core 2 with KDE 3.2.2 and I miss the entry for
opening a terminal from the desktop right-click menu.

Where is this menu defined? Is this a compile-time or a run-time configuration item?

Thanks,

Wolf

m4ktub

Intermediate

Posts: 257

Location: Lisbon, Portugal

Occupation: Software Engineer

  • Send private message

2

Saturday, June 19th 2004, 11:30am

The context menu is generated at run time. The is a directory were KDE looks for when showing the menu.

It's strange that FC2 doesn't have that service menu but it's not difficult to create it. However one as to do it manually (as far as I know).
Here is a fine tutorial.

3

Saturday, June 19th 2004, 12:05pm

Fedora Core 2 DOES have that menu, just not the "open terminal" entry.

I know that one can manually redefine this menu, but as far as I can
figure out only from scratch, not adding one entry, as I would like to do.

So if the default right-click desktop menu is indeed generated from a
directory at runtime, I would appreciate someone telling me where it
is.

Alternatively, I don't mind rebuilding it from scratch, but there are entries
in the default which I wouldn't know how to create, such as Icons, Run Command, Windows, etc. items.

m4ktub

Intermediate

Posts: 257

Location: Lisbon, Portugal

Occupation: Software Engineer

  • Send private message

4

Saturday, June 19th 2004, 8:10pm

Ok, I should have said "doesn't have that service menu entry".

So, if you read the link I posted, you would know that putting a file named "whatever-you-want-that-does-not-exists-yet.desktop" with the following content
[code:1]
[Desktop Entry]
ServiceTypes=inode/directory
Actions=openTerminal

[Desktop Action openTerminal]
Name=Open Terminal
Exec=konsole --workdir %d
[/code:1]
in the directory ~/.kde/share/apps/konqueror/servicemenus would add a service menu entry, to open the terminal, whenever you right click over a directory.

Maybe this will only work with konqueror and not in the destop directly but I found a little app called KServiceMenu (I wonder why :wink:) that can help you.

5

Sunday, June 20th 2004, 9:32am

Why do you assume that I didn't read the link you provided? It simply does not address my problem, neither does kservicemenu.

I am not concerned with the menu which you get when right-clicking on a directory in Konqueror, but with the menu you get when right-clicking on the Desktop.

A quick look at share/apps/konqueror/servicemenus shows that entries on the desktop right-click menu do not come from the files in that directory -- so where do they come from?

And for the same reason "kservicemenu" will not help me either -- I am not trying to change Konqueror's context menus, but the window manager's desktop menu.

I already did a lot of searching -- short of searching the source code. I did a find -exec fgrep in /usr/share for some of the entries in my existing desktop menu and cannot find this anywhere. If I had not already done all the research myself that I could think of I would not have posted the query.

m4ktub

Intermediate

Posts: 257

Location: Lisbon, Portugal

Occupation: Software Engineer

  • Send private message

6

Friday, June 25th 2004, 11:22am

You are right and I'm sorry for my bad assumption.
I've re-read the thread and maybe now I can answer your initial question.

Quoted

Where is this menu defined? Is this a compile-time or a run-time configuration item?

The desktop menu is defined during compile time. By defined during compile time I mean "defined in the code without using any external file", that is, to change the desktop menu one is forced to change the code. You can see how the menu is created here.

As you have already realized, for what I know, there is now way to recreate those special entries like "Create New", "Bookmarks", "Run ...".
Maybe replacing the middle button action to show one of the custom menus and redefining those custom menus' actions would help (I think this waaas +- you idea in the 2nd post) but that isn't what you wanted initially.

7

Monday, July 5th 2004, 3:41pm

Thank you, this answered my question, if not quite the way I had hoped:-(

Wolf