LXDE on machines with more than one desktop

All questions and problems regarding the installation and upgrades of LXDE from USB Stick, Live CD or Web.
Locked
johnw
Posts: 7
Joined: Mon May 08, 2017 7:46 pm

LXDE on machines with more than one desktop

Post by johnw »

I'm thinking about a change and have installed LXDE alongside KDE. The main problem is that due to the way the freedesktop.org xdg spec is set up all of the applications on my machine in /usr/share/applications/ show up in the menu. Also the same in KDE.

I log in using SDDM and have LXDE as a separate user account. That causes LXDE to use a different menu tree to the KDE one. I've found that PCmanFM can be used to hide entries in LXDE and the same sort of thing can be done in KDE. What's not clear is how LXDE arranges to hide them. KDE does it via a user rather than system wide menu tree. I'm wondering if there is some way of getting LXDE to do the same thing?

I have copied the system wide LXDE menu tree to ~./config/menu/ but it doesn't seem to have any effect. If I hide items I don't see any change in it so wonder how that is managed?

To be honest I'd rather ~./local/share/applications was scanned into the menus as I feel that would be more easily managed. It would just mean moving desktop files from the main store to it or maybe just creating links. I've also copied some desktop files to this directory but again no change.

:?: Any ideas? I have a feeling that people running different desktops on the same machine hasn't been covered very well and also different users on the same machine even using the same desktops.

John
-
rufwoof
Posts: 21
Joined: Thu Sep 15, 2016 10:49 am

Re: LXDE on machines with more than one desktop

Post by rufwoof »

Just a suggestion, not really tried it myself, but .desktop files can include a OnlyShowIn or a NotShowIn line/value. Something like

NotShowIn=GNOME;KDE;XFCE;

or

OnlyShowIn=KDE;

I've not seen one for LXDE; however so I can't say if LXDE will correctly parse that ???

Most dynamic menus tend to be built from the content of /usr/share/applications so I guess if those parameters are honoured it could be a way to filter what's shown in the two different sessions menus.

A pain if it does work is if/when programs are upgraded where the prior .desktop file gets updated. I don't know for sure but believe you could store local copies of the .desktop files in somewhere like ~/.local/share/applications that take precedence over /usr/share/applications .desktop files ???
rufwoof
Posts: 21
Joined: Thu Sep 15, 2016 10:49 am

Re: LXDE on machines with more than one desktop

Post by rufwoof »

I have run LXDE without PCmanfm controlling the desktop. When PCmanfm controls the desktop you can drop/create icons on that desktop, with no desktop control you lose that option (unless you install another program to do that job). Personally I like a clear desktop and have no icons at all ... which also opens up the potential to have all of left, middle and right mouse clicks on the desktop perform a action (as defined in ~/.config/openbox/rc.xml). I have previously had it set up so that a left mouse click on the desktop brought up a menu, right click brought up the desktop/open-programs menu ... where the left click (main) menu was static (as defined in ~/.config/openbox/menu.xml).

Again that might be a alternative setup choice for your purposes.

IIRC you can turn off pcmanfm's desktop control by editing/commenting out/deleting the @pcmanfm --desktop --profile LXDE line in /etc/xdg/lxsession/LXDE/autostart file (or the overriding one in ~/.config/lxsession/LXDE/autostart is that exists).

I use Debian, and apt-get install obmenu is a good program to aid with creating/editing the openbox menu. The Debian stable version of obmenu unfortunately doesn't include support for adding menu icons so I had to edit those in myself (I specifically wanted just a menu of icons, so that left clicking on the desktop brought up a menu that looked more like a dock/panel, and set a 1 pixel wide obconf left hand screen edge margin so even when a program was full screen I could still left click over on the left screen edge to see the menu).

Zoomed in image where firefox is full screen and the vertical column of icons is a menu

Image

Image
johnw
Posts: 7
Joined: Mon May 08, 2017 7:46 pm

Re: LXDE on machines with more than one desktop

Post by johnw »

Thanks for the posts.

I.m not sure if show in functions in the desktop files any more. People often want to run a mix so suppose it saves editing them. A change may be on the way. I run opensuse and desktop files are starting to be prefixed org.kde or gnome. Some of these also include language translations now. 5 KB or more instead of a few of hundred.

