=== genii is now known as genii-core === thegodsquirrel is now known as thebotsquirrel === thebotsquirrel is now known as thegodsquirrel === genii-core is now known as genii [22:44] 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] 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] !tty | TonyStone [22:47] TonyStone: To get to the TTY terminals 3-6, use the keystroke Ctrl + Alt + F3-F6 respectively. Ctrl-Alt-F2 or Ctrl-Alt-F1 will get you back to your graphical login (Ctrl-Alt-F7 on 16.04). To change TTY resolution, see https://help.ubuntu.com/community/ChangeTTYResolution [22:47] there is no graphical login... hmmm [22:48] there are also so-called terminal multiplexers which can also give you multiple 'screens', such as tmux (and byobu) and GNU screen [22:48] it's a server, that's why there's no graphical login [22:48] so when i SSH into my ubuntu server i can have different terminals via ctrl-alt f2-f6 m..... im trying now [22:49] 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] lol... except the ctrl-alt f3 changes my desktop to a terminal... [22:49] gotta send it through the ssh client some how... ok [22:49] 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] space between & BG ? [22:50] oh you're not sitting in front of the server, connected with ssh, then tty switching by hotkeys won't work [22:50] im gonna need them to start automnatically... so i will read up on systemd unit files [22:50] enter between & and bg [22:50] yeah i am remote [22:51] ok im trying these now... hold on... ill be a half-arsed linux admin some day! lol [22:51] ok the & works great! [22:52] 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] so i have my server setup with TheLounge IRC web client... [22:53] 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] so when i type BG it shows tony@irontowel:~$ sudo -u thelounge thelounge start & [22:53] [1] 337886 [22:53] tony@irontowel:~$ bg [22:53] [1]+ sudo -u thelounge thelounge start & [22:53] 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] sorry if i posted too many lines here... so now how do i access that application again to see if there is output === genii is now known as genii-core [22:54] fg to put it into foreground again [22:54] ok... noted systemctl i will also read up on [22:55] awesome!!! that is great for the time being! [22:55] so i am sure there would be arguments or parameters for fg command if i put several programs in the background... [22:56] 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] try "help bg" [22:56] or "help fg" for that matter [22:57] the "337886" you posted above is the process id of the process that you paused (using "&"), and later backgrounded. [22:57] 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] "1" is the job spec [22:58] !terminal [22:58] The linux terminal or command-line interface is very powerful. In Unity or GNOME, search the dash for "terminal" and press ENTER. Other desktops: Applications -> System Tools -> Terminal (MATE), K-menu -> System -> Konsole (KDE), or Menu -> Accessories -> LXTerminal (LXDE). Guide: https://help.ubuntu.com/community/UsingTheTerminal [22:58] !shell [22:59] try this guide [23:00] skimming that guide now :) [23:00] crtl+ R thats gonna be a good one! lol [23:03] 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] they don't, they use "help" and "somecomand --help" and most of all "man somecommand" [23:06] !man [23:06] The "man" command brings up the Linux manual pages for the command you're interested in. Try "man intro" at the command line, or see https://help.ubuntu.com/community/UsingTheTerminal | Manpages online: http://manpages.ubuntu.com/ [23:07] !jobs [23:07] wrong channel, try #mac [23:08] thanks for getting me in the right direction [23:08] lol [23:08] sometimes it's reading the source, too [23:09] I definitely prefer --help or manpages when they have my answers :) [23:09] 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] until you realize what a fine hobby that is [23:10] 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] oh, there is also https://help.ubuntu.com/ [23:11] yeah i have been in the ubuntu help site a good bit the past few days... [23:12] 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] that is a valid point! [23:15] a cron job could be appropriate to automatically start my application after system start up as well? [23:16] 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] ahhh. ok. [23:16] 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] so systemd is probably my best route [23:17] ok. perfect. [23:17] now my program needs to start with a sudo command. that probably adds complexities... hmmm... reading up on systemd now [23:18] systemd won't need that :) [23:19] so just use -uTheLoung TheLounge start [23:19] -u TheL.... [23:20] 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] quite often, ubuntu (debian) packages will already provide systemd integration. how did you install the software? [23:21] just downloaded their .deb package [23:22] then sudo apt install theloung.....deb [23:22] TonyStone: https://www.freedesktop.org/software/systemd/man/systemd.exec.html#User= [23:22] https://github.com/thelounge/thelounge-deb [23:23] looks like it comes with systemd service units but just doesn't enable them by default [23:23] omg! i missed all that on their dam page before! [23:23] systemctl enable --now thelounge.service oops [23:29] 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] 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] 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] 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] 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] 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] 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] 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] 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] i may put some sort of access control on it