You are not logged in.
Hi all!
I am a long time Linux user both privately and professionally. At home I use 2 desktop environments, i3 and XFCE. At work, we stick to XFCE.
We provide Linux desktop environments to our infrastructure support people, but they run on shared servers, and we connect to them via persistent VNC sessions. I've been asked to expand this service, and that's why I dove into custom menus for XFCE again.
The goal is to include a custom (nested) menu that allows the users to directly connect to a certain Linux server. All of our Linux servers are tracked in a kind of "CMDB", where we can group them based on the applications running on them, as well as filter on which environment they host (Dev, preproduction, production, labo)
As far as I can tell, I was able to successfully generate a custom menu (using combination of perl and bash scripts). It looks like this (anonimized)
APPS
- APP1
- DEV
- devhost1
- devhost2
- PREPROD
- pphost1
- PROD
- PRODhost1
- APP2
<etc>
Also the respective .directory files and desktop files get generated properly.
The strange thing is, that when I look at the menu from the panel "Applications" menu, I cannot see my custom menu. When I access the menu via "right click" on the desktop, it shows up just fine.
Can someone point me in the right direction? I would also need the submenu to show up from the main "Applications" menu on the panel.
Let me know if I need to share more detailed information, or what I need to share.
Thanks
Peter
Offline
Hello and welcome.
Perhaps the "applications menu" hasn't picked up the change. Have you tried restarting the panel?
xfce4-panel -r
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
Hello ToZ! Thanks!
Yes, I have tried that.
Also tried enabling debugging:
PANEL_DEBUG=1
and
PANEL_DEBUG=applicationsmenu
But that didn't really show anything that I could work with.
Also tried completely logging out, and back in again.
Offline
Maybe worth mentioning as well: if I add a Whisker menu, the submenu for the applications also shows up, but without submenus, and it drops all entries from all submenus directly under it. Not practical in our case, as we have approximately 1200 Linux servers (at the moment).
I also installed menulibre and alcatraz (menu editors), and they also show the entire submenu structure.
Example desktop file: (I generate these for each user in ${HOME}/.local/share/applications , as not all users need to have all servers in their menu. This allows me to filter based on the team the user is member of.)
nfshost1.domaindev.be.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Exec=/usr/local/sbin/nfshost1
Terminal=true
Comment[nl]=SSH connectie naar nfshost1
Comment[en]=SSH connection to nfshost1
Name=nfshost1.domaindev.be HANFS DEV DC1
Categories=NFSDevelopment;NFS;
Type=Application
Icon=start-here
FYI: /usr/local/sbin/nfshost1 is a bash script that launches a SSH connection in a terminal window, with terminal logging enabled (using script)
The respective directory file: ( these get created in /usr/share/desktop-directories , as I need them available for all users on the VNC server)
NFSDevelopment.directory
[Desktop Entry]
Version=1.0
Type=Directory
Icon=folder-remote
Name=NFS Development
I generate a separate menu file, which I then include in the main menu (xfce-applications.menu). The separate menu file gets generated under /etc/xdg/menus , again as I need the entire structure available for all users. Possible empty submenus (for some users) just won't show up in their menu.
From the separate menu file: an extract containing the NFS application:
<Menu> <!-- Start Platform NFS -->
<Name>NFS</Name>
<Directory>NFS.directory</Directory>
<Menu> <!-- Start Platform NFS Labo -->
<Name>Labo</Name>
<Directory>NFSLabo.directory</Directory>
<Include>
<Category>NFSLabo</Category>
</Include>
</Menu> <!-- End Platform NFS Labo -->
<Menu> <!-- Start Platform NFS Development -->
<Name>Development</Name>
<Directory>NFSDevelopment.directory</Directory>
<Include>
<Category>NFSDevelopment</Category>
</Include>
</Menu> <!-- End Platform NFS Development -->
<Menu> <!-- Start Platform NFS Preproduction -->
<Name>Preproduction</Name>
<Directory>NFSPreproduction.directory</Directory>
<Include>
<Category>NFSPreproduction</Category>
</Include>
</Menu> <!-- End Platform NFS Preproduction -->
</Menu> <!-- End Platform NFS -->
This is how I include it in the main menu (xfce_applications.menu):
<Menu>
<Name>Platforms</Name>
<MergeFile>lcm_applications.menu</MergeFile>
</Menu>
Last edited by peterstoops (2021-05-12 06:02:27)
Offline
Which distro, version of Xfce and version of garcon are you running?
Perhaps you are hitting this bug, that was fixed in 0.7.1 (workaround in the bug report)?
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
This is on Redhat Enterprise Linux 7 (XFCE installed from EPEL):
xfce4-panel-4.12.1-4.el7
garcon-0.4.0-3
I tried the suggested workaround. It's not doing the trick for me.
I've also talked to my colleagues about his, and the majority would actually prefer to have this menu as a separate one.
So I have added another "applications" menu to the panel, changed the icon, and configured it to use our specific menu file. It just keeps telling me "No applications found" when I try to use that menu.
I do still have it configured to show up in the "main" application menu, but as before, it only shows up when accessing the menu using right click on the desktop.
Kind regards
Peter
Offline
FYI: I've copied all relevant config files (.desktop, .directory and .menu) to my home dev system.
@Home, I have XFCE version 4.12.2 ( and it runs on Debian Buster).
I add a panel, add a menu to it, change the menu to use the custom .menu file, and this works perfectly.
No modification were made to the xfce_applications.menu file.
So I undid all changes I made on the work VNC server, and only used the extra custom menu button, but still no luck!
I applied our config @work as closely as I can on my DEV VM at home.
Offline
... on the work VNC server ...
Can you expand on this? VNC always seems to cause some sort of problem.
Are you all connecting to this server via VNC as a kick-off server to connect to other hosts?
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
That is correct.
Each Infra team has it's own "management" server, equipped with a basic XFCE dekstop, and some useful tools (SQLDevelopper, Wireshark, Browser, LDAP Browser, Development tools, etc. ) It also runs a RealVNC server (vncserver-virtuald), and so each engineer can connect to it. It allows for multiple persistent connections.
Each night, a cron job will create the server connection scripts. Basically a fancy wrapper around the SSH command. This way we always have the latest situation. We deploy new VMs and decommission other ones almost on a daily basis.
Example connection script:
#!/bin/bash
TERMINAL=gnome-terminal
if [[ ! -f ~/.config/genscripts/gs.cfg ]]; then
mkdir -p ~/.config/genscripts
cp /etc/skel/.config/genscripts/gs.cfg ~/.config/genscripts/gs.cfg
fi
. ~/.config/genscripts/gs.cfg
DT=`date +%Y%m%d_%H%M`
TO_LOG=${TO_LOGPATH}/Terminal_mgmtsrv1.domain.be-${DT}.log
if [[ ${TO_DOLOG} == 1 ]]; then
if [[ ! -d ${TO_LOGPATH} ]]; then
mkdir -p ${TO_LOGPATH}
fi
> ${TO_LOG}
fi
if [[ ${TO_DOLOG} == 1 ]]; then
$TERMINAL --title "${USR}@mgmtsrv1.domain.be - MANAGEMENT infrastructure_server p (on)" -- script -a -c "ssh -A -X -o strictHostKeyChecking=no -o ServerAliveInterval=30 ${USR}@mgmtsrv1.domain.be" -f ${TO_LOG}
else
$TERMINAL --title "${USR}@mgmtsrv1.domain.be - MANAGEMENT infrastructure_server p (on)" -- ssh -A -X -o strictHostKeyChecking=no -o ServerAliveInterval=30 ${USR}@mgmtsrv1.domain.be
fi
These are the scripts that we launch in the ".desktop" files (the menu entries)
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Exec=/usr/local/sbin/mgmtsrv1
Terminal=true
Comment[nl]=SSH connectie naar mgmtsrv1
Comment[en]=SSH connection to mgmtsrv1
Name=mgmtsrv1.domain.be MANAGEMENT infrastructure_server p (on)
Categories=MANAGEMENTProduction;MANAGEMENT;
Type=Application
Icon=start-here
A colleague yesterday also pointed out that the Whisker menu does do the right thing: it has an option to display the "menu structure" (i.e. the nested menu) and that works just fine, menu shows up correctly. I personally don't use it, so I did not know. It is however not so convenient, as it requires a click to open a submenu.
Offline
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 585.53 KiB (Peak: 602.38 KiB) ]