Dunelegacy in retropie 4.7.1 needs sudo to run?
-
I have compiled dunelegacy after changing the game.cpp file commenting out the SDL_RenderPresent(renderer); line to fix the flickering as suggested by tpo1990.
dunelegacy runs fine from inside lxde but wont run in command line or from emulationstation without using command sudo xinit dunelegacy when its stated to run without the sudo prefix by user symbios24 on github.
Why must you run this as root or xinit wont start? I've tried it from terminal also and xinit wont start at all without typing sudo in front of it. It seems the file /dev/tty0 wont load and gives a permission denied error hence why you must use sudo when running xinit. Does anyone know why this is happening and yet doesnt happen for lxde also run directly from the ports menu in emulationstation? Ive checked the permissions on the dunelegacy.sh and lxde.sh in /home/pi/retropie/roms/ports and the emulators.cfg files in /opt/retropie/configs/ports. I've checked permissions on the executable files in /opt/retropie/ports. everything looks the same yet lxde will start without sudo and xinit wont. any help would be appreciated
-
Any info on this? Am I doing something wrong? Should xinit need sudo to run? Why do we have to call xinit in the first place for this port?
-
@polygaryd I don’t have a solution. Just saying I’m running into the same problem with using xinit to launch the supermodel3 emulator
-
@shaggy1 said in Dunelegacy in retropie 4.7.1 needs sudo to run?:
@polygaryd I don’t have a solution. Just saying I’m running into the same problem with using xinit to launch the supermodel3 emulator
After more research I found a solution
https://www.raspberrypi.org/forums/viewtopic.php?t=171843
Next to last post
sudo apt-get install xserver-xorg-legacy
-
Actually that worked for one guy and the last post the says that he fixed it with after trying all the suggested solutions
sudo chmod 0744 /dev/fb0
So I'll try both
-
Ok so the sudo chmod 0744 /dev/fb0 didn't fix the xinit needing sudo to run
Installing the legacy xinit did start the dunelegacy without the use of sudo BUT there is no sound. I immediately exit and run xinit with sudo and I get sound again. So its getting there. Not sure how to get it fully functional though
-
Upgraded to a pi4 8gb model and had to install xserver-xorg-legacy to run dune legacy without sudo. Sound and music works, mouse works, keyboard doesnt work. Smh. Going to try a wired keyboard later. Was trying to get an xorg.Conf file created so i can modify the keyboard settings but that doesnt seem to be happening either. Just errors out.
-
@polygaryd
so to run this from emulationstation @mitu said to add XINIT: /opt/retropie/ports/dunelegacy/dunelegacy in the emulators.cfg file in /opt/retropie/configs/ports/dunelegacy folder and retropie's run command will handle xinit. So I removed xserver-xorg-legacy package and tested what he told me to do. It does in fact work, no need for sudo before the xinit command with his suggestion.As a side note he actually told me to do this for glhexen2 which needs xinit but couldnt find the game data files if you run "sudo xinit". I used what he told me and applied it to dunelegacy.
There are two more issues, one I have overcome the other I need help with. The issue I overcame was that when you run dunelegacy it says it cant find the pak files to run the game and wants them either in the "data" folder or /home/pi/.configs/dunelegacy/data". So in the start script located in /home/pi/Retropie/roms/ports/dunelegacy.sh I added "cd /opt/retropie/ports/dunelegacy" before the runcommand line. This first puts you in the dunelegacy directory with the executable and the data folder it wants, then runs the runcommand to execute the dunelegacy executable. I wish I could have the data under /home/pi/RetroPie/roms/ports like every other game ran in emulationstation but I havent figured out how to do that yet if its even possible.
The issue I need help with is I have no keyboard in dune legacy, but the mouse works. The game works fine otherwise. I cannot figure out how to get the keyboard working.
Keyboard does work in glhexen2 using XINIT: string so it must be something wrong with dunelegacy??
Any help on this would be great.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.