Edit a root file in a GUI live system [duplicate]
This question already has an answer here:
I need an equivalent of gksu in 18.04
4 answers
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.
root live-cd text-editor
marked as duplicate by karel, Elder Geek, Eric Carvalho, Thomas, Charles Green 8 hours ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
I need an equivalent of gksu in 18.04
4 answers
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.
root live-cd text-editor
marked as duplicate by karel, Elder Geek, Eric Carvalho, Thomas, Charles Green 8 hours ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
I need an equivalent of gksu in 18.04
4 answers
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.
root live-cd text-editor
This question already has an answer here:
I need an equivalent of gksu in 18.04
4 answers
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.
This question already has an answer here:
I need an equivalent of gksu in 18.04
4 answers
root live-cd text-editor
root live-cd text-editor
asked yesterday
ygoe
1628
1628
marked as duplicate by karel, Elder Geek, Eric Carvalho, Thomas, Charles Green 8 hours ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by karel, Elder Geek, Eric Carvalho, Thomas, Charles Green 8 hours ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
gksuwas the program that provided a GTK frontend forsuandsudo. This way graphical applications were allowed to be run with root privileges.gksuis deprecated. It is removed from Debian, Ubuntu 18.04 and other newer Linux distribution version.
So, instead of using:
gksudo nautilus
Use:
sudo -H nautilus
or
nautilus admin://
add a comment |
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.
add a comment |
The standard GUI editor in Ubuntu is gedit, and you can run it with elevated permissions with
sudo -H gedit name-of-file # when in the current directory
sudo -H gedit path/to/file
for example
sudo -H gedit /etc/fstab
If you run Wayland (instead of Xorg), you need xhosts too in order to allow the superuser root to access the graphical user environment,
xhost +si:localuser:root
and after that you can run sudo -H .... See this link:
Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
A good (and safe) alternative is the following command line with the gvfs admin backend.
gedit admin:///path/to/file # you need the full path (starting with 3 slashes)
for example
gedit admin:///etc/fstab
The gvfs admin backend works only with application programs, that
are prepared to work with it (Ubuntu's editorgeditand file browser
nautilusare two of them).
In Ubuntu 18.04 LTS, when started from
nautilus admin://,geditwill automatically use
the gvfs admin backend (and you will be asked for a password so that you can edit files owned byroot).
However, I can recommend using text mode tools for tasks that need elevated permissions, in this case the editor nano,
sudo nano name-of-file
sudo nano path/to/file
for example
sudo nano /etc/fstab
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
gksuwas the program that provided a GTK frontend forsuandsudo. This way graphical applications were allowed to be run with root privileges.gksuis deprecated. It is removed from Debian, Ubuntu 18.04 and other newer Linux distribution version.
So, instead of using:
gksudo nautilus
Use:
sudo -H nautilus
or
nautilus admin://
add a comment |
gksuwas the program that provided a GTK frontend forsuandsudo. This way graphical applications were allowed to be run with root privileges.gksuis deprecated. It is removed from Debian, Ubuntu 18.04 and other newer Linux distribution version.
So, instead of using:
gksudo nautilus
Use:
sudo -H nautilus
or
nautilus admin://
add a comment |
gksuwas the program that provided a GTK frontend forsuandsudo. This way graphical applications were allowed to be run with root privileges.gksuis deprecated. It is removed from Debian, Ubuntu 18.04 and other newer Linux distribution version.
So, instead of using:
gksudo nautilus
Use:
sudo -H nautilus
or
nautilus admin://
gksuwas the program that provided a GTK frontend forsuandsudo. This way graphical applications were allowed to be run with root privileges.gksuis deprecated. It is removed from Debian, Ubuntu 18.04 and other newer Linux distribution version.
So, instead of using:
gksudo nautilus
Use:
sudo -H nautilus
or
nautilus admin://
answered yesterday
Kulfy
3,27531039
3,27531039
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered yesterday
danzel
1,627712
1,627712
add a comment |
add a comment |
The standard GUI editor in Ubuntu is gedit, and you can run it with elevated permissions with
sudo -H gedit name-of-file # when in the current directory
sudo -H gedit path/to/file
for example
sudo -H gedit /etc/fstab
If you run Wayland (instead of Xorg), you need xhosts too in order to allow the superuser root to access the graphical user environment,
xhost +si:localuser:root
and after that you can run sudo -H .... See this link:
Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
A good (and safe) alternative is the following command line with the gvfs admin backend.
gedit admin:///path/to/file # you need the full path (starting with 3 slashes)
for example
gedit admin:///etc/fstab
The gvfs admin backend works only with application programs, that
are prepared to work with it (Ubuntu's editorgeditand file browser
nautilusare two of them).
In Ubuntu 18.04 LTS, when started from
nautilus admin://,geditwill automatically use
the gvfs admin backend (and you will be asked for a password so that you can edit files owned byroot).
However, I can recommend using text mode tools for tasks that need elevated permissions, in this case the editor nano,
sudo nano name-of-file
sudo nano path/to/file
for example
sudo nano /etc/fstab
add a comment |
The standard GUI editor in Ubuntu is gedit, and you can run it with elevated permissions with
sudo -H gedit name-of-file # when in the current directory
sudo -H gedit path/to/file
for example
sudo -H gedit /etc/fstab
If you run Wayland (instead of Xorg), you need xhosts too in order to allow the superuser root to access the graphical user environment,
xhost +si:localuser:root
and after that you can run sudo -H .... See this link:
Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
A good (and safe) alternative is the following command line with the gvfs admin backend.
gedit admin:///path/to/file # you need the full path (starting with 3 slashes)
for example
gedit admin:///etc/fstab
The gvfs admin backend works only with application programs, that
are prepared to work with it (Ubuntu's editorgeditand file browser
nautilusare two of them).
In Ubuntu 18.04 LTS, when started from
nautilus admin://,geditwill automatically use
the gvfs admin backend (and you will be asked for a password so that you can edit files owned byroot).
However, I can recommend using text mode tools for tasks that need elevated permissions, in this case the editor nano,
sudo nano name-of-file
sudo nano path/to/file
for example
sudo nano /etc/fstab
add a comment |
The standard GUI editor in Ubuntu is gedit, and you can run it with elevated permissions with
sudo -H gedit name-of-file # when in the current directory
sudo -H gedit path/to/file
for example
sudo -H gedit /etc/fstab
If you run Wayland (instead of Xorg), you need xhosts too in order to allow the superuser root to access the graphical user environment,
xhost +si:localuser:root
and after that you can run sudo -H .... See this link:
Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
A good (and safe) alternative is the following command line with the gvfs admin backend.
gedit admin:///path/to/file # you need the full path (starting with 3 slashes)
for example
gedit admin:///etc/fstab
The gvfs admin backend works only with application programs, that
are prepared to work with it (Ubuntu's editorgeditand file browser
nautilusare two of them).
In Ubuntu 18.04 LTS, when started from
nautilus admin://,geditwill automatically use
the gvfs admin backend (and you will be asked for a password so that you can edit files owned byroot).
However, I can recommend using text mode tools for tasks that need elevated permissions, in this case the editor nano,
sudo nano name-of-file
sudo nano path/to/file
for example
sudo nano /etc/fstab
The standard GUI editor in Ubuntu is gedit, and you can run it with elevated permissions with
sudo -H gedit name-of-file # when in the current directory
sudo -H gedit path/to/file
for example
sudo -H gedit /etc/fstab
If you run Wayland (instead of Xorg), you need xhosts too in order to allow the superuser root to access the graphical user environment,
xhost +si:localuser:root
and after that you can run sudo -H .... See this link:
Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
A good (and safe) alternative is the following command line with the gvfs admin backend.
gedit admin:///path/to/file # you need the full path (starting with 3 slashes)
for example
gedit admin:///etc/fstab
The gvfs admin backend works only with application programs, that
are prepared to work with it (Ubuntu's editorgeditand file browser
nautilusare two of them).
In Ubuntu 18.04 LTS, when started from
nautilus admin://,geditwill automatically use
the gvfs admin backend (and you will be asked for a password so that you can edit files owned byroot).
However, I can recommend using text mode tools for tasks that need elevated permissions, in this case the editor nano,
sudo nano name-of-file
sudo nano path/to/file
for example
sudo nano /etc/fstab
edited yesterday
answered yesterday
sudodus
22.8k32873
22.8k32873
add a comment |
add a comment |