bottlesdevs / Bottles

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

[Bug]: Supported files doesn't show up in the selection menu when adding a program #3199

Closed RunoHawk closed 8 months ago

RunoHawk commented 9 months ago

Describe the bug

When I try to add new program to a bottle I navigate to a folder containing exe file but manager doesn't show any file, only folders. I can't change the view from showing only supported files. It worked fine some time ago

To Reproduce

  1. Choose a bottle
  2. Choose "Add program"
  3. Navigate to a folder with .exe file
  4. There is no files showing up

Package

Flatpak from Flathub

Distribution

Linux Mint 21.2 Cinnamon

Debugging Information

Official Package: true
Version: '51.9'
DE/WM: cinnamon
Display:
    X.org: true
    X.org (port): :99.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-535-129-03/extra/nvidia/wine
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 6.2.0-39-generic
Disk:
    Total: 8347492352
    Free: 8347324416
RAM:
    MemTotal: 15.5GiB
    MemAvailable: 12.1GiB
Bottles_envs: null

Troubleshooting Logs

No response

Additional context

No response

DekosAnjo commented 9 months ago

Same here, I can't add shortcuts. A workaround is to select "All files", but it only works on the "Run executable" button, not on the "add shortcuts" button.

koplo199 commented 9 months ago

Almost surely not a Bottles bug, my bet on the latest release of xdg-desktop-portal.

Perkolator commented 8 months ago

Same problem here. Can't add a shortcut. From "run executable" and selecting "all files" I can see/run the files.

Almost surely not a Bottles bug, my bet on the latest release of xdg-desktop-portal.

How is this updated in users computers? I haven't seen any updates relating to this, nor to Flatpak itself.

EDIT: Is there a manual way to add a shortcut?

koplo199 commented 8 months ago

How is this updated in users computers? I haven't seen any updates relating to this, nor to Flatpak itself.

This is updated by the distribution package manager. Are you (and everyone affected by the bug) also on Linux Mint? I cannot reproduce on my end.

Does running Bottles using flatpak run --no-talk-name="org.freedesktop.portal.FileChooser" com.usebottles.bottles resolve the issue?

Perkolator commented 8 months ago

This is updated by the distribution package manager. Are you (and everyone affected by the bug) also on Linux Mint? I cannot reproduce on my end.

Linux Mint 20.3 Cinnamon here. I update everything manully and I haven't seen any updates to Flatpak nor to anything that "xdg-desktop-portal" related (as far as I can tell).

Does running Bottles using flatpak run --no-talk-name="org.freedesktop.portal.FileChooser" com.usebottles.bottles resolve the issue?

Nope.

EDIT: Was able to add a shortcut manually by editing the "bottle.yml" file (checking the same file of another bottle with a shortcut for an example).

fengbainuo commented 8 months ago

This is updated by the distribution package manager. Are you (and everyone affected by the bug) also on Linux Mint? I cannot reproduce on my end.

Nope, I'm also affected on Oracle Linux 9.

Does running Bottles using flatpak run --no-talk-name="org.freedesktop.portal.FileChooser" com.usebottles.bottles resolve the issue?

Doesn't resolve for me either.

EDIT: Was able to add a shortcut manually by editing the "bottle.yml" file (checking the same file of another bottle with a shortcut for an example).

Can you share a sample file for a shortcut please? I don't have anything installed that has a shortcut in bottles, so don't have a reference file, but would like to add them manually until the bug is fixed.

Perkolator commented 8 months ago

Can you share a sample file for a shortcut please?

In bottle.yml, edit the "External_Programs" part of the file:

External_Programs:
    89c90f7a-7a57-4a92-819f-178e99289480:
        executable: Dusk.exe
        folder: /home/USER/.var/app/com.usebottles.bottles/data/bottles/bottles/Dusk/drive_c/GAMES/dusk_hd
        id: 89c90f7a-7a57-4a92-819f-178e99289480
        name: Dusk HD
        path: /home/USER/.var/app/com.usebottles.bottles/data/bottles/bottles/Dusk/drive_c/GAMES/dusk_hd/Dusk.exe

