Contents

Editorial



January 2017

To make Notecase wordwrap the text and remember the GUI dimensions, press F7, make sure "Restore last position/size" is ticked, and under the display tab make sure "Wrap text" is ticked.

This is not the first time a newsletter has been suggested for Puppy Linux, however, it may be the first time that it has progressed further than ideas. Its life will depend on user support.

There have been a few regular members of the Puppy Linux Forum discussing the newsletter over the past few days. You can read all about it here.

One of the nice features of using Notecase as a medium, articles (nodes) can be exported and then imported into your own collection of nodes. You may have seen my "Puppy Help 101" which was developed as an interactive help in Notecase.

If you have information you would like to see in the newsletter please email it to smokey01 at smokey01@internode.on.net. It must be created in notecase otherwise it makes my job far too difficult. I don't intend doing any significant editing but I will read all of the articles and ask a couple of others to do some proof reading. If you would like to assist in proof reading please let me know on the email address above.

Contributions

If you would like to contribute to the newsletter it must be created in notecase. It's very easy to learn and use. Try and keep your articles to less than 1000 words. Photos and images should be no bigger than 1024 x 768.

The deadline for articles is the 20th of each month. Let's not worry about time zones. I know it may be the 20th in Australia and only the 19th in the USA but I can live with this. If it's more than 24 hours late with respect to Australian CST then your article may be pushed right into the next edition. I expect proof reading to take less than a week which will provide about four days to publish at the beginning of each month.

I will upload the Newsletter to my site at http://smokey01.com/newsletters. There will be two versions. One will be an xz compressed notecase file and the other will be a html file so it can be read in a browser. The naming convention will be pln-2017-01.ncd.xz and pln-2017-01.html respectively. The formatting of the html is not brilliant but readable. The newsletter is intended to be downloaded and read in notecase.

I will take this opportunity to wish everyone a Merry Christmas and a Happy New Year.

Disclaimer

The editor has the right to veto any articles that he/she considers inappropriate. A reasonable effort will be made to avoid spelling and grammatical errors however, I'm sure some will slip through. This newsletter is published by volunteers, and is free, so please be kind. Constructive criticism is acceptable.

### End ###

Distros

The Puppy Linux Forums is the main source for a lot of the information repeated here. Where appropriate, links will be provided so you can read first hand about the distro's development. This section will likely just provide highlights as a starting point.

tahrpup64

Written by 666philb

tahrpup64 6.0.5 CE is being actively developed by 666philb.

Tahrpup was built from scratch using Woof-CE https://github.com/puppylinux-woof-CE/woof-CE/tree/testing. It comprises of approximately 1400 ubuntu trusty tahr .deb packages, 290 puppy.pet packages, 12mb of core puppy scripts & a kernel.

Tahrpup follows a line of popular ubuntu based puppies, Lucid (Playdayz), Precise (Barry K) & Raring (Pemasu)

The Ubuntu based pups had been my operating system of choice for a number of years and when Barry K retired and Pemasu left I wondered who was going to build the next ubuntu based pup. Then there was a post on the forum from Woof-CE asking for puppy builders and so I decided to give it a try.

It was my first time using Woof-CE, and after a lot of trial and error!! the first tahrpup alpha iso was posted on 28th May 2014. It then went through 5 months of development with lots of help and contributions from various forum members and was officially released on 26th October 2014.

Tahrpup is a true CE (community edition) puppy and was only possible due to all the contributions of bug fixes, bug reports and packages posted on both the forum threads and Woof-CE.

Tahrpup is still supported now and there’s a new testing iso http://distro.ibiblio.org/puppylinux/test/tahrpup/

Tahrpup review in Linux Format magazine
http://www.murga-linux.com/puppy/viewtopic.php?p=816508#816508

Happy New Year!

Announcement and release notes for tahrpup64 6.0.5

