Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

[Bug]: Doesn't open with Xfce4 terminal: 'Unknown option: "cmd"'

Open SeongGino opened this issue 6 months ago • 5 comments

Describe the bug

Trying to open a command line in Bottles with xfce4-terminal installed will cause that error to happen.

Looks like the return of #1097

To Reproduce

  1. Open Bottles in a terminal
  2. Open up a bottle, go to Tools -> Command Line
  3. Observe the error.

Package

Flatpak from Flathub

Distribution

Arch Linux

Debugging Information

Official Package: false
Version: 51.9-f9c19ae7
DE/WM: plasma
Display:
    X.org: true
    X.org (port): :0
    Wayland: false
Graphics:
    vendors:
        nvidia:
            vendor: nvidia
            envs:
                __NV_PRIME_RENDER_OFFLOAD: '1'
                __GLX_VENDOR_LIBRARY_NAME: nvidia
                __VK_LAYER_NV_optimus: NVIDIA_only
            icd: /usr/share/vulkan/icd.d/nvidia_icd.json
            nvngx_path: /usr/lib/nvidia/wine
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 6.5.8-273-tkg-linux-tkg-pds
Disk:
    Total: 96634667008
    Free: 7796563968
RAM:
    MemTotal: 15.5GiB
    MemAvailable: 7.3GiB
Bottles_envs: null
Tools and Libraries:
    cabextract: true
    p7zip: true
    patool: true
    glibc_min: '2.38'
    icoextract: true
    pefile: true
    orjson: true
    markdown: true
    ImageMagick: true
    FVS: true
    xdpyinfo: true

Troubleshooting Logs

21:28:26 (INFO) Using Wine Command Line -- launch_terminal 
21:28:26 (INFO) Command: xfce4-terminal -e 'sh -c '/home/seong/.local/share/bottles/runners/wine-ge-proton8-24/bin/wine64 cmd'' 
xfce4-terminal: Unknown option "cmd"

Additional context

Applies to native AUR bottles-git package, not the flatpak; debugging information is accurate to the native version being run.

SeongGino avatar Dec 15 '23 04:12 SeongGino

This is not a Bottles issue, and we don't officially support non-Flatpak packages of Bottles.

On Thu, Dec 14, 2023, 10:12 PM That One Seong @.***> wrote:

Describe the bug

Trying to open a command line in Bottles with xfce4-terminal installed will cause that error to happen.

Looks like the return of #1097 https://github.com/bottlesdevs/Bottles/issues/1097 To Reproduce

  1. Open Bottles in a terminal
  2. Open up a bottle, go to Tools -> Command Line
  3. Observe the error.

Package

Flatpak from Flathub Distribution

Arch Linux Debugging Information

Official Package: false Version: 51.9-f9c19ae7 DE/WM: plasma Display: X.org: true X.org (port): :0 Wayland: false Graphics: vendors: nvidia: vendor: nvidia envs: __NV_PRIME_RENDER_OFFLOAD: '1' __GLX_VENDOR_LIBRARY_NAME: nvidia __VK_LAYER_NV_optimus: NVIDIA_only icd: /usr/share/vulkan/icd.d/nvidia_icd.json nvngx_path: /usr/lib/nvidia/wine prime: integrated: null discrete: null Kernel: Type: Linux Version: 6.5.8-273-tkg-linux-tkg-pds Disk: Total: 96634667008 Free: 7796563968 RAM: MemTotal: 15.5GiB MemAvailable: 7.3GiB Bottles_envs: null Tools and Libraries: cabextract: true p7zip: true patool: true glibc_min: '2.38' icoextract: true pefile: true orjson: true markdown: true ImageMagick: true FVS: true xdpyinfo: true

Troubleshooting Logs

21:28:26 (INFO) Using Wine Command Line -- launch_terminal 21:28:26 (INFO) Command: xfce4-terminal -e 'sh -c '/home/seong/.local/share/bottles/runners/wine-ge-proton8-24/bin/wine64 cmd'' xfce4-terminal: Unknown option "cmd"

Additional context

Applies to native AUR bottles-git package, not the flatpak; debugging information is accurate to the native version being run.

— Reply to this email directly, view it on GitHub https://github.com/bottlesdevs/Bottles/issues/3193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWHH7L4HTHZM3CKCMJ26UZ3YJPE4JAVCNFSM6AAAAABAV3QGYCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2DEOBWGMZTCNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

orowith2os avatar Dec 15 '23 05:12 orowith2os

The error is reproducible if you run the command directly from the terminal (beware, this uses your system prefix instead of a bottles prefix)

21:28:26 (INFO) Using Wine Command Line -- launch_terminal 
21:28:26 (INFO) Command: xfce4-terminal -e 'sh -c '/home/duck/.local/share/bottles/runners/wine-ge-proton8-25/bin/wine64 cmd''
xfce4-terminal: Unknown option "cmd"

When I replace the last single quotes for double quotes, it works as expected

xfce4-terminal -e "sh -c '/home/duck/.local/share/bottles/runners/wine-ge-proton8-25/bin/wine64 cmd'"

Hopefully this is easy to implement. Even if it's not officially supported, it would be nice to have this fix as long as it doesn't break the flatpak version or causes any bugs. I have yet to test this

pato-pan avatar Feb 18 '24 04:02 pato-pan

The error is reproducible if you run the command directly from the terminal (beware, this uses your system prefix instead of a bottles prefix)

21:28:26 (INFO) Using Wine Command Line -- launch_terminal 
21:28:26 (INFO) Command: xfce4-terminal -e 'sh -c '/home/duck/.local/share/bottles/runners/wine-ge-proton8-25/bin/wine64 cmd''
xfce4-terminal: Unknown option "cmd"

When I replace the last single quotes for double quotes, it works as expected

xfce4-terminal -e "sh -c '/home/duck/.local/share/bottles/runners/wine-ge-proton8-25/bin/wine64 cmd'"

Hopefully this is easy to implement. Even if it's not officially supported, it would be nice to have this fix as long as it doesn't break the flatpak version or causes any bugs. I have yet to test this

It looks already like that https://github.com/bottlesdevs/Bottles/blob/536cb8cfbb67e12369020c117d309c41988fa666/bottles/backend/utils/terminal.py#L48

mirkobrombin avatar Apr 25 '24 17:04 mirkobrombin

@mirkobrombin I see what you are saying, and looking at the code it makes sense to think it should work. Now, the only thing left to understand is.... Screenshot_2024-05-19_18-35-20 Why does the program reflect something different!?!? Single quotes instead of double quotes! The quotes starting at sh instead of at -e. I don't get it, probably some kind of bash translation thing. Maybe if I revisit this I'll understand what's happening, make a pull request and fix this, but I can't promise I'll do that any time soon. Thank you for showing me that file to point me in the right direction though

Edit: I just noticed you are the maintainer for the package. Could it be an issue in the package or something specific about arch linux?

pato-pan avatar May 19 '24 22:05 pato-pan

I am not really the maintainer of that package. The maintainer is lotation

mirkobrombin avatar May 20 '24 06:05 mirkobrombin