Banned from Ubuntu/Wayland/Gnome-shell because needs admin right: any project to allow launch as user?

Asked by or2v on 2017-11-13

Synaptic is much more user friendly than the recommended Gnome-package manager on Ubuntu 17.10 using Wayland and Gnome-shell, but it cannot be used because it asks for admin rights in order to be launched and this is forbidden by Wayland.
Any project to allow Synaptic to be launched with normal user rights?

Question information

English Edit question
Ubuntu synaptic Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:

Run the application with sudo like so:

sudo synaptic

Or is that what you mean in the original post? You could always install and try gksudo.


or2v (or2v) said : #2

Known issue:
gunterkoenigsmann commented on 15 Jun:
“The problem that causes this is that in order to improve security wayland doesn't support gui applications to run as root. The preferred way to get root access for an application is to make it run unprivilleged and to elevate the rights of a worker task using policykit, whenever needed.”

Is it considered for Synaptic to follow that path? Would it be hard to do?

or2v (or2v) said : #3

Wayland's clear policy:
Bug 1274451 - sudo with graphical apps doesn't work on wayland

or2v (or2v) said : #4
Message #10 received at <email address hidden>:
From: Laurent Bigonville <email address hidden>
To: <email address hidden>
Subject: Re: synaptic: fails to start under Wayland
Date: Wed, 20 Apr 2016 16:25:05 +0200
“If I'm not wrong, this is a design decision of wayland.
synaptic should really look at adding polkit support to gain the root
privileges instead of running the full ui as root”

or2v (or2v) said : #6

Old problem. Still need an answer :)

Does setting xhost work?

or2v (or2v) said : #8

Thank you actionparsnip.
I did this on my terminal as advised:
:~$ xhost si:localuser:root
localuser:root being added to access control list
:~$ synaptic
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
[xcb] Extra reply data still left in queue
[xcb] This is most likely caused by a broken X extension library
[xcb] Aborting, sorry about that.
synaptic: ../../src/xcb_io.c :568 : _XReply: l'assertion « !xcb_xlib_extra_reply_data_left » a échoué.
Abandon (core dumped)
:~$ sudo synaptic
[sudo] Mot de passe de or2v :

(synaptic opened smoothly, no problem, then after I close the application:)

:~$ xhost -si:localuser:root
localuser:root being removed from access control list

But I read that this is a workaround breaking Wayland's security policy…

Ok, if oit worked then what does "Old problem" mean, from your reply in #6 ?

or2v (or2v) said : #10

This is an “Old problem” as it has been knows for more than 1½ year (at least by Laurent Bigonville quoted above.) The problem is that the beautiful, practical and useful graphical application Synaptic requires admin rights to be opened and that this causes it not to work on Ubuntu 17.10 in its normal version with Wayland and Gnome 3, because Wayland forbids this for security reasons I suppose to be sane. I understand that Wayland is part of the future. There is a Terminal workaround to temporarily use X.Org, as far as I understand, instead of Wayland, but it really is not user-friendly!

My question is whether one day it will be possible to open Synaptic in a user mode, and to elevate the rights of a task, only when needed (I read that the application should use Polkit). This is just the way Update-manager does. Would this evolution be easy or hard to do for the developers?

nota1: my version of synaptic is 0.84.2 (the last one availiable).

In the “TODO” in the code:
 - split into user and root mode. User mode does all the changes and for
   the final installation runs (with gksu or libgksu):
   # synaptic --set-selection --non-interactive --hide-main-window --dont-write-any-config
   ( --dont-write-any-config needs to be implemented)
   -> MOST infrastructure is there.
      Problems: * set-version is not in selection file
                * all settings are in in $USER/.synaptic (use
  * proxy settings and stuff needs to be preserved/passed
    "run-as-root synaptic"
   root is needed for:
      - update: could be solved by making the /var/lib/apt/lists/ dir
                group writeable for a desktop-group
      - edit sources.list

 - Need far better state saving:
   - save selected distribution when doing a "save selection"
   - when using "force version" save this as well
   - when "open cache" is called, make sure that the correct distribution
     is selected for save/restore”

I suggest you report a new bug.

or2v (or2v) said : #12

Done already (not by me)
Thank you!
Problem Solved. Bug not solved…
“synaptic does not run under wayland
Bug #1731324 reported by Javi on 2017-11-09
Affects synaptic (Ubuntu)
Status Confirmed
Importance High
Assigned to Unassigned”