Setting config files as read only
-
I was looking here [https://github.com/Aloshi/EmulationStation/issues/518](link url) and until I get around to compiling the latest source minus some menus, on a pi, I think it might be a good idea to use the method domoaligato mentions - setting any config files that are now complete, to read only.
I have tried this in winscp by right clicking file, going to properties and removing the w's, but I can still edit the files.
Is there any way to make a config file uneditable at least from the retropie menu? It would be okay if winscp was still able to edit it.
Thanks for any help.
-
@matalog Windows does not recognise Linux permissions, even if you think it lets you edit them in WINSCP. If you say what it is you are trying to achieve then maybe someone can help you.
-
I want to be able to leave this perfectly set up retropie machine in the hands of fools, and not let them do any damage to the setup. Ideally (and eventually) I will compile the source without most of the main menu items possibly only Quit left in there.
I want to leave the system protected against any possible messing around with. The simplest way possible. I assumed that would be to set the files i do not want deleted or edited, to read only or something similar.
Matalog
-
@matalog Use Kiosk mode (should be along soon) or make the whole file system read only. Though I can see this actually causing issues. The Pi / RetroPie is not a console. It is a board designed to be tinkered with, RetroPie is also software that is designed to be extremely customisable. It's going to be near impossible to completely lock someone out of it. It's just not designed that way.
-
@jonnykesh Yeah, the kiosk mode doesn't have a lot of confidence in itself in the description, I'll wait until they incorporate it into retropie.
In the meantime, is there no way for me to write protect a file or folder or make them read only?
Thanks,
Matalog
-
@matalog You can do it. You just need to know which ones to do it to and which ones not to. RetroPie needs to write logs, internal nvram files and a host of other things in order to function. Locking it down read only is just going to break it, sooner or later. As I said, I can be done but not via WINSCP. You need to use the command line in the Pi or SSH into it.
What you wan't to do is a Linux thing, so you should google " make files / directories in Debian (RetroPie is built on Raspian which is Debian for Pi) Read Only" -
Thanks :-). I'm talking about locking rom files from being deleted, and gamelist from being edited. I think that should be okay.
-
@matalog You can remove or disable certain menus in different ways. If you tell me what menus you want to remove I should hopefully be able to help you do that. If you just remove the ability to input then it leaves the file system able to operate but they can't muck around with it.
So, which menus do you want to remove?
-
In the Main menu that you access by pressing Start on a control pad, I really would only like Game Collection and Quit to be the 2 options in there.
In the options menu that you usually access by pressing Select, I would like to remove Edit this games metadata.
I have already removed the runcommand options upon starting a game, and I have removed the retropie menu from the console selection screen.
-
@matalog Ooh, If you want a quick and easy solution then it is "all or nothing". I can tell you quickly how to stop that menu being brought up. If you want to edit the options you will have to compile your own version of Emulation Station after editing the source code.
-
There are some ways mentioned in the link I gave in the post at the top, if you have anyhting to add to that, then please share :-).
-
@jonnykesh I actually just read your reply properly, and realised that you said you can tell me how to stop that menu from being brought up. How would I do that? Disable the Start button in emulation station?
If I did disable that menu entirely, can you think of a way I would be able to shut down safely?
Thanks,
Matalog.
-
@matalog Yes, you have the right idea, I was going to suggest an entry in the RetroPie config menu but you have that hidden too.
You could actually set up an
Exit
system on the main system carousel. Inside would be a shell script that would run the normal shutdown routine for ES. You could addReboot
Power Off
. Basically turn it into your own custom menu. -
I can enable the Retropie menu temporarily if it will help me to do something. What option is in there that may help me?
Do you know of a link that describes how to put an exit system on the carousel? I like that idea.
-
@matalog Check out "how to add Kodi as its' own system on retropie" That is basically just calling a script that launches kodi. You can just substitute what you want to do.
-
Thanks again @jonnykesh I'm currently trying to do it. I have created .svgs in inkscape, and tested them in place of another platform to confirm that they work.
I can't get my new 'folder' to show in the carousel though.
So far I have, edited es-systems.cfg and added
<system>
<fullname>cys</fullname>
<name>cys</name>
<path>~/RetroPie/roms/cys</path>
<extension>.sh .SH</extension>
<command>bash %ROM%</command>
<platform>cys</platform>
<theme>cys</theme>
</system>I have made a folder in /RetroPie/roms/ called cys and the only thing i have in it so far is another folder.
I have added a folder in the carbon theme folder called cys, inside that I added a folder called art, containing an svg called controller and an svg called system (controller is blank and as I have said I have tried these 2 images replacing the ones in gb folder, and they show for it). Alongside the art folder in cys, I have put a theme.xml, copied from one of the other folders in carbon, as all of the theme.xmls seem to be the same, referring only to folders contained within. So, I basically copied the structure of most of the folders in etc/emulationstation/themes/carbon.
I suspect that my problem is something in the addition to es-systems.cfg, I didn't really know what I was doing there, especially in the <command>bash %ROM%</command>
<platform>cys</platform> parts.I believe i have 'created a <theme> correctly as I confirmed by replacing the <theme>gb</theme> (in gameboy) with <theme>cys</theme> and my svg showed once again.
Can you offer any help here?
Thanks,
Matalog
-
Nevermind!
I added a .sh file in there and it showed up :-)
Thanks for the help.
I used sudo shutdown -h now in the .sh file to shutdown, is that a good method? Is there a similar way I can reboot from .sh? Just sudo reboot? Or is there a better faster way?
-
@jonnykesh you can edit linux permissions just fine in winscp. I have done it successfully hundreds of times. Right clicking on the file and choosing properties. In there you can change the permissions as they are shown in the same permissions numbers (ie: 0644, 0775, etc..) that linux sees.
-
@edmaul69 I have tried that and it worked - just like chmod 0444 *.nes does - but that doesn't stop the file from being able to be deleted. I thought read only might have stopped a file from being deleted.
Any ideas on how to secure a file from being deleted, but still being able to be read by the retropie system?
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.