AptUrl
The apturl is a graphical mini-program for installing packages from the repository that a user has. It is pre-installed on Ubuntu since version 7.10, and the Firefox and Pidgin programs come with support for it.
Making an APT link
Single package
The basic syntax for an apt link is the following:
<a href="apt:package">click</a>
Where package is the package you'd like the user to install.
Multiple packages
To bundle several packages into one link, the syntax is the following:
<a href="apt:package1,package2,package3">click</a>
Where package1, package2 and package3 are the packages you'd like the user to install.
For example:
apturl apt:pidgin,pidgin-plugin-pack
Installs Pidgin and Pidgin Plugin Pack (if the user confirms).
Enabling repositories
apturl apt:freevial?section=universe
Enables the "universe" component and installs package Freevial.
Using AptUrl right after adding a repository
After adding a repository line via the Software Sources tool, the user has an option to reload the package list now or close the window, without reloading.
This can be an issue if the user wants to install a package via AptUrl right after - because the newly added repositories haven't been scanned, and thus the program will not be found. To avoid such a situation, a "refresh" flag is available - if it's present, apturl will do a refresh first and then look for the program.
Sample syntax: <a href="apt:package1?refresh=yep">click</a>
Sample link: Get Geany!
For websites that malform apt: links
Some websites / wiki's tend to break apt links. A workaround for this is to make use of appnr.com for the linking - simply use http://appnr.com/install/package as the link URL, though appnr does not let you add repositories.
Another workaround is to use a service like TinyURL. This link enables the Universe repository and then installs Wine, for instance: http://tinyurl.com/installwine
Using apturl on the Ubuntu Forums
apturl can be used on the Ubuntu Forums by using BBcode.
[URL="apt://firefox"]apt://firefox[/URL]
or apt://firefox in a insert link box also works great.
AptURL uses
Appnr.com is a website that works entirely on apturl links.
Apturl links can also be very handy if your program is available in Ubuntu repositories. Providing one on your project website is a user-friendly way to have the user install your program and additionally takes the load off your servers.
AptUrl (last edited 2009-11-14 21:45:27 by pool-71-167-60-95)