16 March 2016

display

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: weirdx-1.0.32.tar.gz

This entry is about running plan9port's rio window manager logged in
as one user, then opening a Java window into which will be loaded an
X terminal, switching in that xterm to another user and running GUI
applications inside the Java window.

http://www.jcraft.com/weirdx/
weirdx-1.0.32.tar.gz

One needs a JDK installation, instructions for which are located
in the /extra directory of Slackware distributions. I've used early
as J2SE 1.5.0_01 from Slackware version 10.1. JRE will work,
excepting you can't compile files for other keyboard layouts than
those (gb, de, and jp106) which ship with 1990's circa software.

Boot into the default runlevel 3.

Welcome to Linux 3.2.29-smp (tty1)
darkstar login: glen
Password:
Linux 3.2.29-smp
glen@darkstar:~$ startx -- :1 vt8

Use mouse button 3 to access the menu, select New,
then use mouse button 3 to draw a window.

Check if you're on a non-English keyboard.

sh-4.2$ setxkbmap -query

If you're on an unsupported keyboard run this command.

sh-4.2$ setxkbmap --layout us

Start WeirdX in the background
and xterm on DISPLAY :2.0.

sh-4.2$ cd /tmp/weirdx/misc
sh-4.2$ java -jar weirdx.jar &
[1] 2121
sh-4.2$ xterm -display :2.0 -geometry 80x20-1-1 &
[2] 2135
sh-4.2$

In xterm switch to another user as a login shell,
which will add the variables from /etc/profile.d,
into your shell. If that user is already logged in,
e.g., on another tty, omit the '--login' argument; the
shell within which one runs the su command will
retain a non-login status, but additional terminals
started from twm's mouse accessed menu will
appear as login shells.

sh-4.2$ su felix --login
Password:
felix@darkstar:~$

Start a tab window manager (twm).

felix@darkstar:~$ twm -f /tmp/weirdx/misc/twmrc &
[1] 2166
felix@darkstar:~$ cd $HOME
felix@darkstar:~$

Qt applications will miss the Xlib extension SYNC in WeirdX.

The GTK+ applications wanting access & write permissions to
freedesktop's ~/.local/share/recently-used.xbel won't complain
(issue warnings) when started under a twm. However owing to
the limitations of RANDR to run only one window manager per
screen, having rio running on DISPLAY :1, DISPLAY :2.0 will
lack support for the Xlib extension for a running twm.

Tk applications and athena widgets render favourably.

When finished with the session, use the mouse accessible
menu to Exit; clicking the mouse again in xterm and typing
'exit' returns the shell to the user glen.

Kill the xterm PID from 9term
and then the WeirdX PID.

I first used JCraft's software with a Microsoft® XP
installation of SFU 3.5 Interix. That platform does
not exhibit the above issue with RANDR though I
occasionally have seen a "blacked out" effect on a
widget's dropdown menu entry after having clicked
on it; gvim compiled with the athena toolkit.

I might create Scandinavian languages' keymap and
key modifier files; uncommenting the following line in
C:\weirdx\misc\config\props.and starting WeirdX on
my Netbook I note though that AltGr does not work -
having set the Windows keyboard to DE - and with
CapsLock pressed the typing of numbers results in
the equivalent of Shift + number having been typed.

#weirdx.display.keymap=de

X clients can also be started from remote Un*x
machines, the client applications appearing in
the running X Window System server's display.

I have neither tried Java GUIs nor XForms Toolkit
applications with WeirdX; in the sidebar there are
for example two Java programs as RAnalyticFlow
and SQuirreL SQL Client.

Rudimentary GUI design is an interesting skill.

On Linux from plan9ports's event.c [line 197] is
output "rio: bad mapreq c %p w %x, rescanning\n"
when attempting to run p9p's rio inside WeirdX.

In terms of the differences in ELF versus PE32
interaction between an MS® machine with Interix
and a Un*x network might be possible utilising
multiple Tcl interpreters.

05 March 2016

es

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: es-0.9.tar.gz

This post will be about compiling the extensible shell (es).

http://web.mit.edu/~yandros/doc/es-usenix-winter93.html

https://wryun.github.io/es-shell/
es-0.9.tar.gz

There are two options for line editing, GNU readline (default), and the UNIX port
of the NetBSD libedit library. The latter - even with '--enable-widec' added to the
configure arguments - appears to create dead keys on Scandinvian keyboards.

If the libedit library is chosen, e.g., for UK/US only keyboards, run the configure script
without any arguments for 'Optional Packages', and hand edit afterwords the config.h
and Makefile.

config.h

- /*#undef HAVE_LIBEDITLINE */
+ #define HAVE_LIBEDITLINE 1

- #define HAVE_LIBREADLINE 1
+/*#undef HAVE_LIBREADLINE */

Makefile
- LIBS = $(ADDLIBS) -lreadline -ltermcap
+ LIBS = $(ADDLIBS) -ledit -ltermcap

Then run 'make'.

Based on es-0.9beta is also (albeit with some language changes) a C++ version
where the following line (using automake < 1.12) will create a configure script.

bash-4.2# autoreconf -i

http://pkgs.fedoraproject.org/repo/pkgs/xs/
frytvm-XS-9c19777.tar.gz

https://slackbuilds.org/repository/14.0/development/gc/
gc.tar.gz

http://hboehm.info/gc/gc_source/
gc-7.2d.tar.gz

Add '--enable-cplusplus' to the configure arguments in
the gc.SlackBuild.

Slackware current (i.e., automake >=1.12) would use the
newer frytvm-XS-c9a0b29.tar.gz.

The XS configure script includes an option as '--enable-lisptrees'; sexprs
along with [Plan 9] ndb(6)-like data structures are among the alternatives
to the use of XML.

The es(1) and xs(1) man pages are similar.

03 March 2016

rio

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: plan9port-20140306.tgz

Setting up rio with a Danish keyboard layout.

https://slackbuilds.org/repository/14.1/system/plan9port/

Boot into the default runlevel 3.

Welcome to Linux 3.2.29-smp (tty1)
darkstar login: root
Password:
Linux 3.2.29-smp
Last login: Wed Mar 3 06:08:32 +0100 2016 on /dev/tty1

root@darkstar~# installpkg plan9port-20140306-i486-1_SBo.tgz
root@darkstar~# cat /home/glen/.xinitrc
#!/bin/sh

# Merge in defaults
userresources=$HOME/.Xresources
[ -f $userresources ] && xrdb -merge $userresources

# Change the key map to Danish
/usr/bin/setxkbmap -layout dk

# Start the window manager:
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  exec ck-launch-session rio
else
  exec rio
fi
root@darkstar~#

Modifying the above to read 'exec ck-launch-session rio -grey' will
display a stippled grey background, instead of Plan 9's solid grey.

Use Ctrl+Alt+F2 to access tty2.

Welcome to Linux 3.2.29-smp (tty2)
darkstar login: glen
Password:
Linux 3.2.29-smp
glen@darkstar:~$ startx

Use mouse button 3 to access the menu, select New,
then use mouse button 3 to draw a window.

9term is a dumb terminal.

As I have not ported Mothra to plan9port
start an xterm in the background to use a
text-browser; likewise for emacs, vi(m), or
yi (vty frontend with vim keymap), if you
prefer those to acme, ed, or sam.

From a running 9term in rio the number of processes is minimal.

sh-4.2$ ps x
  PID TTY      STAT   TIME COMMAND
 1912 tty2     Ss     0:00 -sh
 1944 tty2     S+     0:00 /bin/sh /usr/bin/startx
 1960 tty2     S+     0:00 xinit /home/glen/.xinitrc -- /usr/bin/X :0 -auth /home/glen/.serverauth.1944
 1966 tty2     S      0:00 ck-launch-session rio
 1975 tty2     S      0:00 rio
 1978 tty2     S      0:00 9term -w
 1979 tty2     Sl     0:00 9term -w
 1980 tty2     S      0:00 9term 9term (devdraw)
 1985 pts/0    Ss     0:00 /bin/sh -i
 1999 pts/0    R+     0:00 ps x
sh-4.2$

Type 'rio exit' in 9term to end your session.

Logout of tty2 and use Ctrl+Alt+F1 to access tty1.

root@darkstar~# halt

NB: For ordinary use (after the software is installed) one can run exclusively on
/dev/tty1, delaying the 'root' login until the end, which factually is only needed
to run the commands "halt" or "reboot".

02 March 2016

twm

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz

Setting up a tab window manager (twm) with a Danish
keyboard layout.

Boot into the default runlevel 3.

Welcome to Linux 3.2.29-smp (tty1)
darkstar login: root
Password:
Linux 3.2.29-smp
Last login: Wed Mar 2 06:08:32 +0100 2016 on /dev/tty1

root@darkstar~# cat /home/eric/.xinitrc
#!/bin/sh

/usr/bin/twm &
/usr/bin/setxkbmap -layout dk
exec /usr/bin/xterm -geometry 80x20+0+0 -name login
root@darkstar~#

Use Ctrl+Alt+F2 to access tty2.

Welcome to Linux 3.2.29-smp (tty2)
darkstar login: eric
Password:
Linux 3.2.29-smp
eric@darkstar:~$ startx

From a running xterm in a twm the number of processes is minimal.

sh-4.2$ ps x
  PID TTY      STAT   TIME COMMAND
 2308 tty2     Ss     0:00 -sh
 2321 tty2     S+     0:00 /bin/sh /usr/bin/startx
 2337 tty2     S+     0:00 xinit /home/eric/.xinitrc -- /usr/bin/X :0 -auth /home/eric/.serverauth.2321
 2343 tty2     S      0:00 /usr/bin/xterm -geometry 80x20+0+0 -name login
 2344 tty2     S      0:00 /usr/bin/twm
 2348 pts/0    Ss     0:00 sh
 2349 pts/0    R+     0:00 ps x
sh-4.2$

When your session is finished logout of tty2 and use Ctrl+Alt+F1 to access tty1.

root@darkstar~# halt

NB: One can run exclusively on /dev/tty1, delaying the 'root' login until the end,
which factually is only needed to run the commands "halt" or "reboot".