NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: IRC



Steffen Nurpmeso wrote in
 <20240410190923.scQRM5JN@steffen%sdaoden.eu>:
 |pms-dev%outlook.com@localhost wrote in
 | <uv12s6$uuo$1%ciao.gmane.io@localhost>:
 ||Justin Parrott wrote:
 ||> Anybody want to talk about an IRC client?
 ||
 ||Which one?
 ||Most people use web-based interface nowadays AFIK.
 |
 |irssi.  On the server it runs as a "boxed" proxy (for libera.chat
 |via TLS and "SASL"), to which i connect via VPN.
 |In my .irssi/startup i have
 |
 |  LOAD perl
 |  SCRIPT LOAD adv_windowlist
 |
 |(only script in ~/.irssi/scripts) which is a great thing i could
 |not live without.  (Or, better, it should be part of the program
 |as such.)

Ie: on the laptop.  On the server it is "LOAD proxy", and

 3153 root      0:00 /usr/bin/unshare --ipc --uts --pid --fork --mount --mount-proc /usr/sbin/chroot /tmp/.boxircp-steffen/root /init

and with init being (all that build during service startup and
dependent on the used unshare/(su(do)|doas|..) infrastructure):

  #!/bin/sh -

  [ -n "y" ] && /bin/mount -n -t proc -o nosuid,nodev,noexec proc /proc

  if [ -n "" ]; then
          arg1="-u steffen"
          arg2=
  else
          arg1='-p -c'
          arg2=steffen
  fi

  exec /usr/bin/su ${arg1} sh -c '
          dtach -n /tmp/.steffen-irssi /usr/bin/irssi
          read x < /linger_control
          pkill -TERM /usr/bin/irssi
          sleep 1
          pgrep /usr/bin/irssi && pkill -KILL /usr/bin/irssi
          echo done > /linger_control
  ' ${arg2}

Yes it is hacky (but portable to busybox-only once i did it) and
so, but i can even enter irssi on the server when i am there via
ssh (but only windowlist, then).  Works for four years i think.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


Home | Main Index | Thread Index | Old Index