4

Is it possible to execute a command from a single link?

For example when a user clicks on a link it does this:

sudo apt-get install vlc wine openshot but by clicking on a link

Alvar
  • 16,898
  • 29
  • 91
  • 134
Luis Alvarado
  • 209,003
  • 167
  • 543
  • 707

2 Answers2

2

Your particular example is possible via the apt-uris:

http://apt.ubuntu.com/p/wine

This will open wine in the software centre, giving the user the option to install it.

Running arbitrary commands on any Ubuntu machine is (hopefully) never possible:

Stefano Palazzo
  • 85,787
  • 45
  • 210
  • 227
0

Lol found it thanks to Oli's post here Is it possible to install a repository via a web (Clicking in a webpage link)

It is possible to install multiple packages. In this wiki https://wiki.ubuntu.com/AptUrl all the possible actions can be found. To install one would be like this:

<a href="apt:package">click</a> 

For example:

<a href="apt:vlc">click</a> 

This would install vlc.

But lets say you want to install VLC, Ubuntu Extras and subdownloader:

<a href="apt:vlc,ubuntu-restricted-extras,subdownloader">click</a> 

Each separated by a comma. Awesome.

Luis Alvarado
  • 209,003
  • 167
  • 543
  • 707