[22:44] <TonyStone> so i have an ubuntu server setup running.  i have a few programs i start from an SSH session... problem is when i start these programs they tie up my terminal... so i cant do anything else. is there any multitasking methods?
[22:44] <TonyStone> also how can i make some of these programs start automatically after boot and be able to "open" the running instance in a remote terminal?
[22:47] <tomreyn> !tty | TonyStone 
[22:47] <TonyStone> there is no graphical login... hmmm
[22:48] <tomreyn> there are also so-called terminal multiplexers which can also give you multiple 'screens', such as tmux (and byobu) and GNU screen
[22:48] <tomreyn> it's a server, that's why there's no graphical login
[22:48] <TonyStone> so when i SSH into my ubuntu server i can have different terminals via ctrl-alt f2-f6   m..... im trying now
[22:49] <tomreyn> you can also start processes and keep them running int he background, by adding "&" to the end of the command, then typing "bg" as in "background"
[22:49] <TonyStone> lol... except the ctrl-alt f3 changes my desktop to a terminal...
[22:49] <TonyStone> gotta send it through the ssh client some how... ok
[22:49] <tomreyn> and last but not least you can write systemd unit files to have daemons start automatically at boot, or based on a schedule, or just when you start them manually.
[22:49] <TonyStone> space between & BG ?
[22:50] <tomreyn> oh you're not sitting in front of the server, connected with ssh, then tty switching by hotkeys won't work
[22:50] <TonyStone> im gonna need them to start automnatically... so i will read up on systemd unit files
[22:50] <tomreyn> enter between & and bg
[22:50] <TonyStone> yeah i am remote
[22:51] <TonyStone> ok im trying these now... hold on...  ill be a half-arsed linux admin some day! lol
[22:51] <TonyStone> ok the & works great!
[22:52] <tomreyn> TonyStone: if yuo have more details on what you're trying to accomplish / what these applications are supposed to do, maybe we can provide more targeted suggestions.
[22:53] <TonyStone> so i have my server setup with TheLounge IRC web client...
[22:53] <TonyStone> but in order for me to access it so far i have been logging in via SSH and then starting it. but then it ties up my terminal...
[22:53] <TonyStone> so when i type BG it shows tony@irontowel:~$ sudo -u thelounge thelounge start &
[22:53] <TonyStone> [1] 337886
[22:53] <TonyStone> tony@irontowel:~$ bg
[22:53] <TonyStone> [1]+ sudo -u thelounge thelounge start &
[22:53] <tomreyn> i.e. proper services / daemons are usually written in a way that they output primarily to a log file, not to screen (unless you start them in a verbose / debugging / stay in front mode), and come with a service file so that you can manage them with "systemctl"
[22:54] <TonyStone> sorry if i posted too many lines here... so now how do i access that application again to see if there is output
[22:54] <tomreyn> fg to put it into foreground again
[22:54] <TonyStone> ok... noted systemctl i will also read up on
[22:55] <TonyStone> awesome!!!  that is great for the time being!
[22:55] <TonyStone> so i am sure there would be arguments or parameters for fg command if i put several programs in the background...
[22:56] <TonyStone> except now i am stuck in that program tying up my terminal again... how do i get back out of it now that i did fg?
[22:56] <tomreyn> try "help bg"
[22:56] <tomreyn> or "help fg" for that matter
[22:57] <tomreyn> the "337886" you posted above is the process id of the process that you paused (using "&"), and later backgrounded.
[22:57] <TonyStone> ok will do... but then i have to exit the program i brought to fg. lol... i will get it now.. i am capable of reading help files.  my main problem is i dont know what to look for with some stuff that is very basic to lots of you guys, i am sure
[22:57] <tomreyn> "1" is the job spec
[22:58] <tomreyn> !terminal
[22:58] <tomreyn> !shell
[22:59] <tomreyn> try this guide
[23:00] <TonyStone> skimming that guide now :)
[23:00] <TonyStone> crtl+ R  thats gonna be a good one! lol
[23:03] <TonyStone> in the past couple days i have learned so many linux server related things... setting up TheLounge.... and there is still so much more to go!  i setup haproxy on my bsd firewall to access the server... i dont know how sys admins remeber all this stuff!
[23:06] <tomreyn> they don't, they use "help" and "somecomand --help" and most of all "man somecommand"
[23:06] <tomreyn> !man
[23:07] <TonyStone> !jobs
[23:07] <tomreyn> wrong channel, try #mac
[23:08] <TonyStone> thanks for getting me in the right direction
[23:08] <TonyStone> lol
[23:08] <sarnold> sometimes it's reading the source, too
[23:09] <sarnold> I definitely prefer --help or manpages when they have my answers :)
[23:09] <TonyStone> thats the beauty of open source!  but so far... hopefully i wont get into much that serious.... this is all hobby stuff for now
[23:10] <tomreyn> until you realize what a fine hobby that is
[23:10] <TonyStone> yes... i wish i stuck to computer programming and other stuff as a kid... then got a job in the feild... now im mainly a dumb(actually a smart and good)HVAC tech... haha
[23:11] <tomreyn> oh, there is also https://help.ubuntu.com/
[23:11] <TonyStone> yeah i have been in the ubuntu help site a good bit the past few days...
[23:12] <sarnold> TonyStone: there's pros and cons to everything; you're unlikely to be replaced by a team of a dozen in a far flung corner of the world
[23:12] <TonyStone> that is a valid point!
[23:15] <TonyStone> a cron job could be appropriate to automatically start my application after system start up as well?
[23:16] <sarnold> yes, that's very popular because it can be done with a single line in a single file. but it makes it very difficult to restart it properly, or check output from the program while it runs, etc
[23:16] <TonyStone> ahhh. ok.
[23:16] <sarnold> so even though it's easy I think you're better off to set up a systemd service file for the service, so you can stop and start it reliably after boot
[23:16] <TonyStone> so systemd is probably my best route
[23:17] <TonyStone> ok. perfect.
[23:17] <TonyStone> now my program needs to start with a sudo command.  that probably adds complexities... hmmm... reading up on systemd now
[23:18] <sarnold> systemd won't need that :)
[23:19] <TonyStone> so just use -uTheLoung TheLounge start
[23:19] <TonyStone> -u TheL....
[23:20] <TonyStone> because TheLounge documentation says it needs to run under the user TheLounge which i beleive it automatically created the user when i did the install
[23:21] <tomreyn> quite often, ubuntu (debian) packages will already provide systemd integration. how did you install the software?
[23:21] <TonyStone> just downloaded their .deb package
[23:22] <TonyStone> then sudo apt install theloung.....deb
[23:22] <sarnold> TonyStone: https://www.freedesktop.org/software/systemd/man/systemd.exec.html#User=
[23:22] <tomreyn> https://github.com/thelounge/thelounge-deb
[23:23] <tomreyn> looks like it comes with systemd service units but just doesn't enable them by default
[23:23] <TonyStone> omg! i missed all that on their dam page before!
[23:23] <TonyStone> systemctl enable --now thelounge.service   oops
[23:29] <TonyStone> welp... their system ctl unit seems to work fine... i think i missed that because i was using their getting started guide... and it doesnt seem to cover systemctl
[23:31] <TonyStone> well... this is pretty exciting... i had lots of little battles setting this thing up!  Between using LeetsEncrypt for valid SSL certificates... haproxy... and so many things i forgot... my https://lazarus.chat irc web client seems to be securely running!    thanks for your time tomreyn and sarnold
[23:35] <tomreyn> TonyStone: congrats. :) keep in mind that the internet *can* be a hostile place, there are constantly bots trying to hack into your services, so just setting things up is not enough, you'll need to maintain them
[23:37] <TonyStone> yeah... i am constantly installing updates... and i do have concerns of security.  i tried following lots of guides for setting up haproxy via my pfsense firewall... so... i think as of now i did things mostly properly.
[23:38] <TonyStone> i think there is some possible issues with my firewall configuration for some not so important issues... but man.. this is like a full time job! lol
[23:38] <TonyStone> i had also setup openvpn and was playing with that for a while... and i became concerned over security issues so i disabled that for now because there was things i didnt understand yet
[23:41] <TonyStone> i remeber back in the 90s doing some web sites. using CGI and perl.  on shared web hosting service.  i was storing my users personal info un-encrypted. ... then the shared server was misconfigured because i had access to everyone elses web sites via FTP and SSH... so god only knows if someone saw the info i stored... i was a kid... i was getting into things with not enough experience lol
[23:48] <tomreyn> TonyStone: you may want to check with the folks in #libera as to whether they're happy with you hosting a public web interface pointing at their servers. there can be reasons not to want this because it can be an entry point for abusive users, who they would not be able to ban (depending on how you have it configured)
[23:49] <TonyStone> i did discuss it with them in their IRC channel yesterday.  they didnt seem to be against it.  however it is gonna be public but for a small handful of people...
[23:49] <TonyStone> i may put some sort of access control on it