tahrpup64 is built from a "Puppy builder" system named Woof (http://bkhome.org/woof), which can build a Puppy Linux distribution from the binary packages of any other distro. There are many "puppies" built with Woof, including Precise, Wary, Racy, and Slacko.
Each "Puppy distro" built by Woof is a distinctive distribution in its own right, with unique features. You choose a puppy based on your particular needs, be it specific hardware, software, or access to and compatibility with the package repositories of a particular major distro.

Since November 2013 Puppies are built with woof-CE. There are no release notes for woof-CE at this stage however anyone is free to browse the commits and offer code in the form of a "pull request".
The following is left here for historical purposes and still has much relevance.

This is the first official release of an Ubuntu based 64 bit Puppy!

tahrpup64 is built from Ubuntu Trusty Tahr DEB (64 bit) packages, hence has binary compatibility with Ubuntu and access to the Ubuntu Trusty Tahr repositories.

Features include:

Updated "First Run" GUI with bugfixes and visual enhancements.
New following LTS branches of 3 series built with f2fs support and 4 series kernels. The shipped kernel is 3.14.55
New "change_kernels" script to easily change kernels
Many Icon and Graphical User Interface improvements throughout the system.
Updated Joe's Window Manager (JWM).
Visual and bugfix improvements to the tools to configure JWM, including the new PTheme, a global theme manager for JWM and ROX desktop
Pale Moon browser, a lighter fork of Firefox
new graphical firewall program
VLC Media player
Many other updated programs.

Below is a list of some of the applications included.

Jwm, palemoon, vlc, mtpaint, abiword, geany, hexchat, gnumeric, qpdf viewer, urxvt, simple screen recorder, minidlna, dunst(OSD), getflash, getjava, Mydbox, ListDD, pupsysinfo, pmcputemp, mtp-connect, mp-5, deadbeef, sticky-JWM, samba, pburn, gnugcc (gcc switcher), compton, compton-config, QT4, kernel switcher, firewall_ng (01micko), avfs, JWMdesk, planner, homebank, htop, Uextract, packit, multirename, improved fonts (iguleder) and lots more.

### End ###

Slacko32/64 700

Slacko32/64 700 BETA 2 is being developed by 01micko.

This is 32 bit and 64 bit version of Slacko built on top of the recently released binaries of Slackware(64)-14.2.

It is also using the very latest woof-ce experimental 'rationalise' branch.

You can find more information on slacko here.

Slacko64 Puppy 6.9.6.4 - released June 2016

Slacko64 Puppy is built from Slackware64-14.1 binary TXZ packages, hence has binary compatibility with Slackware and access to the Slackware and Salix repositories. It is a 64 bit operating system and requires a compatible Intel (IA64) or AMD (amd64) processor. More comprehensive release notes and documentation of known issues are available.

Features include:

Latest bugfixes from upstream Slackware64 - 14.1
NEW - 64 bit EUFI boot capability!
Kernels following LTS branches of 3 series built with f2fs support and 4 series kernels. The shipped kernel is 4.1.11
New "change_kernels" script to easily change kernels
Many Icon and Graphical User Interface improvements throughout the system.
Ffmpeg and supporting programs including Pmusic and Mplayer.
Joe's Window Manager (JWM).
Visual and bugfix improvements to the tools to configure JWM, including the new PTheme, a global theme manager for JWM and ROX desktop
Updated Firefox ESR
Improvements to the graphical firewall program
Samba, used to share files with Windows, is shipped by default
evince pdf viewer
Many other updated programs.

As mentioned above, Slacko64 6.9.6.4 is shipped with kernel 4.1.11 but 3.18.22 and 4.2.5 are available from the repository and easily changed using the change_kernels script. Find more information at the Slacko download page including a brief guide to which version is right for you.

### End ###

Fatdog64-710

Fatdog64-710 The Fatdog Team (Kirk, James and SFR) with lots of help from step.

Fatdog64-710 is a major update built from source, with new packages and new build system.
It was in parallel development with 700 branch as early as Feb 2015. The 710 alpha was first released on April 2016.

The major change between 700 and 710 branch is 710 branch now supports 32-bit compatibility library natively. Earlier Fatdogs used libraries taken from either Puppy Slacko or Puppy Wary to support 32-bit applications; Fatdog 710 now builds its own 32-bit libraries from source as part of the operating system build. The acid test for this is building WINE: Fatdog 710 is now able to build WINE 64-bit and 32-bit natively without borrowing third party binary libraries. In the interest of size, 32-bit libraries are not included in the basesfs and is separated in an SFS package (32bit_fd64.sfs) which you can download using SFS manager or manually, just like earlier versions, however.

Fatdog 710 branch is part of 700 series, and as such as we expect a high-degree of compatibility between them. Some packages may not work due to inevitable library updates; but in general most of them should.

You can find more information about Fatdog Linux here.

### End ###

Software

Each month this is where new or updated software will be announced. If you would like to share experiences, problems or fixes this is the place.

This is a community newsletter and therefore requires articles from you, if we are to succeed.

Notecase

Notecase is included in every Puppy Linux that I'm aware of and it's there for a good reason, it's very very good. I'm always amazed at how few people know about it and less have even used it.

Notecase is a note taking application. It’s likely you are reading this newsletter in Notecase unless you are reading it on the web. In that case the letter was still developed in Notecase.

The first thing you do is open NoteCase then choose File, then Save As. Provide a name for your document and a storage location.

Notecase is all about nodes. To begin, insert a node, look under the Tree menu item. You can have a node under a node which is called a child node. You can have a child node of a child node and so on. This method is great for organising your data, hyperlinks and images.

You can move nodes up and down using the menu keys under Menu Item Tree but it’s much quicker to use shortcut keys. Simply use the shift+cursor keys. Click on the node you wish to move then press the cursor arrow in the direction you wish to move it.

Text formatting is limited in the free version of Notecase but I don’t consider it restrictive. It’s not meant to be a word processor, rather a note taking application. Text can be bold, italic, underlined and strike-through. You can change the text colour and change the background colours.

Notecase has a nice search facility which works quite well. It can be invoked from the Edit menu item or press Ctrl+F.

By now you are probably thinking what is all this node malarkey about. Think of it as individual pages of information with it’s own tree structure, a bit like a family tree. This makes it easy to group information under a common heading.
Each node can be managed individually. I’ve already mentioned they can be moved up, down, left and right. They can also be exported and imported.

Let's put this theory into practice. In this newsletter is a node called Compiling with a child node called Yad. Highlight the Yad node by clicking on it, click on File then click on Export. A dialog will appear. Under Document source: choose “Selected node only:”. Leave “File format:” as NoteCase document (*.ncd) and under “File name:” choose a /location/filename.ncd and click on the Save button. Congratulations you have exported a node.

Importing nodes is even easier. Click on File and select Import. Navigate to the node EG: /root/filename.ncd and click on the Open button. Now all you have to do is move the imported node with the shift+cursor keys to where you want it.

This was a very quick overview. Have a play and you will find quite a few other nice features. Also press on the F1 key, this will provide quite a bit of additional help.

### End ###

pBurn 4.3.16

pBurn 4.3.16 by zigbert.

pBurn is a CD/DVD Burner.

Features

Data

Burn Data CD/DVD/Blu-ray (multi/single session) compatible with Linux, Mac, Windows, ...
Copy data CD/DVD/Blu-ray

Audio

Burn Audio CD from mp3, ogg, wma, wav ... (CD-text / CDDB)
Burn Audio CD from toc/cue file
Copy audio-CD

Video

Burn Video DVD/CD from avi, mov, mpg, wmv ...
Burn Video DVD/CD as a slideshow with images and background music
Burn Video DVD from video_ts filessytem
Copy video-DVD (decryption of encrypted discs)
Shrink double-layered video-DVD to single-layered disc

Images

Burn ISO-image
Burn NRG-image
Make ISO-image
Convert NRG-image to ISO-image

Misc

Blank/Erase RW disc - fast (only TOC) or complete
Inspect and edit Burn-command before it executes.
Import sessions from multisession disc.
Verify burnt data.
Import (play)list
Fixate disc
Check for c2errors....
Language support
Theme support

### End ###

Rox-Filer

Basic Puppy Navigation: Rox-Filer

Premises

Basic Puppy Navigation - Premises
by Rattlehead

I thought it could be a good idea to write a few quickguides on some essential Puppy programs. The contents will come mainly from looting my own instruction text files, with a bit of filtering for clarity or to avoid unnecessary detail.

I don't intend to cover all the functions in each program (for more exhaustive coverage, there is always the Forum and the Wiki), but rather to provide an overview to help you get started quickly, with keybindings and maybe a few configuration options that I've found useful time after time along the years.

The kind of summary I will be aiming for will be one that Puppy newbies can find useful, but that also maybe gives seasoned puppists a couple of "I didn't know that" here and there. Hope you enjoy it. :)

