![]() The prompt for root access did not exist when I wrote this answer. And to all above: /opt/ is for 3rd party software so generally is empty. The software you install there is from tarballs and those come with them pre-set as they should be. Open registry edit and navigate to HKEYCURRENTUSER\Software\Microsoft\Windows. ![]() wsl.exe/bash return exit code 1 with no message to work off of. Besides that: /opt/ does never need permissions changed. Replace the DefaultUid value with the UID value of the user in your distro. The absolute best thing to do to is make a copy of a restricted file, edit it, and copy it back when you're absolutely sure it's finished.Īlso for editing files to which your user does not have permissions, I would now recommend Talha Junaid's answer which asks for permissions every single time you want to save a file. The permissions in /opt/ have nothing to do with a terminal session opening in root. I'm not saying that you should never use VSCode as root(though its pretty easy to avoid doing) I'm saying you should be careful when you want to do so and know the risks. It's just good practice on any operating system to run your applications on a user level and leave administrative tasks to the root user, and only on a per-need basis. Or that vulnerability that was just posted in ProFTPD to allow an attacker to gain a ROOT shell. For example, you wouldn't want that recent crash of Rhythmbox to wipe out your entire /usr directory due to a bug. To open a folder as root in Ubuntu, you can use the graphical file manager Nautilus by running the command gksu nautilus /path/to/folder.Alternatively, you can use the terminal by running cd /path/to/folder sudo -i. Another options is to just switch to su: sudo su vmplayer &. To open vmware workstation as root: sudo -i vmware &. You can just use sudo to open vmware player as root: sudo -i vmplayer &. Applications are meant to be run with non-administrative security (or as mere mortals) so you have to elevate their privileges to modify the underlying system. And according to a couple of Ubuntu bug reports, it appears this is the case. It defeats the security model that's been in place for years. Have fun.įor everyone asking why this isn't recommended, you clearly don't understand why sudo even exists. Then from the window you can open your project folderĪgain: This is not recommended. You must specify the user data directory to use when running vs code: sudo code -user-data-dir="~/.vscode-root" Iâm just warning you that you may be in for a few hours of hassle, as sometimes items like graphical elements may not line up in your current desktop environment quite as well as you might have hoped.It is very dangerous to run VScode as root (as it is any other application) however, should you absolutely need to: Because these terminal emulators are meant to work as integral parts of other desktop environments, you may have to install several libraries from the environment they specialize in to get them to work correctly. Konsole, for example, installs another 155 packages that come as KDE libraries, taking up an extra 146 MB of space on my drive. Just take a moment to review the other dependencies you install alongside it. You can install, for example, Konsole from KDE Plasma by typing: sudo apt install konsole Absolutely! Just because Ubuntu uses GNOME doesnât mean you have to use GNOME Terminal or a standalone alternative.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |