bottlesdevs / Bottles

Run Windows software and games on Linux
https://usebottles.com
GNU General Public License v3.0
6.34k stars 265 forks source link

[Bug]: File picker only shows MSIs on default filter #2555

Closed keenanweaver closed 1 year ago

keenanweaver commented 1 year ago

Describe the bug

When using 'Run executable', the file picker filters to 'Windows Installer package', which are MSI files. The default filter should also include actual Windows executable files (.EXE). To show these files, you have to cancel the filter.

To be even friendlier, it may also be wise to include other executable Windows file formats by default: .bat, .cmd, .vbs, .ps1, .msp.

To Reproduce

  1. Create/open a bottle
  2. Click Run executable
  3. Find a path with an EXE and MSI. Only the MSI is shown.

Package

Flatpak from Flathub

Distribution

Fedora Kinoite 37

Troubleshooting Logs

Official Package: true
Version: '50.1'
DE/WM: plasmax11
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/lib/x86_64-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json
            nvngx_path: /usr/lib/x86_64-linux-gnu/GL/nvidia-525-78-01/extra/nvidia/wine
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 6.1.5-200.fc37.x86_64
Disk:
    Total: 16783527936
    Free: 16783347712
RAM:
    MemTotal: 31.3GiB
    MemAvailable: 26.8GiB
Bottles_envs: null

Additional context

No response

ghost commented 1 year ago

On KDE Plasma using the KDE filepicker, you aren't even able to change the filter to show all files. The only avaliable option is "Windows Installer package".

TheEvilSkeleton commented 1 year ago

This seems to affect at least Plasma. I'm using GNOME and it shows exe files without a problem. This could be a problem on Plasma's end.

TheEvilSkeleton commented 1 year ago

I asked in #chat:kde.org.

TheEvilSkeleton commented 1 year ago

Alright, a contributor mentioned that this is indeed an issue on xdg-desktop-portal-kde, and referred to https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/138, which fixes the issue.

If anyone is interested with what the issue is, currently, xdg-desktop-portal-kde does not support filtering media types and patterns together. However, we are filtering msi files by media type, and exe files by pattern. The only solution would be to only use one or the other.

https://github.com/bottlesdevs/Bottles/blob/83bff365de3cb3aed1044af969d37bcb7c656c45/bottles/frontend/utils/filters.py#L23-L24

I'll try filter using media types only.

aL4ix commented 1 year ago

I found a workaround, if you press the clear button at the right side inside the "Filter:" combobox, it will clear the filter allowing you to select a .exe file.