### End ###

Rox-Filer

So to get things started with the basics, here is the file manager that ships with most of Puppies: the light and powerful ROX-FILER

Main features:

* Move around files and folders: arrow keys
* Move to a different location/find a file in the current one: key / (opens an editable text field showing your current path) . Esc closes the text field.
* Execute command: ! key. Opens editable text field. If you have some file selected beforehand, it will be included as an argument
* Show/don't show hidden files: in Linux, the file names that start with a . are considered hidden. Ctrl+h switches if those files are shown or not
* Select-unselect one or various files: space, or ctrl+left click
* Go inside a folder: enter or left click
* Execute a program: enter or left click
* Open a file with the default program assigned to it: enter or left click
* Open a file as text: shift+enter, or shift+left click
* Create new file: ctrl+n
* Copy file: ctrl+c
* Options menu: right click in a blank area of the window, or press \ (alt gr+ º). These options will be slightly different if you do the right click on one file instead.

Activating redefinable keys:

You can create your own keyboard bindings for any of the entries in the Options menu (for example, you can assign the key "d" to create a new directory, "r" to rename a file...).

To enable this, go to /root and open the .gtkrc.mine file (if it doesn't exist, just create it. Notice the initial point in the file name; it is therefore a hidden file so it might not show at first).
Add to the file this line:

gtk-can-change-accels = 1

Then restart X to make the changes take effect (in default Puppy, you will find the option in the Puppy Menu in the button on the lower left corner of the desktop, among the options for "Shutdown".)

Once you've done that, you can assign your own keys. To assign one, just open Rox's options menu, select the option you want to associate a key to, and press the desired key. Instantly you'll see the key you've pressed appear at the right of the option. You can then press enter to execute the command right away, or esc to exit if you just wanted to assign the key but not execute it.

-----------------------------------------

The Options menu gives you a lot more of possibilities regarding default view, icon size, thumbnails, terminal by default... I leave those for personal experimentation, as everybody has different tastes.

I hope some of the items in this summary were handy to you. Thank you for reading, happy computing and see you at the kennels!

### End ###

The pekwm window manager
What is pekwm?

Pekwm is a cascading window manager, similar in this respect to jwm and icewm.

It has been around for awhile. I started using it seven years ago, and it was already
at version 1.12.

It is a "grand-nephew", so to speak, of the early 2000's aewm window manager, by
way of aewm++, a rewrite of aewm in C++. Pekwm itself is written in C++. It is
interesting to note that aemenus from aewm can still be used in pekwm. In a way,
pekwm is respecting its elders, you can feel the "family spirit": I like that.

Some prefer pekwm to openbox. Like openbox, pekwm does not provide a traybar. A
user who wants a taskbar for pekwm has to decide between bmpanel2, lxpanel,
fbpanel, and perhaps tint. On a whim, you could even load the xfce panel with
pekwm! I tried it once! It looks out of place, IMO, but it works!

I believe the initial philosophy of pekwm was to provide a WM powerful enough
to not need a taskbar. I'll venture to say that its authors have been successful
in this regard. It's just that we users are so accustomed to using taskbars...

You see a lot of pekwm themes provided with a matching bmpanel2 theme. While
bmpanel2 is indeed a good choice, and popular among pekwm users, it is not the
only choice.

Speaking of themes, one could find 190 pekwm themes on box-look.org during the
first week of December 2016. Plus a more limited choice of quality pekwm themes
on the deviant-art site. Of note, also on box-look, the so called "sqc pekwm theme"
is actually a collection of 220 pekwm themes. So pekwm has no shortage of themes.

You will notice a minimalist trend among pekwm theme designers, which could be
considered a pekwm feature "by association" of "by tradition", rather than intended
by the pekwm authors -- if you look at the default themes pekwm comes with.

One distinguishing feature of pekwm, in addition to the ones listed in the next section,
is "dynamic menus". This enables you to have the time and date in the menu, for
example, as seen in one of the illustrations provided in another section.

Extreme applications of dynamic menu entries include:
-- showing the title and duration of the song playing in your music player, or
-- a different fortune cookie showing every time you open your pekwm menu!
I personally do not see a need for such, but the potential is there if you need it.

Another distinguishing feature, I find, is the wide rande of window-related actions
presented by right-click on the window title. Very handy; unseen in other WM's.

Under the hood, the pekwm menu is quite accessible to the average user. You have to
respect a certain template, but this template is just ordinary text. This is a plus for
users who are not inclined to learn the entire XML language to do a minimal edit of
say, a jwm or an openbox menu.

For some reason, perhaps because of the lack of a good menu generating script -- which
I'm trying to remedy in my script article in this issue --, pekwm has not become the
default WM of the more popular distros. Aside from the Mini Watt OS a few years back
and a variant of the "Linux B.B.Q" distro, there has been no distro based on pekwm.
That's a shame really, given the power that lies within.

I could go and on writing about pekwm. I'll conclude here, however, by saying that "a
test is worth a thousand words." Try it, but carefully: otherwise, it may simply wow you!

Bye for now.

Chris (aka musher0)

### End ###

Some pekwm features

Some Pekwm features
(Answering a query by Tex Dog about pekwm)

Tex Dog wrote, on Sunday Dec. 4, 2016:
[quote="TeX Dog"]
Interesting in knowing more, getting a fast solution to understand this
WM, I see some elements I personally like, which spinoff has this ready
to go? Anything current beyond your own personal use?[/quote]

Hi Tex_Dog.

I'm not sure I understand completely what you mean by "spinoff" in your
sentence "which spinoff has this ready to go". But off the top of my head
I'd say pekwm's distinctive features are:

-- list of running apps by left click on an empty space of the backdrop, plus
clicking on one item of the list gets you to it, on any desktop (top of picture).
Among comparable wm's, icewm has it, but not jwm;

-- integrated command line (bottom of picture);



-- it's very responsive;

-- the menu has text-like syntax, not xml (like jwm has), so it's rather
easy to understand / manipulate / edit;

-- pekwm has an extensive and editable set of key combos for the speed-
minded. I seldom use them personally, but they're there. You don't need
an external utility like xbindkeys with pekwm;

-- detachable submenus ("ShowMenu" directive from main menu). With
this feature, the submenu displays separately instead of connected to the
main menu. I've seldom used it (in a previous pet, not in this version),
but again, it's there if the user has a need for it. Please see the illustration
in the article titled "Generating a pekwm menu" elsewhere in this newsletter.

AFAIK, it doesn't exist in jwm, and "it's a pain to obtain" in icewm;

-- the menu can be called by right click on any screen border. This is very
handy, say, when you're editing a picture in full screen and you need to
launch another app. You don't need to reduce the size of the app you're
working in to access the pekwm menu;

-- various support scripts by non-pekwm-team developers such as
urukrama and others provide "a la WhineDose" stacking / sticking of apps
to occupy half-screen, plus other niceties. I'm sure there's more, but
as I said, this is "off the top of my head"!

~~~~

Regarding "anything current", version 1.18-rc1 was released about a
month ago. Please see https://www.pekwm.org, top of page. Pekwm's
publishing cycle seems to be one new version every year or 1½ year.

I'm testing v. 1-18-rc1 now. I'll provide a pet of it a bit later, after I'm
satisfied with the testing.

~~~

I hope this answers your questions. Any more, just "ring"!

BFN.

Chris (aka musher0)

# # # END # # #

Pekwm & friends!

Pekwm and friends...

... give you the most beautiful desktop!

Bottom left to top right :
-- Rox-panel with transparent icons as spacers
-- Rox-icons on pinboard
-- Month in transparent urxvt
-- pekwm menu (in the middle)
-- aemenu customized with xdotool to always pop up in top right corner, BeOS style
-- watch in urxvt titleless window.

Credits:
Background borrowed from collection in pemasu's polarpup.
Coordinated themes for gtk and pekwm: slightly adapted by me to be more compatible
between each other, from "aum"; originals at http://box-look.org/content/show.php/Aum+suite+?content=143237

Soft on the eyes, no? Enjoy!



# # # END # # #

Biography

From time to time we will publish an article about one of our contributors or maybe an interesting person.

You may simply want to commend someone on their Puppy Linux contribution. I have been around Puppy Linux for about 10 years and have made friends with many people in the community. This is not to say I have personally met many as we generally comunicate via email, the Puppy Linux forum or on PuppyPhone (Psip) or Skype.

A number of years ago I spent quite a bit of time developing a little application called Psip with a group of the forum members. The main developer in the group was hairywill. His real name was Will Davies and we became quite good friends, virtually speaking. A few years later I met Will when I visited Britain on a cruise. It was so nice being able to catch up with someone I had been working with over a long period of time. We had a pint in a hotel at Southhampton and talked about all things Puppy Linux for about an hour until he had to leave for work. I really enjoyed the meeting and hope to catch up with more virtual friends in the future.

If you have a story that you would like to share, send it in and we will publish it, if we can. We will not publish crude, lewd or any articles that may be considered defamatory.

Barry Kauler

As Barry is the creator of Puppy Linux I thought it appropriate to do a quick biography on him in this first edition.


Read about him here.

More information about Barry here.

Where does the name come from?

"The real Puppy, the mascot for Puppy Linux, was a very tiny dog, a Chihuahua, but totally fearless. He didn't seem to know that he was vulnerable because of his small size. Once when my sister was visiting my country property, she brought her Blue Heeler, a very solid middle-sized dog named Muti. We were out walking, and suddenly there was a substantial rustling of branches of a large bush, something was in or behind the bush. Muti took fright and ran back behind the legs of my sister, whereas Puppy got into launch position in front of the bush and barked furiously. It turned out to be my dad playing a trick on the dogs. Puppy used to chase kangaroos and other big wild animals. Anyway, Puppy Linux is like that, reckless, unshackled, in memory of the mascot." -

Barry Kauler

### End ###

Compiling

This is a good section to discuss how to compile software. Compiling is not everyones cup of tea but the more people that can manage it, the longer life Puppy will have.

The hardest part of compiling is the build recipe as there are so many options. Let's include proven recipes here.

Yad

YAD (yet another dialog) is a tool for creating graphical dialogs from shell scripts.

Get the source code here: https://sourceforge.net/projects/yad-dialog/

Make sure the devx is loaded. This is a Squashed File System (SFS) file.

Extract the yad source to a new directory.

Enter the directory it created where you can see the source files.

Open a terminal in the directory. The easiest way is to press the ~ key if you're in Rox. It's just under the Esc key.

Now in the terminal type: ./configure --prefix=/usr

When the prompt returns type:

make

When the prompt returns again type:

make install

This will install Yad into your system. If you already had an earlier version of Yad, it will be overwritten.

Job done.

### End ###

Scripts & Code

There are some clever people that use Puppy Linux. This is a good place to share some of their useful scripts.

A pekwm menu generator

Hello all.

I realize many of you do not use pekwm as a window manager. Rather, this script is offered as an example
of text processing. It will create a pekwm-type menu which you can read with < more > or in your text
editor, even if you do not have the pekwm window manager.

I concocted this generator for the pekwm menu because I was dissatified with the ones available (including
my previous ones!). It's in four parts: begin, pupmenu, end, windows, which are concatenated later. Only
the pupmenu part is generated by this script; the other parts are prepared in advance, i.e. static.

The goal in creating a menu for a window manager is to do it as fast as possible without losing any of the
info provided in the desktop files along the way. I discovered that much speed was gained if I used:

1) grep instead of awk to get at broader categories (please see line 15 below).

