The Text-User Interface

Using applications, configuring, problems
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#101 Post by technosaurus »

gunzip *
gunzip *
tar -xf *

(you probably don't need the 2nd gunzip)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#102 Post by technosaurus »

Here is a little script I wrote to download and allow older versions of flash to work on websites that require a newer version unnecessarily (by faking the version number)
Flash7 will work on non-gtk2 browsers
Flash9 is smaller, has much fewer dependencies (no mozilla libs) and is still being updated (for enterprise linux distros)
Flash10.X default is to install the latest version in case of a site that actually requires features that are only in 10.x.

Code: Select all

#!/bin/sh
case $1 in
--help)echo "options are:
7 for smallest size and dependencies,
9 for medium size and fewer dependencies
  for latest version leave options blank"
;; 

#download all flash7 & fake latest as 10.1 r9
7)wget -c http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp7_archive.zip
unzip fp7_archive.zip
tar -xf fp7_archive/r73/install_flash_player_7_linux_r73.tar.gz
cat install_flash_player_7_linux/libflashplayer.so |sed -e "s/7.0 r73/10.1 r9/g" >/usr/lib/mozilla/plugins/libflashplayer.so
rm -rf fp7_archive.zip install_flash_player_7_linux_r73.tar.gz install_flash_player_7_linux fp7_archive
yaf-splash -text "flash7 installed as flash10.1" -transparent -bg red -timeout 10
;;

#download latest flash9 & fake install as 10.1 r99
9)wget -c http://download.macromedia.com/pub/flashplayer/installers/current/9/install_flash_player_9.tar.gz
tar -xf install_flash_player_9.tar.gz
VER=`strings libflashplayer.so | grep -e "^Shockwave Flash [.\d+]*" | sed -e "s/Shockwave Flash //g"`
cat libflashplayer.so |sed -e "s/$VER/10.1 r99/g" >/usr/lib/mozilla/plugins/libflashplayer.so
rm -f libflashplayer.so install_flash_player_9.tar.gz
yaf-splash -text "flash9 installed as flash10.1" -transparent -bg red -timeout 10
;;

#download and install latest flash
*)wget -c http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz
tar -xf install_flash_player_10_linux.tar.gz
mv -f libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so
rm -f install_flash_player_10_linux.tar.gz
yaf-splash -text "latest flash installed" -transparent -bg red -timeout 10
;;
esac
exit
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

ds2dys
Posts: 14
Joined: Sat 11 Sep 2010, 19:27
Location: Ontario, Canada

#103 Post by ds2dys »

Wow! :shock:

This was my only word came out from my mouth when I clicked through page numbers to find over 90 chapters.
This is amazing lecture for people who want to learn about Linux like me. I'm going to start from the Chapter 1 now.

Thank you very much for sharing this valuable knowledge.

:D :D :D

eriksatie
Posts: 41
Joined: Tue 07 Jun 2011, 03:27

#104 Post by eriksatie »

ds2dys wrote:Wow! :shock:

This was my only word came out from my mouth when I clicked through page numbers to find over 90 chapters.
This is amazing lecture for people who want to learn about Linux like me. I'm going to start from the Chapter 1 now.

Thank you very much for sharing this valuable knowledge.

:D :D :D
I would like to second this notion. I'm still on the first page, but I will be making my way to the rest of the chapters in due time.

Thank you so much for taking the time to teach us linux newbies the TUI!

8)

Superdooper
Posts: 4
Joined: Sun 28 Aug 2011, 21:12

Thanks

#105 Post by Superdooper »

Thanks for the tutorial! Wow im amazed some one took the time to write this up. Hopefully you will get the time to continue the series. Thanks again! :D

User avatar
MrDurtal
Posts: 7
Joined: Sat 23 Apr 2011, 01:05

Excellent source of help!

#106 Post by MrDurtal »

Thanks very much for all of the effort.

MrDurtal

User avatar
rhadon
Posts: 1292
Joined: Thu 27 Mar 2008, 11:05
Location: Germany

#107 Post by rhadon »

Hi,

I have a general question. I can write

Code: Select all

if ...condition...;then
   do this...
