Traditionally some Linux users would recommend the use of gksudo instead, but this has been removed in recent versions of Ubuntu, and should not be used. Of course, malware in Linux is fairly rare, so this is probably down to a few freak cases. Running graphical programs using sudo -i in Ubuntu is basically fine, in many cases but, doing so is somewhat insecure, since it means that the entire GUI of the program, including its dependencies, will be run as root, and this increases the attack surface for malware to exploit - in worst case, malware could gain complete control over your system!. Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.There has been a lot of confusion about running GUI applications in Linux using the sudo command, in this article, I will try to clear up some of this mess. Give nautilus-admin a try and see if you don’t quickly come to depend on the newly-added feature. Thanks to this handy addition to the GNOME File Manager, your work day can be made considerably easier. Edit the file as needed, save it and you’re done. Right-click that file and you should now see a new entry in the Nautilus aka GNOME Files context menu, named Edit As Administrator (Figure A).įigure A Opening the smb.conf file directly from within Nautilus.Īfter typing your user’s sudo password, the Gedit - or whatever GUI text editor you’ve set as your default - will open the file with write permissions. Open Nautilus and navigate to a file you want to open that requires root access, such as /etc/samba/smb.conf. Once the installation completes, restart Nautilus with the command: With that out of the way, log in to your desktop and open a terminal. Do this only if you trust those who’ll be using your desktop. Once you’ve installed this tool, you make it easier for other people to open important configuration files with ease. How to install the necessary extensionīefore we add this extension, please use it with caution. With that said, let’s get this up and running on my go-to Linux distribution, Pop!_OS. The one caveat to this is that there is no way to do this on an RHEL-based distribution such as Fedora without using a tool like beesu, which allows you to open the file manager with sudo privileges and doesn’t make the process any more efficient. The only things you’ll need to make this work are a running instance of any Debian-based Linux distribution that uses the GNOME file manager and a user with sudo privileges. But for those who want more efficiency out of their file manager, let’s fix this glaring omission. If you prefer editing such files in the terminal window, the more cumbersome route is still your best bet. The one caveat to this is that if you’re opening text files, it will open in the default Gedit - or GNOME Text, depending on which version of GNOME you’re using - GUI application. SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)įortunately, there’s a way to add an Edit as Administrator entry to the Files right-click context menu, so you don’t have to go through all of those steps. And when you’re having to do this over and over throughout the day, it can become a serious waste of time. Issue the command (including sudo) to open the file with elevated privileges.Right-click an empty spot inside the directory.Navigate to the directory housing the file in question. As it ships, to open a file with sudo privileges, you have to do the following: Stack Overflow's 2023 Developer Survey: Are developers using AI? Top Python AI and Machine Learning Libraries TIOBE Index for August 2023: Top 10 Most Popular Programming Languages One such feature is the ability to open files with sudo privilege without having to jump through extra hoops. Eventually, however, you’ll find some features that could make things a bit easier. Out of the box, it works great and includes enough features to get you by for a while. Such is the case with the GNOME File Manager. Given how we so often take the file manager for granted, once you find a feature that could really make your daily life a bit more efficient, you realize just how important the tool is. There are also those that ship with a bare minimum of features but allow users to extend the feature set with add-ons. Some file managers have more bells and whistles than the average user will ever need, while other file managers are as inflexible as cold, hard steel. Not all Linux file managers are created equal. If you're tired of having to jump through hoops to open files with sudo privileges in the GNOME File Manager, Jack Wallen has just the trick you need. How to easily open files with sudo privileges in the GNOME File Manager
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |