Ubuntu and aptURL

They say you learn something new everyday don’t they? I came across a little gem in this article, via the Ubuntu Weblogs aggregator that really surprised me! Now, this may be well known, but I hadn’t seen it before. So I guess that this might be of interest to others too…

When I’m working on something I like to have a clear overview of what I’ve done and what I still need to do. I’ve never really found a good way to do that in a visual way, but lately I read about a mindmapping tool for Linux called View Your Mind, which you can find in the repositories as vym. Install VYM.

The last hyperlink in the quote above Install VYM uses a great tool I wasn’t aware of at all. Something called aptURL. If you click on the link in Ubuntu Gutsy, Hardy or Intrepid, you will be asked if you would like to install the software directly. How bloody cool is that? And more to the point, how come I hadn’t come across it before?

It’s a really simple syntax. Something like:

Text for install link

would do the trick.

And there is a man page for apturl if you want to know a bit more:

APTURL(8)                                                            APTURL(8)

NAME
apturl – graphical apt-protocol interpreting package installer

SYNOPSIS
apturl [options…] <URL>

DESCRIPTION
apturl is a simple graphical application that takes an URL (following the apt-protocol) as a command line option, parses it and carries out the operations that  the URL describes (that is, it asks the user if he wants the indicated packages to be installed and if the answer is positive does so).

USAGE
apturl just needs an URL conforming with the apt-protocol in order to work. Additionally, it recognizes the following options:

-p, –http-proxy
Use the given HTTP proxy in order to download the packages.

EXAMPLES
apturl apt:pidgin,pidgin-plugin-pack
Installs Pidgin and Pidgin Plugin Pack (if the user confirms).

apturl apt:freevial?section=universe
Enables the “universe” component and installs package  Freevial.

apturl apt+http://launchpad.net/~mvo/ppa?package=2vcard
Installs  2vcard  from the indicated PPA (if the user confirms), and afterwards asks if the PPA should be removed again or it should remain enabled.
Warning: This is currently disabled because of security concerns.

EXIT CODES
0      All requested packages have been successfully installed or were already installed.

1      The user aborted the installation of one or more packages.

2      There was an error doing the requested operations, or the user aborted the installation while Synaptic (and not apturl  itself) was working.

3      The arguments with which apturl was called were incorrect (e.g., it was called without any argument or the given URL was  wrong).

BUGS
Please report any bug on https://bugs.launchpad.net/ubuntu/+source/apturl.

SEE ALSO
synaptic

AUTHORS
apturl was written by Michael Vogt <michael.vogt@ubuntu.com> for Canonical, Ltd. and this manual page by Siegfried-A. Gevatter <rainct@ubuntu.com>.

It is released under the GNU General Public License, version 2 or any later version published by the Free Software Foundation.

September 01, 2008                     APTURL(8)

I’ll certainly remember that for the next time I write a post and suggest a package for installation or testing.

Tags:

5 Comments

  • Scott Wegner says:

    Ahh, very cool! I was aware the aptUrl links previously, but I didn’t know about it’s advanced syntax. Specifying the PPA is very useful, as I have seen many tutorials which first require adding a PPA to the sources.list. Bonus points because it will ask the user whether to remove the PPA afterwards.

  • Guillaume Muller says:

    And unfortunately, let me remind you that clic-installing is very dangerous from the point of view of security… If such a thing comes to be used widely, then we will have the same problems under linux than those that exists under windows: virii, malwares, spywares, and their use to flood my mailbox with spam :{

  • Alan Lord says:

    @Scott, please note the comment in the manual that says “Warning: This is currently disabled because of security concerns.”

    @Guillaume, thanks. Your comment makes a lot of a sense.

  • Scott Wegner says:

    @Alan: Ahh, so it does say that. I must’ve glanced over it in my excitement. 🙂 I understand the security issues behind PPA’s, although I hope that in the future there will be work to mitigate the problems.

    I know, for example, that the Launchpad team is working on having signed packages in their hosted PPA’s. Then, users can at least demonstrate “trust” in a PPA by conditionally adding the signature file. Down the road, perhaps the community could come up with a set of “trusted” PPAs which are routinely verified. But then, I suppose this would probably have issues as well.

    I’m straying from the point– apturl is still great!

  • Alan Lord says:

    @Scott.

    Yes I was thinking about Guillaume’s comment some more. It is a bit of an issue right now, and I can see why they have disabled PPA support for the time being.

    I could see this being *really* useful in say a corporate environment where you control your own repos. I could imagine a company wide Wiki type scenario where there are links for useful programs, diagnostic tools etc so users could help themselves more…

    Anyway, thanks again for commenting. Always nice to have a dialogue.

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>