Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop #21

Closed
R8s6 opened this issue Feb 18, 2022 · 9 comments

Comments

@R8s6
Copy link

R8s6 commented Feb 18, 2022

Hi,

Running on Arch the textsnatcher-git, I got this error:

$ textsnatcher
archtty
** (textsnatcher:203142): CRITICAL **: 12:40:38.143: TesseractTrigger.vala:124: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop

How to reproduce:

  1. Install textsnatcher-git on Arch
  2. Run textsnatcher, "Snatch Now" --> "Take Screenshot"

Could you please kindly investigate? Thanks!

@RajSolai
Copy link
Owner

What DE are you using Pal ?

@R8s6
Copy link
Author

R8s6 commented Feb 23, 2022

Xfce.

Thanks!

@RajSolai
Copy link
Owner

TextSnatcher uses freedesktop's Screenshot portal but it seems the portal is not fully stable in most of DEs. Hence TextSnatcher is moving to different method for screenshot #16 like scrot for X11 systems

@R8s6
Copy link
Author

R8s6 commented Feb 24, 2022

Thanks. When the fix is out, I'll definitely test it out. Thanks for the hard work!

@RajSolai
Copy link
Owner

The Release 2.0.0 of TextSnatcher uses scrot based screenshots for x11 system, now TextSnatcher can be used on all x11 based DEs.

@R8s6
Copy link
Author

R8s6 commented Mar 17, 2022

Thanks!

On Arch, both the textsnatcher (v2.0.0-1) and textsnatcher-git (the last-commit "git" version 2.0.0.r0.g7192ac1-1) still gave the same error:

** (textsnatcher:3101): CRITICAL **: 12:08:38.405: TesseractTrigger.vala:144: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop

Not sure if it's a packaging issue or not, I looked up the packging script (PKGBUILD) of textsnatcher and it seemed fairly straightforward:

...
pkgver=2.0.0
...
source=("$pkgname-$pkgver.tar.gz::https://github.com/RajSolai/TextSnatcher/archive/refs/tags/v$pkgver.tar.gz")

build() {
  arch-meson TextSnatcher-$pkgver build
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"

  ln -s "/usr/bin/com.github.rajsolai.$pkgname" "$pkgdir/usr/bin/$pkgname"

I also have scrot installed, tested on xfce (x11, not wayland).

Anything I can do to find out why still the same error?

Thanks!

@OnurKader
Copy link
Contributor

OnurKader commented Mar 17, 2022

Can you do echo $XDG_SESSION_TYPE and see if it returns x11 or X11.

It might be tty if you're doing some startx related stuff.

This might help out, I haven't tested the config below but I hope it works for you.

[Service]
Environment=XDG_SESSION_TYPE=x11

You can call the file /etc/systemd/system/[email protected]/set_session_type.conf or something.

@R8s6
Copy link
Author

R8s6 commented Mar 19, 2022

Oh that could be why.

$ echo $XDG_SESSION_TYPE
tty

I did use startx to auto-login during boot. I'll poke around and report back.

Thanks!

@R8s6
Copy link
Author

R8s6 commented Mar 25, 2022

@OnurKader

Yes, I confirm it works out beautifully now.

I normally use the auto-login method described here:
https://wiki.archlinux.org/index.php/Getty#Automatic_login_to_virtual_console

Then I edited /etc/systemd/system/[email protected]/override.conf by adding exactly what you suggested:

[Service]
Environment=XDG_SESSION_TYPE=x11

Reboot, and it works now.

Thank you so much!

@R8s6 R8s6 closed this as completed Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants