Jump to content
The Dark Mod Forums

Darkradiant install with Flatpak? (Linux)


Recommended Posts

20 hours ago, jonri said:

Allowing access to the whole filesystem is strongly discouraged, but hard to avoid if we want to support arbitrary TDM paths.  Would it be reasonable to assume that most people install TDM in their /home directories, or would accept that limitation if they were using the flatpak DR?

Why is it not possible to give access to other places than home (mounted partitions)?

Link to comment
Share on other sites

4 hours ago, datiswous said:

Why is it not possible to give access to other places than home (mounted partitions)?

One of flatpak's strengths and limitations is that it tries to sandbox off anything that is not required for the application to run. Since TDM can be installed anywhere, the only way to support that is to let the application have access to the whole filesystem, which essentially defeats the sandbox.

There's a concept of "portals" that lets the user poke holes in the sandbox to load and save files, but I think DR does too much file access behind the scenes for this to work.  I need to do more research here.

If we can't find a good way forward, in the worst case we could provide instructions on how the user can use flatseal to change the flatpak's permissions and allow access to their chosen TDM install path after installation.

Link to comment
Share on other sites

Flatpak has a default install location though, why would it even be necessary to give it access to the non-default location at all?

To my understanding, leaving the install paths where they are is part of the point with flatpak: it isn't meant to be tampered with or moved by users. That said, running the binaries directly by encouraging the old execution process (./example-executable or double-clicking) isn't how we want users to do this anyway because it could bypass the flatpak sandbox.

I think the solution here would be to just include a .desktop file with the game, but do correct me if I'm misunderstanding something Lol

Link to comment
Share on other sites

5 hours ago, Neko-san said:

Flatpak has a default install location though, why would it even be necessary to give it access to the non-default location at all?

I'm not concerned about the DR flatpak install location, but rather being able to access the TDM game files in whatever arbitrary location the user has installed them.

1. We need to read the game files for the user to make use of any game assets in their map.

2.  We need to write the map and its supporting files to this location for them to be loadable in-game.

 

Link to comment
Share on other sites

Quote

but rather being able to access the TDM game files in whatever arbitrary location the user has installed them

Why would any of the game files be in an arbitrary location if all the files should be where you expect them?

They shouldn't be anywhere else; for that, why even bother making that a concern for supporting with Flatpak at all?

Link to comment
Share on other sites

1 hour ago, Neko-san said:

Why would any of the game files be in an arbitrary location if all the files should be where you expect them?

They shouldn't be anywhere else; for that, why even bother making that a concern for supporting with Flatpak at all?

Where should we expect the files to be? The darkradiant flatpak is separate from the game itself. Since TDM has its own installer, the files could be anywhere the user decides.

Link to comment
Share on other sites

On 9/9/2022 at 10:35 PM, jonri said:

Allowing access to the whole filesystem is strongly discouraged, but hard to avoid if we want to support arbitrary TDM paths.  Would it be reasonable to assume that most people install TDM in their /home directories, or would accept that limitation if they were using the flatpak DR?

I think this is the only outstanding issue left.  Instead of requiring TDM to be in /home, my alternative idea is to provide instructions for the user to modify the permissions after installation.  This can either be done with a single command along the lines of

flatpak override --user --filesystem=/path/to/tdm net.darkradiant.DarkRadian

or by using Flatseal to so the same graphically.

I propose putting these instructions in a wiki article that we link to in the package description, and possibly a little sentence on the Game Setup dialog in the next version of DR saying "Can't find your game path? Click here for instructions" that would show up in the flatpak version only.

This process seems to be what various media players have settled on doing when they need persistent access to an arbitrary directory.  As long as your TDM path doesn't change, this would be a one-time process.

Edited by jonri
  • Like 1
Link to comment
Share on other sites

If, hypothetically speaking, a future FlatPak containing the game itself were to be created, would this be an easier problem to solve? Or is linking between FlatPak directories just as hard as gaining access to an arbitrary directory?

Link to comment
Share on other sites

40 minutes ago, OrbWeaver said:

If, hypothetically speaking, a future FlatPak containing the game itself were to be created, would this be an easier problem to solve? Or is linking between FlatPak directories just as hard as gaining access to an arbitrary directory?

I think it would actually make things harder... :unsure:

Link to comment
Share on other sites

I installed the Flatpak version via my disto (Manjaro) package manager without problem. I think it should state: 3D level editor for The Dark Mod and Doom 3, instead of the other way around.

software-installer-manjaro.thumb.jpg.3c68c48aece9a962c20807b155bf384e.jpg

Originally DR takes over the system theme that is selected. So in my case the dark theme, but with the Flatpak install, only the light theme is used. It doesn't take over the system theme. Is there a way to force the system theme? I guess using the light theme does have the benefit of good looking icons.

Edited by datiswous
Link to comment
Share on other sites

22 minutes ago, datiswous said:

I think it should state: 3D level editor for The Dark Mod and Doom 3, instead of the other way around.

I just copied this information out of the .desktop file.  It wouldn't hurt to clean some of those up though, the longer description was also there but might be a bit brief for a graphical package browser too.

24 minutes ago, datiswous said:

Is there a way to force the system theme?

Not DarkRadiant specific, but I think you usually just have to install the Flatpak version of your system theme.  For me (KDE / Breeze), I had to install https://github.com/flathub/org.gtk.Gtk3theme.Breeze and apply the workaround from the readme.

  • Thanks 1
Link to comment
Share on other sites

On 9/13/2022 at 4:16 PM, jonri said:

I think this is the only outstanding issue left.  Instead of requiring TDM to be in /home, my alternative idea is to provide instructions for the user to modify the permissions after installation.  This can either be done with a single command along the lines of

flatpak override --user --filesystem=/path/to/tdm net.darkradiant.DarkRadian

or by using Flatseal to so the same graphically.

I propose putting these instructions in a wiki article that we link to in the package description, and possibly a little sentence on the Game Setup dialog in the next version of DR saying "Can't find your game path? Click here for instructions" that would show up in the flatpak version only.

This process seems to be what various media players have settled on doing when they need persistent access to an arbitrary directory.  As long as your TDM path doesn't change, this would be a one-time process.

Hey! Have you had a chance to try this with the flatpak manifest I'm working on? I'm curious if one flatpak app can access another's dir in ~/.var or if it's completely disabled. If it's the latter, we need to change the default installation path in the darkmod flatpak:

 

Link to comment
Share on other sites

10 hours ago, Ludvig said:

Hey! Have you had a chance to try this with the flatpak manifest I'm working on? I'm curious if one flatpak app can access another's dir in ~/.var or if it's completely disabled. If it's the latter, we need to change the default installation path in the darkmod flatpak:

I haven't, but I'll certainly try it out!  Ordinarily Flatpak packages can't get to each other's files, but if it can be installed to an agreed-upon location outside the sandbox we should be able to make this work.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

I doubt it's something on our end, as we just tell flatpak that we need OpenGL support and it's supposed to figure out the rest.  I'll see if I can read up on it a little though.  Flatpak has many advantages, but storage space efficiency is not one of them.

  • Like 1
Link to comment
Share on other sites

Yeah, that's something that flatpak does, and only for nvidia since the driver isn't fully open source. Basically flatpak checks what version of the driver your system is using and tries to install a corresponding version for the runtime. These need to match for hardware acceleration to work within flatpak.

You can see if you have any old nvidia runtimes that can be removed by running

flatpak remove --unused

 

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...