You are not logged in.

#1 2016-04-14 00:25:04

oneleaf
Member
Registered: 2016-03-29
Posts: 26

[SOLVED] A newbie question regarding Openbox menu commands

Hello,
I really like the way Openbox menus work regarding manually editing the xml file. I have always had issues with other desktop environments with auto-generating menus, not behaving the way I want it to. So it is nice to be able to just edit it directly.

However, there is one simple question I had regarding the actual commands that you put in the xml file: basically, how do I find out the correct command to put in there?

An example is Synaptic. The .desktop file that is in usr/share/applications has an entry for Exec=synaptic-pkexec, and so my instinct is to put "synaptic-pkexec" in the menu.xml file if I want to have a menu entry for Synaptic. But that doesn't work and in fact, Bunsenlabs uses "gksudo synaptic".

What is the best way to find the correct command? I know in most cases, the name of the program is all you need, but sometimes it is not as obvious. Thanks!

Last edited by oneleaf (2016-04-14 07:11:47)

Offline

#2 2016-04-14 06:59:44

vasa1
Member
Registered: 2015-09-29
Posts: 204

Re: [SOLVED] A newbie question regarding Openbox menu commands

So does gksudo synaptic work for you in menu.xml or doesn't it?

As for finding the correct command for other applications, if you run into trouble, just ask smile


Using the Openbox (3.5.2) session of Lubuntu 14.04 LTS but very interested in BL :)

Offline

#3 2016-04-14 07:03:02

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] A newbie question regarding Openbox menu commands

oneleaf wrote:

An example is Synaptic. The .desktop file that is in usr/share/applications has an entry for Exec=synaptic-pkexec, and so my instinct is to put "synaptic-pkexec" in the menu.xml file if I want to have a menu entry for Synaptic. But that doesn't work and in fact, Bunsenlabs uses "gksudo synaptic".

I would always refer to the .desktop files so it's a bit surprising that doesn't work for synapic.

I've just broken my BLVM so I can't check but `synaptic-pkexec` is a script:

#!/bin/sh
pkexec "/usr/sbin/synaptic" "$@"

So try using:

pkexec /usr/bin/synaptic

Offline

#4 2016-04-14 07:11:33

oneleaf
Member
Registered: 2016-03-29
Posts: 26

Re: [SOLVED] A newbie question regarding Openbox menu commands

Thanks for the replies, guys! (and yea, "gksudo synaptic" always worked fine... was just curious why it did not use the same command as in the synaptic.desktop file).

Apparently, I must have had a weird hiccup, because I rechecked it, and synaptic-pkexec actually works (it does not dim the desktop as "gksudo synaptic" does, when prompting for password, but it works. Not sure what was wrong earlier!

In any case, I am glad checking the .desktop file is the best way to refer. I will simply continue using that method. This Synaptic situation seemed to have been a mistyping or something.

Offline

#5 2016-04-14 09:45:19

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] A newbie question regarding Openbox menu commands

Deep in the system depths there is a setting which allows synaptic to run with admin privileges, using `pkexec` (graphical frontend for PolicyKit). You can also run synaptic with the graphical sudo command, `gksudo`. So in this case two commands are possible.

gksudo seems to grab the desktop, hence the dimming effect the OP found.


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

#6 2016-04-14 10:20:11

vasa1
Member
Registered: 2015-09-29
Posts: 204

Re: [SOLVED] A newbie question regarding Openbox menu commands

damo wrote:

...
gksudo seems to grab the desktop, hence the dimming effect the OP found.

And if you don't want that effect: http://crunchbang.org/forums/viewtopic. … 08#p289808


Using the Openbox (3.5.2) session of Lubuntu 14.04 LTS but very interested in BL :)

Offline

Board footer

Powered by FluxBB