The 89c90f7a-7a57-4a92-819f-178e99289480 UUID's (version 4) I created online here: https://www.uuidgenerator.net/version4

fengbainuo commented 8 months ago

Can you share a sample file for a shortcut please?

In bottle.yml, edit the "External_Programs" part of the file:

External_Programs:
    89c90f7a-7a57-4a92-819f-178e99289480:
        executable: Dusk.exe
        folder: /home/USER/.var/app/com.usebottles.bottles/data/bottles/bottles/Dusk/drive_c/GAMES/dusk_hd
        id: 89c90f7a-7a57-4a92-819f-178e99289480
        name: Dusk HD
        path: /home/USER/.var/app/com.usebottles.bottles/data/bottles/bottles/Dusk/drive_c/GAMES/dusk_hd/Dusk.exe

The 89c90f7a-7a57-4a92-819f-178e99289480 UUID's (version 4) I created online here: https://www.uuidgenerator.net/version4

Thank You!

DekosAnjo commented 8 months ago

How is this updated in users computers? I haven't seen any updates relating to this, nor to Flatpak itself.

This is updated by the distribution package manager. Are you (and everyone affected by the bug) also on Linux Mint? I cannot reproduce on my end.

Does running Bottles using flatpak run --no-talk-name="org.freedesktop.portal.FileChooser" com.usebottles.bottles resolve the issue?

No, I'm on Pop!_OS.

koplo199 commented 8 months ago

Does running Bottles using flatpak run --no-talk-name="org.freedesktop.portal.FileChooser" com.usebottles.bottles resolve the issue?

Nope.

Then I lost my bet and it's unrelated to the desktop portal. Shooting in the dark, but does flatpak update gives anything? If not, does this build artifact help?

Perkolator commented 8 months ago

Shooting in the dark, but does flatpak update gives anything?

Nothing.

If not, does this build artifact help?

Tried in a "clean" VirtualBox environment, installed Bottles normally and then your build, still the same problem.

koplo199 commented 8 months ago

Found the culrprit, which is the org.gnome.Platform runtime's latest update (commit 8633b80ad57b272e38c51a53704f1c096fd1a1bd3da5005241f9beb1d123fd71).

Downgrading to the previous version fixes the issue : sudo flatpak update --commit=486bda410d634cc025d6ea0b4bfaec01510d97cd5a43580fd1267cd3c6c6d65e org.gnome.Platform/x86_64/44

Commits were obtained with the following command : flatpak remote-info --log flathub org.gnome.Platform/x86_64/44

Perkolator commented 8 months ago

Found the culrprit

Confirmed (in VBox env). Is this a bug in gnome platform, or something permanent that Bottles needs to adapt to? Downgrading is not a permanent solution, and even temporarily might cause problems with other Flatpak apps that use the same gnome platform.

koplo199 commented 8 months ago

Is this a bug in gnome platform, or something permanent that Bottles needs to adapt to?

Temporary and unrelated to Bottles, this issue should be closed.

Perkolator commented 8 months ago

unrelated to Bottles

How is it "unrelated to Bottles" when Bottles is dependant of this 3rd party software that creates this problem when using Bottles. This I don't understand, not the first time I have read something like this, the "it's not our problem" mentality here in this repo. For example #3076. It's like you build this software, that is basically a GUI for different software, meaning to hide the complicated stuff running underneath, for running windows programs and when something breaks underneath, from a user POV, Bottles doesn't seem to work properly, the devs just seem to wash their hands and state that it's no concern of us. What I'm trying to say is that while technically correct that something 3rd party stuff under the hood of Bottles broke and is not a Bottles fault, the situation from the end-user POV is that Bottles isn't working.. I feel that this end-user POV is lost with the devs of this repo, just like in the #3076, Bottles is made to be an easier to use front-end to complicated software underneath, but still devs require/expect that the users know everything that happens with the 3rd party software under the hood of Bottles, and don't even consider warning users about possible problems arising from well-known situations (only to people who know about the 3rd party software underneath Bottles) that Bottles itself allows the user to do from the GUI (and then even restricting commenting about the issues... and if the argument is that "issues are not for discussions" (dubious claim IMO), then why not enable the github discussions in this repo?). All that said, I'm just frustrated about this topic, I wish peace and love for all.

