Re: How to add *.desktop?

Lets see if I can help.

On Wed, 2002-11-20 at 22:14, anukeey wrote:
> Hi all:
>     Now I had delevoped a gnome utility, I want to add
> a menu entry(eg. Foot-->Programs-->Graphics-->The
> GIMP) and desktop shortcut(like Start Here and user's
> home), so people can use it more easy!
>     I has known, the menu entry can add by a *.desktop
> file in /usr/share/gnome/apps/Utilities, 
Is this a GNOME 2 app?  The proper place to install .desktop files in
GNOME 2 is <prefix>/share/applications.

To install correctly if you are using the GNU auto tools (automake,
autoconf, etc.) you should place these lines in the in the
directory your .desktop file is in (this is an example from my project. 
You must edit it to fit yours):


desktopdir = $(datadir)/applications
desktop_DATA = $( 

and you should have a file named <appname> that looks kind of
like this:

[Desktop Entry]
_Name=GObject Factory
_Comment=Creates GObject skeletons from user input

>and in
> /user's home/.gnome-desktop to the desktop shortcut,
The way I interpret the HIG (Human Interface Guidelines) you should not
clutter up a user's desktop with icons.  If they want they can drag and
drop it from the menu. Oh and in GNOME2 the proper place to install
files on the desktop is the Desktop directory (which is a link to

> but it is with default gnome path, how can I get the
> gnome install path different with default?
>     Also, could I add my utility like
> "Starthere.desktop" with new adding user?
Again you should not do this for a general utility unless you are
providing a standard desktop install within your own company, network or
distribution.  In other word this should not be done if you plan on
shipping the tool to users other than those under your control.  In the
directory /usr/skel you can place any files and directories you want
copied over whenever a user is added to the system.  In your case you
would put the .gnome-desktop directory with the shortcuts you want to
appear on the desktop.  Do not mess with the /etc/skel directory on 
install unless your tool is only going to be deployed on machines that
you are the administrator.   

Hoped I helped a little.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]