this post was submitted on 03 Oct 2023
25 points (100.0% liked)

Linux

48062 readers
732 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I'm posting here, because i have no idea how to search for this.

When exploring GTK programming, I ran into a very specific problem:

I created an application that crashes when i open a GtkDropDown, so to debug the crash I ran my app inside GDB. When GDB notices an application crashing, it freezes it, so i can analyze the state in which it crashed. The GtkDropDown grabs the pointer, like rofi or i3lock grab the pointer to prevent the window manager from exercising any keyboard shortcuts. Problem is now, the application gets frozen while the pointer is grabbed, so I'm basically locked out of my window manager.

To close the application, I can just log into a TTY and kill the GDB process, but I would like to have a simpler solution, that possibly doesn't kill the application.

Is there a way with Xorg to get out of such a situation without switching to the TTY? If not, why can a single user application completely prevent you from using anything in your graphical environment?

Because Xorg bad? Should I switch to Wayland?

Solution (thanks to @trachemys@iusearchlinux.fyi):

  • switch to TTY and log in
  • export DISPLAY=':0'
  • setxkbmap -option grab:break_actions
  • xdotool key XF86Ungrab
you are viewing a single comment's thread
view the rest of the comments
[–] anon5621@lemmy.ml -4 points 1 year ago (1 children)
[–] quantenzitrone@feddit.de 4 points 1 year ago

Maybe once I am a bit more used to reading and understanding documentation for large existing libraries and programs.