-1

I opened nautilus using $ sudo nautilus / and deleted some files at /usr/share (Discord related files) but after that i tried to open nautilus by clicking the icon and it don't open. i got no idea what happened,i don't think i deleted any files related to nautilus. i can still open nautilus using $ sudo nautilus but $ nautilus returns an timeout. sudo apt-get install --reinstall nautilus-data i ran this command and i still can't open nautilus. anyone have any idea why this is happening and how to fix it? please help me

Ubuntu Version : 20.04 LTS

1 Answers1

1

It is a very bad idea to run graphical applications with sudo, as you experience now. Formerly, we had gksudo, and nowadays, legacy graphical applications can be run as root using pkexec. Current idea is never to run graphical applications as root, but program them in a way that they ask the user password and then launch a process in the background that does the action requiring root privileges. Gnome Disks is an example of how this works.

The reason this is happening is that files in your home folder have been given the wrong permissions. It is difficult to tell which.

You could try your chance to solve this by finding files in your home directory that are owned by root, then change the ownership of these files to your own user. The command find ~ -user root will allow you to identify these files.

vanadium
  • 88,010