Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-06-26 13:21:26

paolo321
Member
Registered: 2011-06-26
Posts: 121

[Solved] Add/Remove items to Settings Manager

Hi everyone, I'm trying xubuntu 11.04, really like it :-)

One question:
I'd like to use gnome-screensaver and not xscreensaver. I installed it, I made it default with:
settings -> settings editor -> xfce4-session
New property:  / startup /screensaver /type
Value: gnome-screensaver

Then I wanted to add its options to Settings Manager and removing the other item related to xcreensaver

1) Created ~/ .local/share/applications/gnome-screensaver-preferences.desktop

[Desktop Entry]
Version=1.0
Name=Screensaver (Gnome)
Comment=Change gnome-screensaver properties
Exec=gnome-screensaver-preferences
Icon=preferences-desktop-screensaver
Terminal=false
StartupNotify=true
Type=Application
Categories=X-XFCE;Settings;DesktopSettings;X-XfceSettingsDialog;

2) I cannot find a way to remove the other item related to xscreensaver

cp /usr/share/applications/xscreensaver-properties.desktop .local/share/applications/
echo "NoDisplay=true" >> .local/share/applications/xscreensaver-properties.desktop

doesn't work.
- Putting NoDisplay=true directly in /usr/share/applications/xscreensaver-properties.desktop doesn't work
- Removing Categories other than X-XFCE; from /usr/share/applications/xscreensaver-properties.desktop WORKS
- Tried other ways to do it, googled with no luck

Anyway, I think I'm wrong since there should be an option to remove items from settings manager without messing with system-wide configuration files
BTW, is my method to ADD items to Settings Manager the right one, or am I wrong also in that?
Please help me (and forgive my English, since I'm not English-speaking :-)

Greetings

Offline

#2 2011-06-26 16:07:40

stqn
Member
Registered: 2010-10-11
Posts: 174

Re: [Solved] Add/Remove items to Settings Manager

Well if changing the categories works, you could do that but in .local instead of /usr, it should work I suppose...? Unless you've already tried that.

(I personnaly don't see the point of the Settings Manager since all the settings are already easily accessible in the same menu...)

Offline

#3 2011-06-26 16:50:39

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: [Solved] Add/Remove items to Settings Manager

Hidden=true should work

Offline

#4 2011-06-26 19:17:12

paolo321
Member
Registered: 2011-06-26
Posts: 121

Re: [Solved] Add/Remove items to Settings Manager

Tried changing to a new opensuse xfce virtual machine to be sure everything is clean...

GLOBAL desktop file left unchanged
/usr/share/applications/xscreensaver-properties.desktop

[Desktop Entry]
X-SuSE-translate=true
GenericName=Screensaver properties
Exec=xscreensaver-demo
Icon=xscreensaver
Terminal=false
Name=Screensaver
Comment=Change screensaver properties
Type=Application
Categories=Settings;DesktopSettings;Security;X-XFCE;
NotShowIn=KDE;GNOME;

LOCAL DESKTOP FILE:

1) Doesn't work adding hidden=true:

[Desktop Entry]
X-SuSE-translate=true
GenericName=Screensaver properties
Exec=xscreensaver-demo
Icon=xscreensaver
Terminal=false
Name=Screensaver
Comment=Change screensaver properties
Type=Application
Categories=Settings;DesktopSettings;Security;X-XFCE;
NotShowIn=KDE;GNOME;
Hidden=true

2) Doesn't work removing categories

[Desktop Entry]
X-SuSE-translate=true
GenericName=Screensaver properties
Exec=xscreensaver-demo
Icon=xscreensaver
Terminal=false
Name=Screensaver
Comment=Change screensaver properties
Type=Application
Categories=X-XFCE;
NotShowIn=KDE;GNOME;
Hidden=true

Then I tried with another item (accessibility):

Global Launcher is

[Desktop Entry]
X-SuSE-translate=true
Version=1.0
Name=Accessibility
Comment=Improve keyboard and mouse accessibility
Exec=xfce4-accessibility-settings
Icon=preferences-desktop-accessibility
Terminal=false
Type=Application
Categories=X-XFCE;Settings;DesktopSettings;X-XfceSettingsDialog;
StartupNotify=true
OnlyShowIn=XFCE;
X-XfcePluggable=true
X-XfceHelpFile=xfce4-settings.html

Local .desktop item left the same, still doesn't work adding

NoDisplay=true

or changing also

OnlyShowIn=none;

Adding NoDisplay=true works well instead for launcher in the main menu
For example, this works perfectly for hiding gimp from the Graphics menu:

$ cp /usr/share/applications/gimp.desktop ~/.local/share/applications/
$ echo "NoDisplay=true" >> .local/share/applications/gimp.desktop 

I'm not a programmer and I'm definitely an xfce newbie, so please forgive my long post.
I tried to post many example to be clearer, since imho there's something strange about this:
NoDisplay=true seems to behave different for items in the settings manager.

Offline

#5 2011-06-26 19:39:06

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: [Solved] Add/Remove items to Settings Manager

Looked at the code and the settings manager is quite dumb. The only way to properly fix this is using our global menu library, but for now it doesn't understand .local overwrites. If you put Hidden=true in the /usr/share/applications/??.desktop file it will work.

Offline

#6 2011-06-27 08:29:27

paolo321
Member
Registered: 2011-06-26
Posts: 121

Re: [Solved] Add/Remove items to Settings Manager

Ok, thank you for your help :-)

Offline

#7 2011-06-27 08:45:16

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: [Solved] Add/Remove items to Settings Manager

I'll take a look if we can switch the settings manager to use garcon for this. Then everything will be resolved.

Offline

#8 2011-06-27 10:12:01

paolo321
Member
Registered: 2011-06-26
Posts: 121

Re: [Solved] Add/Remove items to Settings Manager

Yes, it would be nice.
I'm just a newbie, but I think that if something like:

cp /usr/share/applications/xscreensaver-properties.desktop .local/share/applications/
echo "NoDisplay=true" >> .local/share/applications/xscreensaver-properties.desktop

works for .desktop items in the menu, it should work the same way for items in the settings manager.

Another "suggestion" may be making screensaver item run configuration for xscreensaver or gnome-screensaver depending on which is currently used in the system...
But this may be overkill and not needed, if there will be a simple way to add/remove items from settings manager like you said.

Thank you again for your effort :-)

Offline

#9 2011-06-27 10:31:39

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: [Solved] Add/Remove items to Settings Manager

Xfce doesn't install the desktop files for the screensaver, but 2 desktop items with a TryExec key should work fine. Then they will even show both if installed.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.005 seconds, 7 queries executed - Memory usage: 557.59 KiB (Peak: 574.44 KiB) ]