From 544f7346178df4f285062a7b3e8ee840ceb547c6 Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Mon, 18 Feb 2019 13:20:04 +0200 Subject: [PATCH] bashrc & zshrc: alias startx="exec \startx" I generally have the shortcut to kill Xorg enabled and last night I was wondering what happens if I use it within i3lock. The result was unlocked TTY and that was a gaping hole even if running `startx` again presented me i3lock (I wonder how that works), but after repeating the experiment with this alias I was thrown into TTY login prompt. --- rc/bashrc | 3 +++ rc/zshrc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/rc/bashrc b/rc/bashrc index 7b0e93a7..da6469e9 100644 --- a/rc/bashrc +++ b/rc/bashrc @@ -591,6 +591,9 @@ alias apt-builddep="apt-rdepends --build-depends --follow=DEPENDS" # http://superuser.com/a/638033 - get embedded Windows key alias winkey="xxd /sys/firmware/acpi/tables/MSDM" +# Always exec startx so Ctrl-Alt-Backspace won't lead to unlocked TTY. +alias startx="exec \startx" + # Allow custom aliases to be put in .aliases or .bash_aliases . # .aliases diff --git a/rc/zshrc b/rc/zshrc index b8172eae..d278519a 100644 --- a/rc/zshrc +++ b/rc/zshrc @@ -589,6 +589,9 @@ alias apt-builddep="apt-rdepends --build-depends --follow=DEPENDS" # http://superuser.com/a/638033 - get embedded Windows key alias winkey="xxd /sys/firmware/acpi/tables/MSDM" +# Always exec startx so Ctrl-Alt-Backspace won't lead to unlocked TTY. +alias startx="exec \startx" + # Allow custom aliases to be put in .aliases or .zsh_aliases . # .aliases