synaptic does not run over gnome wayland session

Bug #1551951 reported by Edson T. Marques
356
This bug affects 79 people
Affects Status Importance Assigned to Milestone
synaptic
New
Undecided
Unassigned
synaptic (Debian)
New
Unknown
synaptic (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Synaptic does not run over gnome wayland session. After sudo login interface it simply not appear.

This messages are shown at the Terminal when try to run it manually:

etm@etm-SVS151290X:~$ synaptic
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

(synaptic:5335): GLib-GObject-WARNING **: invalid cast from 'GdkWaylandDisplay' to 'GdkX11Display'
Falha de segmentação (imagem do núcleo gravada)
etm@etm-SVS151290X:~$ sudo synaptic
[sudo] senha para etm:
No protocol specified
Failed to connect to Mir: Failed to connect to server socket: Arquivo ou diretório não encontrado
Unable to init server: Não foi possível conectar: Conection refused

(synaptic:5361): Gtk-WARNING **: cannot open display: :0
etm@etm-SVS151290X:~$

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: synaptic 0.83
ProcVersionSignature: Ubuntu 4.4.0-9.24-generic 4.4.3
Uname: Linux 4.4.0-9-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CurrentDesktop: GNOME
Date: Tue Mar 1 17:57:20 2016
InstallationDate: Installed on 2015-11-10 (112 days ago)
InstallationMedia: Ubuntu-GNOME 16.04 LTS "Xenial Xerus" - Alpha amd64 (20151108)
SourcePackage: synaptic
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Edson T. Marques (edsontmarques) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in synaptic (Ubuntu):
status: New → Confirmed
Changed in synaptic (Ubuntu):
importance: Undecided → Medium
Revision history for this message
PeterPall (peterpall) wrote :

According to https://bugzilla.redhat.com/show_bug.cgi?id=1274451 not allowing graphical user interfaces to run as root is a design decision of wayland. The way to go for synaptic would be to run the graphical user interface as the unprivileged user who has called the program and then to use polkit in order to gain root rights for the portion of the program that does the actual installation and uninstallation of packages.

Jeremy Bícha (jbicha)
tags: added: wayland
Changed in synaptic (Debian):
status: Unknown → New
Revision history for this message
corrado venturini (corradoventu) wrote :

same on Ubuntu 17.10 gnome wayland
corrado@corrado-HP-aGnome:~$ synaptic
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Segmentation fault (core dumped)
corrado@corrado-HP-aGnome:~$ sudo synaptic
[sudo] password for corrado:
No protocol specified
Unable to init server: Could not connect: Connection refused

(synaptic:1917): Gtk-WARNING **: cannot open display: :0
corrado@corrado-HP-aGnome:~$ uname -a
Linux corrado-HP-aGnome 4.10.0-20-generic #22-Ubuntu SMP Thu Apr 20 09:22:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

This is a bug post from Michael Vogt on github:
https://github.com/mvo5/synaptic/issues/15

I really don't know where is the main development site of Synaptic right now.
Is any of this?:
http://www.nongnu.org/synaptic/
https://github.com/mvo5/synaptic
https://code.launchpad.net/synaptic

Revision history for this message
PeterPall (peterpall) wrote :

I think it is the launchpad one. Hope they resolve the problem soon: Seems like Ubuntu will drop the possibility to run gui applicatins as root on standard X11, too.

Revision history for this message
Mark (1aunchpad-nct) wrote :

I have removed the duplicate marking on this bug. The bug this was marked as a duplicate of, bug #1712089, is a general report about the inability to run graphical applications as root under Wayland. As noted in comment #3, this is a Wayland design decision and Synaptic needs to be changed.

I am concerned that if this bug remains as a duplicate it will be invisible to the Synaptic maintainers, delaying a fix.

Absent objections to this change, I will change the duplicate settings on the other Synaptic related bugs currently dup'ed to bug #1712089 to be dup's of this.

Importance needs to be set to High but I don't have permission to do that.

Revision history for this message
Mark (1aunchpad-nct) wrote :

As no objections have been raised in the past 5 days, I have marked all the Synaptic-doesn't-run under-Wayland related bugs as duplicates of this.

Revision history for this message
dino99 (9d9) wrote :

From the Debian report #818366 :

just a couple remarks:

(1) The method pkexec uses to grant root (i.e. the user it runs its
argument as) access to the real user's X display doesn't work under
Wayland, but still using X (i.e. using Xwayland).
Xwayland (at least as started by mutter/gnome-shell) is started without the
"-auth" option and hence only grants access to the real user (adopting
Wayland's security model).
Hence there's no Xauthority file to grant access to other users. The
workaround is to explicitly allow root to access the user's X display using

$ xhost +si:localuser:root

(2) synaptic nowadays is built with gtk+ 3, so should run natively under
Wayland, but

$ /usr/sbin/synaptic

segfaults:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fa743155cc0 in wl_display_interface ()
    at /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#1 0x00007fa7496b5af9 in XSync (dpy=0x561939e12100, discard=discard@entry
=0)
    at ../../src/Sync.c:42
#2 0x000056193905ba6b in RGFlushInterface() () at rgutils.cc:68
#3 0x000056193906a73e in RGMainWindow::buildInterface()
(this=this@entry=0x561939e645b0)
at rgmainwindow.cc:973
#4 0x000056193906cb68 in RGMainWindow::RGMainWindow(RPackageLister*,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >) (this=0x561939e645b0, packLister=0x56193a103550,
name="") at rgmainwindow.cc:815
#5 0x00005619390467c2 in main(int, char**) (argc=<optimized out>,
argv=<optimized out>) at gsynaptic.cc:462

