Weird jgmeu happenings

So I have jgmenu in polybar and for some reason in the exit menu alongside the exit options are all the apps shown in my accessories section.

this is my append.csv:

^sep()
Lock,i3lock-fancy -p,system-lock-screen
Exit,^checkout(exit),system-shutdown

exit,^tag(exit)
exit to prompt,openbox --exit,system-log-out
suspend,systemctl -i suspend,system-log-out
reboot,systemctl -i reboot,system-reboot
poweroff,systemctl -i poweroff,system-shutdown

Any ideas? @malm

setting the csv_cmd as “pmenu” fixed my issue.

Still would like to get xdg, lx options sorted though.

I’m drawing a blank on that one.
Working all day today, so will have to wait until tonight.
Could you post the output of

jgmenu_run lx

What .menu file are you using (/etc/xdg/menus)

Sorry for being brief. On phone.

Thanks for taking the time to reply :slight_smile:

Okay output of jgmenu_run lx:

Mail Reader,exo-open --launch MailReader,emblem-mail
networkmanager_dmenu (Networkmanager Settings),networkmanager_dmenu,
Revolt,revolt,org.perezdecastro.Revolt
Steam (Native),/usr/bin/steam-native,steam
Steam (Runtime),/usr/bin/steam-runtime,steam
Telegram Desktop,/usr/bin/telegram-desktop --,telegram
Thunderbird (Bleeding edge) (Mail Client (Bleeding edge)),/opt/thunderbird-beta/thunderbird,thunderbird-beta
Transmission (BitTorrent Client),transmission-gtk,transmission
Vivaldi (Web Browser),/usr/bin/vivaldi-stable,vivaldi
Web Browser,exo-open --launch WebBrowser,web-browser
Office,^tag(Office)
Back,^back(),go-previous
Typora (Markdown Editor),typora,typora
Other,^tag(Other)
Back,^back(),go-previous
Autostart Editor,/usr/bin/ob-autostart,openbox
Compositing Editor,/usr/bin/paranoid.py,desktop-effects
jgmenu (Application Menu),jgmenu_run,start-here
Programming,^tag(Development)
Back,^back(),go-previous
Atom (Text Editor),/usr/lib/atom/atom,atom
Brackets,/opt/brackets/brackets,brackets
CMake,cmake-gui,CMakeSetup
Electron,electron,electron
Emacs (Text Editor),emacs,emacs
Geany (Integrated Development Environment),geany,geany
Sublime Text 3 Dev (Text Editor),subl3,sublime-text
Sound & Video,^tag(Multimedia)
Back,^back(),go-previous
Audacious (Music Player),audacious,audacious
Calf Plugin Pack for JACK,calfjackhost,calf
Cantata (Music Player Client),cantata,cantata
DeaDBeeF (Audio Player),deadbeef,deadbeef
EasyTAG (Audio File Metadata Editor),easytag,easytag
FFADO Mixer (Firewire audio mixer),ffado-mixer,hi64-apps-ffado
GNOME ALSA Mixer,gnome-alsamixer,/usr/share/pixmaps/gnome-alsamixer/gnome-alsamixer-icon.png
GNOME MPV,gnome-mpv,io.github.GnomeMpv
mpv Media Player (Multimedia player),mpv --player-operation-mode=pseudo-gui --,mpv
Nicotine-Plus,nicotine,nicotine-plus
PulseAudio Volume Control (Volume Control),pavucontrol,multimedia-volume-control
PulseEffects (Equalizer, Compressor and Other Audio Effects),pulseeffects,pulseeffects
Qt V4L2 test Utility,qv4l2,qv4l2
Sonata,sonata,sonata
Volti,volti,multimedia-volume-control
Xfmpc (MPD client),xfmpc,stock_volume
System Tools,^tag(System)
Back,^back(),go-previous
Avahi Zeroconf Browser,/usr/bin/avahi-discover,network-wired
Bulk Rename,/usr/lib/Thunar/ThunarBulkRename,Thunar
dconf Editor (Configuration editor for dconf),dconf-editor,ca.desrt.dconf-editor
File Manager PCManFM (File Manager),pcmanfm,system-file-manager
GParted (Partition Editor),/usr/bin/gparted,gparted
Htop (Process Viewer),^term(htop),htop
Simpleterm,st,utilities-terminal
System Profiler and Benchmark,hardinfo,/usr/share/hardinfo/pixmaps/logo.png
Task Manager,xfce4-taskmanager,utilities-system-monitor
Termite,termite,utilities-terminal
Thunar File Manager (File Manager),thunar,Thunar
Tint2 (Tint2 panel),tint2,tint2
urxvt,urxvt,utilities-terminal
urxvt (client),urxvtc,utilities-terminal
urxvt (tabbed),urxvt-tabbed,utilities-terminal
USB Image Writer (Make a bootable USB stick),mintstick -m iso,system-run
USB Stick Formatter (Format a USB stick),mintstick -m format,system-run
UXTerm,uxterm,xterm-color_48x48
WoeUSB,woeusbgui,woeusbgui-icon
XTerm,xterm,xterm-color_48x48
Preferences,^tag(DesktopSettings)
Back,^back(),go-previous
Accessibility,xfce4-accessibility-settings,preferences-desktop-accessibility
ACYLS,bash -c 'python3 ~/.icons/ACYLS/scripts/run.py',acyls
Appearance,xfce4-appearance-settings,preferences-desktop-theme
ARandR (Screen Settings),arandr,display
Caffeine-ng Preferences,/usr/bin/caffeine -p,caffeine
CoverGloobus Configuration,covergloobus-config,covergloobus
Default applications for LXSession,lxsession-default-apps,preferences-desktop
Desktop Preferences,pcmanfm --desktop-pref,user-desktop
Desktop Session Settings,lxsession-edit,preferences-desktop
Display,xfce4-display-settings,video-display
File Manager,thunar-settings,system-file-manager
Keyboard,xfce4-keyboard-settings,preferences-desktop-keyboard
Kickshaw,/usr/bin/kickshaw,openbox
Languages,mintlocale,preferences-desktop-locale
MIME Type Editor,xfce4-mime-settings,application-x-executable
Mouse and Touchpad,xfce4-mouse-settings,preferences-desktop-peripherals
Network Connections,nm-connection-editor,preferences-system-network
Oomox: customize icons and GTK themes (Oomox),oomox-gui,com.github.actionless.oomox
Openbox Configuration Manager (Configuration Manager),obconf,obconf
Openbox Key bindings,obkey,obconf
Panel,xfce4-panel --preferences,xfce4-panel
Power Manager,xfce4-power-manager-settings,xfce4-power-manager-settings
Preferred Applications,libfm-pref-apps,preferences-desktop
Preferred Applications,exo-preferred-applications,preferences-desktop-default-applications
Privilege granting,gksu-properties,gksu.png
Qt5 Settings,qt5ct,preferences-desktop-theme
Removable Drives and Media,thunar-volman-settings,drive-removable-media
Screensaver,xscreensaver-demo,xscreensaver
Settings Editor,xfce4-settings-editor,preferences-system
Settings Manager,xfce4-settings-manager,preferences-desktop
Tint2 Settings (Panel configurator),tint2conf,tint2conf

