• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Using kmsgrab and triggerhappy for full-screen screenshots

Scheduled Pinned Locked Moved Help and Support
kmsgrabtriggerhappysudoframebuffer
2 Posts 2 Posters 134 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    roslof
    last edited by roslof 19 Feb 2025, 03:57

    Referring to an older thread

    In the past we could use raspi2png for screengrabs, but the tech is obsolete for modern OSes. Would like to combine a modern capture tool with triggerhappy for keyboard-triggered screen captures using the method in the thread linked above.

    In 2025, it seems that kmsgrab might be a good alternative with Bookworm, but it needs sudo/root access, which may prohibit it from running in a script. Wondering if there is a way to run kmsgrab in this fashion, or if a different tool would be required.

    I've already configured a triggerhappy conf file and it tries to run kmsgrab with a filename param, but it definitely needs sudo, which I think is a non-starter.

    Is there a clever way to make this work?

    Cheers!
    -Ros

    EDIT: I'm realizing that this may be a Pi 5 / Bookworm issue and thus is probably not ready for this forum.

    1 Reply Last reply Reply Quote 0
    • L
      Lolonois
      last edited by 25 Feb 2025, 19:50

      You may succeed with giving the kmsgrab system admin capabilities, it does no longer require explicit sudo then.

      sudo setcap cap_sys_admin+ep /path/to/kmsgrab

      https://linux.die.net/man/8/setcap
      https://linux.die.net/man/3/cap_from_text
      https://man7.org/linux/man-pages/man7/capabilities.7.html

      I did not debug to the end, but I strongly assume at some point DRM hits this method, which bails out with -EACCES ("Operation not permitted") when privileges are not met.

      1 Reply Last reply Reply Quote 1
      1 out of 2
      • First post
        1/2
        Last post

      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

        This community forum collects and processes your personal information.
        consent.not_received