fi
if not...condition...;then
   do that...
fi
or I can write

Code: Select all

if ...condition...;then
   do this...
else
   do that...
fi
It looks to me that the last one is 'better style' but is it really better, maybe faster?

Concrete example, with slacko 5.3.2.1 in rcsysinit, ~line 754 is written:

Code: Select all

#save button on desktop when booted from flash drive...
if [ $PUPMODE -eq 3 -o $PUPMODE -eq 7 -o $PUPMODE -eq 13 ];then #pup_rw is tmpfs.
 if [ "`cat /root/Choices/ROX-Filer/PuppyPin | grep "save2flash"`" = "" ];then
  echo '<icon x="768" y="128" label="save">/usr/sbin/save2flash</icon>' >> /root/Choices/ROX-Filer/PuppyPin
  cat /root/Choices/ROX-Filer/PuppyPin | grep -v '/pinboard' > /tmp/PuppyPin-CPY
  sync
  cp -f /tmp/PuppyPin-CPY /root/Choices/ROX-Filer/PuppyPin
  echo '</pinboard>' >> /root/Choices/ROX-Filer/PuppyPin
 fi
fi
I added:

Code: Select all

if ! [ $PUPMODE -eq 3 -o $PUPMODE -eq 7 -o $PUPMODE -eq 13 ];then #pup_rw is tmpfs.
 if ! [ "`cat /root/Choices/ROX-Filer/PuppyPin | grep "save2flash"`" = "" ];then
	cat /root/Choices/ROX-Filer/PuppyPin | grep -v "^<icon x=\"768\" y=\"128\" label=\"save\"" >/tmp/PuppyPin-CPY
	cp -f /tmp/PuppyPin-CPY /root/Choices/ROX-Filer/PuppyPin
	echo '</pinboard>' >> /root/Choices/ROX-Filer/PuppyPin
 fi
fi
Is it worth to change?

Thanks,
Rolf
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#108 Post by 01micko »

Hi Rolf..
Is it worth to change?
Probably yes!

But it's embedded in woof and getting upstream changes like that are difficult as there are always more pressing issues.

[One example is how gdk-pixbuf-query-loaders is run since gtk+2.20 , I tried to get Barry to change it to the correct call from what I researched but to no avail, I patch it every time I build slacko]

I would do it completely differently...

Code: Select all

case $PUPMODE in
3|7|13)
(code for whatever goes here)
;;
*)echo
;;
esac
:)
Puppy Linux Blog - contact me for access

User avatar
rhadon
Posts: 1292
Joined: Thu 27 Mar 2008, 11:05
Location: Germany

#109 Post by rhadon »

Thanks Mick :D

I wasn't aware about '*)' in case...esac. Will give it a try.

I also know that it's only for one special version. If woof changes (I know it does often :lol: ), everything must be done again and maybe it doesn't work in newer versions or at least it must be changed. Too annoying to do it everytime. But a good feeling to be able to do so and it works. That's the fun. :lol:

Cheers
Rolf
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.

SkullyRipz
Posts: 24
Joined: Fri 02 Mar 2012, 16:50

#110 Post by SkullyRipz »

Bruce...

... thank you. :D This is exactly what I needed. I appreciate all the time spent. Its very well put together and easy to follow.
[b]Lucid 5.2.8 Frugal[/b]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#111 Post by rufwoof »

Reviving this old but excellent thread

Text User Interface isn't just a # (root) or $ (user) prompt and having to type in commands, it also includes ncurses or similar 'screens' as well.

Here are some snapshots of some of mine for instance http://murga-linux.com/puppy/viewtopic. ... 23#1029923. Where I use tilda as my preferred terminal, that is sized to near full screen (but leaves the bottom gui tray still visible), and where that tui shows/hides when toggled by pressing F1. Quick and easy access to both tui and gui.

So for instance pressing F1 with my tui (tput based) MENU being shown, that includes a range of options such as 'r' to reboot - then F1, r, Enter and the system starts to reboot.

