There are some posts with nice Software Center icons and links to software installation via apt. How to do that?
This is the official download button from Ubuntu: Copy this and edit it for the package you want and paste it into an answer:
Or like this when you want an inline app link:
|
||||
|
|
|
A simple script that prompts for package name and copy the formatted code to your clipboard:
Make sure you install xclip |
||||
|
|
|
This is a partial solution for people who don't use Firefox, so can't use the new addon. I can confirm it works for Chromium 6. You can use browser bookmarks with 'javascript:' URLs to insert the correct markdown into the answer box. Bookmark 1: Name: URL: Clicking on this will insert the markdown for a software package link in the title. Bookmark 2: Name: URL: Clicking on this will insert the markdown for a software package link in the text. There is a problem with this: If you enter text then delete it and press one of the bookmarks, your deleted text will mysteriously appear. On Chrome/Chromium, you can add these bookmarks by right clicking on the bookmarks bar and clicking 'Add Page'. You can toggle the visibility of the bookmarks bar by pressing Ctrl+Shift+B.
DEMO hello
|
||||
|
|
|
For reference, the source syntax for a package called NAME is Other answers show various means of automation that generate this from the name you enter. |
||||
|
|
Insert Apt LinkThis small UserScript adds a button to the editing toolbar that makes it easy to insert a link to an APT package. Simply click on the button and type the name of the package.
LicenseMIT License Downloadhttp://files.quickmediasolutions.com/userscripts/apt.user.js PlatformTested on Chrome 11 - should work on Firefox and Opera as well. ContactI can be reached at CodeWritten in JavaScript using jQuery. |
||||
|
|
|
You could use apt:// protocol links, which would open with the apturl package. It sounds like apturl is installed by default, and doesn't depend on any browser-specific extensions: |
|||
|
|
|
Version 1.0.1 of AskUbuntu Add-on will come with such functionality. http://askubuntu-extension.blogspot.com/2010/10/new-features-coming-soon.html |
|||
|
|
|
Since this thread just popped back up, it reminded me that I made a small change to the above script that is worth sharing. I realized that I'm normally calling the script (which I call
|
||||
|
|
|
I dont think this is something that should be fixed editorially, that is to say: us. We would spend weeks changing Picking one or other isn't going to make everybody happy and enforcing it isn't going to make our lives any easier. However, I'm not saying this isn't a feature we should leverage. Would it not make a certain amount of sense to have a little bit of javascript (and it would be quite small) that searched the page for In the same vein, we could do something with JS that just made a link direct to To deal with PPAs up until now I've been writing it out as a command using And while we're at it, we could have something that replaced -->, -> with ▸ (per the unified style guides). These are all things we'd need to sort out with StackOverflow but they're trivially easy that I can't see them having a problem with them. |
||||
|
|
|
It's nice to have an easy install link for packages, but I'd rather have it link to a short page with the package description, which in turn has an easy install link. I think there's a danger in making the process too transparent. Is there an alternative service to the standard package search site which doesn't make one pick a distribution version first, and has an apturl? |
|||
|
|

