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

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

Open
Cleetu5 opened this issue Mar 30, 2024 · 24 comments
Open

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

Cleetu5 opened this issue Mar 30, 2024 · 24 comments

Comments

@Cleetu5
Copy link

Cleetu5 commented Mar 30, 2024

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 Cleetu5 changed the title IWAD not found on linux even thogh the path is clearly specified IWAD Not Found On Linux Even Though The Path Is Clearly Specified Mar 30, 2024
@fabiangreffrath
Copy link
Owner

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

@Cleetu5
Copy link
Author

Cleetu5 commented Mar 30, 2024

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

@fabiangreffrath
Copy link
Owner

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

@Cleetu5
Copy link
Author

Cleetu5 commented Mar 30, 2024

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

@mikeday0
Copy link
Collaborator

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

@Cleetu5
Copy link
Author

Cleetu5 commented Mar 30, 2024

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

There are no spaces.

@mikeday0
Copy link
Collaborator

There are no spaces.

Okay. Can you share the exact terminal output then?

@Cleetu5
Copy link
Author

Cleetu5 commented Mar 30, 2024

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!

@fabiangreffrath
Copy link
Owner

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

@Cleetu5
Copy link
Author

Cleetu5 commented Mar 30, 2024

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.

@mikeday0
Copy link
Collaborator

mikeday0 commented Mar 30, 2024

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

@Cleetu5
Copy link
Author

Cleetu5 commented Mar 30, 2024

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

@ceski-1
Copy link
Collaborator

ceski-1 commented Mar 30, 2024

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).

@ceski-1
Copy link
Collaborator

ceski-1 commented Mar 30, 2024

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

@Cleetu5
Copy link
Author

Cleetu5 commented Mar 30, 2024

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.

@mikeday0
Copy link
Collaborator

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. 😄 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!)

@ceski-1
Copy link
Collaborator

ceski-1 commented Mar 30, 2024

Could you perhaps post the entire command for crispy?

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

@mikeday0
Copy link
Collaborator

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

@Cleetu5
Copy link
Author

Cleetu5 commented Mar 30, 2024

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!

@ceski-1
Copy link
Collaborator

ceski-1 commented Mar 31, 2024

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

@mikeday0
Copy link
Collaborator

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.

@Cleetu5
Copy link
Author

Cleetu5 commented Mar 31, 2024

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?

@mikeday0
Copy link
Collaborator

@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?

@6b6279
Copy link

6b6279 commented Apr 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants