In my program I want to copy some files in the /usr and other system directories. Is it possible from WINE program and how?
In the FAQ I read:
/!\ NEVER run Wine as root! Doing so gives Windows programs (and viruses) full access to your computer and every piece of media attached to it. Running with sudo also has these same risks but with the added bonus of breaking the permissions on your ~/.wine folder in the process. If you have run Wine with sudo you need to fix the permission errors as described in the next question, and then run winecfg to set Wine up again. You should always run Wine as the normal user you use to login.
Is it so important?
On Tue, May 13, 2014 at 07:51:24PM +0300, John Found wrote:
In my program I want to copy some files in the /usr and other system directories.
Why? Unless you know what you're doing, only your package manager should be touching files in </usr>.
Is it possible from WINE program and how?
Sure. You can change the permissions on the directories or run Wine as root. But you have a good chance of destroying your operating system in the process. For example, you could accidentally delete the wrong file. You also open up your system to exploitation by providing more opportunities for an attacker to exploit.
In the FAQ I read:
/!\ NEVER run Wine as root! Doing so gives Windows programs (and viruses) full access to your computer and every piece of media attached to it. Running with sudo also has these same risks but with the added bonus of breaking the permissions on your ~/.wine folder in the process. If you have run Wine with sudo you need to fix the permission errors as described in the next question, and then run winecfg to set Wine up again. You should always run Wine as the normal user you use to login.
Is it so important?
Somewhat more information here: http://kb.mediatemple.net/questions/792/An+introduction+to+the+root+user
Andrew
On Tue, 13 May 2014 12:54:26 -0500 Andrew Eikum aeikum@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).
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@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
Thanks. Your hint is really helpful. I will have to read more. :)
Thanks again.
On Tue, 13 May 2014 13:20:22 -0500 Andrew Eikum aeikum@codeweavers.com wrote:
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
What are you writing, out of curiosity?
On Tue, May 13, 2014 at 11:31 AM, John Found johnfound@asm32.info wrote:
Thanks. Your hint is really helpful. I will have to read more. :)
Thanks again.
On Tue, 13 May 2014 13:20:22 -0500 Andrew Eikum aeikum@codeweavers.com wrote:
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
-- asm32.info johnfound@asm32.info
What are you writing, out of curiosity?
http://fresh.flatassembler.net
It is assembly language RAD IDE, that can compile and run Linux and Windows applications both on Windows and Linux OS. This way, it is actually hybrid - uses some native Linux system calls in Linux. So, I want to natively integrate it in Linux desktop, not in the "programs" submenu of Wine.
John Found wrote:
So, I want to natively integrate it in Linux desktop, not in the "programs" submenu of Wine.
In that case, I would suggest looking into creating packages (RPM, DEB) for the Linux based desktop systems you're targeting. Then you can just include desktop files in the package.
Two examples of packaged Wine-applications are pptview (on Debian & Ubuntu using the system provided Wine) and Picasa (which included its own Wine if I remember correctly).