Re: "Program Files" folder

There is no such thing as default folder under Linux/Unix. The user might
want to install an application in her home directory, or in /opt, or in
/usr/bin depending on permissions or the visibility of the application.
Perhaps you meant to ask if it is possible to know where the application was
run from? In that case just check argv[0].


On Thu, Apr 21, 2011 at 11:00, John Emmas <johne53 tiscali co uk> wrote:

I know that glib offers a function called g_get_home_dir() which returns
the user's home folder on the relevant platform.  Is there any similar
function that will give me the default folder for installing applications?
 For example, on Windows this would return "C:\Program Files".  On Linux it
might be "/bin" or "/usr/bin" or "/usr/local/bin" etc.  And on OS-X it would
be "/Applications".

gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

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