crispy-doom icon indicating copy to clipboard operation
crispy-doom copied to clipboard

IWAD Not Found On Linux Even Though The Path Is Clearly Specified

Open Cleetu5 opened this issue 3 months ago • 24 comments

Background

Version of Crispy Doom: 6.0.0

Operating System and version:
Linux Pop!_OS 22.04 LTS x86_64

Game: Doom

Bug description

Observed behaviour: I specify the path to the IWAD like this: flatpak run io.github.fabiangreffrath.Doom -iwad ~/path/to/iwad/DOOM2.WAD, but it's not working. Thank you for the help in advance.

Cleetu5 avatar Mar 30 '24 20:03 Cleetu5

Well, what exactly does it say? Are you aware of the fact that file paths are case sensitive in Linux?

fabiangreffrath avatar Mar 30 '24 21:03 fabiangreffrath

its says: IWAD file /path to file/DOOM2.WAD not found. I'm not sure what "case sensitive" means tbh.

Cleetu5 avatar Mar 30 '24 21:03 Cleetu5

This means that doom2.wad is not the same as DOOM2.WAD and both may be separate files.

fabiangreffrath avatar Mar 30 '24 21:03 fabiangreffrath

I see. I did experiment with renaming the file, but that also didnt work. So is he looking for doom2.wad or DOOM2.WAD?

Cleetu5 avatar Mar 30 '24 21:03 Cleetu5

If the path to your iwad contains spaces, you also need to surround it with .

mikeday0 avatar Mar 30 '24 21:03 mikeday0

If the path to your iwad contains spaces, you also need to surround it with .

There are no spaces.

Cleetu5 avatar Mar 30 '24 21:03 Cleetu5

There are no spaces.

Okay. Can you share the exact terminal output then?

mikeday0 avatar Mar 30 '24 21:03 mikeday0

There are no spaces.

Okay. Can you share the exact terminal output then?

flatpak run io.github.fabiangreffrath.Doom -iwad ~/Doom_iwads/DOOM2.WAD
                           Crispy Doom 6.0.0
Z_Init: Init zone memory allocation daemon. 
zone memory: 0x7821e4400010, 32 MiB allocated for zone
Using /home/fredi/.var/app/io.github.fabiangreffrath.Doom/data/crispy-doom/ for configuration and saves
V_Init: allocate screens.
M_LoadDefaults: Load system defaults.
saving config in /home/fredi/.var/app/io.github.fabiangreffrath.Doom/data/crispy-doom/default.cfg
IWAD file '/home/fredi/Doom_iwads/DOOM2.WAD' not found!

Cleetu5 avatar Mar 30 '24 21:03 Cleetu5

And does the file /home/fredi/Doom_iwads/DOOM2.WAD exist? As mentioned before, upper case and lower case makes a difference.

fabiangreffrath avatar Mar 30 '24 21:03 fabiangreffrath

And does the file /home/fredi/Doom_iwads/DOOM2.WAD exist? As mentioned before, upper case and lower case makes a difference.

100% it absolutely does. The WAD also works, as I checked it with a diferent sourceport. Could there be an issue with the way crispy searches for files on my computer perhaps? Putting the file in the root of my home directory also doesnt work. Neither did putting the file in the crispy directory.

Cleetu5 avatar Mar 30 '24 21:03 Cleetu5

Sorry if this seems like an inane request, but can you run ls -l /home/fredi/Doom_iwads and share the output?

mikeday0 avatar Mar 30 '24 22:03 mikeday0

Sorry if this seems like an inane request, but can you run ls -l /home/fredi/Doom_iwads and share the output?

Haha you really don't trust me it seems. Here's the output:

ls -l ~/Doom_iwads
insgesamt 43400
-rw-rw-r-- 1 fredi fredi 14604584 Dez 24  1996 DOOM2.WAD
-rw-rw-r-- 1 fredi fredi 12408292 Dez 24  1996 DOOM.WAD
-rw-rw-r-- 1 fredi fredi 17420824 Dez 24  1996 PLUTONIA.WAD

Cleetu5 avatar Mar 30 '24 22:03 Cleetu5

Someone removed the ability to access the file system: https://github.com/flathub/io.github.fabiangreffrath.Doom/commit/5d0e9354f9bd15b7c183a7543017ad2c300f219b

A line like this needs to be added: https://github.com/flathub/org.chocolate_doom.ChocolateDoom/blob/c9575372cffade6d9d55240c853454d9066ef1d4/org.chocolate_doom.ChocolateDoom.yml#L14C5-L14C37

Until that's fixed, try adding --filesystem=/path/path:ro to the command line (more info).