This way we avoid the need for sorting and or re-processing the standard desktop categories later in the
script, through awk or otherwise. The desktop categories being suggestions rather than a strict standard,
the developer has some freedom. The important thing is that the menu sections and subsections make
sense to the user.

2) LANG=C for the main loop (line 30).

The English version does gain +/- 1 ½ seconds this way. Sadly, this optimization cannot be used when
building the menu for other locales. For example, building a FR version of the menu takes 3.4 seconds,
as compared to the 2 seconds needed for the EN version.

3) I did many string substitution tests with various utilities before deciding, and the lesser-known replaceit
utility does the job fastest, as far as I can tell.

Its syntax is rather simple to understand and use (simpler than the gsub function in awk, certainly) and
it offers some parameters that similar utilities do not have -- or at the expense of much learning time.

For example, replaceit offers the capacity to erase a line (replace an entire line with blank space; please
see line 50). It also does in-file replacements, which saves some i/o time.

That said, replaceit has the downside of changing the exec bit of a file to "read" before processing it. Not
a problem in this case, since pekwm is reading its menu, not calling it as an executable child. But should
you be using replaceit on a script or executable, you have to remember to re-do < chmod +x script >.

4) bash's string splitting capacity.

If you insert a separating character rather than a space in a bash string, the string can be used as an array
(lines 26-27). This was very handy for sub-string substitution in combination with replaceit.