I have that tui arrangement all auto-load at startup, so they're all accessible from the get-go. Two/three keypresses typically to get to a wide range of programs. In addition to the images in the link above I do also have wordgrinder and sc for tui based word processing and spreadsheet, but tend to prefer gui based versions of those myself (libreoffice). Although sc can be handy as a form of more advanced 'calculator'.

Image

A nice feature with tilda as the terminal is that it supports right click context cut/paste options and also simple clicking (later versions, with Fatdog (older version of tilda) you have to use ctrl click) of url links to open the link in whichever browser you have set by default (I like chrome). Which means you can have a simple text file of your bookmarks/links, perhaps with that text file being displayed using mc editor, for quick and easy access/launch of those bookmarks. Keeping your bookmarks outside of the browser also means that you can start each session (reboot), with a brand new/fresh version of the system and browser (less cookies/tracking).

I love being able to boot Fatdog using a usb, and have everything loaded into ram, including multi-session saves, such that the usb can be unplugged after bootup. No risk whatsoever of the mbr, vmlinuz, initrd, main sfs or saves being compromised due to being physically disconnected. cli/tui has advantages in some cases/usage, disadvantage in other cases/usage. Quick and easy access to both tui and gui opens up the benefits of being able to select which to use at any one time that best meets your needs/objectives.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#112 Post by rufwoof »

Hi comfi
Enhancing our TUI

This chapter is for the purpose of improving your Text User Interface, making it an easier, more pleasant and powerful working environment.

We will install two applications from Puppy's official repository

Add the terminal emulator mrxvt

mrxvt-0.5.2.pet

The reason why is, because its better than rxvt, in a number of areas. Of particular importance to me is the handling of F keys and the eol (end of line) and bol (beginning of line).

Puppy includes a great TUI text editor 'mp' ( Minimum Profit ), but rxvt doesn't handle the bol and eol as it should for some reason, thus making working with mp quite difficult.

Add Midnight Commander

mc-4.6.1.pet
If mc doesn't run - maybe you need gpm-1.20.1.pet

Run Midnight Commander by typing mc in terminal emulator. It is a very powerful, extensible and time honored file manager for the TUI.
mc comes with its own text editor, that you can run with either 'mc -e' or 'mcedit'

Within the options for that is a 'learn keys' function. Takes a lot of tabbing (around 38 tabs on mine to reach the HOME choice, and then another 8 to get to the Save button), but you can set it so that the likes of HOME, END ...etc. match your actual choice of terminal keys.

mcedit also supports multiple files open at the same time and where you can cut to clipfile, paste from clipfile between files. The function keys aren't well defined for that however (would be nice to have a 'in house' variant that was compiled with better Fn key definitions).

mp doesn't work well on the console in my experience. And if/when you start ssh'ing around, more often mc will be available on linux servers.

EDIT : Weird, comfi's post seems to have disappeared, so I've edited this post to quote it.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

williams2
Posts: 337
Joined: Fri 14 Dec 2018, 22:18

#113 Post by williams2 »

Puppy includes a great TUI text editor 'mp' ( Minimum Profit ), but rxvt doesn't handle the bol and eol as it should for some reason, thus making working with mp quite difficult.
The home and end keys seem to work in a urxvt terminal using mp in bionicPup64-8.0

Home and End do not seem to work using mp in the console (no X).
But it does work properly if you set

TERM=linux

User avatar
Makoto
Posts: 1665
Joined: Fri 04 Sep 2009, 01:30
Location: Out wandering... maybe.

#114 Post by Makoto »

rufwoof wrote:EDIT : Weird, comfi's post seems to have disappeared, so I've edited this post to quote it.
comfi was a spambot. Its post in this thread was ripped from Bruce B's post at the beginning of the thread, without style formatting and links.
[ Puppy 4.3.1 JP, Frugal install ] * [ XenialPup 7.5, Frugal install ] * [XenialPup 64 7.5, Frugal install] * [ 4GB RAM | 512MB swap ]
In memory of our beloved American Eskimo puppy (1995-2010) and black Lab puppy (1997-2011).

User avatar
gcav
Posts: 104
Joined: Fri 25 May 2012, 04:12
Location: Ontario

telehack...

#115 Post by gcav »

for the tui/cli aficionados...

try telnet telehack.com

g

Post Reply