I’ll probably need to delete one of the menus shown?

Hi :slight_smile:

Are you sure that’s all of the output? It looks truncated to me - but maybe that’s the problem.

Shall we try to get csv_cmd=lx working to start with.

The lx module uses libmenu-cache which needs the environment variable XDG_MENU_PREFIX set.

If it’s empty, jgmenu sets it for you in the order “gnome-”, “lxde-”, “lxqt-”, “kde-” (depending on what’s available on your system). We don’t bother with xfce- because lx libmenu-cache can’t parse it AFAIK.

Could you confirm if XDG_MENU_PREFIX is set and if so to what.

set | grep XDG_MENU_PREFIX
echo $XDG_MENU_PREFIX

For the purposes of fault finding, either unset or “lxde-” is fine. It doesn’t matter that you have other menu files installed.

May I assume that your /etc/xdg/menus/lxde-applications.menu has not been hacked around with? (i.e. original from lxmenu-data)

If you have populated ~/.config/jgmenu/{ap,pre}pend.csv, jgmenu_run lx will include these at the right point.

I would expect the output from jgmenu_run lx to look similar to this (slighly pseudo, but hopefully you understand what I mean).

firefox
thunar
termite
^sep()

Accessories,^checkout(Accessories),applications-accessories
Graphics,^checkout(Graphics),applications-graphics
Internet,^checkout(Internet),applications-internet
Office,^checkout(Office),applications-office
etc...