Bash does have an in-built substring substitution capacity, but I found that replaceit was still needed to
speedily locate the word to replace in the file (function at line 14). Also, if using only the bash substring
substitution capacity, you have to create an overhead, to process the series of translation strings.

A timed test with a loop overhead came up at 12.6 seconds, versus 3.4 seconds with replaceit. This result
speaks for itself, doesn't it?

I hope this article has shed some light for those of you interested in text processing.
Here is what the end result looks like:



As always in open source, improvements and / or constructive criticisms are welcome.

Chris (aka musher0)

############

1 #!/bin/ash
2 # /root/.pekwm/essai4a.sh # Requires / Requiert : awk, replaceit.
3 # Goal: To incorporate a Puppy submenu in the pekwm WM menu. /
4 # Objectif : Intégrer un sous-menu Puppy au menu du gest. de fen. pekwm.
5 #
6 # Note -- Called by "menu-complet.sh". Not very useful by itself. /
7 # NOTA -- Appelé par « menu-complet.sh ». Pas très utile en soi.
8 #
9 # (c) Christian L'Écuyer (alias musher0 [Puppy forum]),
10 # Gatineau (Qc), Canada, 7 déc. 2016; rév. 11-16 déc. 2016. GPL3.
11 #### set -xe
12 PeK="/root/.pekwm";pupmenu="/tmp/pupmenu2";echo "PupMenu = \"PupMenu\" {" > $pupmenu

