Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 06 Dec 2019, 03:03
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Misc
Without a GUI--How to Live Entirely in a Terminal
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 13387
Location: Arizona USA

PostPosted: Mon 01 Jul 2019, 00:45    Post subject:  Without a GUI--How to Live Entirely in a Terminal  

Without a GUI--How to Live Entirely in a Terminal
Quote:
by Bryan Lunduke
on June 28, 2019
Sure, it may be hard, but it is possible to give up graphical interfaces entirely—even in 2019.

About three years back, I attempted to live entirely on the command line for 30 days—no graphical interface, no X Server, just a big-old terminal and me, for a month.

I lasted all of ten days.

Why did I attempt this? What on Earth would compel a man to give up all the trappings and features of modern graphical desktops and, instead, artificially restrict himself to using nothing but text-based, command-line software, as if he were stuck in the early 1980s?

Who knows. Clearly, I make questionable decisions.

But you know, if I'm being honest, the experience was not entirely unpleasant. Sure, I missed certain niceties from the graphical side of things, but there were some distinct benefits to living in a shell. My computers, even the low-powered ones, felt faster (command-line software tends to be a whole lot lighter and leaner than those with a graphical user interface). Plus, I was able to focus and get more work done without all the distractions of a graphical desktop, which wasn't bad.

What follows are the applications I found myself relying upon the most during those fateful ten days, separated into categories. In some cases, these are applications I currently use over (or in addition to) their graphical equivalents.

Quite honestly, it is entirely possible to live completely without a GUI (more or less)—even today, in 2019. And, these applications make it possible—challenging, but possible. ...
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3665

PostPosted: Mon 01 Jul 2019, 06:27    Post subject:  

Doesn't have to be either/or, instead - combine both.

My Fatdog gui desktop has the panel at the bottom, menu as the first item ..etc. The 'usual' sort of desktop that we're all familiar with. The following images are thumbnails i.e. click to view.



For tui (text user interface) I use tilda as I like its Quake like drop down/hide by pressing F1 toggle type action. My first item (tab) shows a ncurses style menu, where keys or mouse clicks can activate programs, and where programs launch in a new tilda tab. I have tilda set to fill most, but not all of the screen, leaves a gap at the bottom so my gui desktop panel is still visible. That tilda ncurses style menu isn't restricted to just launching tui programs such as htop, but could also launch gui programs such as galculator or libre office/whatever.



On the tui side, I also connect to a ssh server, hashbang.sh in my case. When logged into that it runs a tmux session, and typically I have email (mutt) and irc running in separate tmux windows, the visible tmux window 4 in the following image is opening a BBS connection, where window 1 is email (mutt), window 2 is irc (irssi) ...etc.



Using a server for frontline email is good in the sense that its textual, and running on a server means that it has low risk of a 'bad' attachment type email being opened and infecting my local system. A filter, where emails I actually want can be forwarded to my gui based email account. Being a always on ssh server, I can leave irc etc. all running and simply just detach and attach at any time, from any device and its all still running as I last left it (but of course updated for any events that occurred whilst I was 'away'), and where someone else takes care of all the backups etc. involved in maintaining that server.

As that last image shows, my location is indicated as being in the US, whilst I'm actually in the UK, that's because of the ssh server I connect to being in the US. I can also route all of my browser (I prefer chrome) traffic via that ssh connection so that any web sites visited or dns lookup's all appear as though I were in the US, and my local IP (and UK government) snooping only sees a single ssh encrypted connection between me and that ssh server (they don't see what actually flows through that ssh tunnel).

For me, using tui alone is as restrictive as using gui alone. Why restrict yourself and miss out. Yes sometimes you may only have need for one or the other, for instance I now have my Fatdog boot setup so that I can drop to cli within initrd, where wireless network connection has already been established so I can ssh or whatever using cli. That's before the main fatdog fd64.sfs gets loaded, so no X/gui desktop, but only requires 75MB or so to boot. That could even pull down a different variant of the main sfs (fd64.sfs) over the net and then resume to booting that instead of booting the default local copy fd64.sfs. ... Flexibility/functionality.

The big Fatdog attraction for me is its multi-session usb functionality. Where I can boot from usb with the saves also on that same usb, but unplug it once booted, only needing to be reattached to boot again, or to save. Typically I don't save that often as I save data separately so saves primarily just reflect system updates, such as after I've updated google chrome. If you only save after installing/updating, then each new boot loads a desktop system that is as good as factory fresh/pristine. Known clean and virus free.

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
Colonel Panic


Joined: 16 Sep 2006
Posts: 2125

PostPosted: Mon 01 Jul 2019, 16:24    Post subject:  

Good article, especially for those of us with older computers. I use midnight commander a lot more than I do any graphical file manager anyway.
_________________
Packard Bell iMedia 6020 (AMD Athlon 3800+, 4 GB of RAM, 250 GB hard drive) running Sparky 2019.08 (current), Absolute 64, Mint Debian 3.0, CrunchBang++ 10.1, Siduction 18.3.0, VLocity 7.2, Puppy Precise 5.7.1 Large and Pardus 19.0 XFCE.
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3665

PostPosted: Tue 02 Jul 2019, 06:51    Post subject:  

mc as a file manager is indeed good. Its editor is also good (mcedit), supporting having multiple files open at the same time, cut and paste, word wrap etc. With mc you can add a simple menu file to a folder and the F2 Menu will show that specific menu, or failing that the main default menu that can also be easily configured. mc runs well on a remote box accessed via ssh, seemingly as quick as if it were being run locally. If you use that remote box also for calendar, email, irc ...etc. then someone else takes care of all the backups/integrity.

Even the likes of reddit can be nicer via a textual interface. Open a terminal window and try
Code:
ssh redditbox.us
for instance (tip type /puppylinux once in, and it will flip you over to the puppylinux area, down arrows to move up/down the listings, right arrow to read a listing).

But of course where textual is better in some cases, gui is better in others. LibreOffice or online googledocs, image editing, multimedia ...etc. Yes you can live with just one arm, tui or gui, but having/using both arms is so much better.

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3665

PostPosted: Wed 03 Jul 2019, 12:50    Post subject:  

See this post. Today I've opted to swap out usage of mcedit (that is part of mc i.e. alternatively launched with mc -e), with the FreePascal IDE (Interactive Desktop Environmen) launched by running 'fp').

I more prefer fp as a text editor, albeit intended as a developers code editor/compiler.

I didn't install the full fp set, instead just booted, installed fp and then copied the fp binary program to HDD, and rebooted without saving (so fp was 'uninstalled') and then copied that HDD preserved copy of the fp program into /usr/local/bin, so only the IDE/editor is actually available, and the saved (to make that change persistent across reboots).

The fp IDE is more intuitive/easy IMO for highlighting/cut/pasting, moving/resizing windows (including using the mouse) - and it even includes a calculator.


_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3665

PostPosted: Thu 04 Jul 2019, 19:25    Post subject:  

Bryan likes w3m for a browser, and I'd tend to agree. For some web sites its great, such as yahoo as pages load really quick, unlike a gui browser where the blitz of content can make it very laggy. For other web sites however, such as the PuppyLinux board, its OK if running under X where you can scale down the font size to better fit the content to the screen (see attached), but the web site layout isn't really well designed for the likes of w3m when running in a console.


_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3665

PostPosted: Sun 07 Jul 2019, 11:26    Post subject:  

Text User Interface (TUI), can be set to a comfortable screen size/resolution. I tend to use 640x400 myself (terminus 32 bit bold font - that also works well with telnet'ing into BBS's). Nice to avoid having to go -_- wth your eyes. Some web sites totally distract you with popups/ads ..etc. so for those web sites a text only browser such as w3m can be nice (yahoo for instance is very quick via w3m, view it using a gui browser and its sluggish).

hashbang is a good ssh server, free and functional from the get-go. The hashbang server code is in github so you could alternatively set up your Debian home based server (PC) to use that instead - but for convenience (out of box), using hashbang is a good starting point IMO. With that you can socks proxy i.e. set things up to route all your internet traffic via that ssh link/tunnel, and it runs tmux by default, with weechat (irc), mutt (email) already activated. A nice thing about that is you can reboot your local end/PC, and the things running on the server continue running, all ready to be accessed again, perhaps from a different device/location. I prefer to keep irc and mail running on the ssh server myself, just attach (tmux attach) and detach (ctrl-b d) as desired. If I want another tmux window then ctrl-b c creates one, and then perhaps run w3m google.com to fire up the browser in that window. ctrl-b n steps to the next tmux window (or ctrl-b 1 (or any window number) to jump directly to that tmux window. Awkward at first, but relatively quickly to start to do those actions instinctively.

For me, tilda terminal is a nice to the local system, I like the F1 to show/hide it (Quake style), so when set to full screen (or a little less i.e. I like to still have my Fatdog panel at the bottom of screen still visible), then you can toggle between tui and gui quickly. Fatdog doesn't come with tilda, so its a add-in. Fatdog does however come with sshfs-fuse by default, so you can mount your hashbang home folder so it appears as just another local folder. With ssh configured sshfs mounting your ssh server (such as hashbang) is as easy as
Code:
mkdir /hashbang
sshfs userid@ny1.hashbang.sh:/home/userid /hashbang

(replacing userid with your actual hashbang userid)

I like to store my tui main menu on the server, i.e store and run it via the sshfs mount (my /hashbang folder), and I sshfs mount as soon as I boot, so once connected the ssh keys (~/.ssh folder) can be encrypted/hidden for the rest of the session (less chance of the private keys being copied/stolen). I have it set so that clicking on any menu option in the tui menu opens up a new tilda tab with that program (menu choice) loaded. To achieve that I installed xdotool and have a script function to add another tilda tab
Code:
_tab () {
      # escape code to change a tilda terminals tab label
      # and run a command in the tab
      #
      # $1 label to set tab title to
      # $2 command to run on tab

      newtitle=$1
      command=$2
      esc="\"\\x1B]2;${newtitle}\\x07\""
      xdotool key ctrl+T            # add a new tilda tab
      xdotool type 'echo -e ' $esc
      xdotool key KP_Enter
      xdotool type "$command"
      xdotool key KP_Enter
}

For some things, tui is best, for others gui is best, you tend to soon find what suits you best relatively quickly - a form of natural selection. Predominately for me tui involved becoming familiar with tilda, ssh, tmux, irssi, mutt and mc (along with mcedit) and even then I use them in a limited manner i.e. mostly just a handful of common/basic commands. Scripting ability is also required, such as writing your own bespoke tui menu, but that can be moderately easy if you just tweak a pre-existing one that's already out-there. Fatdog already comes with mc (that includes mcedit), so fundamentally a reasonable combined tui/gui under fatdog requires just installing tilda and registering for a hashbang acount in addition - and educating yourself as to how to set up and use the tui (ssh, tmux etc.).

Best of both worlds is far better than being pedantic about sticking solely with one-or-tother.

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
Colonel Panic


Joined: 16 Sep 2006
Posts: 2125

PostPosted: Wed 28 Aug 2019, 11:48    Post subject:  

I don't know if this will work for posters outside the UK, but George Ornbo has just posted a fantastic use for the mpv media player.

With mpv installed, typing or pasting this link into a terminal will bring up BBC 6 Music;

mpv 'http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8'

I've just done it and got Rush's Tom Sawyer Smile

https://shapeshed.com/listening-to-bbc-radio-with-mpv/#listening-with-mpv

_________________
Packard Bell iMedia 6020 (AMD Athlon 3800+, 4 GB of RAM, 250 GB hard drive) running Sparky 2019.08 (current), Absolute 64, Mint Debian 3.0, CrunchBang++ 10.1, Siduction 18.3.0, VLocity 7.2, Puppy Precise 5.7.1 Large and Pardus 19.0 XFCE.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1554
Location: Drøbak, Norway

PostPosted: Wed 28 Aug 2019, 17:22    Post subject:  

I did the same at the uni, we found the server at nrk, our version of bbc. I used the original mplayer in a terminal, not the mpv, to download the programs while listening, they had the wma format. A weekly program with 2 hours of club music, which no other radio stations played at the time. Ahh, those were the times...
Hmm, still have the programs from 2008/2009!

Code:
23:24 ~ # mpv 'http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8'
Playing: http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8
[ytdl_hook] youtube-dl failed, trying to play URL directly ...
[ffmpeg] http: HTTP error 403 Forbidden
[lavf] avformat_open_input() failed

Playing: http://as-hls-uk-live.akamaized.net/pool_904/live/uk/bbc_6music/bbc_6music.isml/bbc_6music-audio%3d320000.norewind.m3u8
[ytdl_hook] youtube-dl failed, trying to play URL directly ...
[ffmpeg] http: HTTP error 403 Forbidden
Failed to open http://as-hls-uk-live.akamaized.net/pool_904/live/uk/bbc_6music/bbc_6music.isml/bbc_6music-audio%3d320000.norewind.m3u8.


Exiting... (Some errors happened)

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
Colonel Panic


Joined: 16 Sep 2006
Posts: 2125

PostPosted: Mon 16 Sep 2019, 07:27    Post subject:  

Many people here already know this, but inxi is a very good command-line system information utility whose output can be piped to a file like inxi.txt. If you want a comprehensive display of the information, use the -F switch; inxi -F.
_________________
Packard Bell iMedia 6020 (AMD Athlon 3800+, 4 GB of RAM, 250 GB hard drive) running Sparky 2019.08 (current), Absolute 64, Mint Debian 3.0, CrunchBang++ 10.1, Siduction 18.3.0, VLocity 7.2, Puppy Precise 5.7.1 Large and Pardus 19.0 XFCE.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Misc
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1150s ][ Queries: 12 (0.0152s) ][ GZIP on ]