I have Ubuntu 16.04 installed with the default Unity desktop. On my desktop I have an icon with the text below the icon naming the file as a .xspf file. VLC is the default program that I have registered to open this extension. It opens a stream from a radio station. I like the radio station and I want to make the icon and its file name more interesting. So I changed the default icon, but I want to completely remove the text underneath the icon. I only want to remove the text for this specific icon, though. The following solution will therefore not do:

How can I hide the text under the desktop icons?

I could not find a solution elsewhere either so I decided to instead just make the text more interesting than example.xspf. In this screenshot I call the file "Link to file":

enter image description here

When I do this, the desktop environment (I guess it's the DE) no longer associates the file with VLC and opens the file with Firefox instead. Firefox then recognizes the file based on its content and prompts for permission to open VLC. That defeats the purpose because I might as well right click on the file and open it with another application. I want the process to be automated after I click on the icon. Is it possible to override the default application with which to open a file within the code of a file? If so, how do you do that in a .xspf type file? Otherwise, can the solution at the following links somehow be adapted to do that:

Running a .desktop file in the terminal

How to set the default program to open a certain file type in a certain folder?

1 Answer 1


What you should do is make a .desktop file. A .desktop file is a text file describing some action, for example, open a certain file with VLC. See the Desktop entry specification. You can specify the program to run and its arguments, the icon, and the name to display (and a non-breaking space   is a valid name).

[Desktop Entry]
Name=Name of Radio Station
Exec=/full/path/to/vlc /full/path/to/file.xspf

Place the .desktop file in your ~/Desktop folder and make it executable (chmod +x file.desktop).

  • I assigned \s to Name to get an empty string. Dec 1, 2016 at 6:50
  • And by moving the .desktop file to /usr/share/applications/ I can now search for the link using the Dash. Dec 1, 2016 at 7:11
  • The directory /usr/share/applications/ is for system-wide use; your own application launchers should go into ~/.local/share/applications. Not that it matters on single-user systems...
    – AlexP
    Dec 1, 2016 at 12:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .