SOCSBC
Posts: 17
Joined: Thu May 31, 2018 4:12 pm
Location: Houston, Texas, U.S.A.

Using the terminal emulator, exclusively

Thu May 31, 2018 6:05 pm

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.

jahboater
Posts: 2783
Joined: Wed Feb 04, 2015 6:38 pm

Re: Using the terminal emulator, exclusively

Thu May 31, 2018 6:29 pm

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 [email protected]

/* 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 [email protected]" (say)
or when you "scp myfile [email protected]:"

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.

User avatar
DougieLawson
Posts: 33379
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Using the terminal emulator, exclusively

Thu May 31, 2018 7:05 pm

+1, that's how 14 of my 15 Raspberries run. The 15th has an official 7" touch screen.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

SOCSBC
Posts: 17
Joined: Thu May 31, 2018 4:12 pm
Location: Houston, Texas, U.S.A.

Re: Using the terminal emulator, exclusively

Thu May 31, 2018 10:42 pm

I'm glad to hear that I'm not alone. :D

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.

tpyo kingg
Posts: 148
Joined: Mon Apr 09, 2018 5:26 pm
Location: N. Finland

Re: Using the terminal emulator, exclusively

Fri Jun 01, 2018 4:55 am

SOCSBC wrote:
Thu May 31, 2018 10:42 pm
Any preferences for Alpine, Mutt, etc.? I'd love to be able to run nothing but Lite, tbh.
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.
SOCSBC wrote: I can't be the only person that this idea appeals to. Please share you experiences, advice, tips, etc.
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.

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.

rin67630
Posts: 121
Joined: Fri Mar 04, 2016 10:15 am

Re: Using the terminal emulator, exclusively

Fri Jun 01, 2018 5:11 am

jahboater wrote:
Thu May 31, 2018 6:29 pm
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.
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.

SOCSBC
Posts: 17
Joined: Thu May 31, 2018 4:12 pm
Location: Houston, Texas, U.S.A.

Re: Using the terminal emulator, exclusively

Fri Jun 01, 2018 2:05 pm

rin67630 wrote:
Fri Jun 01, 2018 5:11 am
...Can't understand why people want to miss the comfort of e.g. a file manager.
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.

rin67630
Posts: 121
Joined: Fri Mar 04, 2016 10:15 am

Re: Using the terminal emulator, exclusively

Fri Jun 01, 2018 2:23 pm

SOCSBC wrote:
Fri Jun 01, 2018 2:05 pm
Btw, check out the GNU Midnight Commander, if you haven't already seen it.
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.

SOCSBC
Posts: 17
Joined: Thu May 31, 2018 4:12 pm
Location: Houston, Texas, U.S.A.

Re: Using the terminal emulator, exclusively

Fri Jun 01, 2018 2:41 pm

rin67630 wrote:
Fri Jun 01, 2018 2:23 pm
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.
I love nano.

SOCSBC
Posts: 17
Joined: Thu May 31, 2018 4:12 pm
Location: Houston, Texas, U.S.A.

Re: Using the terminal emulator, exclusively

Wed Jun 13, 2018 1:10 am

My local store has Pi Zero W's, on sale, for $5., so I picked up another one. :mrgreen:

...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?

User avatar
The Traveler
Posts: 361
Joined: Sat Oct 21, 2017 3:48 pm

Re: Using the terminal emulator, exclusively

Wed Jun 13, 2018 1:25 am

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 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." ;)

Cheers.
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

SOCSBC
Posts: 17
Joined: Thu May 31, 2018 4:12 pm
Location: Houston, Texas, U.S.A.

Re: Using the terminal emulator, exclusively

Wed Jun 13, 2018 1:27 am

That's awesome.

...I just realized that there's no way to "rep" good posters, lol.

tpyo kingg
Posts: 148
Joined: Mon Apr 09, 2018 5:26 pm
Location: N. Finland

Re: Using the terminal emulator, exclusively

Wed Jun 13, 2018 6:21 am

SOCSBC wrote:
Wed Jun 13, 2018 1:10 am
Is there any way to open a .pdf without a GUI?
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.

SOCSBC
Posts: 17
Joined: Thu May 31, 2018 4:12 pm
Location: Houston, Texas, U.S.A.

Re: Using the terminal emulator, exclusively

Wed Jun 13, 2018 8:47 pm

tpyo kingg wrote:
Wed Jun 13, 2018 6:21 am
SOCSBC wrote:
Wed Jun 13, 2018 1:10 am
Is there any way to open a .pdf without a GUI?
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.
Thank you. I'll have to check into them. I'm still on my quest to be GUI-free. 8-)

SOCSBC
Posts: 17
Joined: Thu May 31, 2018 4:12 pm
Location: Houston, Texas, U.S.A.

Re: Using the terminal emulator, exclusively

Wed Jun 13, 2018 8:50 pm

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.

User avatar
The Traveler
Posts: 361
Joined: Sat Oct 21, 2017 3:48 pm

Re: Using the terminal emulator, exclusively

Wed Jun 13, 2018 9:23 pm

Code: Select all

pdftotext -layout file.pdf - | less
Is one way of doing it.

Cheers.
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

SOCSBC
Posts: 17
Joined: Thu May 31, 2018 4:12 pm
Location: Houston, Texas, U.S.A.

Re: Using the terminal emulator, exclusively

Wed Jun 13, 2018 11:45 pm

The Traveler wrote:
Wed Jun 13, 2018 9:23 pm

Code: Select all

pdftotext -layout file.pdf - | less
Is one way of doing it.

Cheers.
Fantastic! Worked just as needed. Thank you!

Four thumbs up! :D

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

Return to “Raspbian”

Who is online

Users browsing this forum: mfoglio and 22 guests