gnome screenshot gtk-mir crashes on taking the shot under Mir

Bug #1674477 reported by kevin gunn on 2017-03-20
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
High
Unassigned
gnome-screenshot (Ubuntu)
Undecided
Unassigned
gtk+3.0 (Ubuntu)
High
Unassigned
unity8 (Ubuntu)
High
Unassigned

Bug Description

Tried this with (updated) Zesty plus ppa:attente/gtk-mir-staging
then export GDK_BACKEND=mir
launch from command line: gnome-screenshot -- --desktop_file_hint=org.gnome.Screenshot.desktop

Attempt to take a screen shot in any form and it will crash (see attached log)

according to attente:
gnome-screenshot crashes is because it delegates the screenshotting to org.gnome.Shell, and falls back to using x11 if that fails
so i think the solution is to have u8 implement that interface...
https://git.gnome.org/browse/gnome-shell/tree/data/org.gnome.Shell.Screenshot.xml

kevin gunn (kgunn72) wrote :
tags: added: unity8-desktop
Changed in canonical-devices-system-image:
importance: Undecided → High
Changed in gtk+3.0 (Ubuntu):
importance: Undecided → High
Changed in unity8 (Ubuntu):
importance: Undecided → High
Daniel van Vugt (vanvugt) wrote :

If we really want to support gnome-screenshot at all, it might be easier to implement a Mir backend right inside it (perhaps after fixing bug 1660269).

tags: added: gtk-mir
summary: - gnome screenshot gtk-mir crashes on taking the shot
+ gnome screenshot gtk-mir crashes on taking the shot under Mir
William Hua (attente) wrote :

I don't know if that would be the easiest approach. It sounds to me like having U8 implement that dbus interface would be the easiest and least invasive solution, but then again, I'm not the one volunteering for that :)

Is there some mir client api for scraping the screen? I'm worried about whether or not that kind of change would be accepted upstream (there's no wayland-specific code in gnome-screenshot). Also, how does it look from a security perspective? The nice thing about that interface is that the screenshot app never has direct access to the pixel data in the first place (it's just file names that U8 would save the image data directly to), and access to the interface could be restricted via apparmor dbus rules.

Changed in gtk+3.0 (Ubuntu):
status: New → Invalid
tags: removed: gtk-mir
Daniel van Vugt (vanvugt) wrote :

On one hand asking the shell to own screenshotting is nice and secure.

On the other hand, persisting with an architecture where apps don't work unless processes other than the shell happen to be running is a bit nasty in my opinion. And similarly anything that depends on a bus is ugly IMHO. I've lost count of the number of times in recent months where GTK apps refused to start because they were timing out waiting for some process or bus to become available that didn't exist in Mir.

When you develop an app for a platform, like for Mir using just libmirclient, there should ideally be zero other dependencies on the system. Everything should be implemented or proxied through that one library.

Daniel van Vugt (vanvugt) wrote :

"Is there some mir client api for scraping the screen?"

Yes, but it's also not nice. See src/utils/screencast.cpp. That's why I suggest we need to fix Mir in bug 1660269.

Daniel van Vugt (vanvugt) wrote :

That all said... why don't we just declare gnome-screenshot unsupported if it's really just a client of gnome-shell. Doesn't Unity8 have other adequate screenshotting mechanisms?

William Hua (attente) wrote :

> On the other hand, persisting with an architecture where apps don't work unless processes other than the shell happen to be running is a bit nasty in my opinion. And similarly anything that depends on a bus is ugly IMHO. I've lost count of the number of times in recent months where GTK apps refused to start because they were timing out waiting for some process or bus to become available that didn't exist in Mir.

This is something I've thought about before too with gtk, and I think it comes down to whether you want your platform modular where you can pick and choose the parts you want, or you want to define your platform to be one monolithic unit. We have gtk that depends on libmirclient and content-hub, but what happens if you have a mir server but no content-hub? Should that situation be possible?

> That all said... why don't we just declare gnome-screenshot unsupported if it's really just a client of gnome-shell. Doesn't Unity8 have other adequate screenshotting mechanisms?

I'm wondering this too. Print screen doesn't seem to do anything in U8.

It does seem weird that it isn't just baked directly into gnome-shell since it's just a front-end for that interface. Maybe it was intended to allow gnome-screenshot to be usable on other DEs. But yes, basically do we want gnome-screenshot to work on U8? And if so, do we want that to be the default way of doing it? U8 can still decide to support gnome-screenshot even if it provides its own.

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

Duplicates of this bug

Other bug subscribers

Bug attachments