I need to inspect and repair a Raspberry Pi SD card. This is my main goal. And it should be as simple as possible. It's already bad enough that Windows 10 cannot mount that file system and Android also has no idea about it (but creates random junk on the volume it understands). So I got an Ubuntu disk image and started the live system in VMware. I thought this should be the easiest and quickest solution to get to an environment that can handle a Linux file system.
I plugged in the card reader and it showed up as two volumes on the Ubuntu live desktop as expected. But the file I need to edit belongs to root. The default graphical text editor (it has no visible name) that is started from the default graphical file explorer (also has no visible name) only opens the file as read-only. Saving is not possible.
Smart Windows applications ask me for the required privileges when I want to use them. (Dumb Windows applications still don't.) I thought Linux apps were that smart before. But the editor isn't.
So what are my options to edit that file?
Is going to a terminal and using all the funny text UI tools all I can do now? I'd really prefer a GUI solution because I always forget terminal commands after not using them for a month. And the mount path seems to be unreadable for humans, it's so long I can't see it completely. I found the command gksudo nautilus
somewhere around but it's not available on my system.
So, instead of using:
Use:
or
The text editor kate let's you edit and save files you don't have write permissions on by entering the sudo password. Since in a live system there is no sudo password (i.e. you can sudo without providing a password), it won't even ask for it, so you can just save all files regardless of the write permissions.
You can install kate in the Ubuntu live system (after enabling the online repositories), but it would be lost on shutdown/reboot.
If you are comfortable with using a different Ubuntu flavour, you can try Kubuntu, which comes with kate pre-installed as the default text editor.