Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Ubuntu 12.04 and I would to create a folder with all of my shortcuts. Is it possible to create icons (like usual links to files in my harddisk) that automatically launch my browser and open a specific page? For example, I would like to have an icon on my desktop that automatically opens the StackExchange homepage. How can I do that?

share|improve this question
Why is this considered such a terrible question? – Simon Hoare Jan 25 '13 at 14:24
It's difficult to understand what's being asked here. @Fizz, do you mean a shortcut or launcher that launches a browser and opens a website when it is clicked? If so, what desktop are you using? Please edit and add clarification to your question. – uther Jan 25 '13 at 15:24
@SimonHoare because UNIX filesystem links are intended to link to other places in the same filesystem; but perhaps systems like Plan 9 would introduce some sort of unified naming system that actually lets you link to random protocols on the network? – njsg Jan 25 '13 at 15:39
@njsg - the OP only wanted desktop shortcut icons not symlinks to the ether :) – Simon Hoare Jan 26 '13 at 18:07
@SimonHoare Yeah, that's a nice thing to have clarified, bringing link in the mix surely makes it a bit confusing, I smell a bit of Windows terminology in here. For stuff that supports that (I guess anything which fills the screen background with icons? I've not used that kind of stuff for years now), the Freedesktop .desktop thing is the way to go. – njsg Jan 26 '13 at 18:27
up vote 4 down vote accepted

Assuming you are using something like Gnome, Xfce or some compliant desktop environment; a good alternative is to create a .desktop file. For example unix_stackexchange_com.desktop with the following contents:

[Desktop Entry]
Name=Unix & Linux
Comment=Link to Unix & Linux.
Exec=google-chrome http://unix.stackexchange.com

Now you just make it executable like this

chmod +x unix_stackexchange_com.desktop

Instead of google-chrome you can use your favorite browser like firefox or the like. Or use a more generic approach like xdg-open, provided it's installed and configured. Also you can replace /path/to/icon for a generic icon name like text-html to use the icon used for html files in your file manager or point to an image somewhere in your disk. In my case I downloaded and borrowed the icon of this site.

Example of how it looks

share|improve this answer
Thank you, this is exactly what I was looking for. – Fizz Jan 26 '13 at 12:02

A link to a website isn't exactly possible if you're trying to go the hardlink/symlink route. What you can do, and I found this suggestion here, is to create a simple script that can be executed.

x-www-browser 'http://www.example.com/your/link'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.