Alias 'browse' to xdg-open

Bug #1624022 reported by Mark Shuttleworth
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xdg-utils (Ubuntu)
Fix Released
Wishlist
Martin Wimpress 
Xenial
Fix Released
Wishlist
Unassigned

Bug Description

[Impact]

The 'sensible-browser' and 'xdg-open' commands are very useful, but it's a bit unwieldy to use everywhere in docs. How about aliasing to the simple 'browse', so I can recommend things like:

  sudo apt install foo; browse http://locahost:2022/

That would be crisp clean and friendly for current users.

[Test Case]

There is currently no simple 'browse' command.

[Regression Potential]

None. There are no name collisions with /usr/bin/browse in Debian or Ubuntu.

[ Other Info ]

Although the original request was to alias 'sensible-browser' it was decided that 'xdg-open' has the more consistent behaviour (in terms of selecting the correct web browser to use) and also falls back to 'sensible-browser'.

Related branches

Revision history for this message
Will Cooke (willcooke) wrote :

Advice from Chad is that we should symlink /usr/bin/browse to sensible-browser in the sensible-utils package.
Looking at that now.

Changed in sensible-utils (Ubuntu):
assignee: nobody → Will Cooke (willcooke)
status: New → In Progress
Will Cooke (willcooke)
Changed in sensible-utils (Ubuntu):
assignee: Will Cooke (willcooke) → Martin Wimpress (flexiondotorg)
Revision history for this message
Jeremy Bícha (jbicha) wrote :

I think sensible-browser is obsolete and I'd like to see it go away. Most things use mimetypes these days but it's the odd thing in the Debian repositories that still uses sensible-browser that's annoying. As far as I know, there is not a GUI way to configure the Debian alternatives that sensible-browser uses.

On my computer:

xdg-open http://www.google.com/ opens Firefox
gvfs-open http://www.google.com/ opens Firefox
sensible-browser http://www.google.com/ opens Epiphany :(

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Or why don't we do like Apple and just symlink /usr/bin/open to /usr/bin/xdg-open (since it's installed in Kubuntu too unlike gvfs-open) ?

Then you could recommend

sudo apt install foo; open http://locahost:2022/

and you could also

open ~/Pictures/yakkety-yak.png

etc.

Revision history for this message
Iain Lane (laney) wrote :

the "kbd" package has a binary called /bin/open - it would not be very awesome to shadow that

xdg-open is probably better though, since it (AFAIK) falls back to sensible-browser if necessary like in a console, but uses more modern methods to select the program otherwise

& I think it would be best if any solution were implemented in Debian as well, to both get wider adoption and help prevent any hiccups if a future package takes over the generic name that is chosen

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1624022] Re: Alias 'browse' to sensible-browser

Guys, the bug is to have the command "browse" DTRT.

It sounds like xdg-open is TRT :) but please don't forget that the point
is to get the command "browse" onto every ubuntu system. xdg-open is a
lovely command for people who have a clue what xdg is. "browse <url>" is
what we want to tell our users to do.

Mark

summary: - Alias 'browse' to sensible-browser
+ Alias 'browse' to xdg-open
Changed in xdg-utils (Ubuntu):
assignee: nobody → Martin Wimpress (flexiondotorg)
status: New → In Progress
no longer affects: sensible-utils (Ubuntu)
Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Attached is a debdiff for xdg-utils (Yakkety) that creates a symlink from /usr/bin/xdg-open to /usr/bin/browse.

Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Attached is a debdiff for xdg-utils (Xenial) that creates a symlink from /usr/bin/xdg-open to /usr/bin/browse.

Jeremy Bícha (jbicha)
Changed in xdg-utils (Ubuntu Xenial):
importance: Undecided → Wishlist
Changed in xdg-utils (Ubuntu):
importance: Undecided → Wishlist
Changed in xdg-utils (Ubuntu Xenial):
status: New → Triaged
Changed in xdg-utils (Ubuntu Xenial):
status: Triaged → In Progress
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1624022] Re: Alias 'browse' to xdg-open

Thanks folks :)

Revision history for this message
Iain Lane (laney) wrote :

I sponsored these.

Martin (or anyone), please format the bug description to be SRU compliant. Forwarding would still be nice, just to do the right thing.

Mathew Hodson (mhodson)
tags: added: patch
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-utils - 1.1.1-1ubuntu2

---------------
xdg-utils (1.1.1-1ubuntu2) yakkety; urgency=medium

  * debian/xdg-utils.links:
    - Symlink /usr/bin/xdg-open to /usr/bin/browse (LP: #1624022)

 -- Martin Wimpress <email address hidden> Thu, 29 Sep 2016 16:56:07 +0100

Changed in xdg-utils (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote :

Forwarded to Debian yet?

Changed in xdg-utils (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Mark, or anyone else affected,

Accepted xdg-utils into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xdg-utils/1.1.1-1ubuntu1.16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : [xdg-utils/xenial] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for xenial for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Revision history for this message
Will Cooke (willcooke) wrote :

Installed version 1.1.1-1ubuntu1.16.04.1 and tested with "browse <site>". Everything worked as expected.

Thanks all.

$ sudo apt-get install xdg-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-51 linux-headers-4.4.0-51-generic
  linux-image-4.4.0-51-generic linux-image-extra-4.4.0-51-generic
  ubuntu-core-launcher
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  xdg-utils
1 to upgrade, 0 to newly install, 0 to remove and 189 not to upgrade.
Need to get 59.7 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Get:1 http://gb.archive.ubuntu.com/ubuntu xenial-proposed/main amd64 xdg-utils all 1.1.1-1ubuntu1.16.04.1 [59.7 kB]
Fetched 59.7 kB in 0s (975 kB/s)
(Reading database ... 340719 files and directories currently installed.)
Preparing to unpack .../xdg-utils_1.1.1-1ubuntu1.16.04.1_all.deb ...
Unpacking xdg-utils (1.1.1-1ubuntu1.16.04.1) over (1.1.1-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up xdg-utils (1.1.1-1ubuntu1.16.04.1) ...
will@malfunctioning-eddie:~$ browse http://www.google.co.uk
will@malfunctioning-eddie:~$ Created new window in existing browser session.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-utils - 1.1.1-1ubuntu1.16.04.1

---------------
xdg-utils (1.1.1-1ubuntu1.16.04.1) xenial; urgency=medium

  * debian/xdg-utils.links:
    - Symlink /usr/bin/xdg-open to /usr/bin/browse (LP: #1624022)

 -- Martin Wimpress <email address hidden> Thu, 29 Sep 2016 16:56:07 +0100

Changed in xdg-utils (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for xdg-utils has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Simon Quigley (tsimonq2) wrote :

Has this been forwarded to Debian yet?

It's the last bit of the Ubuntu delta, and if we could push that upstream, we'll have the ability to sync.

Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.