Can't find "sudo gedit" alternative
#1
How can I edit a admin text file with Phosh?  Cant seem to find how to edit a file as root.
#2
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.
#3
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?"
#4
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
. ~/.profile && echo $EDITOR $VISUAL
sudo -e /path/to/file


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,608 07-07-2021, 12:41 PM
Last Post: cowsay
  Cannot find a method of flashing to EMMC that works MarkF 4 6,965 10-30-2020, 09:06 PM
Last Post: discogribbs
Sad ERROR: Could not find dependency 'firmware-rtl8723bt' Engineer 4 6,886 06-16-2020, 12:29 PM
Last Post: Engineer

Forum Jump:


Users browsing this thread: 1 Guest(s)