Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a bug with force_show initialization, xdotool now enforces xter…

…m focus in xlshrc.
  • Loading branch information...
commit 5345e8c067a0e19f06b15af88c2a3fff4a2b98f5 1 parent 9007a8c
@Nadrin authored
Showing with 12 additions and 2 deletions.
  1. +5 −0 README
  2. +6 −1 etc/xlshrc
  3. +1 −1  src/xlsh.c
View
5 README
@@ -24,6 +24,9 @@ Features:
The only build dependencies are: make, a decent C compiler, libreadline and libpam.
Configuration options can be edited in include/config.h before compiling.
+Runtime dependencies for xlshd are: standard X11 distribution with xterm and
+(optionally) xdotool for enforcing terminal window focus on multi-monitor setups.
+
When using xlsh as "login" replacement remember to tell your getty program to not
ask for username. When using xlshd from inittab specify -f flag so it won't fork
into background.
@@ -35,5 +38,7 @@ c1:2345:respawn:/sbin/agetty -8 -s 38400 -n -l /usr/local/sbin/xlsh tty1 linux
# xlshd starting X server and xterm/xlsh on runlevel 5
x:5:respawn:/usr/local/sbin/xlshd -f
+Thanks goes to Mateusz Hromada for testing and providing useful patches. ;-)
+
Please report any bugs or issues either via github or via mail to:
<my_firstname@my_lastname.pl>
View
7 etc/xlshrc
@@ -12,9 +12,14 @@ py=$(($screen_h/2 - 120))
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
export PATH
if ! which xlsh; then
- xmessage -center 'xlsh cannot be found in PATH!'
+ xmessage -center "xlsh cannot be found in PATH!"
exit 1
fi
+
xrdb -merge "$XRESFILE"
xsetroot -solid "$BGCOLOR"
+if which xdotool; then
+ ( xwindow=$(xdotool search --sync --class $TERMINAL)
+ xdotool windowfocus "$xwindow" )&
+fi
exec $TERMINAL -g 80x15+$px+$py $(which xlsh)
View
2  src/xlsh.c
@@ -521,7 +521,7 @@ static char* xlsh_cmd_match_user(const char* text, int state)
static size_t len;
static struct passwd* pw_entry;
- int force_show;
+ int force_show = 0;
if(!state) {
setpwent();
Please sign in to comment.
Something went wrong with that request. Please try again.