The links to various files is interesting. It looks like LXDE may be mostly local user based. I can get obmenu from opensuse's web based software search. I'll bear that in mind but even after using Linux/KDE for over 15 years I still like a start button menu but this sort of area is what I want to play around with at some point. I do use desktop links

I did find one file ~/.config/lxsession-default-apps/settings.conf that looks to contain full path links to every application desktop file on my system. I'm not at all sure what this is for? The xdg stuff should look after that on start button menu's.

:roll: 15 years +. I still don't know my way around in a console other than for trivial things.

John
-
johnw
Posts: 7
Joined: Mon May 08, 2017 7:46 pm

Re: LXDE on machines with more than one desktop

Post by johnw »

I thought that I was getting somewhere.

The first thing I did was edit the system wide lxde menu file that I had copied to ~/.config/menus/ and removed the entire accessibility category. That caused the category to disappear immediately so indicated that it was using this one. I kept a copy of the original one just in case.

Then I tried editing it further based on the freedesktop.org spec having seen something similar on the arch wiki. I commented out the default application and menu directory lines. Then added AppDir and MenuDir entries pointing to my user local directories. It did just that and only showed what was in ~/.local/share/applications but the start button menu sections didn't have any headings, just small squares. Also the quick launch didn't show pcmanfm any more. I also messed the quick launch up somehow - it's all crowded to the left. Network and clock etc icons were on the far right.

:cry: However I found an lxde utility that reset the desktop and it or something has deleted the user local menu and applications except for a couple of kde desktop files that I may not have not copied across.

John
-
johnw
Posts: 7
Joined: Mon May 08, 2017 7:46 pm

Re: LXDE on machines with more than one desktop

Post by johnw »

I've managed to get things back more less to where I started. I copied the system wide menu back to the ~/.config/menus directory. No joy but then remembered a comment on the arch wiki - clear the menu cache when ever anything is done with menus. There is a menus directory of ~/.cache. Once I had deleted the content of that and also logged out and back in it all came back.

:cry: So having remembered to clear the cache I need to do it all again as all I should have needed to do to the menu was add an AppDir and remove the default one.

The spec for the menu arrangement is on freedesktop.org - for if anyone else who is mad enough to be interested in this area.

I may have some more questions relating to setting up LXDE but initially in order to get back to how it looked exactly the first time I logged in the simple solution may be to delete the user and then add it again. I'm a couple of task bar panel network icons missing and can see no way of getting them back. Also a couple that shouldn't be there. One I added and another - network manager that I don't need as opensuse uses wicked.

John
-
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: LXDE on machines with more than one desktop

Post by drooly »

tl;dr.
i don't have a clear answer for you, but i'm confident that custom menus ARE possible.
tricky, but possible.

imo editing .desktop files in /usr/share/applications is the wrong approach; anyway these would get overwritten on updates i think.
but i think a same name file in ~/.local/share/applications overrides its twin in /usr/share.

you should start by reading https://standards.freedesktop.org/menu- ... atest.html
and maybe https://wiki.debian.org/GnomeMenus
johnw
Posts: 7
Joined: Mon May 08, 2017 7:46 pm

Re: LXDE on machines with more than one desktop

Post by johnw »

Thanks. I had already been through the freedesktop spec's. The same site also has the desktop file specs but I suspect that older ones are ok on some desktops but maybe not on others. On kde for instance I have seen some that are flagged as illegal. Many now contain translations so that their names change according to language.

I'm not sure if ~/.local/share/applications over rides the system wide one. I suspect not but if it does simply creating the directory will do something to keep the desktop working as it does when ~/.config/menus is created. I know that I can cause applications to be local but it didn't work out as it should. This may just have been down to the fact that everything seems to be cached - in the local ~/.cache directory. It looks like that has to be cleared and a log out and back in done. Wont know until I try it that way.

Deleting the lxde user account and adding it again did get things back to how they were before I messed it up. So far I have just edited the task bar panel file to get the things I want in it. Caching showed up here too. I created a leafpad button in it and found that it wasn't retained. It is if the refresh panels button in one of the lxde applications is used after each file update. When I have this sorted I'll back up the entire user directory in case I mess up again.

Currently I am trying to find out what each plug in does and how it displays on the desktop. Some of the names are too cryptic. kbled. xkb and in my case netstat and netstatus as netstat shows a network manager icon I don't want and net activity ones that I do. The desktop application for these doesn't seem to show what is available in /usr/lib64/lxpanel/plugins.

John
-
Locked