CC: Tweaked

CC: Tweaked

64M Downloads

`file_transfer` not working on Ubuntu 24

Selim042 opened this issue ยท 4 comments

commented

Minecraft Version

1.20.1

Version

1.115.0

Details

Logs: https://mclo.gs/4ATOA9G

Reproduction:

  1. After launching the game and opening a PC terminal, execute the import command
  2. Drag 'n' drop a file onto the game
  3. Expect the file to transfer, nothing happens

Screenshot

Other Details:
I tried making sure the game is focused, that doesn't fix it.
To confirm similar functionality, I tried dropping a resource pack into the game in settings, that works as expected.
In these logs, I used Prism launcher, with no other mods installed.

commented

Thanks for the report! Oh, that's very odd โ€” I also run Linux (not Ubuntu, but still GNOME on Wayland, so should be pretty similar), and this works fine for me.

If you open the resource-packs screen of the game, does drag-and-drop work for you there? This may just be an issue with how Ubuntu and GLFW talk to each other.

It might be worth trying running Minecraft outside of Flatpak, and seeing if that behaves any better. It shouldn't cause any issues (I've not had any problems at least) but just in case.

commented

If you open the resource-packs screen of the game, does drag-and-drop work for you there? This may just be an issue with how Ubuntu and GLFW talk to each other.

Dropping in resource packs works just fine.

It might be worth trying running Minecraft outside of Flatpak, and seeing if that behaves any better. It shouldn't cause any issues (I've not had any problems at least) but just in case.

I'll try this tomorrow.

commented

It might be worth trying running Minecraft outside of Flatpak, and seeing if that behaves any better. It shouldn't cause any issues (I've not had any problems at least) but just in case.

I ran Minecraft using the official launcher, and it seems okay in this environment...
Why would the resource pack screen work still though?

commented

[Flatpak] shouldn't cause any issues (I've not had any problems at least) [...] Why would the resource pack screen work still though?

Hah. I span up an Ubuntu VM to test this, but after further testing I needn't have. This is actually an issue on my computer too.

The problem here is that file drag-and-drop events are incorrectly handled by Flatpak/Nautilus/GLFW (it's unclear!). If you try to drag a file from ~/Documents/foo.lua, then that path is passed directly to Minecraft. However, ~/Documents is not available inside the Flatpak, and so the file doesn't exist.

I suspect the reason it worked when testing resource packs (and in my earlier testing), is that ~/Downloads is mounted inside the flatpak, and so you can drag and drop directories from there!

I'm afraid I'm going to close this, as it's not a bug with CC:T, so I don't think there's much I can do to work around it. Though I'm not quite sure where the bug is โ€” Flatpak should have a system for this, and AFAICT Nautilus is on GTK4 now, so should support it. Possibly GLFW? Their DND implementation definitely isn't doing anything fancy.

As an (admittedly terrible) workaround, you can mount additional directories into the flatpak (sudo flatpak override org.prismlauncher.PrismLauncher --filesystem=$HOME/Documents), though aware that does reduce some of the security guarantees :/.