Using the terminal emulator, exclusively
I mentioned this in another post, but thought that it might merit its own topic. Is there anyone here that spends the majority of their time in the terminal emulator? I had the idea to do this, went online, and found a few articles by Bryan Lunduke ( https://www.networkworld.com/article/30 ... minal.html , for example). I can't be the only person that this idea appeals to. Please share you experiences, advice, tips, etc.
Re: Using the terminal emulator, exclusively
Yes, many people have "headless" Pi's (that is, without a terminal or screen attached).
You can run a GUI desktop using VNC, but 99.99% of the time I just ssh into a Pi in a terminal window.
So yes, this is routine!
Its common for people to have multiple Pi's running 24/7. You cant have a screen/keyboard/mouse attached to all of them.
You wanted tips:
Setup password-less public/private key authentication. Its much quicker as you do not need to give a password every time you "ssh" into the Pi or "scp" files back and forth.
ssh-keygen -t rsa
ssh-copy-id pi@yourhostname
/* you can ssh-copy-id the key to any number of Pi's */
From now on you don't need a password when you "ssh pi@yourhostname" (say)
or when you "scp myfile pi@yourhostname:"
Tip 2:
Use the Raspbian Lite image if you are happy without the GUI, its smaller to download etc and has a lot less processes running.
You can run a GUI desktop using VNC, but 99.99% of the time I just ssh into a Pi in a terminal window.
So yes, this is routine!
Its common for people to have multiple Pi's running 24/7. You cant have a screen/keyboard/mouse attached to all of them.
You wanted tips:
Setup password-less public/private key authentication. Its much quicker as you do not need to give a password every time you "ssh" into the Pi or "scp" files back and forth.
ssh-keygen -t rsa
ssh-copy-id pi@yourhostname
/* you can ssh-copy-id the key to any number of Pi's */
From now on you don't need a password when you "ssh pi@yourhostname" (say)
or when you "scp myfile pi@yourhostname:"
Tip 2:
Use the Raspbian Lite image if you are happy without the GUI, its smaller to download etc and has a lot less processes running.
- DougieLawson
- Posts: 40828
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: Using the terminal emulator, exclusively
+1, that's how 14 of my 15 Raspberries run. The 15th has an official 7" touch screen.
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: Using the terminal emulator, exclusively
I'm glad to hear that I'm not alone.
Has anyone set-up e-mail via the CL? Any preferences for Alpine, Mutt, etc.? I'd love to be able to run nothing but Lite, tbh.

Has anyone set-up e-mail via the CL? Any preferences for Alpine, Mutt, etc.? I'd love to be able to run nothing but Lite, tbh.
-
- Posts: 982
- Joined: Mon Apr 09, 2018 5:26 pm
- Location: N. Finland
Re: Using the terminal emulator, exclusively
You're changing the topic in the thread, but to answer your new topic first I think the trend is with Mutt these days. I haven't more than looked at Mutt though. I much prefer Alpine and use it still rather often. However, there are some problems with it and Gmail in that you can't undelete a message once it is marked for deletion. That is apparently due to a broken IMAP/IMAPS implementation at Google. Like with other mail clients, you can use them with multiple mail accounts simultaneously.
Back to the original question, shell access is the first thing I set up in most cases. Sometimes I arrange SSH connectivity even before booting the RPi (or other machines) for the first time. For me it is just the fastest, easiest, most flexible way of dealing with the system for many activities. It is also irrelevant then whether the machine is on your desk, in the server room, or on the other side of the planet. I usually connect via SSH but sometimes also have the machine set up to use a serial cable either directly or via a jump host. If you use serial cables, watch out for the cheap cables without serial numbers Without electronic identifiers inside the cables themselves the associations can change after resume from sleep or a reboot so that the cable that was ttyUSB0 swaps places with ttyUSB1 or ttyUSB2 and so on. The serial numberless cables work great when there is just one by itself though. But I digress.SOCSBC wrote: I can't be the only person that this idea appeals to. Please share you experiences, advice, tips, etc.
The only downside is the fear of the UI that a certain large company has paid many tens of millions over many years to cultivate, mainly because they had and continue to have no alternative.
Going via the shell makes it easy to automate activities and diverse systems are far more similar when seen from the shell. Both are advantages. Usually the first package I install is "tmux" and I go into that directly upon login so I can use the mouse less. There's nothing wrong with a mouse but removing fingers from the keyboard has a heavy cost in time and motion and focus. Some take it further and install a window manager like RatPoison to handle their graphical UI.
The de facto standard UI these days for what you are planning is "bash". Years ago it was other shells which I won't name. But if you are just starting out you might look at the "zsh" UI for your user account instead at least for a while. You may end up back at "bash" but having tried a second UI first will give you a clearer picture of what tool you have to work with.
Re: Using the terminal emulator, exclusively
I am also running all my Pi's headless. But using VNC from which I start bash, when I need to get into a console.
Can't understand why people want to miss the comfort of e.g. a file manager.
Re: Using the terminal emulator, exclusively
I'm a product of late 70's-80's computing (Coleco Adam, anyone?), and I'm just getting back into computer science. The terminal emulator feels very comfortable to me, and I like the idea of going GUI'less. Reading news in ELinks, after you get used to navigating the page and toggling the color scheme to your liking, is really enjoyable. Less distractions, and pages load faster. Btw, check out the GNU Midnight Commander, if you haven't already seen it. It sounds like a super hero with tendencies, but it's actually a fantastic file manager for the terminal.
I didn't think I was jumping around from topic to topic, please forgive me if I do, but to my original point: if anyone knows of any programs that make life in the CLI better, please share. So far I've added ELinks, cmus, rtv, Midnight Commander, and WordGrinder.
And since I'm easily distracted by squirrels and shiny objects, may I now take a moment and say how much I love Raspbian? Fantastic work.
Re: Using the terminal emulator, exclusively
Once upon a time I used to use Norton Commander, from which MC is a clone. I preferred Xtree.
But I am living in the current millenium, which does not prevent me to use nano whereas it is convenient.
Re: Using the terminal emulator, exclusively
My local store has Pi Zero W's, on sale, for $5., so I picked up another one.
...anyway.
I have a lot of really cool programs installed for CLI-only computing, but have a question for the more knowledgeable amongst you:
Is there any way to open a .pdf without a GUI? I installed xpdf, but it won't open my .pdf files. I feel pretty proud about making directories, mounting a usb, and copying files without the help of a GUI, but "see", "cat", and "xpdf <name of file>" don't work to open. CMUS opens the .mp3's, beautifully, but I'd like to be able to read more than nano txt documents. Any suggestions?

...anyway.
I have a lot of really cool programs installed for CLI-only computing, but have a question for the more knowledgeable amongst you:
Is there any way to open a .pdf without a GUI? I installed xpdf, but it won't open my .pdf files. I feel pretty proud about making directories, mounting a usb, and copying files without the help of a GUI, but "see", "cat", and "xpdf <name of file>" don't work to open. CMUS opens the .mp3's, beautifully, but I'd like to be able to read more than nano txt documents. Any suggestions?
- The Traveler
- Posts: 403
- Joined: Sat Oct 21, 2017 3:48 pm
Re: Using the terminal emulator, exclusively
I use it exclusively. One reason is that I test and use different distros on the RPi. So, instead of hassling around with different pixel-based GUIs and their quirks, (and resource hogging) I can have a set of common command line tools for working that exist in most distros. I love nano for an editor and use the command line extensively. I like the philosophy of "Do one thing and do it well" because as the illustrious Mr. Scott of the Starship Enterprise once noted, "The more they overthink the plumbing, the easier it is to stop up the drain."I mentioned this in another post, but thought that it might merit its own topic. Is there anyone here that spends the majority of their time in the terminal emulator?

Cheers.
RPi interests: Coding an Infinite Improbability Drive. In C.
Old Assembler programmers don't die. They just disassemble.
Old Assembler programmers don't die. They just disassemble.
Re: Using the terminal emulator, exclusively
That's awesome.
...I just realized that there's no way to "rep" good posters, lol.
...I just realized that there's no way to "rep" good posters, lol.
-
- Posts: 982
- Joined: Mon Apr 09, 2018 5:26 pm
- Location: N. Finland
Re: Using the terminal emulator, exclusively
Kind of. It really depends on what is in the PDF. If there is any text, and not just pictures of text, then you might be able to get it with either or both of the pdf2htmlex or pstotext utilities. Both are in the repository.
Re: Using the terminal emulator, exclusively
Thank you. I'll have to check into them. I'm still on my quest to be GUI-free.tpyo kingg wrote: ↑Wed Jun 13, 2018 6:21 amKind of. It really depends on what is in the PDF. If there is any text, and not just pictures of text, then you might be able to get it with either or both of the pdf2htmlex or pstotext utilities. Both are in the repository.

Re: Using the terminal emulator, exclusively
By the way, if you're like me, and you want to check your e-mail from the command line, this is a great tutorial for mutt set-up:
https://www.sbprojects.net/projects/ras ... i/mutt.php
I used this to configure mine, quite painlessly. Most guides are pretty tiring to look at, but this ^^^^ one is really straightforward and easy. Now I'll just have to spend some time in the user's manual to get used to the commands. Really cool, though.
https://www.sbprojects.net/projects/ras ... i/mutt.php
I used this to configure mine, quite painlessly. Most guides are pretty tiring to look at, but this ^^^^ one is really straightforward and easy. Now I'll just have to spend some time in the user's manual to get used to the commands. Really cool, though.
- The Traveler
- Posts: 403
- Joined: Sat Oct 21, 2017 3:48 pm
Re: Using the terminal emulator, exclusively
RPi interests: Coding an Infinite Improbability Drive. In C.
Old Assembler programmers don't die. They just disassemble.
Old Assembler programmers don't die. They just disassemble.
Re: Using the terminal emulator, exclusively
Fantastic! Worked just as needed. Thank you!The Traveler wrote: ↑Wed Jun 13, 2018 9:23 pmIs one way of doing it.Code: Select all
pdftotext -layout file.pdf - | less
Cheers.
Four thumbs up!

https://www.xpdfreader.com/pdftotext-man