PiDP-8/I SoftwareCheck-in [bf005a02cd]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clarified that SCREEN_MANAGER=none is for interactive use only in the README.md file, and made a test for this high up in the pidp8i script.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | screen-mgr-none-dtach
Files: files | file ages | folders
SHA3-256: bf005a02cd1c78bfde4e5284e9bb3301e754059d18e56a083c83718842f17ca6
User & Date: tangent 2020-01-27 18:41:59
Context
2020-01-27
18:41
Clarified that SCREEN_MANAGER=none is for interactive use only in the README.md file, and made a test for this high up in the pidp8i script. Leaf check-in: bf005a02cd user: tangent tags: screen-mgr-none-dtach
18:37
Moved the dtach socket from /tmp to $prefix/run. systemd does strange things with /tmp, and systemd likes "run" for files like this. check-in: d80f67fef7 user: tangent tags: screen-mgr-none-dtach
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to README.md.

783
784
785
786
787
788
789
790
791





792
793
794
795
796
797
798
799
800
    this option.

    Unlike `screen` and `tmux`, there is no command layer enetered
    via an "attention" keystroke in `dtach`. The only key that `dtach`
    scans for from the terminal is the detach keystroke, which we leave
    at its default, <kbd>Ctrl-\\<kbd>.

*   **<tt>none</tt>**: Effectively aliases the `pidp8i` and `pidp8i start`
    commands, attaching the simulator to the local console. The `pidp8i





    stop` command becomes a no-op, since stopping the simulator is then
    done in the standard SIMH way: <kbd>Ctrl-E, quit</kbd>.

Note that the alternative screen managers are not installed by default.
If you set `SCREEN_MANAGER=tmux`, you must then ensure that `tmux` is in
fact installed before the `pidp8i` script goes to try and use it. On
Raspbian, this is done by:

    $ sudo apt install tmux







|
|
>
>
>
>
>
|
|







783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
    this option.

    Unlike `screen` and `tmux`, there is no command layer enetered
    via an "attention" keystroke in `dtach`. The only key that `dtach`
    scans for from the terminal is the detach keystroke, which we leave
    at its default, <kbd>Ctrl-\\<kbd>.

*   **<tt>none</tt>**: This mode is for interactive use, allowing you to
    run the installed simulator with the installed media without any
    screen manager at all.

    In this mode, the `pidp8i` and `pidp8i start` commands do the
    same thing: run the simulator directly attached to your current
    interactive terminal. The `pidp8i stop` command becomes a no-op,
    since stopping the simulator is then done in the standard SIMH way:
    <kbd>Ctrl-E, quit</kbd>.

Note that the alternative screen managers are not installed by default.
If you set `SCREEN_MANAGER=tmux`, you must then ensure that `tmux` is in
fact installed before the `pidp8i` script goes to try and use it. On
Raspbian, this is done by:

    $ sudo apt install tmux

Changes to bin/pidp8i.in.

39
40
41
42
43
44
45





46
47
48
49
50
51
52
...
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
dtsock=$prefix/run/pidp8i-dtach.sock

if [ -e "$prefix/etc/pidp8i.rc" ]
then
    . "$prefix/etc/pidp8i.rc"
fi
[ -n "$SCREEN_MANAGER" ] || SCREEN_MANAGER=screen






is_running() {
    if [ "$SCREEN_MANAGER" = "none" ]
    then
        return 1
    elif [ "$SCREEN_MANAGER" = "tmux" ]
    then
................................................................................
    cd @abs_top_builddir@
    export XDG_RUNTIME_DIR=/run/user/$(id -u)
    unitdir=~@INSTUSR@/.local/share/systemd/user
    @INSTALL@ -d $unitdir
    @INSTALL@ -m 644 @srcdir@/etc/pidp8i.service $unitdir
    $systemctl --user daemon-reload
    $systemctl --user enable pidp8i
elif test -t 1 -a -x $systemctl -a "$SCREEN_MANAGER" != "none"
then
    # We were given some other arg(s) and we're attached to a terminal,
    # so build a systemctl command with those args so the user doesn't
    # have to type out the canonical form of the command.
    $systemctl --user $verb "$@" pidp8i
    exit $?
elif [ "$verb" = "start" ]







>
>
>
>
>







 







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
dtsock=$prefix/run/pidp8i-dtach.sock

if [ -e "$prefix/etc/pidp8i.rc" ]
then
    . "$prefix/etc/pidp8i.rc"
fi
[ -n "$SCREEN_MANAGER" ] || SCREEN_MANAGER=screen
if [ ! -t 1 ] && [ "$SCREEN_MANAGER" = "none" ]
then
    echo "The 'none' screen manager mode is meant for interactive use only!"
    exit 1
fi

is_running() {
    if [ "$SCREEN_MANAGER" = "none" ]
    then
        return 1
    elif [ "$SCREEN_MANAGER" = "tmux" ]
    then
................................................................................
    cd @abs_top_builddir@
    export XDG_RUNTIME_DIR=/run/user/$(id -u)
    unitdir=~@INSTUSR@/.local/share/systemd/user
    @INSTALL@ -d $unitdir
    @INSTALL@ -m 644 @srcdir@/etc/pidp8i.service $unitdir
    $systemctl --user daemon-reload
    $systemctl --user enable pidp8i
elif test -t 1 -a -x $systemctl
then
    # We were given some other arg(s) and we're attached to a terminal,
    # so build a systemctl command with those args so the user doesn't
    # have to type out the canonical form of the command.
    $systemctl --user $verb "$@" pidp8i
    exit $?
elif [ "$verb" = "start" ]