You are not logged in.

#1 2017-03-19 12:25:29

sickley
New Member
Registered: 2017-03-19
Posts: 2

[SOLVED]Open URL through openbox menu

Just wondering if anyone knows how to add an openbox menu item to open a specific ("static") URL in a browser

I know I've done this before, but can't remember how I did it. I also can't find my answer on Google or in the forums here, but if it is already answered you can just forward me to the page smile

Thanks!

Last edited by damo (2017-03-19 13:02:11)

Offline

#2 2017-03-19 12:46:30

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

Re: [SOLVED]Open URL through openbox menu

This works for me:

2017_03_19_124340_500x528_scrot.png

~/.config/openbox/menu.xml:

		<item label="bunsenlabs.org">
			<action name="Execute">
				<execute>x-www-browser bunsenlabs.org</execute>
			</action>
		</item>

EDIT: ha! That's the broken version of obmenu that I've used...

@damo's answer gives the correct syntax.

Last edited by Head_on_a_Stick (2017-03-19 12:50:19)

Offline

#3 2017-03-19 12:47:11

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

Re: [SOLVED]Open URL through openbox menu

<item label="URL">
            <action name="Execute">
                <command>
                    x-www-browser "http://your-url-here/"
                </command>
            </action>
        </item>


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

#4 2017-03-19 12:56:38

sickley
New Member
Registered: 2017-03-19
Posts: 2

Re: [SOLVED]Open URL through openbox menu

Thank you kindly sirs, worked perfectly!

Offline

#5 2017-03-19 13:01:46

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

Re: [SOLVED]Open URL through openbox menu

NB "<execute>" is deprecated syntax, and <command> should now be used. BL ships a patched version of obmenu which is compatible with the newer syntax - the versions in the Debian jessie/stretch haven't been fixed yet.

Next time, you can add [SOLVED] yourself, by editing the title of your first post wink


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 2017-03-19 18:01:20

cpoakes
Member
Registered: 2016-12-02
Posts: 108

Re: [SOLVED]Open URL through openbox menu

You can also use the Open Desktop/XDG standard way xdg-open:

<item label="URL">
  <action name="Execute">
    <command>
      xdg-open "http://your-url-here/"
    </command>
  </action>
</item>

The x-www-browser method is only suited to Debian and RedHat derivatives using /etc/alternatives. Xdg-open is distro- and desktop-agnostic (if you find yourself in the Arch or Gentoo universes).

It can also open files according to the mime-assigned applications (~/.config/mimeapps.list), particularly useful when applications don't have defined x-* (or bl-*) alternatives. Example:

xdg-open /path/to/mydocument.odt

would start whatever office/document app is your default.

Offline

Board footer

Powered by FluxBB