^sep()
i3lock
Exit,^checkout(exit)

^tag(exit)
openbox --exit
systemctl -i poweroff

^tag(Accessories)
item1.1
item1.2

^tag(Graphics)
item2.1
item2.2

etc...

Yours appears truncated shortly before ^tag(Office). If that’s genuinely the case, that might be a clue regarding the error.

Are all your menu related files utf-8 or ascii? They should be. XDG specify that menu related files should be ascii/utf-8 but I’ve come across a couple of third party applications (windows related and qt5) which were unicode.

Check files with file -i. You don’t want any “charset=iso-8859” and similar.

For example:

file -i /usr/share/applications/*.desktop | grep -v 'utf-8\|ascii'

pmenu and jgmenu check for unicode files and cope with them, I’ve not fully built that into lx and xdg yet - on the TODO list.

Have you used any “exoctic” editors, virtual machines, etc which might have given you strange line-endings?

It would be worth checking that the following environment variables are not set to anything strange:
XDG_CONFIG_HOME
XDG_CONFIG_DIRS
XDG_DATA_HOME
XDG_DATA_DIRS

Are they set at all?

This should be set to ~/.config, the rest I’m not sure

@malm, no its not all the output, I forgot to paste the rest.

warn: NULL passed to sbuf_addstr
Web,firefox,firefox
File,thunar,system-file-manager
Terminal,st,utilities-terminal
Music,audacious, music
^sep()Accessories,^checkout(Accessories),applications-accessories
Games,^checkout(Games),applications-games
Graphics,^checkout(Graphics),applications-graphics
Internet,^checkout(Internet),applications-internet
Office,^checkout(Office),applications-office
Other,^checkout(Other),applications-other
Programming,^checkout(Development),applications-development
Sound & Video,^checkout(Multimedia),applications-multimedia
System Tools,^checkout(System),applications-system
^sep()
Preferences,^checkout(DesktopSettings),preferences-desktop
^sep()
Lock,i3lock-fancy -p,system-lock-screen
Exit,^checkout(exit),system-shutdown

exit,^tag(exit)
exit to prompt,openbox --exit,system-log-out
suspend,systemctl -i suspend,system-log-out
reboot,systemctl -i reboot,system-reboot
poweroff,systemctl -i poweroff,system-shutdownAccessories,^tag(Accessories)
Back,^back(),go-previous
About Xfce,xfce4-about,help-about
Archive Manager,file-roller,file-roller
Atom (Text Editor),/usr/lib/atom/atom,atom
Caffeine-ng,/usr/bin/caffeine,caffeine
Catfish File Search (File search),/usr/bin/catfish,catfish
ClipIt,clipit,clipit-trayicon
Clipman,xfce4-clipman,xfce4-clipman-plugin
compton (X compositor),compton --xrender-sync-fence,compton
CoverGloobus,covergloobus,covergloobus
Disks,gnome-disks,gnome-disks
File Manager,exo-open --launch FileManager,system-file-manager
FlashFire Image Writer,flashfire,usb-creator
Galculator,galculator,galculator
Image Viewer,gpicview,gpicview
Neovim (Text Editor),^term(nvim),nvim
nitrogen (Wallpaper Setter),nitrogen,nitrogen
razerCommander,/usr/bin/razercommander,org.gabmus.razercommander
Redshift (Color temperature adjustment),redshift-gtk,redshift
Screenshot,xfce4-screenshooter,applets-screenshooter
Terminal Emulator,exo-open --launch TerminalEmulator,utilities-terminal
Tomboy Notes (Note-taker),tomboy --search,tomboy
USB Image Writer,mintstick -m iso,usb-creator
USB Stick Formatter,mintstick -m format,usb-creator
Vim (Text Editor),^term(vim),gvim
Games,^tag(Games)
Back,^back(),go-previous
Baldur's Gate II: Enhanced Edition,steam steam://rungameid/257350,steam_icon_257350
Borderlands 2,steam steam://rungameid/49520,steam_icon_49520
Linux Steam Integration,lsi-settings,steam
LSI Steam,/usr/bin/lsi-steam,steam
Minecraft,minecraft,minecraft
Steam (Native),/usr/bin/steam-native,steam
Steam (Runtime),/usr/bin/steam-runtime,steam
Graphics,^tag(Graphics)
Back,^back(),go-previous
GNU Image Manipulation Program (Image Editor),gimp-2.8,gimp
Gpick (Color picker),gpick,gpick
Inkscape (Vector Graphics Editor),inkscape,inkscape
Peek (Animated GIF recorder),peek,com.uploadedlobster.peek
Viewnior,viewnior,viewnior
Internet,^tag(Internet)
Back,^back(),go-previous
Avahi SSH Server Browser,/usr/bin/bssh,network-wired
Avahi VNC Server Browser,/usr/bin/bvnc,network-wired
Chromium (Web Browser),/usr/bin/chromium,chromium
Deluge (BitTorrent Client),deluge-gtk,deluge
Dropbox (Network Storage),dropbox,dropbox
FileZilla (FTP client),filezilla,filezilla
Firefox (Web Browser),/usr/lib/firefox/firefox,firefox
Firefox Developer Edition (Web Browser),/usr/lib/firefox-developer-edition/firefox,firefox-developer-edition
HexChat (IRC Client),hexchat --existing,hexchat
Linux Steam Integration,lsi-settings,steam
LSI Steam,/usr/bin/lsi-steam,steam
Mail Reader,exo-open --launch MailReader,emblem-mail
networkmanager_dmenu (Networkmanager Settings),networkmanager_dmenu,
Revolt,revolt,org.perezdecastro.Revolt
Steam (Native),/usr/bin/steam-native,steam
Steam (Runtime),/usr/bin/steam-runtime,steam
Telegram Desktop,/usr/bin/telegram-desktop --,telegram
Thunderbird (Bleeding edge) (Mail Client (Bleeding edge)),/opt/thunderbird-beta/thunderbird,thunderbird-beta
Transmission (BitTorrent Client),transmission-gtk,transmission
Vivaldi (Web Browser),/usr/bin/vivaldi-stable,vivaldi
Web Browser,exo-open --launch WebBrowser,web-browser
Office,^tag(Office)
Back,^back(),go-previous
Typora (Markdown Editor),typora,typora
Other,^tag(Other)
Back,^back(),go-previous
Autostart Editor,/usr/bin/ob-autostart,openbox
Compositing Editor,/usr/bin/paranoid.py,desktop-effects
jgmenu (Application Menu),jgmenu_run,start-here
Programming,^tag(Development)
Back,^back(),go-previous
Atom (Text Editor),/usr/lib/atom/atom,atom
Brackets,/opt/brackets/brackets,brackets
CMake,cmake-gui,CMakeSetup
Electron,electron,electron
Emacs (Text Editor),emacs,emacs
Geany (Integrated Development Environment),geany,geany
Sublime Text 3 Dev (Text Editor),subl3,sublime-text
Sound & Video,^tag(Multimedia)
Back,^back(),go-previous
Audacious (Music Player),audacious,audacious
Calf Plugin Pack for JACK,calfjackhost,calf
Cantata (Music Player Client),cantata,cantata
DeaDBeeF (Audio Player),deadbeef,deadbeef
EasyTAG (Audio File Metadata Editor),easytag,easytag
FFADO Mixer (Firewire audio mixer),ffado-mixer,hi64-apps-ffado
GNOME ALSA Mixer,gnome-alsamixer,/usr/share/pixmaps/gnome-alsamixer/gnome-alsamixer-icon.png
GNOME MPV,gnome-mpv,io.github.GnomeMpv
mpv Media Player (Multimedia player),mpv --player-operation-mode=pseudo-gui --,mpv
Nicotine-Plus,nicotine,nicotine-plus
PulseAudio Volume Control (Volume Control),pavucontrol,multimedia-volume-control
PulseEffects (Equalizer, Compressor and Other Audio Effects),pulseeffects,pulseeffects
Qt V4L2 test Utility,qv4l2,qv4l2
Sonata,sonata,sonata
Volti,volti,multimedia-volume-control
Xfmpc (MPD client),xfmpc,stock_volume
System Tools,^tag(System)
Back,^back(),go-previous
Avahi Zeroconf Browser,/usr/bin/avahi-discover,network-wired
Bulk Rename,/usr/lib/Thunar/ThunarBulkRename,Thunar
dconf Editor (Configuration editor for dconf),dconf-editor,ca.desrt.dconf-editor
File Manager PCManFM (File Manager),pcmanfm,system-file-manager
GParted (Partition Editor),/usr/bin/gparted,gparted
Htop (Process Viewer),^term(htop),htop
Simpleterm,st,utilities-terminal
System Profiler and Benchmark,hardinfo,/usr/share/hardinfo/pixmaps/logo.png
Task Manager,xfce4-taskmanager,utilities-system-monitor
Termite,termite,utilities-terminal
Thunar File Manager (File Manager),thunar,Thunar
Tint2 (Tint2 panel),tint2,tint2
urxvt,urxvt,utilities-terminal
urxvt (client),urxvtc,utilities-terminal
urxvt (tabbed),urxvt-tabbed,utilities-terminal
USB Image Writer (Make a bootable USB stick),mintstick -m iso,system-run
USB Stick Formatter (Format a USB stick),mintstick -m format,system-run
UXTerm,uxterm,xterm-color_48x48
WoeUSB,woeusbgui,woeusbgui-icon
XTerm,xterm,xterm-color_48x48
Preferences,^tag(DesktopSettings)
Back,^back(),go-previous
Accessibility,xfce4-accessibility-settings,preferences-desktop-accessibility
ACYLS,bash -c 'python3 ~/.icons/ACYLS/scripts/run.py',acyls
Appearance,xfce4-appearance-settings,preferences-desktop-theme
ARandR (Screen Settings),arandr,display
Caffeine-ng Preferences,/usr/bin/caffeine -p,caffeine
CoverGloobus Configuration,covergloobus-config,covergloobus
Default applications for LXSession,lxsession-default-apps,preferences-desktop
Desktop Preferences,pcmanfm --desktop-pref,user-desktop
Desktop Session Settings,lxsession-edit,preferences-desktop
Display,xfce4-display-settings,video-display
File Manager,thunar-settings,system-file-manager
Keyboard,xfce4-keyboard-settings,preferences-desktop-keyboard
Kickshaw,/usr/bin/kickshaw,openbox
Languages,mintlocale,preferences-desktop-locale
MIME Type Editor,xfce4-mime-settings,application-x-executable
Mouse and Touchpad,xfce4-mouse-settings,preferences-desktop-peripherals
Network Connections,nm-connection-editor,preferences-system-network
Oomox: customize icons and GTK themes (Oomox),oomox-gui,com.github.actionless.oomox
Openbox Configuration Manager (Configuration Manager),obconf,obconf
Openbox Key bindings,obkey,obconf
Panel,xfce4-panel --preferences,xfce4-panel
Power Manager,xfce4-power-manager-settings,xfce4-power-manager-settings
Preferred Applications,libfm-pref-apps,preferences-desktop
Preferred Applications,exo-preferred-applications,preferences-desktop-default-applications
Privilege granting,gksu-properties,gksu.png
Qt5 Settings,qt5ct,preferences-desktop-theme
Removable Drives and Media,thunar-volman-settings,drive-removable-media
Screensaver,xscreensaver-demo,xscreensaver
Settings Editor,xfce4-settings-editor,preferences-system
Settings Manager,xfce4-settings-manager,preferences-desktop
Tint2 Settings (Panel configurator),tint2conf,tint2conf

Regarding echo $XDG_MENU_PREFIX I get no output.

Anything related to file -i seem correct.

I haven’t played around with this menu at all.

Nothing that stands out.

Sorry to be vague, I am treading unknown waters here. Hopefully the full output will give you some ideas.

Line six of your output doesn’t look right. There should be a space after ^sep()

Does this commit help?

Best way to test is:

git clone https://github.com/johanmalm/jgmenu.git
cd jgmenu
make prefix=$HOME install
killall jgmenu
jgmenu
./scripts/uninstall.sh

(and set csv_cmd=lx in jgmenurc)

No still the same issue.

What happens if you do the following in the git-repo top level directory:

./jgmenu-lx | jgmenu --simple

If that still doesn’t work, could you post the output of ./jgmenu-lx | head

We don’t want to see this line:

^sep()Accessories,^checkout(Accessories),applications-accessories

It should be

^sep()
Accessories,^checkout(Accessories),applications-accessories

I get this:

zsh: no such file or directory: ./jgmenu-lx
info: using config file /home/dobbie/.config/jgmenu/jgmenurc
info: screen:        (3840,0,3840,2160)
info: _NET_WORKAREA: (0,0,7680,2160)
info: _NET_WORKAREA: panel @ 'left'; margin=0
info: halign has been set
info: got font from jgmenurc
info: set font to 'San Francisco Display Regular 17'
fatal: input file contains no menu items

Gives me:

zsh: no such file or directory: ./jgmenu-lx

Is there another directory I should be looking in?

You need to be in the jgmenu directory that you git-cloned.

Try

git clone https://github.com/johanmalm/jgmenu.git
cd jgmenu
make
./jgmenu-lx | jgmenu --simple
./jgmenu-lx | head

Got ya.

./jgmenu-lx | jgmenu --simple:

info: using config file /home/dobbie/.config/jgmenu/jgmenurc
warn: NULL passed to sbuf_addstr
info: screen:        (3840,0,3840,2160)
info: _NET_WORKAREA: (0,0,7680,2160)
info: _NET_WORKAREA: panel @ 'left'; margin=0
info: halign has been set
info: got font from jgmenurc
info: set font to 'San Francisco Display Regular 17'

./jgmenu-lx | head

warn: NULL passed to sbuf_addstr
Web,firefox,firefox
File,thunar,system-file-manager
Terminal,st,utilities-terminal
Music,audacious, music
^sep()
Accessories,^checkout(Accessories),applications-accessories
Games,^checkout(Games),applications-games
Graphics,^checkout(Graphics),applications-graphics
Internet,^checkout(Internet),applications-internet
Office,^checkout(Office),applications-office

That looks promising. The output is as I hoped it would be.
Did the menu behave correctly?

If the above works, I think the original “fix” fixed it.

Assuming you’ve got the same prepend.csv in ~/.config/jgmenu/ and csv_cmd=lx in jgmenurc, let’s try it again.

I assume you have ~/bin in your $PATH

Have you got a jgmenu and jgmenu_run in $HOME/bin (i.e. the version you installed from the git repo)? If so, try

hash jgmenu
jgmenu

If not, let’s re-do the whole thing (with a hash this time)

git clone https://github.com/johanmalm/jgmenu.git
cd jgmenu
make prefix=$HOME install
killall jgmenu
hash jgmenu
jgmenu

If, having done the above, you still experience the problem, please post the output of type jgmenu and jgmenu --version

If the above worked, we might just have experienced a hash problem. This depends on your shell and shell setup. When you install two versions of the same program it’s worth doing a type check. If type doesn’t give you the right path, you need to either use the full path to the program or re-hash the program (e.g. hash jgmenu).

1 Like

This fixed it, thanks for the help @malm

@Dobbie03 Thanks. That’s great. I really appreciate your help in quashing that bug. I couldn’t reproduce it on my box and don’t like bugs hanging around.

1 Like

I didn’t do much other than get confused. It was all you man :smiley:

Let’s call it joint effort :star_struck:

I’m working on jgmenu init now. Appreciate any feedback on it.
Suggest backing up your jgmenurc and tint2rc first.

1 Like

For sure! Will let you know.