LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Configuring Xfce4 (http://www.linuxquestions.org/questions/slackware-14/configuring-xfce4-4175483108/)

Spect73 11-01-2013 11:11 PM

Configuring Xfce4
 
After using the Xfce4 wiki to find out how to hide applications in the Applications Menu, I encountered some strange behavior. After exiting and restarting Xfce4, all of the MIME type changes reverted to defaults. I asked on the Xfce forum about this, figuring I had either done something wrong or did not understand the wiki information. By 'hide' I mean adding "NoDisplay=true" to the .desktop file.

I got a reply back that sent me to an Arch Linux wiki page. Reading it, it talked about copying
/usr/share/applications/defaults.list or /usr/share/applications/mimeapps.list to
./local/share/applications/. However, I don't seem to have either one of these files in /usr/share/applications.

So, my question: how is Xfce configured in Slackware and where do I go to find out how to hide applications while retaining my MIME types?

kikinovak 11-02-2013 03:57 AM

Take a look at the cleanmenu.sh script:

http://www.microlinux.fr/slackware/M...0-32bit/tools/

I'm using this to clean up Xfce's applications menu. Here's what the result looks like:

http://www.microlinux.fr/images/desk...reau_light.png

Cheers,

Niki

solarfields 11-02-2013 05:28 AM

Niki,

how did you get the bigger icons in the Xfce menu? I do it by editing this file in my home folder:

Code:

~/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
changing the following line

Code:

property name="IconSizes" type="empty"
to

Code:

property name="IconSizes" type="string" value="gtk-menu=16,16:gtk-button=16,16:panel-applications-menu=22,22:panel-directory-menu=22,22"
Do you make this system-wide for all users?

kikinovak 11-02-2013 05:45 AM

Quote:

Originally Posted by solarfields (Post 5057004)
Niki,

how did you get the bigger icons in the Xfce menu? I do it by editing this file in my home folder:

Code:

~/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
changing the following line

Code:

property name="IconSizes" type="empty"
to

Code:

property name="IconSizes" type="string" value="gtk-menu=16,16:gtk-button=16,16:panel-applications-menu=22,22:panel-directory-menu=22,22"
Do you make this system-wide for all users?

Here's the values I use. Took me quite some time to figure this out, since it's not documented at all.

* gtk-menu=16,16
* gtk-button=20,20
* panel-applications-menu=24,24
* panel-directory-menu=24,24

Hope that helps.

solarfields 11-02-2013 05:51 AM

thanks!

And this is done in

Code:

/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
to make it system-wide?

kikinovak 11-02-2013 07:42 AM

Quote:

Originally Posted by solarfields (Post 5057015)
thanks!

And this is done in

Code:

/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
to make it system-wide?

I don't know. I just create a template user, configure Xfce, and then copy over the whole ~/.config stuff to /etc/skel. Or more precisely, I put this configuration in a 'user-settings-xfce' package.

http://www.microlinux.fr/slackware/M...settings-xfce/

cyberpatrol 11-02-2013 08:48 AM

Quote:

Originally Posted by Spect73 (Post 5056889)
After using the Xfce4 wiki to find out how to hide applications in the Applications Menu, I encountered some strange behavior. After exiting and restarting Xfce4, all of the MIME type changes reverted to defaults. I asked on the Xfce forum about this, figuring I had either done something wrong or did not understand the wiki information. By 'hide' I mean adding "NoDisplay=true" to the .desktop file.

I got a reply back that sent me to an Arch Linux wiki page. Reading it, it talked about copying
/usr/share/applications/defaults.list or /usr/share/applications/mimeapps.list to
./local/share/applications/. However, I don't seem to have either one of these files in /usr/share/applications.

So, my question: how is Xfce configured in Slackware and where do I go to find out how to hide applications while retaining my MIME types?

To hide an application in the Xfce menu just add "Hidden=true" to the corresponding .desktop file. To do it system wide, do it in /usr/share/applications. This way your changes could be reverted with every package update. To do it locally for specific users, copy the corresponding .desktop file from /usr/share/applications to the users' ~/.local/share/applications and do it there. This way your changes won't be reverted, but also not updated with package updates.

If the directory ~/.local/share/applications doesn't exist, just create it.

This way you can change every part of the menu item for an application.

Spect73 11-02-2013 11:17 AM

Quote:

Originally Posted by cyberpatrol (Post 5057072)
To hide an application in the Xfce menu just add "Hidden=true" to the corresponding .desktop file. To do it system wide, do it in /usr/share/applications. This way your changes could be reverted with every package update. To do it locally for specific users, copy the corresponding .desktop file from /usr/share/applications to the users' ~/.local/share/applications and do it there. This way your changes won't be reverted, but also not updated with package updates.

If the directory ~/.local/share/applications doesn't exist, just create it.

This way you can change every part of the menu item for an application.

Well I had created ~/.local/share/applications and copied all .desktop files over to it. That is what the Xfce wiki said to do. I used NoDisplay=true rather than Hidden=true because of this part of the wiki: "As explained here, NoDisplay=true will hide the application from the menu but the mime type associations will still be available. Hidden=true is equivalent to deleting the file." My understanding was that doing it this way would just get the item off the applications menu, but still allow the MIME association to remain. My desire was to just cleanup the applications menu to make it somewhat easier for me to select what I was interested in. For example, I never use Kjots so I wanted it to disappear from the menu.

As I said, the wiki procedure worked in that the items were no longer being displayed. It was just that after I restarted Xfce all of my MIME associations had reverted to the default. It is this changing of associations that was undesireable. When I asked about this on the Xfce forum, I was given the link to the Arch Linux wiki which mentioned the mimeapps.list or defaults.list files and these files evidently do not exist on Slackware. Maybe they are Arch specific? Perhaps my question should be changed to "what files control MIME associations on Slackware"?

Coordially

Spect73 11-02-2013 11:21 AM

Quote:

Originally Posted by kikinovak (Post 5056966)
Take a look at the cleanmenu.sh script:

http://www.microlinux.fr/slackware/M...0-32bit/tools/

I'm using this to clean up Xfce's applications menu. Here's what the result looks like:

http://www.microlinux.fr/images/desk...reau_light.png

Cheers,

Niki

Thanks. I also snagged your 'user-settings-xfce' package. I'll study them.

Coordially

Spect73 11-04-2013 01:34 AM

After some experimenting I found out many interesting things, such as where a mimeapps.list file can come from. From my reading I've not found out why the MIME associations changed just by hiding an item on the Applications menu. I'll mark this solved as I have figured out how to hide some of the items I don't want cluttering up my menus and can always just redo the MIME associations. Thanks for the help from all.

Coordially

mjjzf 11-04-2013 08:12 AM

I have stopped using the menu entirely - but if you want only a few menu entries, you can make a new menu file and just add in the few apps you want.
Of course, you can also do an auto-hiding panel...

sgosnell 11-05-2013 05:25 PM

Maybe I'm missing something, but if you just want to hide items in your menu, why not just edit the menu through Menu/Settings/Main Menu, and uncheck the items you don't want to see?

Spect73 11-05-2013 05:33 PM

Quote:

Originally Posted by sgosnell (Post 5058939)
Maybe I'm missing something, but if you just want to hide items in your menu, why not just edit the menu through Menu/Settings/Main Menu, and uncheck the items you don't want to see?

Hmmm... on Xfce4 I don't have a Menu/Settings/Main Menu. Do you?

Coordially

sgosnell 11-05-2013 06:08 PM

Yes. On the panel is Applications Menu. Open that, and one of the choices is Settings, and one of the choices on that submenu is Main Menu, which is a menu editor. Running Xfce4.10. IIRC it was also on previous versions.

cyberpatrol 11-05-2013 06:29 PM

Quote:

Originally Posted by sgosnell (Post 5058954)
Yes. On the panel is Applications Menu. Open that, and one of the choices is Settings, and one of the choices on that submenu is Main Menu, which is a menu editor. Running Xfce4.10. IIRC it was also on previous versions.

There is no menu editor in Xfce 4.10. Upstream removed it after 4.6 if I recall correctly.

There are a few external menu editors available for Gnome, which are working more or rather less with Xfce, too, but they are not needed, because they also do nothing else than what I already suggested to do manually.


All times are GMT -5. The time now is 07:22 AM.