Xfce Forum

Sub domains
 

You are not logged in.

#26 2018-06-01 12:13:47

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Menu editors

Have a read through the Desktop File ID section of the desktop-entry-spec.

It depends on the value of the environment variable $XDG_DATA_DIRS:

echo $XDG_DATA_DIRS

If not set, it defaults to "/usr/local/share:/usr/share". Which means, if there are duplicate file names, the priority goes like this:

1. ~/.local/share/applications (this local location always takes precedence to system wide locations)
2. /usr/local/share/applications
3. /usr/share/applications


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#27 2018-06-13 00:34:46

John_Jason_Jordan
Member
From: USA, left coast
Registered: 2011-11-13
Posts: 107

Re: Menu editors

It has been a couple weeks since I last said anything here. Happily, I now have all my menus the way I want them (a LOT of work), but there is one remaining problem: The Settings Manager previously was missing several items, but I just ignored the problem. Now, after editing all my .desktop files to specify the categories= line, all but three of the entries in the Settings Manager are gone. I just show the three categories, Personal, Hardware, and System, and Preferred Applications, Removable Drives and Media, and MIME Type Editor.

There are .desktop files for About Me, Accessibility, and all the rest, but they fail to appear in Settings Manager. They do appear in Applications > Settings, so I can launch them from there, but the Settings Manager is often more convenient.

When I was editing my .desktop files I had lots of duplicates, plus I decided that I preferred them to be in ~./local/share/applications instead of /usr/share/applications, so as I edited them I moved them all to ~/.local/share/applications. In my editing I usually deleted most of the stuff in the categories= line, leaving just one or two that I wanted. I suspect that there is something in the desktop files that has to be there to make it appear in Settings Manager, and I foolishly deleted it.

Suggestions?


Linguistics on Linux!

Offline

#28 2018-06-13 01:25:42

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Menu editors

To get items to appear in the Settings Manager, you have to add 2 entries to the categories line:

1. A general item to indicate that the entry should appear in the Settings Manager:

Settings;X-XFCE-SettingsDialog

2. An item to indicate which section to appear in:

X-XFCE-PersonalSettings
X-XFCE-HardwareSettings
X-XFCE-SystemSettings

Not specfying one will put it in the Others section.

You are right that it is a lot of manual work to get it set up right (and to understand how the spec works). But once you understand it, it does get easier to maintain your own menu structure.

Last edited by ToZ (2018-06-13 10:52:39)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#29 2018-06-13 04:17:52

John_Jason_Jordan
Member
From: USA, left coast
Registered: 2011-11-13
Posts: 107

Re: Menu editors

Thanks, that got me most of the way.

User toolforger posted a list of things he had in the Settings Manager that were missing [ https://forum.xfce.org/viewtopic.php?id=9786 ]. I have most of them, but a few are missing and I can't get them to appear:

Bluetooth Manager (blueman-manager)
NVIDIA X-Server Settings (nvidia-settings)
Orage Preferences (orage -p)
Printers (system-config-printer)
Software Updater (update-manager)
Ubuntu Software Center (software-center)
Theme Configuration (gtk-theme-config)
Notes (xfce4-notes)

I have .desktop files for all but the last two of these, and they all appear in Applications > [Category] and launch as expected. I added the appropriate entries in the .desktop files and saved them, but they still do not appear in Settings Manager.

For Theme Configuration I can't find the .desktop file, but it must exist somewhere because it appears in Applications > Settings and executes when I click on it.

Notes is a different problem. I have the .desktop file and edited it, but it does not appear in Settings Manager. It does appear in Applications > Settings, but when I click to launch it nothing happens. From the command line 'xfce4-notes' executes without error and without doing anything.

Edit: I created a .desktop file for Theme Configuration copying and 'saving as' Theme-Configuration.desktop, and adding the appropriate entries to the Categories= line. I could not get it to appear in Settings Manager. Later I found the correct file for Theme Configuration, and added the exact same items to its Categories= line, and presto! It appeared right away in Settings Manager. Conclusion: There is something that blocks some files from appearing in Settings Manager, besides leaving out X-XFCE-SettingsDialog.

Last edited by John_Jason_Jordan (2018-06-13 05:12:20)


Linguistics on Linux!

Offline

#30 2018-06-13 10:52:16

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Menu editors

Sorry. It looks like you also need "Settings" in the category line along with "X-XFCE-SettingsDialog" to make it appear. I'll update my post above.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#31 2018-06-13 16:04:11

John_Jason_Jordan
Member
From: USA, left coast
Registered: 2011-11-13
Posts: 107

Re: Menu editors

Thanks, but still no luck.

First, regarding the Settings category, all my .desktop files that do appear in Settings Manager do so without the Settings category. But I added it to the remaining short list above, with no change.

The problem seems to be related to the System category in Settings Manager, because all the .desktop files that don't work are ones that I'm trying to get to appear there. However, Mime Type Editor has always appeared there, so just now I copied its entire Categories= line:

Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;

And pasted it into Printers.desktop to replace its existing line, and saved the file. Printers still does not appear in Settings Manager. And if I add any of the others. e.g., X-XFCE-PersonalSettings, it still does not appear in Settings Manager. It's like there's a list somewhere of what's allowed in Settings Manager and my remaining items are not on the list.


Linguistics on Linux!

Offline

#32 2018-06-13 18:05:20

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Menu editors

The dialog seems to cache information. Are you closing and re-opening the Settings Manager to see if it shows up then?

Can you paste the full contents of Printers.desktop?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#33 2018-06-13 22:19:26

John_Jason_Jordan
Member
From: USA, left coast
Registered: 2011-11-13
Posts: 107

Re: Menu editors

All done! Well, except for a couple of unimportant things.

The problem computer is my laptop, recently dist-upgraded from Xubuntu 14.04 to 16.04. The Settings Manager was kind of messed up before (as were the menus), so now is a good time to do some housecleaning, hence this whole thread.

When I got up this morning it occurred to me that I probably had the whole solution on my desk in the form of a new desktop that I built last December, and on which I installed Xubuntu 17.10, later dist-upgraded to 18.04. I opened its Settings Manager, then copied the .desktop files for everything in it that did not already appear in Settings Manager on the laptop, into a USB stick to keep them separate to start with.

Then I started by opening in Gedit the laptop version of the .desktop file and its counterpart from the desktop, in different windows so I could see them side by side. In each case there were differences in the Categories= lines, so I copied and pasted the line from the desktop file into the laptop file and saved it. Half the time this worked and half the time it did not. Eventually I noticed that the Categories= lines on the laptop needed something like 'X-XFCE-SettingsDialog' and 'X-XFCE-PersonalSettings,' but to get the item to appear in Settings Manager on the desktop all it needed was 'Settings' and 'PersonalSettings.' I assume this is due to a difference between 16.04 and 18.04, although About XFCE says both have 4.12. Probably more (X)Ubuntu shenanigans.

Oh, and your comment about the cache is sort of correct. As I was working I had Settings Manager open, and as soon as I saved a (correctly) edited file its icon appeared. Except not always. After reading your comment I restarted Settings Manager and suddenly two items that had been vexing me appeared. Why some items appear immediately and others only after restarting Settings Manager is beyond my ken.


Linguistics on Linux!

Offline

Board footer

Powered by FluxBB