I'm running on Xubuntu 14.04.2 LTS. Trying to share a folder on a network via shares-admin and system-config-samba applications but they give me error.
command
sudo shares-admin
output:
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
(shares-admin:11220): Gtk-WARNING **: cannot open display:
command
sudo system-config-samba
output:
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
/usr/share/system-config-samba/mainWindow.py:62: Warning: invalid (NULL) pointer instance
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: GtkWarning: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: PangoWarning: pango_context_set_font_description: assertion 'context != NULL' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: PangoWarning: pango_context_set_base_dir: assertion 'context != NULL' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: PangoWarning: pango_context_set_language: assertion 'context != NULL' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: PangoWarning: pango_layout_new: assertion 'context != NULL' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: PangoWarning: pango_layout_set_attributes: assertion 'layout != NULL' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: PangoWarning: pango_layout_set_text: assertion 'layout != NULL' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: PangoWarning: pango_layout_get_unknown_glyphs_count: assertion 'PANGO_IS_LAYOUT (layout)' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: Warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: GtkWarning: IA__gdk_screen_get_display: assertion 'GDK_IS_SCREEN (screen)' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
/usr/share/system-config-samba/mainWindow.py:62: GtkWarning: IA__gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
self.xml = gtk.glade.XML ("/usr/share/system-config-samba/system-config-samba.glade", domain="system-config-samba")
any idea about what's going wrong?
After some googling I ended up with this solution:
It passes required environment variables to the new isolated environment. Since root doesn't have DISPLAY and XAUTHORITY variables in its environment, user must pass it before the root uses any application dependent on GUI.
(Now I started to think how can I make them permanent when sudo called...)
another solutions is to
Set authentication mode to sudo and grab mode to enable