I use blueproximity to lock my pc.
In blueproximity you specify which commands to run for lock and unlock.
For locking Lubuntu I use dm-tool lock (lightdm)
For unlocking, dm-tool switch-to-user $USER does not work.
Found someone suggesting xdotool (move mouse and then type the password) haven't tried this since it can be done better.
Any suggestions?
(less installing == greater happiness; i.e. gnome screensaver isn't desired)
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.
Using xfce4-keyboard-settings, I have SuperL keybound to start rofi using rofi -show drun, but this prevents me from using SuperL in combination with any other key combinations, such as Super + L to lock the screen. rofi is hijacking the show immediately.
I've tried prepending a sleep to rofi, ie. sh -c "sleep 1 && rofi -show drun", which correctly sleeps and even lets me use Super + L to lock the screen, but then rofi loads over the top and starts to interact weirdly (read: undesirably) with the lock screen.
Is there a way that I can have both keyboard shortcuts work as desired without interfering with eachother?
BTW, the lock screen I'm using is i3lock-fancy.
I solved this following AndreLDM's advice.
I installed xcape, and added xcape -e 'Super_L=Control_L|Escape' to ~/.config/openbox/autostart and bound the keyboard shortcut Ctrl+Esc to run rofi. I was then able to keybind Super+L to i3lock-fancy and have both keyboard shortcuts work as I intended. Pressing Super by itself presents my rofi drun menu, and Super+L locks the screen.
I was after the exact same functionality on Manjaro XFCE. I found that even though the whisker menu popup was bound to <Alt + F1>, it still popped up when I pressed < SuperL >. So instead of binding rofi to I bound it to <Alt + F1>.
With that I was able to start rofi with < SuperL > and also use it in combination with other keys.
You may need to install this package.
ksuperkey allows you to open the application launcher in desktop
environments such as KDE Plasma and Xfce using the Super key (also
known as "Meta" or "the Windows key"). If you hold down the Super key
it will still act as a modifier key, allowing you to use it for other
keyboard shortcuts.
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.
I'm running the KDE desktop, and I'd like to associate hotkeys with a set of windows and use those hotkeys to activate those windows from anywhere. Ideally, this would work like in Windows - where the key launches the app the first time you press it, and thereafter just brings it to the front. But I don't think that's possible in KDE (why not???).
Anyway, the kwin window menu has a "More Actions/Window Shortcut" option that does let you set a key combination that will bring that window to the front. Except that it only works for the current session. Is there no way to make that association permanent?
In my normal Windows workspace, I have 2 PuTty sessions logged on to a unix host under different user ids. Each of these has an associated hotkey. In addition, I have the app I work in (a browser of sorts) with its own hotkey, and a programming editor with its own key. I am constantly switching between these 4 windows, and I do it all with keystrokes. And I use the same keystrokes to start those sessions up when I first need them. It's great - the only Windows feature that I seriously miss when running Linux. How can I come closest to having that in KDE? Or some other Linux desktop?
Well, I tried xdotool, and combined in a script and attached to a KDE custom shortcut, it actually works. Launches the app if xdotool doesn't find it, and activates the window if it does. Painful, but it does work. The app in question is WIN32 code - hence launching it via wine.
Here's the script:
#!/bin/bash
pid=`xdotool search --name Medialine`
if [ "$pid" == "" ]; then
wine /home/rob/wem.exe&
else
xdotool windowactivate $pid
fi
This is obviously a stupid question.
I am coding in Eclipse both on Mac and Linux, but I mixed up and used the Mac shortcut to window tabbing (Ctrl-Cmd-F6), but I was using the Linux on uni and screen went black. I've done this before, but this time I can't get back to my desktop. Ctrl-Alt F1-F6 gives me different terminals, F7 gives me a black screen and F8 a blinking underscore in the top left corner. Shouldn't my session have been somewhere in F1-F6 and is it lost?
Ctrl-Alt-F7 should work perhaps your X has crashed?
I just did what you did and F7 got it back for me, saying that before I remember X crashing and I had the same black screen
I had the same issue. I tried with hitting ctl+ alt + F1 together. And it worked
X is probably still running on F7, your display driver (or something else) is just misbehaving. You might be able to trick it into coming back on by going to F7 and blindly opening a terminal and playing with xset ($ xset dpms force on). Or you can ctrl-alt-backspace to kill X and GDM should restart it.
Try seeing if you can repeat the problem and then file a bug report (or let the lab admin know if it isn't your computer). It probably has something to do with your distro's kernel configuration/patching. I've had this happen before on Ubuntu but not any other distros (I've used many), which is why I am assuming it might be distro-specific issue. Probably the unintended consequences of some kernel patching.
The ctrl+alt+Fx (x=1..6) key combinations often allow you to have up to 6 concurrent terminal sessions on the console.
Usually one is setup to use X windows, and differs from distribution to distribution. Typically its on Ctrl+Alt+F7.
http://linux.about.com/od/linux101/l/blnewbie5_1.htm
Some distributions of Linux allow you to kill the X Windows session with Ctrl+Alt+Backspace at which point the operating system will attempt to restart it.
alt + F1
works for ubuntu 18.04.
In the future, you can go into a terminal and type:
init 3
To bring the system into text mode, and:
init 5
To return the system to X mode. The nice thing about doing it that way is that everything should be shut down and restarted cleanly.
For My case. I tried with hitting
ctl+ alt + F2
together. And it worked in Fedora
Try Ctrl-Alt-F9, and Ctrl-Alt-F10. :-)
Looks like X crashed. To check, you could log in on one of the terminals (on Ctrl+F1 etc.) and check that the "X" process is still running.
I've had the same happen to me recently, and found the SIGSEGV and backtrace later in /var/log/Xorg.0.log. Curse your graphics driver vendor (usually) and then reboot.
We're running gnome on Red Hat 5.
ps axu in one of the other terminals showed some of the processes still running. Probably something with the display drivers then. Did ctrl-alt-backspace and restarted it. Thanks for the help.
F8 solves the problem in Linux Mint 17.3 Rosa