🐈
» Forums » Freelancers » Re: Constantly asking for permission to share...
Page options
mirkog2
Community Member

Constantly asking for permission to share screenshot on Gnome/Wayland

Hello,
Does the Upwork team have any workarounds they are woking on to improve screenshot making?

Currently everytime Upwork takes a screenshot on Wayland/Gnome a window appears for confirming to share the screenshot with Upwork which is very annoying and a pretty laughable "security feature" that Gnome devs implemented since I (or any other malicious app running on the system) can run their official screenshot utility to get the screenshot using this command
`gnome-screenshot -f /home/mirko/Pictures/Screenshot.png` or `import os; os.system('gnome-screenshot -f /home/mirko/Pictures/Screenshot.png')` for Python

Is Upwork considering using gnome-screenshot instead of whatever other method they're using? it would be highly appreciated to bypass the "security feature" by Gnome developers.
Are there any potential issues with my proposition?

If this won't be implemented, would it be against the TOS for me to try to implement a wrapper over the current method Upwork is using (if even possible)?
I'm guessing not since I would not be changing the Upwok app itself, I would be changing my own system. It would still get the required screenshot.

Thank you.

ACCEPTED SOLUTION
mirkog2
Community Member

I have upgraded my OS from Fedora Workstation 35 to Fedora Workstation 37 which upgraded Gnome 41 to 43 and they have made it to only ask for permission once and now this is no longer an issue, except that Upwork uses the supposedly private "unsecure" DBus API.

Also if someone has pressed the deny button like me when I was asked to give screenshot permissions for the first time here is some Python3 code to give the permission afterwards as I did not find an option for this in the settings.
The code should be run as the current user and not root.

import dbus
bus = dbus.SessionBus()
perm = bus.get_object('org.freedesktop.impl.portal.PermissionStore', '/org/freedesktop/impl/portal/PermissionStore')
perm_iface = dbus.Interface(perm, dbus_interface='org.freedesktop.impl.portal.PermissionStore')

perm_iface.Lookup("screenshot", "screenshot")
perm_iface.Set("screenshot", dbus.Boolean(True), "screenshot", {"": ["yes"]}, dbus.Byte(0x00))
perm_iface.Lookup("screenshot", "screenshot")


As an alternative you can use the app named "D-Feet" to  make DBus calls to update the setting.
There is also a profiler named "Bustle" that can monitor DBus calls in case you want to see what does Upwork call to get the screenshots.

View solution in original post

3 REPLIES 3
AveryO
Community Manager
Community Manager

Hi Mirko, 

The team has confirmed that this is working as designed. The Upwork Desktop App uses gnome-screenshot, and it's expected behavior that the screenshot is confirmed.

Currently, the team doesn't have any new product releases on the Desktop App in the pipeline. However, they took note of this post. If you can successfully write a wrapper, please don't hesitate to update this thread so that we can share it with the team. 


~ Avery
Upwork
mirkog2
Community Member

Hello.

Sorry for the late response, this was a small issue so it was not a priority.

As per this thread it asks for permission when using the private DBus API, it never asks for permission when using the gnome-screenshot utility.
The thread (https://www.reddit.com/r/gnome/comments/r7j3dp/new_gnome_version_damages_the_workflow_of/)

Or maybe you misunderstood the dev and they are using the Gnome DBus API and not the gnome-screenshot utility, both have gnome in the name but they are actually different.

In case there is no confusion can the dev provide the actuall command they run to make the screenshot?
When I run the utility to get the screenshot it never asks for permission.

I would rather avoid trying to replace a DBus API if it's even possible (don't have much experience with DBus APIs)

mirkog2
Community Member

I have upgraded my OS from Fedora Workstation 35 to Fedora Workstation 37 which upgraded Gnome 41 to 43 and they have made it to only ask for permission once and now this is no longer an issue, except that Upwork uses the supposedly private "unsecure" DBus API.

Also if someone has pressed the deny button like me when I was asked to give screenshot permissions for the first time here is some Python3 code to give the permission afterwards as I did not find an option for this in the settings.
The code should be run as the current user and not root.

import dbus
bus = dbus.SessionBus()
perm = bus.get_object('org.freedesktop.impl.portal.PermissionStore', '/org/freedesktop/impl/portal/PermissionStore')
perm_iface = dbus.Interface(perm, dbus_interface='org.freedesktop.impl.portal.PermissionStore')

perm_iface.Lookup("screenshot", "screenshot")
perm_iface.Set("screenshot", dbus.Boolean(True), "screenshot", {"": ["yes"]}, dbus.Byte(0x00))
perm_iface.Lookup("screenshot", "screenshot")


As an alternative you can use the app named "D-Feet" to  make DBus calls to update the setting.
There is also a profiler named "Bustle" that can monitor DBus calls in case you want to see what does Upwork call to get the screenshots.

Latest Articles
Top Upvoted Members