Can my WINE program write to files in /usr directory?
Andrew Eikum
aeikum at codeweavers.com
Tue May 13 13:20:22 CDT 2014
On Tue, May 13, 2014 at 09:13:52PM +0300, John Found wrote:
> On Tue, 13 May 2014 12:54:26 -0500
> Andrew Eikum <aeikum at codeweavers.com> wrote:
>
> >
> > Why? Unless you know what you're doing, only your package manager
> > should be touching files in </usr>.
> >
>
> I don't want to use the package manager. From my program I want (on user request) to create or delete .desktop file in "/usr/share/applications" directory. (of course only when running in Linux, in Windows the program will create start menu shortcuts).
>
If it's on a single user's request, <~/.local/share/applications/>
might be a better location, and wouldn't require special permissions.
If you want the desktop file accessible for all users, you could use
$XDG_DATA_DIRS to tell programs that use desktop files to access a
location where all users have permission to read and possibly write.
Those programs should hopefully use that variable correctly to locate
your desktop files.
Some more info here:
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Andrew
More information about the wine-devel
mailing list