09-08-2020, 12:50 PM
How can I edit a admin text file with Phosh? Cant seem to find how to edit a file as root.
Can't find "sudo gedit" alternative
|
09-08-2020, 12:50 PM
How can I edit a admin text file with Phosh? Cant seem to find how to edit a file as root.
09-08-2020, 03:25 PM
In Phosh, you can go to Settings > Applications to view a list of installed applications. I'm running Mobian and gedit is listed as "Text Editor". You can open the app in software manager for more detail, like its actual name.
09-08-2020, 03:28 PM
I can't execute the command in Phosh for some reason! Nothing opens.
Response from Alpine Linux Chat: "<user1> Please don't launch GUI apps with root <user1> Doesn't work on any Wayland environment <user1> You could make a simple bash script that copies the file to $(mktemp -d)/file, opens that with gedit and sudo cp the temp file <user2> EDITOR=gedit sudoedit? <user1> Right, that does basically that, right?"
09-10-2020, 03:48 AM
(This post was last modified: 09-10-2020, 03:54 AM by User 18618.
Edit Reason: Fix printf
)
Indeed, please don't escalate the privileges of text editors. Use one of these (identical) commands instead:
Code: sudo -e || sudoedit If you're using Bash, try this: Code: printf '%b' "export EDITOR=gedit\nexport VISUAL=gedit\n" | tee -a ~/.profile |
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
sudo broke - "/usr/bin/sudo must be owned by uid 0 and have the setuid bit set" | cowsay | 2 | 3,606 |
07-07-2021, 12:41 PM Last Post: cowsay |
|
Cannot find a method of flashing to EMMC that works | MarkF | 4 | 6,961 |
10-30-2020, 09:06 PM Last Post: discogribbs |
|
ERROR: Could not find dependency 'firmware-rtl8723bt' | Engineer | 4 | 6,886 |
06-16-2020, 12:29 PM Last Post: Engineer |