13 nAMe () { awk -F= '$1=="Name" { print $2 }' $ProG; }
14 rPLCt () { replaceit --input=$pupmenu "${line%%+*}" "${line#*+}"; }

15 progs () { for ProG in `grep -l $CaT *.desktop`;do
16 case "${LANG:0:2}" in
17 fr)NamE="`awk -F= '$1=="Name[fr]" { print $2 }' $ProG`"
18 [ "$NamE" = "" ] && NamE="`nAMe`" ;; # Si pas de nom en français.

19 en|*)NamE="`nAMe`" ;;
20 esac
21 ExeC="`awk -F= '$1=="Exec" { print $2 }' $ProG`"
22 echo "Entry = \"$NamE\" { Actions = \"Exec $ExeC &\" }" >> $pupmenu
23 done; } # Crée une ligne par fichier desktop dans le menu pekwm.

24 sprtr () { echo -e "Separator {}\n}\n" >> $pupmenu; } # Séparateur du menu pekwm
25 cats () { echo "Submenu = \"$CaT\" {" >> $pupmenu;progs;sprtr; } # Catégories.

26 construis () { echo -e "Submenu = \"${line%%+*}\" {\n" >> $pupmenu;
27 CaT="";for CaT in `echo "${line#*+}"`;do cats;done;sprtr; } # Référence # Méta-catégories.
28 ####

