confused newbie

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
ChristTrekker
Level 1
Level 1
Posts: 7
Joined: Mon Aug 03, 2009 5:18 pm

confused newbie

Post by ChristTrekker »

To launch a Windows exe from a command line, is it "wine <program>" or "wine start <program>"? I've seen both mentioned in the documentation.

From what I can tell, every Wine user has their own copy of everything in the ~/.wine dir. Would it make more sense to install apps in a common location for everyone to use? This doesn't seem to be addressed in any FAQ that I have seen.

Having a list of what Windows apps (or clones thereof) are included in the standard Wine install would be useful, but I haven't found anything like this. Am I just missing it?
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

confused newbie

Post by austin987 »

On Tue, Aug 4, 2009 at 11:12 AM, ChristTrekker<[email protected]> wrote:
To launch a Windows exe from a command line, is it "wine <program>" or "wine start <program>"?  I've seen both mentioned in the documentation.
Wine program is more common, but wine start program is 'more proper'.
It sets paths properly, and supports more file formats.
From what I can tell, every Wine user has their own copy of everything in the ~/.wine dir.  Would it make more sense to install apps in a common location for everyone to use?  This doesn't seem to be addressed in any FAQ that I have seen.
No, this isn't supported. Multiple people using the same wineprefix
can cause corruption.
Having a list of what Windows apps (or clones thereof) are included in the standard Wine install would be useful, but I haven't found anything like this.  Am I just missing it?
Such as? Many builtin programs are included, e.g., wordpad, notepad,
cmd, msiexec, etc.

--
-Austin
ChristTrekker
Level 1
Level 1
Posts: 7
Joined: Mon Aug 03, 2009 5:18 pm

Re: confused newbie

Post by ChristTrekker »

austin987 wrote:
From what I can tell, every Wine user has their own copy of everything in the ~/.wine dir.  Would it make more sense to install apps in a common location for everyone to use?  This doesn't seem to be addressed in any FAQ that I have seen.
No, this isn't supported. Multiple people using the same wineprefix
can cause corruption.
I assume "corruption" refers to various config files. So use a different wineprefix - just put binaries in a common place, using symlinks if this "binary path" isn't separately configurable. (~/.wine/drive_c/Program\ Files -> /usr/local/share/wine/Program\ Files) Executables aren't written to, so how would they be corrupted?
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

confused newbie

Post by austin987 »

On Tue, Aug 4, 2009 at 11:34 AM, ChristTrekker<[email protected]> wrote:
austin987 wrote:
From what I can tell, every Wine user has their own copy of everything in the ~/.wine dir.  Would it make more sense to install apps in a common location for everyone to use?  This doesn't seem to be addressed in any FAQ that I have seen.
No, this isn't supported. Multiple people using the same wineprefix
can cause corruption.
I assume "corruption" refers to various config files.  So use a different wineprefix - just put binaries in a common place, using symlinks if this "binary path" isn't separately configurable.  (~/.wine/drive_c/Program\ Files -> /usr/local/share/wine/Program\ Files)  Executables aren't written to, so how would they be corrupted?
Depends on the executable. Most programs come with other files that
are written to, e.g., ini files and the like.

--
-Austin
ChristTrekker
Level 1
Level 1
Posts: 7
Joined: Mon Aug 03, 2009 5:18 pm

Re: confused newbie

Post by ChristTrekker »

austin987 wrote:On Tue, Aug 4, 2009 at 11:34 AM, ChristTrekker<[email protected]> wrote:
I assume "corruption" refers to various config files.  So use a different wineprefix - just put binaries in a common place, using symlinks if this "binary path" isn't separately configurable.  (~/.wine/drive_c/Program\ Files -> /usr/local/share/wine/Program\ Files)  Executables aren't written to, so how would they be corrupted?
Depends on the executable. Most programs come with other files that
are written to, e.g., ini files and the like.
Ahhh... And since Windows wasn't designed as a timesharing OS with concurrent users in mind, it has single ini files rather than per-user ini files. Is that what I'm hearing? That would make sense.

But... If I knew the deployment environment would only ever have one user at a time, would it be possible (and safe) to set up users to share a single wineprefix? I can't help but think there's an alternative to installing the same app multiple times.
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

confused newbie

Post by austin987 »

On Tue, Aug 4, 2009 at 12:01 PM, ChristTrekker<[email protected]> wrote:
austin987 wrote:
On Tue, Aug 4, 2009 at 11:34 AM, ChristTrekker<[email protected]> wrote:
I assume "corruption" refers to various config files.  So use a different wineprefix - just put binaries in a common place, using symlinks if this "binary path" isn't separately configurable.  (~/.wine/drive_c/Program\ Files -> /usr/local/share/wine/Program\ Files)  Executables aren't written to, so how would they be corrupted?
Depends on the executable. Most programs come with other files that
are written to, e.g., ini files and the like.
Ahhh...  And since Windows wasn't designed as a timesharing OS with concurrent users in mind, it has single ini files rather than per-user ini files.  Is that what I'm hearing?  That would make sense.
Exactly.
But...  If I knew the deployment environment would only ever have one user at a time, would it be possible (and safe) to set up users to share a single wineprefix?  I can't help but think there's an alternative to installing the same app multiple times
You'd have to patch the source code. Search the forum, it's been
explained before several times.

--
-Austin
ChristTrekker
Level 1
Level 1
Posts: 7
Joined: Mon Aug 03, 2009 5:18 pm

Re: confused newbie

Post by ChristTrekker »

austin987 wrote:You'd have to patch the source code. Search the forum, it's been explained before several times.
Ack, that sounds messy. Maybe it would be easier to run wine via sudo, so all the Windozey stuff stays under one user as intended.
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

