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

file_transfer not working on Ubuntu 24 #2112

Closed
Selim042 opened this issue Feb 25, 2025 · 4 comments
Closed

file_transfer not working on Ubuntu 24 #2112

Selim042 opened this issue Feb 25, 2025 · 4 comments
Labels
area-Minecraft This affects CC's Minecraft-specific content. bug A problem or unexpected behaviour with the mod. invalid Issues caused by user error, another mod, etc...

Comments

@Selim042
Copy link

Selim042 commented Feb 25, 2025

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.

@Selim042 Selim042 added the bug A problem or unexpected behaviour with the mod. label Feb 25, 2025
@SquidDev SquidDev added the area-Minecraft This affects CC's Minecraft-specific content. label Feb 25, 2025
@SquidDev
Copy link
Member

SquidDev commented Feb 25, 2025

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.

@Selim042
Copy link
Author

Selim042 commented Feb 26, 2025

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.

@Selim042
Copy link
Author

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?

@SquidDev SquidDev added help wanted I haven't got the knowledge or time to work on this. wontfix A bug which I won't fix or an enhancement which won't be implemented. invalid Issues caused by user error, another mod, etc... and removed help wanted I haven't got the knowledge or time to work on this. wontfix A bug which I won't fix or an enhancement which won't be implemented. labels Feb 28, 2025
@SquidDev
Copy link
Member

SquidDev commented Feb 28, 2025

[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 :/.

@SquidDev SquidDev closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Minecraft This affects CC's Minecraft-specific content. bug A problem or unexpected behaviour with the mod. invalid Issues caused by user error, another mod, etc...
Projects
None yet
Development

No branches or pull requests

2 participants