• Dosemu2 + mis

    From Alpha@21:4/158 to All on Thu Oct 22 23:34:00 2020
    For you dosemu2 gurus, a question!

    Door programs launch with dosemu2 when I run ./mis as non-root (e.g. as my bbs user); but when I run mis with sudo (e.g. as a systemd service), it looks like dosemu2 is trying to run as root--which it won't.

    Am I doing this wrong, or do I just need to run without sudo? All my ports are high enough so they won't need it elevated permissions, but I do miss using systemd to run on re-start.

    Cheers,

    |07┌[|08..|15Alpha|08.....................|07]┐
    |07├[|08..|11The Drunken Gamer BBS|08.....|07]┤ |07└[|08..|03TheDrunkenGamer.com:8888|08..|07]┘

    --- Mystic BBS v1.12 A47 2020/10/20 (Linux/64)
    * Origin: The Drunken Gamer BBS (21:4/158)
  • From Alpha@21:4/158 to All on Thu Oct 22 23:47:49 2020
    Door programs launch with dosemu2 when I run ./mis as non-root (e.g. as
    my bbsuser); but when I run mis with sudo (e.g. as a systemd service),
    it looks likedosemu2 is trying to run as root--which it won't.

    Lol, just answered my own question:

    sudo -u [username] ./mis daemon

    dosemu2 now works with non-root :)

    |07┌[|08..|15Alpha|08.....................|07]┐
    |07├[|08..|11The Drunken Gamer BBS|08.....|07]┤ |07└[|08..|03TheDrunkenGamer.com:8888|08..|07]┘

    --- Mystic BBS v1.12 A47 2020/10/20 (Linux/64)
    * Origin: The Drunken Gamer BBS (21:4/158)
  • From Al@21:4/106.1 to Alpha on Thu Oct 22 17:04:56 2020
    Lol, just answered my own question:

    sudo -u [username] ./mis daemon

    dosemu2 now works with non-root :)

    Wow! I have been sorta/kinda/maybe looking at this and I think you got it. I should probably start mis like this also.

    --- BBBS/Li6 v4.10 Toy-4
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106.1)
  • From ryan@21:1/168 to Alpha on Thu Oct 22 19:16:21 2020
    Door programs launch with dosemu2 when I run ./mis as non-root (e.g. as
    my bbs user); but when I run mis with sudo (e.g. as a systemd service),
    it looks like dosemu2 is trying to run as root--which it won't.

    dosemu does the same. I recommend not running with sudo :)

    --- Mystic BBS v1.12 A46 2020/08/06 (Linux/64)
    * Origin: monterey bbs (21:1/168)
  • From ryan@21:1/168 to Alpha on Thu Oct 22 19:16:38 2020
    sudo -u [username] ./mis daemon

    dosemu2 now works with non-root :)

    Woah! Mind blown!

    --- Mystic BBS v1.12 A46 2020/08/06 (Linux/64)
    * Origin: monterey bbs (21:1/168)
  • From Alpha@21:4/158 to ryan on Fri Oct 23 13:49:23 2020
    Door programs launch with dosemu2 when I run ./mis as non-root (e.g. my bbs user); but when I run mis with sudo (e.g. as a systemd service it looks like dosemu2 is trying to run as root--which it won't.

    dosemu does the same. I recommend not running with sudo :)

    Ryan, do you run mis as a service (ala systemctl) or manually start as a daemon? Pretty sure systemctl service allows for running as non root as well, but thought I'd ask...

    Cheers,

    |07┌[|08..|15Alpha|08.....................|07]┐
    |07├[|08..|11The Drunken Gamer BBS|08.....|07]┤ |07└[|08..|03TheDrunkenGamer.com:8888|08..|07]┘

    --- Mystic BBS v1.12 A47 2020/10/20 (Linux/64)
    * Origin: The Drunken Gamer BBS (21:4/158)
  • From ryan@21:1/168 to Alpha on Fri Oct 23 09:19:13 2020
    Ryan, do you run mis as a service (ala systemctl) or manually start as a daemon? Pretty sure systemctl service allows for running as non root as well, but thought I'd ask...

    I run as a user as a systemd service and fork it off into a screen session so
    I can attach to mis any time and see what's going on. Let me know if you want to take a look at my startup script, I can throw it on termbin or something.

    --- Mystic BBS v1.12 A46 2020/08/06 (Linux/64)
    * Origin: monterey bbs (21:1/168)
  • From Alpha@21:4/158 to ryan on Fri Oct 23 16:48:43 2020
    Ryan, do you run mis as a service (ala systemctl) or manually start a daemon? Pretty sure systemctl service allows for running as non root well, but thought I'd ask...

    I run as a user as a systemd service and fork it off into a screen
    session soI can attach to mis any time and see what's going on. Let me know if you wantto take a look at my startup script, I can throw it on termbin or something.

    I'd love to see it, thank you!

    I'm using a ./mis-start.sh script I found on a blog, without systemd. I start it manually with the sudo -u thing and then use ./nodespy to peep on activity. When I reboot, I often forget to re-start mis :(

    |07┌[|08..|15Alpha|08.....................|07]┐
    |07├[|08..|11The Drunken Gamer BBS|08.....|07]┤ |07└[|08..|03TheDrunkenGamer.com:8888|08..|07]┘

    --- Mystic BBS v1.12 A47 2020/10/20 (Linux/64)
    * Origin: The Drunken Gamer BBS (21:4/158)
  • From Altere@21:1/113 to ryan on Fri Oct 23 17:37:16 2020
    I run as a user as a systemd service and fork it off into a screen session so I can attach to mis any time and see what's going on. Let me know if you want to take a look at my startup script, I can throw it on termbin or something.

    Can you share it, so I can be lazy and not start my own from scratch? :)

    -altere
    --- SBBSecho 3.11-Linux
    * Origin: Athelstan - athelstan.org (21:1/113)
  • From ryan@21:1/168 to Alpha on Fri Oct 23 23:47:32 2020
    I'd love to see it, thank you!

    Check out https://termbin.com/4nh8 - you'll need to change User/Group/WorkingDirectory to meet your needs, but I suspect it'll work out
    of the box.

    When I want to bring up mis (notice I don't launch in daemon mode), I just 'screen -R Mystic', do what I need to do, then detach the vtty with ctrl-a d.

    --- Mystic BBS v1.12 A46 2020/08/06 (Linux/64)
    * Origin: monterey bbs (21:1/168)
  • From Alpha@21:4/158 to ryan on Sat Oct 24 14:50:21 2020
    I'd love to see it, thank you!

    Check out https://termbin.com/4nh8 - you'll need to change User/Group/WorkingDirectory to meet your needs, but I suspect it'll work outof the box.

    Totally makes sense with screen. I'll give it a go, thank you!

    Is the reason you don't run in daemon mode because you prefer mis's 'waiting for caller screen' over nodespy?

    Cheers,

    |07┌[|08..|15Alpha|08.....................|07]┐
    |07├[|08..|11The Drunken Gamer BBS|08.....|07]┤ |07└[|08..|03TheDrunkenGamer.com:8888|08..|07]┘

    --- Mystic BBS v1.12 A47 2020/10/20 (Linux/64)
    * Origin: The Drunken Gamer BBS (21:4/158)
  • From ryan@21:1/168 to Alpha on Sat Oct 24 10:58:05 2020
    Is the reason you don't run in daemon mode because you prefer mis's 'waiting for caller screen' over nodespy?

    Basically, yes. And when I attach the screen vtty I can see exactly what's going on in a more graphically pleasing user experience that I find easier to understand. It basically just dumps me into currently seeing the BBS live logging exactly what's happening at any given moment.

    --- Mystic BBS v1.12 A46 2020/08/06 (Linux/64)
    * Origin: monterey bbs (21:1/168)
  • From Alpha@21:4/158 to ryan on Sat Oct 24 18:31:00 2020
    Is the reason you don't run in daemon mode because you prefer mis's 'waiting for caller screen' over nodespy?

    Basically, yes. And when I attach the screen vtty I can see exactly what'sgoing on in a more graphically pleasing user experience that I
    find easier tounderstand. It basically just dumps me into currently
    seeing the BBS livelogging exactly what's happening at any given moment.

    Just setup via systemd with your example, works great! Thanks again :)

    |07┌[|08..|15Alpha|08.....................|07]┐
    |07├[|08..|11The Drunken Gamer BBS|08.....|07]┤ |07└[|08..|03TheDrunkenGamer.com:8888|08..|07]┘

    --- Mystic BBS v1.12 A47 2020/10/20 (Linux/64)
    * Origin: The Drunken Gamer BBS (21:4/158)
  • From Altere@21:1/113 to ryan on Sat Oct 24 21:38:28 2020
    Check out https://termbin.com/4nh8 - you'll need to change User/Group/WorkingDirectory to meet your needs, but I suspect it'll work out of the box.

    When I want to bring up mis (notice I don't launch in daemon mode), I just 'screen -R Mystic', do what I need to do, then detach the vtty with ctrl-a

    What term are you using? When I just run ./mis SERVER without screen the ansi shows up fine, in screen it looks like crap.

    -altere
    --- SBBSecho 3.11-Linux
    * Origin: Athelstan - athelstan.org (21:1/113)
  • From Altere@21:1/113 to ryan on Sun Oct 25 00:57:15 2020
    Check out https://termbin.com/4nh8 - you'll need to change User/Group/WorkingDirectory to meet your needs, but I suspect it'll work

    Since I was looking at this debating using screen with SERVER instead of DAEMON or not, after starting and stopping this service I realized you may want to add PIDFile=/mystic/semaphore/mis.bsy in [Service]

    -altere
    --- SBBSecho 3.11-Linux
    * Origin: Athelstan - athelstan.org (21:1/113)
  • From ryan@21:1/168 to Altere on Sun Oct 25 09:48:19 2020
    What term are you using? When I just run ./mis SERVER without screen the ansi shows up fine, in screen it looks like crap.

    Interesting! For me I think it looks fine but may be wrong, I haven't
    actually had a need to pull it up recently. I just use the de-facto utf8 terminal settings and connect via putty. *shrug*

    --- Mystic BBS v1.12 A46 2020/08/06 (Linux/64)
    * Origin: monterey bbs (21:1/168)
  • From ryan@21:1/168 to Altere on Sun Oct 25 09:49:28 2020
    Since I was looking at this debating using screen with SERVER instead of DAEMON
    or not, after starting and stopping this service I realized you may want to add
    PIDFile=/mystic/semaphore/mis.bsy in [Service]

    Ah, interesting. But Mystic will itself not run if there's a busy semaphore, right? So there's no real risk here, just an extra safeguard to utilize systemd's init capabilities?

    --- Mystic BBS v1.12 A46 2020/08/06 (Linux/64)
    * Origin: monterey bbs (21:1/168)
  • From Altere@21:1/113 to ryan on Sun Oct 25 12:20:16 2020
    or not, after starting and stopping this service I realized you may
    want to add
    PIDFile=/mystic/semaphore/mis.bsy in [Service]

    Ah, interesting. But Mystic will itself not run if there's a busy semaphore, right? So there's no real risk here, just an extra safeguard to utilize systemd's init capabilities?

    Correct, the semaphore looks like it's getting removed when you select Yes from the Shutdown screen. So since 'systemctl stop mystic' just kills the process, the semaphore isn't deleted, unless you put in the pidfile line. Probably wouldn't be stopping/starting the service that often but systemctl will throw an error if you try and start it with mis.bsy still being there, then you would know it thinks it's running already and can check whatever you need to.

    -altere
    --- SBBSecho 3.11-Linux
    * Origin: Athelstan - athelstan.org (21:1/113)
  • From Altere@21:1/113 to ryan on Sun Oct 25 12:26:41 2020
    What term are you using? When I just run ./mis SERVER without screen
    the ansi shows up fine, in screen it looks like crap.

    Interesting! For me I think it looks fine but may be wrong, I haven't actually had a need to pull it up recently. I just use the de-facto utf8 terminal settings and connect via putty. *shrug*

    Strange, I use Linux Mint for my desktop and have tried the regular terminal which is utf-8 and I've tried putty for linux using utf-8 and cp437. Both have garbled asni under screen but is perfectly fine not in screen. Using screen 4.08.00. I went a step further and connected with putty from a windows machine and had the same results so I can only assume it's something with screen.

    -altere
    --- SBBSecho 3.11-Linux
    * Origin: Athelstan - athelstan.org (21:1/113)
  • From Altere@21:1/113 to ryan on Sun Oct 25 13:12:54 2020
    What term are you using? When I just run ./mis SERVER without
    screen the ansi shows up fine, in screen it looks like crap.

    Interesting! For me I think it looks fine but may be wrong, I
    haven't actually had a need to pull it up recently. I just use the
    de-facto utf8 terminal settings and connect via putty. *shrug*

    Strange, I use Linux Mint for my desktop and have tried the regular terminal which is utf-8 and I've tried putty for linux using utf-8 and cp437. Both have garbled asni under screen but is perfectly fine not in screen. Using screen 4.08.00. I went a step further and connected with putty from a windows machine and had the same results so I can only assume it's something with screen.

    Just wanted to follow-up with this. Changed my Mystic configuration for Local Codepage from UTF-8 to CP437 and putty remote character set to CP437 and it displays fine with screen now. My linux terminal apparently doesn't support cp437.

    -altere
    --- SBBSecho 3.11-Linux
    * Origin: Athelstan - athelstan.org (21:1/113)
  • From Alpha@21:4/158 to all on Sun Oct 25 18:17:18 2020
    Ah, interesting. But Mystic will itself not run if there's a busy semaphore,right? So there's no real risk here, just an extra safeguard
    to utilizesystemd's init capabilities?

    You've probably seem this, but I've found that these scripts do a pretty good job managing semaphore clean-up w/mis and systemd:

    https://vswitchzero.com/mystic-systemd/

    Best,

    |07┌[|08..|15Alpha|08.....................|07]┐
    |07├[|08..|11The Drunken Gamer BBS|08.....|07]┤ |07└[|08..|03TheDrunkenGamer.com:8888|08..|07]┘

    --- Mystic BBS v1.12 A47 2020/10/20 (Linux/64)
    * Origin: The Drunken Gamer BBS (21:4/158)
  • From ryan@21:1/168 to Altere on Mon Oct 26 00:00:55 2020
    Correct, the semaphore looks like it's getting removed when you select
    Yes from the Shutdown screen. So since 'systemctl stop mystic' just
    kills the process, the semaphore isn't deleted, unless you put in the pidfile line. Probably wouldn't be stopping/starting the service that often but systemctl will throw an error if you try and start it with mis.bsy still being there, then you would know it thinks it's running already and can check whatever you need to.

    Oh man, Eureka! This is super helpful. I didn't realize I could automatically clean up the semaphore that way :)

    There's a voice in my head telling me to kill mis gracefully, though...but that's super cool.

    --- Mystic BBS v1.12 A46 2020/08/06 (Linux/64)
    * Origin: monterey bbs (21:1/168)
  • From ryan@21:1/168 to Alpha on Mon Oct 26 00:02:22 2020
    You've probably seem this, but I've found that these scripts do a pretty good job managing semaphore clean-up w/mis and systemd:

    https://vswitchzero.com/mystic-systemd/

    Splendid, thanks for sharing. I haven't seen this before. Cool.

    --- Mystic BBS v1.12 A46 2020/08/06 (Linux/64)
    * Origin: monterey bbs (21:1/168)