pkexc nautilus error

Bug #1710918 reported by Sushenjit Bandyopadhyay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
policykit-1 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I have installed Nautilus-Admin to enable opening nautilus and gedit as administrator. But it does not work. On the terminal I get the following error:

$ pkexec nautilus
No protocol specified
Unable to init server: Could not connect: Connection refused

(nautilus:2524): Gtk-WARNING **: cannot open display: :0

Thanks

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: policykit-1 0.105-18
ProcVersionSignature: Ubuntu 4.11.0-13.19-generic 4.11.12
Uname: Linux 4.11.0-13-generic x86_64
ApportVersion: 2.20.6-0ubuntu5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Aug 15 12:09:19 2017
InstallationDate: Installed on 2017-08-09 (5 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170807)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: policykit-1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sushenjit Bandyopadhyay (s-bandyo1) wrote :
Revision history for this message
dino99 (9d9) wrote :

pkexec does not work with wayland (needed to be ported to polkit)

workaround typed into a terminal, to get a gui app loaded: xhost +si:localuser:root

Changed in policykit-1 (Ubuntu):
status: New → Invalid
Revision history for this message
Sushenjit Bandyopadhyay (s-bandyo1) wrote :

Thanks @dino99 for the workaround. I get some errors about gtk widget, but nautilus opens.

**************** Commands and errors ***********

$ xhost +si:localuser:root
localuser:root being added to access control list

$ pkexec nautilus
sys:1: PyGIWarning: Nautilus was imported without specifying a version first. Use gi.require_version('Nautilus', '3.0') before import to ensure that the right version gets loaded.
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

(nautilus:2687): Gtk-CRITICAL **: gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed

** (nautilus:2687): CRITICAL **: setup_side_pane_width: assertion 'priv->sidebar != NULL' failed

** (nautilus:2687): WARNING **: Unable to get contents of the bookmarks file: Error opening file /root/.gtk-bookmarks: No such file or directory

** (nautilus:2687): WARNING **: Unable to get contents of the bookmarks file: Error opening file /root/.gtk-bookmarks: No such file or directory

************* End commands and errors ***********

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.