EDIT: To counter-balance the criticism, here some love for Bottles from the components repo.

koplo199 commented 8 months ago

It's unrelated to Bottles in the sense that nothing can be done here about the issue. It's that simple really.

DekosAnjo commented 8 months ago

i agree for a permanent solution and i agree that is a problem with a 3rd party. we can have both solutions in one shot. i opened the code and see that the "add shortcuts" don't have add_all_filters(dialog) unlike the "Run executable" that has it. i think if we add add_all_filters(dialog) to enable the "add shortcuts" file picker to get all files will solve the issue until gnome don't fix his issue. you will need to change to "all files" for a while until then.

koplo199 commented 8 months ago

Or you can downgrade the runtime using the command above.

Edit: @rafaelhipercg I misunderstood your comment. I see no downsides in having add_all_filters(dialog) for the "Add shortcuts" button too, if you open a PR it should be accepted. It would even be more consistent with the "Run executable" button behavior.

FullStackFlamingo commented 8 months ago

Downgrading to the previous version fixes the issue : sudo flatpak update --commit=486bda410d634cc025d6ea0b4bfaec01510d97cd5a43580fd1267cd3c6c6d65e org.gnome.Platform/x86_64/44

Thanks for finding the issue and a temporary workaround, I knew I shouldn't have updated my flatpaks around the holidays!

sobersthebear commented 8 months ago

Same issue here, solved by downgrading. What a silly problem.

hardBSDk commented 8 months ago

I think this xdg-desktop-portal change broke existing bottles, when launching executable shortcuts they don't match with a Windows Installer package.

hardBSDk commented 8 months ago

Downgrading the Bottles version to 51.9 don't fix the issue for me (PopOS 22.04).

pyrestriker commented 8 months ago

Another workaround possibly: when the file select window opens, navigate to the folder where the executable should show. Then, navigate there in your file browser and drag the exe over to the file select window. This worked for me, at least on mx linux xfce.

nekromoff commented 8 months ago

I can confirm for 51.10 flatpak / KDE Neon - only installers are supported in the dropdown.

Once I delete and enter *.exe or similar, it show other files as well. However, .exe files do not launch anymore, completely broken.

sierret commented 7 months ago

Here is a temp fix for executables(not shortcuts):

sudo flatpak update --commit=779ddf6a44999c6e231aef3b4ffb53d0625ef7af8a0d98a909a9e19e235ed761 com.usebottles.bottles

This downgrade bottles as well as it's dependencies(mainly gnome).

You can also the commit history list yourself using flatpak remote-info --log flathub com.usebottles.bottles and select whatever commit version you prefer(each commit has a ID. Simply replace that ID in above command as sudo flatpak update --commit=_your-prefererred commit-id_ com.usebottles.bottles.

The issue appears to be related to a update version of gnome(as mentioned above) that breaks Bottles Executable functionality. Downgrading also downgrades this gnome version.

bbbowles commented 2 months ago

sudo flatpak update --commit=779ddf6a44999c6e231aef3b4ffb53d0625ef7af8a0d98a909a9e19e235ed761 com.usebottles.bottles

Tried it today, the command results in error: Server returned status 404. Furthermore, looking for the commit you are talking about using "flatpak remote-info --log" shows me only the last 4 commits made, this link says the commits were pruned, but you can still clone the git repo. Should i clone this git repository we are commenting in? I searched for the commit by its UUID in the command i quoted but didn't find anything

Its my very first time using flatpak and bottles, so any help is greatly appreciated