confused newbie

Post by austin987 »

On Tue, Aug 4, 2009 at 1:59 PM, ChristTrekker<[email protected]> wrote:
austin987 wrote:
You'd have to patch the source code. Search the forum, it's been explained before several times.
Ack, that sounds messy.  Maybe it would be easier to run wine via sudo, so all the Windozey stuff stays under one user as intended.
No. Using sudo will give windows apps full access to your computer.
Furthermore, sudo is intentionally made hard to use, to prevent people
breaking their installs (to work around it, you need to patch the
source code, or run as root itself, which is definitely a unix no-no).

--
-Austin
ChristTrekker
Level 1
Level 1
Posts: 7
Joined: Mon Aug 03, 2009 5:18 pm

Re: confused newbie

Post by ChristTrekker »

austin987 wrote:No. Using sudo will give windows apps full access to your computer. Furthermore, sudo is intentionally made hard to use, to prevent people breaking their installs (to work around it, you need to patch the source code, or run as root itself, which is definitely a unix no-no).
No...using sudo won't give any more access to the computer than the user running sudo has to begin with. As long as that user isn't root, what's the concern?
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

confused newbie

Post by austin987 »

On Tue, Aug 4, 2009 at 3:56 PM, ChristTrekker<[email protected]> wrote:
austin987 wrote:
No. Using sudo will give windows apps full access to your computer.  Furthermore, sudo is intentionally made hard to use, to prevent people breaking their installs (to work around it, you need to patch the source code, or run as root itself, which is definitely a unix no-no).
No...using sudo won't give any more access to the computer than the user running sudo has to begin with.  As long as that user isn't root, what's the concern?
Do you not know what sudo does?

--
-Austin
Martin Gregorie

confused newbie

Post by Martin Gregorie »

On Tue, 2009-08-04 at 15:56 -0500, ChristTrekker wrote:
No...using sudo won't give any more access to the computer than the
user running sudo has to begin with. As long as that user isn't root,
what's the concern?
Thats not quite right. While its true that sudo's configuration can
limit the users who can run programs with it and restrict the programs a
specific user can run, those programs are still run as root and so they
can do as much damage as if the user had logged in as root or used su to
become root before running them.


Martin
ChristTrekker
Level 1
Level 1
Posts: 7
Joined: Mon Aug 03, 2009 5:18 pm

Re: confused newbie

Post by ChristTrekker »

austin987 wrote:Do you not know what sudo does?
It lets one user execute a command as another user, as long as he is authorized to do so in the sudoers file.

ct@mybox$ sudo -u winuser wine start someapp.exe

This would let me (ct) run wine out of wineprefix ~winuser/.wine - right? How does any root access occur? Am I missing something?

Sudo also has many other options to configure the environment for commands thus executed, that may be useful to get this to work "correctly".
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Re: confused newbie

Post by DaVince »

ChristTrekker wrote:
austin987 wrote:Do you not know what sudo does?
It lets one user execute a command as another user, as long as he is authorized to do so in the sudoers file.

ct@mybox$ sudo -u winuser wine start someapp.exe

This would let me (ct) run wine out of wineprefix ~winuser/.wine - right? How does any root access occur? Am I missing something?

Sudo also has many other options to configure the environment for commands thus executed, that may be useful to get this to work "correctly".
A regular "sudo" is exactly that - "Super User DO". Using the -u flag rather temporarily logs you in as a different user for the duration of the command.
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

confused newbie

Post by austin987 »

On Tue, Aug 4, 2009 at 4:46 PM, ChristTrekker<[email protected]> wrote:
austin987 wrote:
Do you not know what sudo does?
It lets one user execute a command as another user, as long as he is authorized to do so in the sudoers file.

ct@mybox$ sudo -u winuser wine start someapp.exe

This would let me (ct) run wine out of wineprefix ~winuser/.wine - right?  How does any root access occur?  Am I missing something?

Sudo also has many other options to configure the environment for commands thus executed, that may be useful to get this to work "correctly".
Didn't know you were sudoing to a specific user (not root), sorry.

May work...the winuser would need to own the .wine directory and
parent directory. You'd need to make sure that $DISPLAY and other
variables are properly set.

--
-Austin
James McKenzie

confused newbie

Post by James McKenzie »

Austin English wrote:
On Tue, Aug 4, 2009 at 4:46 PM, ChristTrekker<[email protected]> wrote:
austin987 wrote:
Do you not know what sudo does?
It lets one user execute a command as another user, as long as he is authorized to do so in the sudoers file.

ct@mybox$ sudo -u winuser wine start someapp.exe

This would let me (ct) run wine out of wineprefix ~winuser/.wine - right? How does any root access occur? Am I missing something?

Sudo also has many other options to configure the environment for commands thus executed, that may be useful to get this to work "correctly".
Didn't know you were sudoing to a specific user (not root), sorry.

May work...the winuser would need to own the .wine directory and
parent directory. You'd need to make sure that $DISPLAY and other
variables are properly set.

Austin:

Correct. Sudo should handle loading the user's environment as well,
including switching the $HOME directory if needed. If not, you may have
a file/folder ownership issue. Overcoming this is may be as easy as
making sure the group has read/write/execute access if both users are in
the same primary group. I don't recommend opening directory structure
to world access unless absolutely necessary.

James McKenzie
ChristTrekker
Level 1
Level 1
Posts: 7
Joined: Mon Aug 03, 2009 5:18 pm

Post by ChristTrekker »

I mentioned this to a coworker, and he said that it may require granting X privs to "winuser" as it would be starting the apps while "ct" owns the display. I hadn't thought of that aspect.
Locked