Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandwine fails with "true: 1: wineserver: not found" #55

Open
MausKaffee34767 opened this issue Apr 29, 2024 · 13 comments · May be fixed by #68
Open

Sandwine fails with "true: 1: wineserver: not found" #55

MausKaffee34767 opened this issue Apr 29, 2024 · 13 comments · May be fixed by #68

Comments

@MausKaffee34767
Copy link

If i try to run sandwine it immediately crashes!

Log:

2024-04-29 19:49:48 a sandwine._main[700753] DEBUG Path '/home/x/.nvm/versions/node/v21.7.1/bin' will not exist in sandbox mount stack, dropped from ${PATH}.
2024-04-29 19:49:48 a sandwine._main[700753] DEBUG Path '/snap/bin' will not exist in sandbox mount stack, dropped from ${PATH}.
2024-04-29 19:49:48 a sandwine._main[700753] DEBUG Path '/home/x/.dotnet/tools' will not exist in sandbox mount stack, dropped from ${PATH}.
2024-04-29 19:49:48 a sandwine._main[700753] DEBUG Path '/home/x/jadx-1.4.7/bin' will not exist in sandbox mount stack, dropped from ${PATH}.
2024-04-29 19:49:48 a sandwine._main[700753] DEBUG Path '/home/x/.local/bin' will not exist in sandbox mount stack, dropped from ${PATH}.
# bwrap \
    --disable-userns \
    --die-with-parent \
    --hostname 99d22c77309f \
    --unshare-user --unshare-all \
    --tmpfs / \
    --ro-bind /bin /bin \
    --dev /dev \
    --dev-bind /dev/dri /dev/dri \
    --ro-bind /etc /etc \
    --tmpfs /home/jakob \
    --tmpfs /home/jakob/.wine \
    --ro-bind /lib /lib \
    --ro-bind /lib32 /lib32 \
    --ro-bind /lib64 /lib64 \
    --proc /proc \
    --ro-bind /sys /sys \
    --tmpfs /tmp \
    --ro-bind /usr /usr \
    --clearenv \
    --setenv HOME /home/jakob \
    --setenv HOSTNAME 99d22c77309f \
    --setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/games:/usr/libexec/xscreensaver:/usr/lib/wine \
    --setenv TERM xterm-256color \
    --setenv USER x \
    --setenv container sandwine \
    -- \
    sh -c 'wineserver -p0 && "$0" "$@" ; ret=$? ; wineserver -k ; exit ${ret}' \
    true
true: 1: wineserver: not found
true: 1: wineserver: not found
@hartwork
Copy link
Owner

Hi @MausKaffee34767,

I think it's arguable whether that's a crash when the is no backtrace, the verbose output is there by default. To me it looks like you do not have Wine installed but are running sandwine without --no-wine. Before I start patching things in to change the situation, I would like to ask what output and behavior you would expect from sandwine as a user with no Wine installed starting sandwine.

Best, Sebastian

@cadrian
Copy link

cadrian commented Oct 20, 2024

Hello,

I have exactly the same problem even though I do have wine installed:

$ wineserver -version
Wine 9.0

I am running Debian testing with Wine stable from winehq.

What am I missing?

Thanks

@hartwork
Copy link
Owner

@cadrian interesting! I'm starting to think that Wine could be installed in your system at a location that is not covered by the "usual system locations" that are mounted with bwrap. Could you share the output of which -a wineserver and lsb_release -a?

@cadrian
Copy link

cadrian commented Oct 20, 2024

Here it is:

$ which -a wineserver
/usr/bin/wineserver
/bin/wineserver
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux trixie/sid
Release:	n/a
Codename:	trixie

Note that /bin is a symlink to /usr/bin, hence the first output.

Apart from that, I did nothing fancy except installing the package from winehq instead of the native package from debian.

@hartwork
Copy link
Owner

@cadrian I guess the question is where the rest of the Wine files live. I would check the file listing of their Debian packages but https://dl.winehq.org/wine-builds/debian/dists/trixie/main/binary-amd64/ shows many different versions. Which of those debs do you have installed? E.g. if it turns out that most of the package lives in say /opt that would be the reason it's not already working.

@cadrian
Copy link

cadrian commented Oct 20, 2024

Here is the list of installed wine packages:

$ sudo apt list --installed | grep wine

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

carla-bridge-wine32/focal,focal,now 5:2.6.0~git20240921-1kxstudio1 all [installed]
carla-bridge-wine64/focal,focal,now 5:2.6.0~git20240921-1kxstudio1 all [installed]
carla-vst-wine/focal,now 5:2.6.0~git20240921-1kxstudio1 amd64 [installed]
wine-stable-amd64/testing,now 9.0.0.0~trixie-1 amd64 [installed]
wine-stable-i386/testing,now 9.0.0.0~trixie-1 i386 [installed]
wine-stable/testing,now 9.0.0.0~trixie-1 amd64 [installed]
wineasio-amd64/focal,now 5:1.2.0b-4kxstudio1 amd64 [installed]
wineasio-data/focal,focal,now 5:1.2.0b-4kxstudio1 all [installed]
wineasio-i386/focal,now 5:1.2.0b-4kxstudio1 amd64 [installed]
wineasio/focal,now 5:1.2.0b-4kxstudio1 amd64 [installed]
winehq-stable/testing,now 9.0.0.0~trixie-1 amd64 [installed]

And yes, I see wine directories in /opt

@cadrian
Copy link

cadrian commented Oct 20, 2024

Yep. Maybe the explanation:

$ ls -l /usr/bin/wineserver 
lrwxrwxrwx 1 root root 31 18 janv.  2024 /usr/bin/wineserver -> /opt/wine-stable/bin/wineserver

@hartwork
Copy link
Owner

hartwork commented Oct 20, 2024

@cadrian could you try add --pass /opt/wine-stable:ro during invocation of sandwine and report back how it went?

@cadrian
Copy link

cadrian commented Oct 21, 2024

It worked! Thank you.

@hartwork
Copy link
Owner

hartwork commented Oct 21, 2024

@cadrian perfect, thanks for trying and the update! There may be ways to make it work out of the box with Wine upstream Debian packages. I will need to sleep over it.

@hartwork
Copy link
Owner

It worked! Thank you.

@cadrian could you check if pull request #68 makes things work out of the box for you (i.e. without passing --pass /opt/wine-stable:ro explicitly)?

@cadrian
Copy link

cadrian commented Oct 22, 2024

@hartwork It would be my pleasure, for sure.

I checked out the PR. But how do I build or run locally? There is not any build file or launcher I can recognize :'(

Thanks

@hartwork
Copy link
Owner

hartwork commented Oct 22, 2024

@cadrian here's two ways that levarage Python virtualenvs:

a)

# cd "$(mktemp -d)"
# python3 -m venv venv
# source venv/bin/activate
# git clone --depth 1 --branch issue-55-support-wine-upstream-debian-packages https://github.com/hartwork/sandwine
# pip3 install -e sandwine/ 
# sandwine --help

b)

# cd "$(mktemp -d)"
# python3 -m venv venv
# source venv/bin/activate
# pip3 install git+https://github.com/hartwork/sandwine@issue-55-support-wine-upstream-debian-packages
# sandwine --help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants