1

When using natilus as root, open in terminal used to work as using with any user. However, when I press open in terminal when using nautilus as root now, it does nothing.

How to solve it?

The error:

GLib-GObject-CRITICAL **: g_object_set_data: assertion 'G_IS_OBJECT (object)' failed
Vitor Abella
  • 8,015
  • 16
  • 63
  • 115

2 Answers2

2

Putting aside any possible damage you've done via sudo nautilus command you could just install & use the nautilus extension nautilus-admin, requires restarting nautilus after install

sudo apt-get install nautilus-admin

It provides

* Open as Administrator: opens a folder in a new Nautilus window running with administrator (root) privileges. * Edit as Administrator: opens a file in a Gedit window running with administrator (root) privileges.

Does so thru a policykit policy.

doug
  • 17,212
0

I know this thread is more than 8 years old at this point but I was looking for a way to access Nautilus on Ubuntu 24.04.2 LTS with root access yesterday and found a clever way using the following simple command in terminal:

nautilus admin:/

This launches nautilus with the prompt to log in using your password (sudo) and gives root access to nautilus.

Shout out to Raymond KIMATHI at codegeek for the solution I found. Full link to his page: Open nautilus as root – Ubuntu 24.04

He also shows the code needed to add a desktop shortcut in his article however does not elaborate on how to do that.