29 cd /usr/share/applications
30 if [ "${LANG:0:2}" = "en" ];then LINGUA="$LANG";LANG=C;fi # Speeds up EN version.

31 case "${LANG:0:2}" in
32 fr)EnV="Environnement";UtiL="Utils_&_Dev.";DisQ="Partitions_&_Fichiers";BuR="Bureautique"
33 PerS="Personnel";ConN="Connexions";MulT="Multimedia";LoiS="Loisirs" ;; # Traduction fr.

34 en|*)EnV="Environment";UtiL="Utils_&_Dev.";DisQ="Partitions_&_Files";BuR="Office"
35 PerS="Personal";ConN="Connections";MulT="Multimedia";LoiS="Leisure" ;;
36 esac # Méta-catégories.

37 echo -e "$EnV+DesktopSettings X-Desktop Setup\n$UtiL+Development System =Utility
38 $DisQ+Archiving FileManager Filesystem\n$BuR+Calc Database Document Graphic TextEditor
39 $PerS+Organizer Personal\n$ConN+Network Internet FileTransfer
40 $MulT+Audio Video DiskBurning\n$LoiS+Fun Game" | while read line;do construis;done
41 # Catégories en pseudo-matrices en se servant de la capacité de coupure des chaînes de bash.
42 # Changer la catégorie GUIDesigner à Development dans fichier desktop économise une catégorie.
43 # Les utilitaires catégorisés comme Utility-Qqchz sont intégrés aux catégories « Qqchz ».

