When I do not use my graphical session anymore, the screensaver automatically lock it and power off the screen to save energy.
I want it to keep locking my session but not to power off the screen, is it possible ?
I use Ubuntu 18.04 with default gnome display manager.
Thank you,
Matias
As described in this thread on ubuntu forums it looks like this is part of the gnome-screensaver-command and there is no easy way to disable it. Try replacing the default screensaver with another one, like xscreensaver.
Hint: when you manually lock your screen, just hold the buttons a second longer and the screen won't turn off.
Related
On modern Fedora Linux installations, pressing the computer's "power off" button does not actually shut it down, but rather hibernates it, which is very convenient.
However, this is only true if I run the default Gnome window manager. If I use a different window manager (my favorite is the old-school ctwm), this doesn't happen - the power-off button shuts down the system instead of hibernating.
My question is: How can I tell my system (I don't mind a little coding, and it doesn't need to be inside ctwm) to do something else - and not a shutdown - when the poweroff button is pressed. Without Gnome.
I did a little digging, and it appears that I have "upowerd" running. However, it is running just the same when ctwm and Gnome are the current window manager, so Gnome must somehow be telling upowerd not to power-off the computer and instead either do something else (like hibernate) or send Gnome that the event happened. But I couldn't find any documentation on how that's done, or how I can do something similar without Gnome.
I use Archlinux. After latest update, my gnome 3 gets a property that a window can get focus without overlap other windows. I like it. But when I copy my configuration to another Archlinux (same version), it doesn't behave like that.
So, how to configure gnome to keep that property?
I am playing with X-windows, Xlib, etc. I want to create a X-window independent of the window-manager: meaning that I do not want the WM to put a frame, minimize-maximize, close, menu, title-bar, etc. in the window. I want to create a vanilla X window. How?
[edit]
Alternatively, how to I capture those events so my windowing app can at least die without an error?
[edit] ninjalj's answer led me to the following info:
ICCCM
Lots & lots of info :) cool!
Tutorial
I think what you want is an override-redirect window. Just set the override-redirect on your XSetWindowAttributes struct (and the corresponding bit on valuemask) when creating the window.
I am working on old Motif-based application for Linux. I want to be able to programmatically change the active window of our application. I can redirect the input by using XSetInputFocus() function and the keyboard input start to go there, but XReconfigureWMWindow() and XRaiseWindow() functions just don't work.
I've read that Window Managers try to stop this behaviour, so tried to disable configure redirection, but this doesn't work either. Any ideas how to make one of my own windows on top of the window stack?
There is a tiny program called wmctrl available (at least in Debian/Ubuntu it is in standard distribution) which is able to perform many operations on windows and desktops, and handles plenty of window managers. I'd suggest testing whether it works in your environment, and if so, peeking at its sources.
You may find the answer to this is dependent on the Window Manager the user is using, or even what settings they've given to the Window Manager. I like to set my Window Managers to do "focus follows mouse", which means you can't send the focus to a window that I haven't put my mouse on, unless you also warp the mouse there (is that function called XWarpMouse?).
What would be the best approach to install a keyboard hook on Linux (X-windows) in order to trigger some application when some key-combo is pressed?? Is there a way to do this regardless of which window manager is running? The idea is to have an application being called ( or brought to foreground ) when some key is pressed in a way similar that Google Desktop does to Ctrl-Ctrl.
XGrabKey on the root window is how xbindkey does it. Be careful about having some alternative method of killing the grab though, it's very annoying to have to go somewhere to ssh into your own box just to kill that process... And that's why, if it was me, xbindkeys+"echo 'moo' > /tmp/moo-fifo" would be the way to do it. That way, you could also control it in any number of other ways you haven't thought of yet.