The reason is the explicit call to XSync. If I remove that, it works
natively under Wayland. But only as non-root, as pkexec doesn't work on
Wayland.

tags: added: artful bionic
removed: gnome3-ppa third-party-packages
Revision history for this message
Wolf Rogner (war-rsb) wrote :

fine but how can one set this automatically.
It cannot be added to .profile nor .bash_rc (will not execute)

If I have to enter this command manually after each boot on every machine I need a new pair of runners.

Revision history for this message
Wolf Rogner (war-rsb) wrote :

... and possibly roller-skates

Revision history for this message
Wolf Rogner (war-rsb) wrote :

sorry, I try to be serious again.

description: updated
Revision history for this message
Stephen Allen (stephen-d-allen) wrote : Re: [Bug 1551951] Re: synaptic does not run over gnome wayland session

Create a script containing those commands, make it executable and run it
via the 'startup' switch each time you login. Works for me as a temp
standby, until fixed properly by the developers.

On Tue, Nov 7, 2017 at 2:56 AM Wolf Rogner <email address hidden> wrote:

> fine but how can one set this automatically.
> It cannot be added to .profile nor .bash_rc (will not execute)
>
> If I have to enter this command manually after each boot on every
> machine I need a new pair of runners.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1705955).
> https://bugs.launchpad.net/bugs/1551951
>
> Title:
> synaptic does not run over gnome wayland session
>
> Status in synaptic:
> New
> Status in synaptic package in Ubuntu:
> Confirmed
> Status in synaptic package in Debian:
> New
>
> Bug description:
> Synaptic does not run over gnome wayland session. After sudo login
> interface it simply not appear.
>
> This messages are shown at the Terminal when try to run it manually:
>
> etm@etm-SVS151290X:~$ synaptic
> Gtk-Message: GtkDialog mapped without a transient parent. This is
> discouraged.
>
> (synaptic:5335): GLib-GObject-WARNING **: invalid cast from
> 'GdkWaylandDisplay' to 'GdkX11Display'
> Falha de segmentação (imagem do núcleo gravada)
> etm@etm-SVS151290X:~$ sudo synaptic
> [sudo] senha para etm:
> No protocol specified
> Failed to connect to Mir: Failed to connect to server socket: Arquivo ou
> diretório não encontrado
> Unable to init server: Não foi possível conectar: Conection refused
>
> (synaptic:5361): Gtk-WARNING **: cannot open display: :0
> etm@etm-SVS151290X:~$
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.04
> Package: synaptic 0.83
> ProcVersionSignature: Ubuntu 4.4.0-9.24-generic 4.4.3
> Uname: Linux 4.4.0-9-generic x86_64
> ApportVersion: 2.20-0ubuntu3
> Architecture: amd64
> CurrentDesktop: GNOME
> Date: Tue Mar 1 17:57:20 2016
> InstallationDate: Installed on 2015-11-10 (112 days ago)
> InstallationMedia: Ubuntu-GNOME 16.04 LTS "Xenial Xerus" - Alpha amd64
> (20151108)
> SourcePackage: synaptic
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/synaptic/+bug/1551951/+subscriptions
>
--

This email is printed from 100% recycled mobile electrons.

Revision history for this message
Mark (1aunchpad-nct) wrote :

The importance of this bug still needs setting to *high*. Bug #1731324 that I have just marked as a duplicate of this *much* earlier bug had been set to high. Why hasn't this one?

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.