44 if [ "$LANG" = "C" ];then
45 sprtr
46 echo "Entry = \"Help\" { Actions = \"Exec defaulthtmlviewer file:///usr/share/doc/index.html &\" }
47 Entry = \"Growl\" { Actions = \"Exec $PeK/growl.sh &\" }\n}" >> $pupmenu
48 sprtr
49 fi

50 replaceit --input=$pupmenu --wholeline defaultconnect "" # Efface ligne à problème.
51 replaceit --input=$pupmenu Document Documents # Bilingue, ok.

52 [ "${LANG:0:2}" = "en" ] && LANG="$LINGUA"

53 ####
54 case "${LANG:0:2}" in
55 fr)echo -e "DesktopSettings+Réglages_bureau\nX-Desktop+Bureau_X\nSetup+Prise_en_main
56 =Utility+Utilitaires\nSystem+Système\nArchiving+Archivage\nFileManager+Fichiers
57 Filesystem+Syst._de_fich.\nDatabase+BdD\nDevelopment+Développement
58 Calc+Chiffres\nTextEditor+Éditeurs\nGraphic+Infographie
59 Organizer+Organiseur\nNetwork+Réseau\nOpenOffice+OO\nLibreOffice+LO
60 FileTransfer+Transferts\nMultimedia+Multimédia\nDiskBurning+Gravure
61 Fun+Jeux_1\nGame+Jeux_2\nHelp+Aide\nGrowl+Gronder" | while read line;do rPLCt;done # Traduction
62 # Apply a similar structure to other languages. / Appliquer structure similaire à d'autres langues.

63 sprtr
64 echo "Entry = \"Aide\" { Actions = \"Exec defaulthtmlviewer file:///usr/share/doc/index.html &\" }
65 Entry = \"Gronder\" { Actions = \"Exec $PeK/growl.sh &\" }\n}" >> $pupmenu
66 sprtr ;;

67 en|*)# English has to come last because paired with asterisk.
68 echo -e "TextEditor+TextEditing
69 Calc+Number-Crunching\nOpenOffice+OO\nLibreOffice+LO
70 =Utility+Utilities\nGame+Games" | while read line;do rPLCt;done ;;
71 esac

72 mv -f $pupmenu $PeK/pupmenu2
73 cd $PeK;cp -f --backup pupmenu2 pupmenu2.cdr
74 ####
75 # time ~/.pekwm/essai4.sh # Pour 356 lignes : 2,01 sec. (v. EN); 3,35 sec. (v. FR).
76 #### < uname -a > / pour temps ci-dessus : / for time results above:
77 # Linux puppypc5656 3.14.0 #1 SMP PREEMPT Thu Apr 14 14:41:33 BST 2016 i686 GNU/Linux
78 # avec / with SSHD.
79 # The exec. time also depends on the CPU. / Le temps d'exéc. dépend aussi de l'UCT.
80 # set +xe

### End ###

Tutorials
USB Frugal Install

This link will redirect you to a youtube video explaining how to install Slacko 570 to a USB drive.

The video was created by puppy linux forum member Mike Walsh.

### End ###

Useful Links

Puppy Linux Forums USA

Ibiblio repository USA

nluug repository Netherlands

Internode repository Australia

University of Crete repository Greece

aarnet repository Australia

Internet archive repository USA

Puppy Linux Tips by smokey01

Puppy Linux wikka Puppy sites

Bookmarkos provided by kerl

### End ###

Contributors this month

smokey01
musher0
kerl
Rattlehead
Mike Walsh
666philb

Grammar & Spelling Police

russoodle

### End ###