You are not logged in.
Starting obmenu throws this error,
toor@bunsenlabs:~$ obmenu
Traceback (most recent call last):
File "/usr/bin/obmenu", line 617, in <module>
app.init()
File "/usr/bin/obmenu", line 521, in init
self.menu.loadMenu(self.menu_path)
File "/usr/lib/python2.7/dist-packages/obxml.py", line 153, in loadMenu
self.dom = xml.dom.minidom.parseString(fil.read())
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 275, column 19
Did I screw up my python? I had installed few openbox themes using obconf and gtk themes few mins before getting this error. I had also changed the hostname of my system.
Last edited by linux_user (2019-04-06 17:54:11)
"Blind faith to authority is the greatest enemy of truth."
Offline
Did you make any changes menu.xml?
"All we are is dust in the wind, dude"
- Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
- Wayne Campbell
Offline
Did you make any changes menu.xml?
Yes, I had made some changes - some rearrangements, some commenting and some deletion. But that was few days back and everything was working well. Now, even obconf works well.
Here's my menu.xml
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/menu.xsd">
<menu id="exit-menu" label="Exit">
<item label="Log out">
<action name="Execute">
<command>
bl-exit --logout
</command>
</action>
</item>
<item label="Suspend">
<action name="Execute">
<command>
bl-exit --suspend
</command>
</action>
</item>
<item label="Reboot">
<action name="Execute">
<command>
bl-exit --reboot
</command>
</action>
</item>
<item label="Power off">
<action name="Execute">
<command>
bl-exit --poweroff
</command>
</action>
</item>
</menu>
<menu id="root-menu" label="Openbox 3">
<item label="Run Program">
<action name="Execute">
<command>
gmrun
</command>
</action>
</item>
<separator/>
<item label="Terminal">
<action name="Execute">
<command>
x-terminal-emulator
</command>
</action>
</item>
<item label="Web Browser">
<action name="Execute">
<command>
x-www-browser
</command>
</action>
</item>
<item label="File Manager">
<action name="Execute">
<command>
bl-file-manager
</command>
</action>
</item>
<item label="Text Editor">
<action name="Execute">
<command>
bl-text-editor
</command>
</action>
</item>
<item label="Media Player">
<action name="Execute">
<command>
bl-media-player
</command>
</action>
</item>
<item label="Catfish File Search">
<action name="Execute">
<command>
catfish
</command>
</action>
</item>
<!--<item label="Archive Manager">
<action name="Execute">
<command>
file-roller
</command>
</action>
</item>
<item label="Task Manager (htop)">
<action name="Execute">
<command>x-terminal-emulator -T 'htop task manager' -e htop</command>
</action>
</item>-->
<separator/>
<!--<menu execute="bl-sshconfig-pipemenu" id="sshconfig" label="SSH"/>
<menu execute="bl-remote-desktop-pipemenu" id="remotedesktop" label="Remote Desktop"/>
<menu execute="bl-graphics-pipemenu" id="bl-graphics-pipemenu" label="Graphics"/>
<menu execute="bl-multimedia-pipemenu" id="bl-multimedia-pipemenu" label="Multimedia"/>
<menu execute="bl-places-pipemenu" id="pipe-placesmenu" label="Places"/>
<menu execute="bl-recent-files-pipemenu -rl15" id="pipe-recentfilesmenu" label="Recent Files"/>
<separator/>-->
<menu id="obConfig" label="Openbox">
<item label="Edit menu.xml">
<action name="Execute">
<command>
bl-text-editor ~/.config/openbox/menu.xml
</command>
</action>
</item>
<item label="Edit rc.xml">
<action name="Execute">
<command>
bl-text-editor ~/.config/openbox/rc.xml
</command>
</action>
</item>
<item label="Edit autostart">
<action name="Execute">
<command>
bl-text-editor ~/.config/openbox/autostart
</command>
</action>
</item>
<separator/>
<item label="Menu Editor">
<action name="Execute">
<command>
obmenu
</command>
</action>
</item>
<item label="WM Preferences">
<action name="Execute">
<command>
obconf
</command>
</action>
</item>
<item label="How to Edit Menu">
<action name="Execute">
<command>
yad --button="OK":0 --center --window-icon=distributor-logo-bunsenlabs --text-info --title="How to Edit the Menu" --filename="/usr/share/bunsen/docs/helpfile-menu.txt" --width=900 --height=700 --fontname=Monospace
</command>
</action>
</item>
<separator/>
<item label="Reconfigure">
<action name="Reconfigure"/>
</item>
<item label="Restart">
<action name="Restart"/>
</item>
</menu>
<menu execute="bl-compositor" id="CompositingPipeMenu" label="Compositor"/>
<menu execute="bl-conky-pipemenu" id="pipe-conkymenu" label="Conky"/>
<menu execute="bl-tint2-pipemenu" id="pipe-tint2menu" label="Tint2"/>
<item label="Appearance">
<action name="Execute">
<command>
lxappearance
</command>
</action>
</item>
<item label="Wallpaper">
<action name="Execute">
<command>
nitrogen
</command>
</action>
</item>
<item label="BLOB Themes Manager">
<action name="Execute">
<command>
bl-obthemes
</command>
</action>
</item>
<item label="Notifications">
<action name="Execute">
<command>xfce4-notifyd-config</command>
</action>
</item>
<item label="Power Management">
<action name="Execute">
<command>
xfce4-power-manager-settings
</command>
</action>
</item>
<menu id="dmenuconfig" label="dmenu">
<item label="Edit Start-up Script">
<action name="Execute">
<command>
bl-text-editor ~/.config/dmenu/dmenu-bind.sh
</command>
</action>
</item>
<separator label="Help"/>
<item label="man page">
<action name="Execute">
<command>
x-terminal-emulator -T 'man dmenu' -e man dmenu
</command>
</action>
</item>
</menu>
<menu id="gmrunconfig" label="gmrun">
<item label="Edit Config File">
<action name="Execute">
<command>
bl-text-editor ~/.gmrunrc
</command>
</action>
</item>
<separator label="Help"/>
<item label="man page">
<action name="Execute">
<command>
x-terminal-emulator -T 'man gmrun' -e man gmrun
</command>
</action>
</item>
</menu>
<menu id="DisplaySettings" label="Display">
<item label="ARandR Screen Layout Editor">
<action name="Execute">
<command>
arandr
</command>
</action>
</item>
<separator label="Help"/>
<item label="man xrandr">
<action name="Execute">
<command>
x-terminal-emulator -T 'man xrandr' -e man xrandr
</command>
</action>
</item>
</menu>
<!--<menu execute="bl-printing-pipemenu" id="PrintingPipeMenu" label="Printers"/>-->
<item label="Synaptic Package Manager">
<action name="Execute">
<command>
pkexec synaptic
</command>
</action>
</item>
<!--<item label="Login Settings">
<action name="Execute">
<command>
pkexec bl-text-editor /etc/lightdm/lightdm-gtk-greeter.conf /etc/lightdm/lightdm.conf
</command>
</action>
</item>-->
<item label="GParted">
<action name="Execute">
<command>
pkexec gparted
</command>
</action>
</item>
<item label="Edit Debian Alternatives">
<action name="Execute">
<command>
galternatives
</command>
</action>
</item>
<separator/>
<!--<item label="About Bunsen Alternatives">
<action name="Execute">
<execute>yad --button="OK":0 --center --window-icon=distributor-logo-bunsenlabs --text-info --title="About Bunsen Alternatives" --filename="/usr/share/bunsen/docs/helpfile-bl-alternatives.txt" --width=900 --height=700 --fontname=Monospace
</execute>
</action>
</item>-->
<menu execute="bl-help-pipemenu" id="help" label="Help & Resources"/>
<menu execute="bl-kb-pipemenu" id="keybinds" label="Display Keybinds"/>
<separator/>
<item label="Lock Screen">
<action name="Execute">
<command>
bl-lock
</command>
</action>
</item>
<item label="Exit">
<action name="Execute">
<command>
bl-exit
</command>
</action>
</item>
<!-- comment out or remove the preceding "Exit" item,
and uncomment the following "exit-menu"
for one-click exit options. -->
<!--
<menu id="exit-menu"></menu>
-->
</menu>
</openbox_menu>
"Blind faith to authority is the greatest enemy of truth."
Offline
Sorry I can't test. On i3 over here.
I know when I was on Openbox and if I used gui to configure the obmenu rather than edit the .xml directly sometimes it would cause errors.
Hopefully someone more knowledgeable can help.
Last edited by Döbbie03 (2019-04-06 08:59:06)
"All we are is dust in the wind, dude"
- Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
- Wayne Campbell
Offline
Sorry I can't test. On i3 over here.
I know when I was on Openbox and if I used gui to configure the obmenu rather than edit the .xml directly sometimes it would cause errors.
Hopefully someone more knowledgeable can help.
I doubt it's because of the menu edit, since the rest of the menu actually works and running obmenu on terminal throws the error as well.
Got to do with obmenu and/or its dependencies.
"Blind faith to authority is the greatest enemy of truth."
Offline
Works for me on my buster/lithium setup and the package is the same as in stretch/helium...
rachel@TyrellCorp:~$ apt-cache policy obmenu
obmenu:
Installed: 2.0-1
Candidate: 2.0-1
Version table:
*** 2.0-1 100
100 /var/lib/dpkg/status
1.0-4 500
500 https://deb.debian.org/debian buster/main amd64 Packages
rachel@TyrellCorp:~$
If your using a version that's not in the repos, try removing it and using the debian package.
If still no joy backing up your menu.xml and using the default one by copying it from /etc/xdg/openbox/
I don't care what you do at home. Would you care to explain?
Offline
Here's a bug with the same errors caused by a malformed menu.xml...
I don't care what you do at home. Would you care to explain?
Offline
Found the culprit, and thanks to @hhh for directing me towards it.
I comment those entries on menu.xml that I do not want instead of deleting them. As @hhh suggested I tried the default menu.xml and it worked. So I went back to using my menu.xml and started un-commenting each of those commented entries, restarted openbox and tested obmenu.
obmenu worked in all cases except when this entry was commented,
<item label="About Bunsen Alternatives">
<action name="Execute">
<execute>yad --button="OK":0 --center --window-icon=distributor-logo-bunsenlabs --text-info --title="About Bunsen Alternatives" --filename="/usr/share/bunsen/docs/helpfile-bl-alternatives.txt" --width=900 --height=700 --fontname=Monospace
</execute>
</action>
</item>
And the reason? Commenting is done by prefixing codes with <!-- and post fixing it with -->. The above entry has a number of -- in it (--center, --window etc).
Although -- isn't -->, I believe that parsing this might have caused the issue. I checked the other commented entries and there is no -- in between the prefix <!-- and postfix -->.
To make sure this is the culprit, I went ahead and commented the "How to Edit Menu" entry which has lot of -- in it,
<item label="How to Edit Menu">
<action name="Execute">
<command>
yad --button="OK":0 --center --window-icon=distributor-logo-bunsenlabs --text-info --title="How to Edit the Menu" --filename="/usr/share/bunsen/docs/helpfile-menu.txt" --width=900 --height=700 --fontname=Monospace
</command>
</action>
</item>
And as I expected, running obmenu threw error. So that was my case - an issue with parsing/parser. Perhaps some of you can try this and see if it breaks obmenu.
Last edited by linux_user (2019-04-06 17:55:48)
"Blind faith to authority is the greatest enemy of truth."
Offline
^ Confirmed
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
This isn't in fact a bug. The xml commenting syntax is more complicated than it appears ( -- has a specific meaning which would have to be googled for ) and no -- are allowed inside the <!-- and -->. Most web browsers will overlook it, but the same applies to double dashes inside html comments.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
^ are you sure? i thought the culprit was """.
in any case, have you tried enclosing your commands like this:
<command><![CDATA[
command --to --execute "with quotes"
]]></command>
(newlines not required, only added to make it visually clearer)
Last edited by ohnonot (2019-04-07 12:28:13)
Offline
^ are you sure? i thought the culprit was """.
in any case, have you tried enclosing your commands like this:<command><![CDATA[ command --to --execute "with quotes" ]]></command>
(newlines not required, only added to make it visually clearer)
Yes, I am sure that I didn't miss the -- in <!--.
I did this too, putting the opening and closing tags in different lines.
Sorry, I misunderstood what you said.
Yes, Using <![CDATA[ and ]]> works. The entry is commented off and obmenu works too.
Wow... Thanks.
Last edited by linux_user (2019-04-07 15:30:34)
"Blind faith to authority is the greatest enemy of truth."
Offline
^^ @ohnonot - yes let’s use CDATA. I’ll create a PR for @johnraff
Offline