ceski-1 avatar Mar 30 '24 23:03 ceski-1

I guess you can also copy the wad to the crispy directory under ~/.var/app/ ?

ceski-1 avatar Mar 30 '24 23:03 ceski-1

Someone removed the ability to access the file system: flathub/io.github.fabiangreffrath.Doom@5d0e935

A line like this needs to be added: https://github.com/flathub/org.chocolate_doom.ChocolateDoom/blob/c9575372cffade6d9d55240c853454d9066ef1d4/org.chocolate_doom.ChocolateDoom.yml#L14C5-L14C37

Until that's fixed, try adding --filesystem=/path/path:ro to the command line (more info).

Oh, great that the problem got figured out! Could you perhaps post the entire command for crispy?

I guess you can also copy the wad to the crispy directory under ~/.var/app/ ?

Tried already. Didn't work. And the WAD file itself works fine.

Cleetu5 avatar Mar 30 '24 23:03 Cleetu5

Haha you really don't trust me it seems. Here's the output:

Quite the opposite, in fact! This problem seems kind of crazy so I knew there was no way you were making it up. :smile: I was thinking maybe a strange character got into the filename or perhaps the permissions got mangled.

Anyway, @ceski-1 to the rescue. (As usual!)

mikeday0 avatar Mar 30 '24 23:03 mikeday0

Could you perhaps post the entire command for crispy?

flatpak run --filesystem=~/Doom_iwads:ro io.github.fabiangreffrath.Doom -iwad ~/Doom_iwads/DOOM2.WAD

ceski-1 avatar Mar 30 '24 23:03 ceski-1

I guess you can also copy the wad to the crispy directory under ~/.var/app/ ?

Tried already. Didn't work. And the WAD file itself works fine.

The flatpak works fine for me provided that the iwad file is located somewhere under ~/.var/app/io.github.fabiangreffrath.Doom.

For example: flatpak run io.github.fabiangreffrath.Doom -iwad ~/.var/app/io.github.fabiangreffrath.Doom/DOOM2.WAD

mikeday0 avatar Mar 30 '24 23:03 mikeday0

Could you perhaps post the entire command for crispy?

flatpak run --filesystem=~/Doom_iwads:ro io.github.fabiangreffrath.Doom -iwad ~/Doom_iwads/DOOM2.WAD

thanks!

Cleetu5 avatar Mar 30 '24 23:03 Cleetu5

The flatpak works fine for me provided that the iwad file is located somewhere under ~/.var/app/io.github.fabiangreffrath.Doom.

For example: flatpak run io.github.fabiangreffrath.Doom -iwad ~/.var/app/io.github.fabiangreffrath.Doom/DOOM2.WAD

That's probably a more secure approach than exposing other parts of the file system to the flatpak. Maybe someone can update the manifest to be more convenient.

This also works with the above but I'm not sure what the best practice is: flatpak run --persist=. io.github.fabiangreffrath.Doom

ceski-1 avatar Mar 31 '24 00:03 ceski-1

I know next to nothing about flatpak, but could you add a wad directory to the data folder and then set DOOMWADPATH to that directory and then inject it into flatpak environment? Then the user could place their wads in that folder and call them by their bare filenames.

mikeday0 avatar Mar 31 '24 00:03 mikeday0

Could you perhaps post the entire command for crispy?

flatpak run --filesystem=~/Doom_iwads:ro io.github.fabiangreffrath.Doom -iwad ~/Doom_iwads/DOOM2.WAD

I just wanted to say that it works now! Also do I have to put in the filesystem command everytime I wanna run Crispy?

Cleetu5 avatar Mar 31 '24 00:03 Cleetu5

@Cleetu5 Could you confirm that if you put DOOM2.WAD in the ~/.var/app/io.github.fabiangreffrath.Doom/ directory and then call crispy-doom using flatpak run io.github.fabiangreffrath.Doom -iwad ~/.var/app/io.github.fabiangreffrath.Doom/DOOM2.WAD that it does not load for you?

mikeday0 avatar Mar 31 '24 00:03 mikeday0

Manually setting DOOMWADPATH over Flatseal and then copying the WAD files to the respective directory within the sandbox seems to work. It's important to keep in mind that Flatpak does not replace $HOME by the root of the sandbox namespace itself, but it exposes the respective .var subdirectory, i.e., DOOMWADPATH should be set according to the actual user home directory. DOOMWADPATH=/home/foobar/.var/app/io.github.fabiangreffrath.Doom/data/wads should do it. Don't forget to replace /home/foobar with your own home directory path. $HOME doesn't work as Flatpak (nor Flatseal) does bash-like string replacement.

6b6279 avatar Apr 01 '24 17:04 6b6279