- How to open Ubuntu file manager as root user
- Open Ubuntu Nautilus File Manager as root
- Edit or Open Ubuntu Files and Folders as root Administrative
- Warning: Running File Manager as Admin
- Thread: How do I open file manager as root? in Lubunu
- How do I open file manager as root? in Lubunu
- Re: How do I open file manager as root? in Lubunu
- Re: How do I open file manager as root? in Lubunu
- Re: How do I open file manager as root? in Lubunu
- Re: How do I open file manager as root? in Lubunu
- Re: How do I open file manager as root? in Lubunu
- Re: How do I open file manager as root? in Lubunu
- Re: How do I open file manager as root? in Lubunu
- Re: How do I open file manager as root? in Lubunu
- Re: How do I open file manager as root? in Lubunu
- How to open files as root via a right click
- Right Click Open as (Root) Administrator
- How to open programs with Root access on Linux
- Enable the Root account
- Open programs with Root – Terminal
- Open programs with Root – Pkexec
- Open programs with Root – Gksu
- Ubuntu 16.04 LTS
- Debian
- OpenSUSE LEAP 15.0
- OpenSUSE LEAP 42.3
- OpenSUSE Tumbleweed
- Leave a Reply Cancel reply
How to open Ubuntu file manager as root user
By default, the File Manager in Ubuntu or in any other Linux distro uses a non-root user. I mean a user that doesn’t have Administrative rights can access them graphically. It improves overall system security. However, if you want to run File manager as the root user or want to open & edit files and folder with administrative rights that are possible as well. However, you have to use the command terminal to enable that. The following tutorial carried out on Ubuntu 20.04 LTS focal fossa. However, the steps will be the same for earlier versions such as Ubuntu 19.10/19.04; 18.10/18.04 including Debian, Linux Mint, or any similar OS running Nautilus File manager.
Open Ubuntu Nautilus File Manager as root
- Open command terminal either from Applications or using keyboard shortcut- Ctrl+Alt+T.
- Run Nautilus file manager with sudo. Here is the syntax:
- It will ask for your current non-root user’s password that is present in the sudo group.
- Ubuntu File manager will open under administrative rights. Now you can navigate to any folder and files that can only be accessed by the root user via the graphical user interface.
Edit or Open Ubuntu Files and Folders as root Administrative
If you want to edit any file or open folder as root user directly from the Nautilus file manager’s graphical user interface. Then, we can embed an option “Edit as Administrator” or “Open as Administrator” privileges in its contextual menu.
- Again open command terminal, if you already have not.
- Install the Nautilus Admin package.
- Enter the current user password and press the Y key to accept the packages for downloading and installing.
- Restart Nautilus File manager instances.
- Type exit and hit the Enter key to close the Terminal window.
- Now, to edit any file as the root user, open file manager, or right-click on that particular wherever it resides. And select the option “Edit as Administrator”.
- To open folders as root, same just like above right click on that and select “Open as Administrator’.
Warning: Running File Manager as Admin
Although, the above tutorial is useful in case you are not a well-experienced command terminal user, however, be cautious. Make sure you wouldn’t alter or edit some core configuration files that could leave your Ubuntu unstable or un-bootable.
Источник
Thread: How do I open file manager as root? in Lubunu
Thread Tools
Display
How do I open file manager as root? in Lubunu
Don’t touch the Linux hat!
Linux user #572109
Re: How do I open file manager as root? in Lubunu
Can you do this, it works in Ubuntu.
Re: How do I open file manager as root? in Lubunu
Generally, you can achieve this for any command, by prefixing the command with sudo. e.g. assuming your file manager is nautilus you would open a terminal and type:
Replace ‘nautilus’ above by your favorite file manager program name.
sudo would ask you for a password unless configured otherwise, type your password (not root) and the file manager should run with superuser privileges.
You should be able to do a similar thing in the GUI by prefixing the command launch config, wherever it is, with ‘gksu’ e.g.
(If you use kde, use kdesudo instead of gksu, YMMV.)
There are some more lubuntu specific hints here:
Last edited by benteveo; December 27th, 2011 at 03:33 AM .
Re: How do I open file manager as root? in Lubunu
You should never use sudo for graphical applications; at least not in that manner.
Use gksu, gksudo or kdesudo. If none of these are available to you, and you don’t want to install them for whatever reason, then use sudo -i, followed by the command name. e.g.
Re: How do I open file manager as root? in Lubunu
You should never use sudo for graphical applications; at least not in that manner.
Use gksu, gksudo or kdesudo. If none of these are available to you, and you don’t want to install them for whatever reason, then use sudo -i, followed by the command name. e.g.
Why? I am curious. I have used both ‘sudo’ and ‘gksudo’ and got the same results. It works. Is there some special reason?
Re: How do I open file manager as root? in Lubunu
As it turns out Lubuntu doesn’t come with nautilus. I’ll have to install it first to use sudo nautilus.
That means this is resolved.
P.S.
I’ll just install nautilus because the file manager, pcmanfm, gave a access denied message.
Nautilus doesn’t and works better because of it.
Last edited by pretty_whistle; December 26th, 2011 at 10:16 PM . Reason: major typos.
Don’t touch the Linux hat!
Linux user #572109
Re: How do I open file manager as root? in Lubunu
I added more to the post during edit just now, so if you already read the previous post please read it again.
Don’t touch the Linux hat!
Linux user #572109
Re: How do I open file manager as root? in Lubunu
Indeed. It’s all due to the way that the environment variables are handled. «sudo» doesn’t unset all your user’s environment variables, which means that your user’s config files are used. If these config files are written to during the application’s runtime, then the ownership of these files will be changed to root. In some cases this will just mean that your applications will function as normal, but any changes to their configuration won’t be saved, meaning that you’ll have to repeat the changes every time you run it. In other cases, it’ll stop your applications running at all, with enigmatic messages like «Could not update xyz. Aborting.». And in other cases, it may even prevent your user from launching the graphical environment (X11), due to inconsistencies with the .Xauthority file. That can lead to inexperienced users either giving up with Linux entirely, or else reinstalling their entire operating system needlessly.
Re: How do I open file manager as root? in Lubunu
Indeed. It’s all due to the way that the environment variables are handled. «sudo» doesn’t unset all your user’s environment variables, which means that your user’s config files are used. If these config files are written to during the application’s runtime, then the ownership of these files will be changed to root. In some cases this will just mean that your applications will function as normal, but any changes to their configuration won’t be saved, meaning that you’ll have to repeat the changes every time you run it. In other cases, it’ll stop your applications running at all, with enigmatic messages like «Could not update xyz. Aborting.». And in other cases, it may even prevent your user from launching the graphical environment (X11), due to inconsistencies with the .Xauthority file. That can lead to inexperienced users either giving up with Linux entirely, or else reinstalling their entire operating system needlessly.
OK I see. Hey, thanks a lot. Next time I need to run as root I will use the ‘-i’. Good information.
Re: How do I open file manager as root? in Lubunu
Well, gksudo is still the preferred way of launching graphical apps as root, but «sudo -i», «sux», or «su -«, are useful to fall back on, especially if you’re trying to maintain a minimal installation, and don’t want to install gksu with all it’s dependencies.
Источник
How to open files as root via a right click
Last updated: February 18, 2008
The following tutorial explains how to add a context menu item that enables a Linux user to open files as the root user or administrator when browsing their file system using nautilus. This feature allows the user to navigate their file system and open or edit any file or directory as the root user or admin of the system. It’s a perfect solution for those that are not completely comfortable using terminal commands.
Note: This tutorial assumes your using a Debian based system and will be utilizing nautilus. Systems such as Ubuntu or another Debian based derivative should work. An Ubuntu Live CD was used for this tutorial. In addition, if your attempting this on a Full Blown Debian installation, you will first need to make sure your user has been added to the sudoers list.
Adding a contextual menu to right click open files as root:
- Open the Terminal
- Type sudo su and press enter.
- Provide your password and press enter
- Then type apt-get install -y nautilus-admin and press enter
- Now type nautilus -q and press enter
- Finally type exit and press enter, and close the terminal window
All set. Now when you want to open a file as root, simply right click the folder and select Open as Administrator.
Note: You may need to logoff and then login to see the changes!
Right Click Open as (Root) Administrator
You also have the option to Edit Files as Administrator using a right click.
Источник
How to open programs with Root access on Linux
Feb 23, 2019
Comment
Opening programs with root privileges on Linux is sometimes required, due to the nature of security on the platform. The fact is, some operations aren’t possible with a regular user (things like managing files in the Root folder, formatting a hard drive or editing system files come to mind.)
There are several ways to open programs with Root access on Linux. In this guide, we’ll show you how. However, keep in mind: to start programs with the Root account, you’ll need to enable it first. If you’re using a Linux OS with a disabled root account, follow the instructions below to learn how to turn it on.
Enable the Root account
Launch a terminal window by pressing the Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, assuming your system has sudo privileges, use the sudo -s command to log into an elevated session.
Next, type passwd to force a reset of the Root account’s password on the system.
Set a new password on your Linux PC for the Root account. Keep in mind though, that it needs to be secure. Once the new password is set, the Root account can be accessed once again.
Open programs with Root – Terminal
The fastest and usually most reliable way to launch programs with Root privileges is to log into Root in the terminal, and then execute the name of the program as a command.
Once you’ve gotten root access in the terminal session, you’ll be able to start up a program. So, for example, if you want to access the Gnome file manager with Root access, you’d run the nautilus command in the terminal.
So, remember. Log in as Root then start up the app with:
Most programs can quickly start up with superuser privileges if you are Root. Though, please keep in mind, the terminal window method isn’t 100% reliable. Due to the nature of the command-line on Linux, some apps just flat out won’t run.
There isn’t a way to detect what programs work with this method and what don’t. The best way to determine is by trial and error. Though, if a program refuses to launch as Root in the terminal, it’ll say so in the command-line.
Open programs with Root – Pkexec
On most Linux operating systems, when a program needs to run as Root, a password prompt appears. This prompt instructs the user to enter their account password. Then, apps launch with elevated privileges. Launching programs on the desktop in this way is all made possible thanks to the Pkexec tool.
Launching programs this way isn’t wizardry. It’s quite easy to start just about any application installed on your Linux desktop with this tool.
To use pkexec, press Alt + F2 on the keyboard. This keyboard combo will start up a quick-launch window on your desktop environment.
Once the quick-launch window is open on the desktop, write out the pkexec command, followed by the name of the program you’d like to launch.
For example, to launch the Gparted partition manager as Root, you’d do:
Just follow the command-syntax like below, and nearly every program should launch as Root.
Don’t want to use the quick-launch bar on the Linux desktop? It’s also possible to launch apps as Root through with the pkexec tool in the terminal. Just launch a terminal session by pressing Ctrl + Alt + T or Ctrl + Shift + T. Then, do:
Open programs with Root – Gksu
Long before the Pkexec tool took its place, there was Gksu. It functions identically to the way Pkexec does, but Linux distribution maintainers decided to ditch it, as it doesn’t work as well. That said, if you don’t like using Pkexec and need a way to launch programs as Root, it still works.
Unfortunately, Gksu isn’t set up on a lot of modern Linux distribution’s software repositories, as it’s not used as much. As of now, Debian 7-9 supports it, OpenSUSE LEAP (42.3 and 15.0) and Tumbleweed support it. Ubuntu 16.04 LTS does as well.
To install it, open up a terminal and enter the commands that correspond with your operating system.
Ubuntu 16.04 LTS
Debian
OpenSUSE LEAP 15.0
OpenSUSE LEAP 42.3
OpenSUSE Tumbleweed
When the Gksu application is set up on your Linux system, it should be ready to use. To start a program as Root, press Alt + F2 on the desktop. A launch bar will appear. In the bar, write gksu followed by the program you’d like to launch. For example, to start up the XFCE4 file manager, you’d do:
To launch any application with Gksu, follow the command-line syntax below.
You can also launch an app right from the terminal as Root with the same syntax as well.
Leave a Reply Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Источник