LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to put an icon/shortcut on the desktop for a custom application? (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-put-an-icon-shortcut-on-the-desktop-for-a-custom-application-903082/)

firefiber 09-14-2011 08:40 PM

How to put an icon/shortcut on the desktop for a custom application?
 
I'm totally new to Linux, so sorry if this has been asked before. I did search though. And found nothing, so I guess I've made a new level of noob, eh? :p

I'm currently using Ubuntu 11.10.

Anyway. I downloaded a tar.bz2 Skype, instead of the .deb package, because I wanted to learn how to install it from that, instead of just double clicking and letting the package manger handle everything.

However, once I extract it, and cd into the extracted folder, there's nothing to make. It runs right out of the folder, if I type in skype in the terminal. I moved the folder into /usr/lib and made a symlink of skype.sh in /bin. So now when I type Skype anywhere, it'll open up.

My question is, how do I add a shortcut to the desktop (or the Unity Launcher), with the Skype icon? The icons folder exists in the extracted folder, but I don't know how to use them. And what exactly can I do with the skype.desktop file? What does it do?

This goes for firefox too. I downloaded the tar.bz2 Aurora. I extract it, there's nothing to install. So I move it to /usr/lib and symlink firefox.sh to /bin. What to do after that? I don't want to have to go to the terminal everytime I want to launch something.

etech3 09-14-2011 10:51 PM

Right click on a free spot on the desktop.

You should have create launcher...

If you right click on your shortcut, then you should be able to tell it where the icon is.

jdkaye 09-14-2011 11:26 PM

Quote:

Originally Posted by firefiber (Post 4472002)
I moved the folder into /usr/lib and made a symlink of skype.sh in /bin. So now when I type Skype anywhere, it'll open up.

Just a quick suggestion. You might want to move the skype folder into /opt or /usr/local/lib. That might save you some grief some time later.
ciao,
jdk

samtoddler 09-15-2011 01:54 AM

How to put an icon/shortcut on the desktop for a custom application?
 
Hi,

You can also try this one
create a file "anything.desktop"
and then add the following lines to it

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=<make it on |off whether you want to execute it in the terminal or not>
Name[en_IN]=<name of shortcut>
Exec=<put here the app name>
Comment=<here goes the comments regarding the shortcut>
#standard location for the icons in ubuntu is "/usr/share/icons/hicolor/scalable/apps"
Icon=<here goes the app icon>

the above file contents are created after you have created the launcher of an application.

regards
samtoddler

firefiber 09-17-2011 03:15 AM

Thanks for the really quick replies, folks! I wasn't able to reply myself, 'cause I was messing about in Gentoo and screwed something up quite badly. Anywho, I've tried everything, and it works. :) Thanks a lot! It was really simple though, now that I look at it, and I feel incredibly stupid. :\

A question to jdkaye: why put it in /opt or /usr/local/lib? I'm still trying to understand the folder structure and naming scheme on this thing, so I'm a wee bit confused. I thought /usr/bin and /usr/lib was to be used for the apps that I've installed myself? No?

Thanks again!

jdkaye 09-17-2011 03:40 AM

Quote:

Originally Posted by firefiber (Post 4474237)
A question to jdkaye: why put it in /opt or /usr/local/lib? I'm still trying to understand the folder structure and naming scheme on this thing, so I'm a wee bit confused. I thought /usr/bin and /usr/lib was to be used for the apps that I've installed myself? No?

Thanks again!

This comes under the "ounce of prevention" category. It makes it easier to quickly identify what is unique to your own system and hence what needs backing up or cloning onto a new system. The standard issue packages that you get from your distro's repos don't need backing up. You can also make a list of your installed packages so you can always get them again if need be. What is unique in your system is harder to replace if you don't remember what it is. Keeping those type of things in /usr/local (for things you compile yourself or packages you make yourself) and /opt (for software binaries you download as tarballs directly from their site) makes your life easier in the long run.
Hope that's clear.
ciao,
jdk


All times are GMT -5. The time now is 05:34 AM.