From a3806294dc63de833af2a00e7a3aea15d93cb914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Sat, 18 Jan 2020 14:46:35 +0100 Subject: [PATCH] start X with sx if available (after login to first virtual console) --- .profile | 6 ++++++ .xsession | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.profile b/.profile index 3df85fb..33253d1 100644 --- a/.profile +++ b/.profile @@ -8,6 +8,9 @@ # for ssh logins, install and configure the libpam-umask package. #umask 022 +export EDITOR=emacsclient +export VISUAL=emacsclient + # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists @@ -29,3 +32,6 @@ if [ -d "$HOME/bin" ] ; then fi export PATH + +# start X at login +[[ -z "$DISPLAY" && "$XDG_VTNR" -eq 1 ]] && which /bin/sx > /dev/null && exec sx ~/.xsession diff --git a/.xsession b/.xsession index 2ca60e1..bdc7f2c 100755 --- a/.xsession +++ b/.xsession @@ -1,6 +1,8 @@ #!/bin/sh -. ~/.profile +if [ -z "$EDITOR" ]; then + . ~/.profile +fi xrandr --auto xrandr --output HDMI1 --right-of DP1