Slackware notes
===============

"When in doubt use brute force" --Ken Thompson

"I'm in the camp where if something works properly then there's no need 
to rock the boat. If there's a known issue, you know where to find me" 
--Patrick Volkerding

"...the only maintenance task I have to do is keeping the machines up to 
date and changing the toner cartridges on the printers. That's what is 
meant by 'stable'." -- kikinovack

http://slackware.uk/slackware/slackware-14.1/Slackware-HOWTO
http://www.slackware.com/changelog/stable.php?cpu=i386

http://www.slackware.no/    # weekly -current 32bit iso

One liners
----------

tar xvfz archive.tar.gz         # unpack tar.gz file 
tar xvjf archive.tar.bz2        # unpack archive.bz2 file
tar -zcvf archive.tar.gz folder # packs folder and all of its contents into a tar.gz file. s
tar xfv archive.anytype         # tar can guess compression types! Unpacks any tar.whatever
for a in `ls -1 *.tar.gz`; do tar -zxvf $a; done # untar all .tar.gz files in a directory
split -b 1000m somefile         # splits a large file into 1Gb chunks for burning to dvd. Chunks named xaa, xab ...
cat x* > somefile		# joins the files produced by the split command
ffmpeg -i v.mp4  -vn -ab 128k a.mp3    # extract mp3 audio from mp4 video file
grep -Po '(?<=href=")[^"]*' file.html  # prints everything after href=" until a new double quote appears
wget -nc -i list.txt  # downloads all the files in list.txt without duplicating files that are already downloaded
telnet telnet.wmflabs.org       # Set terminal character type to UTF-8 and you have the whole of wikipedia to read on the train...
for i in *.mp3; do mpg321 -w "`basename "$i" .mp3`".wav "$i"; done # converts all the mp3s in the current folder to wavs
wget -r -nH --no-parent --reject=index.html* --cut-dirs=1 --no-clobber http://slackware.uk/slackware/slackware-14.2/patches/packages/ # fetch upgrades
for f in *\ *; do mv "$f" "${f// /_}"; done # replaces spaces in filenames with underscores - includes subdirectories
rsync -av --exclude=x86 --delete rsync://slackware.uk/slackware/slackware64-14.2/patches/packages/ . # Downloads the contents of the patches directory to current directory. Note trailing dot.
rsync -av --delete rsync://slackware.uk/slackware/slackware-14.1/patches/packages/ . # updates the 14.1 i686 installations
lynx -dump -hiddenlinks=listonly http://www.gardnermuseum.org/music/listen/music_library?filter=composer | grep  http://traffic.libsyn.com/gardnermuseum | cut -c 7- > a.txt # pulls out all links to CC licenced mp3 files on the Isabella Stewart Gardner Museum music library page
wget -nc -i a.txt --wait=60 # used with above command to download only newly added mp3 files
sed '/pattern/d' ./infile # prints file to terminal with all lines that match pattern removed
pdfmom -etp mybook.mom > mybook.pdf # processes a text file containing groff_mom macros, text, pictures, tables and mathematical equations into a pdf file using groff
man -t command > command .ps    # exports the man page for command to ps file
echo $(uname -n)-$(date +%Y%m%d) # machine name and current date in a form suitable for naming e.g. incremental backups
ls /var/log/packages | grep openoffice | tr '\n' ' ' > oneline.txt # generate a list of the Apache OpenOffice files so that I can cat the file and copy the output as argument to removepkg
find . -maxdepth 1 -name "*string*" -print # lists file names that match string. Omit maxdepth for recursive search 
openssl rand -base64 12 | grep ^[a-zA-Z0-9]*$ # generate a 12 character password with no funny symbols
head -c 1000 /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15 | head -n 10 # generate 10 lines of 15 random alphanumeric characters
rsync -rtvu --modify-window=1 --delete --progress /home/keith/folder/ /media/keith/Elements/folder # rsync command line to sync a folder from ext4 linux drive to ntfs external drive
find . -type f -name '*pattern*' -delete # removes all files that match pattern recursively starting from here. Handy for message files of deleted programs in /usr/share/locale
echo "It seemed like a good idea at the time" | sed 's/\s/\n/g' | sed 's/./\u&/' | awk '{ printf "%s\n", substr($1,1,2) }' | tr -d '\r\n' && echo "" # prints first two chars of each word in a string with first letter capitalised. If one letter word, just prints one character
find /var/log/packages/ -type f -printf '%T+ %p\n' | sort -nr | head # lists most recent 10 installed packages so you know when you last updated
man ksh | col -bx > ksh.txt # man recognises the pipe and dumps txt col clears the control characters for bold &c
montage +frame +shadow +label -tile 3x3 -geometry 150x200+0+0 *.jpg post.jpg # resize Nokia images from 1200 wide 1600 high to 150x200 and tile in a 3x3 array using ImageMagick's montage command.
sleep 10 && xwd -root -silent | convert xwd:- png:screen2.png # screenshot (needs imagemagic)
rsync -rtvu --modify-window=1 --exclude=".*" --delete --progress /home/keith/ /run/media/keith/52695A6F6816ABA4/X61s/ # backup home directory (sans dots) to external ntfs format hard drive
sed -e 's/^/prefix/' file > file.new # prefix each line in a file
csplit notes.md /===/-1 {*} # Split a markdown file with == headings into separate files.
csplit -f prefix 3600.txt '/KEYWORD/' '{*}' # splits a long text file into chunks starting with KEYWORD and prefixed by prefix
sed '$!N;/.*\n.*====.*/P;D' notes.md # prints line above a match (not consecutive matches)
sed ':a;N;$!{/\n$/!ba}; s/[[:blank:]]*\n[[:blank:]]*/ /g' wrapped.txt > unwrapped.txt # wrapped has paragraphs of text wrapped at col 80 or wherever separated by blank lines, unwrapped will have paragraphs ending in a single new line
pandoc -t html -s input.odt -s -o output.html # convert an odt to relatively clean html. Not sure about images, objects &c
ntpdate pool.ntp.org # sync the local hardware clock to network time one off
sed 's/^/prefix/; s/$/postfix/' file.txt # add a prefix and a postfix to each line in a file
sed -i 's/[.,;!?]  */&\n/g' file # splits each line in the file on punctuation 'semantic linebreaks'. Use fmt to return to formatted text.
sed -e 's/\([.?!]\) \{2,\}/\1 /g' file # fixes fmt two spaces after fill stop. You can pipe the output of fmt into sed.
tar -czpf /var/tmp/home.tgz .  # tar up your whole home drive including dotfiles
tar --exclude='./Music' --exclude='./Pictures' --exclude='./*.iso' -czpf /var/tmp/home.tgz . # tar up dotfiles and exclude some directories
tar xvf home.tgz # copy mytar.tgz to /home/user and then untar to restore dotfiles and data
tar -cvf mydirectory.tar mydirectory # just tar up directory no compression. Good for images or binary package files
setxkbmap -option caps:escape # make the caps lock key a second escape for vi or mg in OpenBSD or anywhere
setxkbmap -layout gb # English UK keyboard layout
magick mogrify -resize 512x512 -quality 100 -path small *.jpg # generates resized copies of all jpg files in current directory into a sub-directory called 'small'
ls -t | awk 't {if ($0 == l) print "..."; exit} NR == 5 {l = $0; t = 1} 1' # list files with the five most recent distinct modification times
find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum  | sort -k 2 > checksums_`date +%Y-%m-%d`.md5 # searches current (.) directory recursively and calculates a checksum for each file in every subdirectory or in the directory. Can be used to check for bitrot over years. Ignores .md5 files
lynx -dump -listonly k58.uk | cut -c 6- | sed 's/http:/https:/' | grep 'k58.uk' > sitemap.txt # one-liner to make a sitemap from the index page on k58.

November 13th 2024
------------------

sdf's gopher space.

Text files need 644 permissions, and directories need 755 permissions. 
Entries in a gophermap need an actual tab character between description 
and location. I've not sorted if each directory needs its own gophermap 
yet, or if you can have one gophermap at root and just list directory 
contents.

November 10th 2024
------------------

xfce4 version 4.12 on Slackware 15.0

https://www.linuxquestions.org/questions/slackware-14/this-is-my-slackware-desktop-725754/page355.html#post6537448

'backleveled' to xfce version 4.12 (last GTK2) with selection of 
libraries that need adding. Also some compiler errors with newer 
compilers but not sure if those are with the xfce.

Algol 68 compiler

> "While many of the delegates presented papers that discussed the 
> difficulty of implementation of the new language, the small team from 
> the Royal Radar Establishment presented their working compiler for a 
> substantially complete subset of the language that they called Algol 
> 68-R [ Wikipedia-2 ]. Algol68-R was already in daily use for 
> production code on the ICL 1907F computer at RRE, where it had 
> replaced Algol 60 for new development. The Algol 68-R compiler was 
> later distributed without charge by ICL to other users of 1900-series 
> hardware, and it was this compiler that I first used when I went to 
> University."

<https://accu.org/journals/overload/26/148/james_2586/>

A later version of this compiler might have been in use at Warwick 
University's computer centre in 1976.

October 11th 2024
-----------------

Moto g14 cheapie android for taking pics in whitby

https://www.reddit.com/r/MotoG/comments/16p5d4p/moto_g14_screen_keeps_waking_up_randomly_every/

To stop the screen switching on when you move the phone or touch the 
screen you have to:

1) Switch Ambient Display on and disable 'turn on touch screen'
2) Switch Ambient Display off again (rolleyes)
3) Switch Lift to Wake off

Then the screen won't come on until you short press the power button and 
sanity is regained.

September 29th 2024
-------------------

Reduce computer algebra package installed from the most recent 
snapshot rpm. I use the Codemist Standard Lisp implementation. 
redcsl invokes a GUI repl by default.

This GUI is implemented using the fox toolkit which is quite nice 
light and cross platform BUT the default font sizes are tiny even on 
a 1366x768 screen. There is a font size setting for the font used in 
the repl but not in the font used in the GUI widgets (menu 'bar' 
which is actually buttons and the associated menus).

https://sourceforge.net/p/foxgui/mailman/message/14874756/

The foxgui-users mailing list came up with a work-around.
Add the following to the settings file at

~/.foxrc/Codemist/reduce

[SETTINGS]
normalfont=helvetica,140,medium,roman,normal,iso8859-1

If the Xorg bitmap font you happen to use is not available, the 
application will just segfault. I needed to experiment a bit, but 
the above worked on Fedora 21 under Gnome/Wayland presumably under 
xwayland. So it appears that 'normalfont' provides the base font for 
all the widgets.

September 20th 2024
-------------------

Idea for occ25: emacs.

https://karthinks.com/software/batteries-included-with-emacs/

https://old.reddit.com/r/emacs/comments/1f44evi/its_fine_to_use_plain_emacs_and_a_simple_config/?rdt=54353

I'm using Gnome Shell 47 on Fedora 41 Beta for lutz.
Noticebly faster in desktop but heavy on the ram.

September 12th 2024
-------------------

$ cat ~/bin/ospl
    # This command breaks a paragraph with hard line breaks
    # into one clause per line (sentence, comma or question mark)
    # It only replaces punctuation with at least one space after
    # so 'this gets matched. As it should' but 'C.A.T. ' only
    # gets matched after the final full stop. 
    # It reverses the effect of fmt
    # Meant for use with }!ospl from nvi
    tr '\n' ' ' | sed "s/[.,;?] [ ]*/\0\n/g"
$

See sed&awk p40

August 28th 2024
----------------

Current .exrc when using vim.tiny to provide vi

set showmode
set showmatch
set ruler
set shiftwidth=4
set tabstop=4
"set verbose
"set leftright (not sure if I want wrap or scroll so I try both)
map     #4      !}fmt^M
map     #5      !}ospl^M
map     ;       :
"this might sort out the arrows in insert mode in vim.tiny
map! ^[OA ^[ka
map! ^[OB ^[ja
map! ^[OC ^[la
map! ^[OD ^[ha

Remember that ^M is 'Ctrl-V and a new line' and ^[ is 'Ctrl-V and Escape 
key' not just the characters as printed.

Alas using vim.tiny loses the infinite undo capacity of nvi (u to undo 
then . to repeat undo)

August 26th 2024
----------------

Cinnamon DE set critical battery action to suspend and change time

Installed Mint LMDE 6 (Faye) on x220.

The critical battery settings did not by default include suspend, so
I added it as follows;

https://forums.linuxmint.com/viewtopic.php?f=42&t=302573&hilit=power#3

edit /usr/share/cinnamon/cinnamon-settings/modules/cs_power.py

as root and alter the 'critical_options' python statement (a fair way down the file) to read

    critical_options = [
        ("shutdown", _("Shutdown immediately")),
        ("hibernate", _("Hibernate")),
        ("suspend", _("Suspend")),
        ("nothing", _("Do nothing"))
    ]

Basically adding the line '("suspend", _("Suspend")),'. Go to settings 
Power Manager and you'd find Suspend as an option.

Then increase the default battery life to trigger critical actions from
420 second to 1800 seconds (7 mins to 30 mins) so you have time to find
a mains plug. 30 mins on normal is about 6 to 8 hours on suspend.

Nice to see a setting from Cinnamon 19 still working.

Documents: make a draft script in ~/bin

Current state of mkdrft

keith@x220:~$ cat ~/bin/mkdrft
#! /bin/sh

# Variables
dir=$PWD/drafts
file="$1"
date=$(date -I)

# Test for drafts directory in current directory
# and it it isnt there create it
if [ ! -e $dir ]; then
    mkdir $dir
elif [ ! -d $dir ]; then
    echo "$dir already exists but is not a directory"
fi

# Make a copy of $file inside drafts with date added to
# end of file name
cp $file $dir/$file"-"$date
keith@x220:~$

Basic: it allows over writing of drafts with same date. But at least it 
catches directory not there or a file of same name. Works fine in test 
directory.

August 22nd 2024
----------------

https://christian.amsuess.com/tools/arandr/

Just installed arandr to help with external monitors.
xfig has very small bitmap fonts hard coded.
A 1280x1024 large monitor will help.

But also

xrandr --output LVDS-1 --scale 0.8x0.8

and

xrandr --output LVDS-1 --scale 1x1

The first command line zooms in so xfig looks 25% larger which is fine

The second command reverts to 100% scale.

<https://unix.stackexchange.com/questions/596887/how-to-scale-the-resolution-display-of-the-desktop-and-or-applications>

Also

<https://lecorbeausvault.wordpress.com/2021/09/25/using-xrandr-for-multi-monitor-setups-plus-some-useful-scripts/>

for simple two monitor setups

August 21st 2024
----------------

IceWM on OpenBSD installed with the helpers including icewmbg from 
packages.

My changed preferences...

home/keith/.config/icewm/preferences                                          <
foo$ grep -v '^\#' /home/keith/.config/icewm/preferences | grep -v '^$'  
 TaskBarShowCPUStatus=0 # 0/1
TaskBarShowWorkspaces=0 # 0/1
TaskBarWorkspacesLimit="1"
 TimeFormat="%H:%M"
WorkspaceNames=" 1 "
 ActiveTaskBarFontNameXft="DejaVu Sans:size=10:bold"
ClockFontNameXft="DejaVu Sans Mono:monospace:size=10"
ColorClock="rgb:C0/C0/C0"
ColorClockText="rgb:00/00/00"
NormalTaskBarFontNameXft="DejaVu Sans:size=10"
TitleFontNameXft="DejaVu Sans:size=10"
 DesktopBackgroundColor="teal"

I'm using the Win95 theme with teal background colour for giggles.
It works very nicely and is quite light on memory and the processor.

August 20th 2024
----------------

Below is contents of ~/.xpdfrc 

That file works on Xpdf version 4 (the QT one) and means I can not have 
the side bar and the strange scrolling mode. OpenBSD has the man xpdfrc 
man page with all options, and the man xpdf page COMMANDS section has 
the commands available.

initialDisplayMode	single
initialSidebarState	no
initialSelectMode	block
popupMenuCmd	"Zoom to selection"	zoomToSelection
popupMenuCmd	"Zoom fit page"	zoomFitPage
popupMenuCmd	"Zoom fit width"	zoomFitWidth
popupMenuCmd	Reload	reload

OpenBSD ~/.profile back2stick

alias back2stick='rsync -rtvu --modify-window=1 \
--exclude=".*" \
--exclude="*.iso" \
--exclude="*.img" \
--exclude="*.core" \
--exclude="usb" \
--progress --delete \
/home/keith/* /home/keith/usb/obsd75-home/' 

That alias will copy contents of ~/keith to external stick mounted on 
~/usb. Excluding big stuff like iso and img files and the odd core dump 
from Chromium.

I need to get a 16 or 32Gb usb drive.

August 19th 2024
----------------

echo "This is a sentence with *two words* emphasised" | sed 's/ \*/ \\fI/' | sed 's/\* /\\fR /'

Ugly but it works. Might allow emphasis to span two lines as well as 
separate patterns for start of emphasis (asterisk preceeded by a space) 
and for end (asterisk succeeded by a space).

cat bread.ms | sed 's/^$/.PP/' | sed 's/ \*/ \\fI/' | sed 's/\* /\\fR /' | groff -T pdf -ms > b.pdf

If I put the sed lines above into a script file and use them as a 
filter, and add sed lines for **strong** and `code` then that is a chunk 
of markup already done. Just need to disable the matching inside the 
preprocessor requests like .EQ....EN.

So far I have this...

foo$ cat mrk.sh
cat $1 | # useless use of cat? 
sed 's/^$/.PP/' | # put paragraph request in each blank line 
sed 's/ \*/ \\fI/' | # space-* = start of italics  
sed 's/\* /\\fR /' | # *-space = end of italics
sed 's/^\# /.NH 1\
/' # OpenBSD sed won't allow \n in substitution so literal new line

I'll add in the other character styles and the rest of the headings 
tommorrow.

Note from the future

echo "This *might* be a *sentence*. And *this*?" \
| sed 's/\([.? ]\)\*/\1\\fI/g' | sed 's/\*\([.? ]\)/\\fR\1/g'

Capture expressions or 'backreferences' (but not actually).

The [.? ] means match either of a full-stop, a question mark or a space.
The \([.? ]\) 'captures' this match as \1 (you can have up to \9 of these)
The replacement part prints what you captured as \1 and what you want to replace it with
It is the second sed that is important...

sed 's/\*\([.? ]\)/\\fR\1/g'

's/matched expression/substitution/g' 
The matched expression is \* (an asterisk) and [.? ] any of . or ? or a space.
The \(part\) bit of the matched expression is stored as \1
The g on the end says not to stop after first match on a line.

The substitution is \\fR first (need \\ because we want a literal \ printed)
then whatever we stored in the substitution \1 gets printed

So: thing*. -> thing/fR.
And that*? -> that/fR?
And something* else -> something/fR else

Problem: how do I include punctuation in the emphasis? 
Cross that bridge &c

<https://www.grymoire.com/Unix/Sed.html#uh-4>

August 18th 2024
----------------

Reddit for heavens sake - nowt on stackoverflows

https://old.reddit.com/r/bash/comments/17twwyv/how_to_remove_single_new_lines_from_the_end_of_a/

awk '
    NF { printf sep "%s", $0; sep = ""; next }
    { sep = "\n\n" }
    END { printf "\n" }
' filename

Above fragment takes a text file with paragraphs with hard breaks 
(single new line) at the end of each line and a blank line between 
paragraphs and renders it as a single line for each paragraph but 
preserves the blank line between paragraphs. Exactly what I want for the 
markdownish -> ms converter that I want to hack up.

Then blank line -> .PP

Line starting with * after a blank line but with space following * -> .IP "\[bu]" 0.25i

Word in a line starting with * like *emphasis -> \fI

Word in a line ending with * like emphasis* -> \fR

And **strong -> \fB with strong** -> \fR

And `words -> \fC with words` -> \fR

Above will need to trap no space after * | ** | ` to avoid list at line start  

Line starting with # words -> .NH 1 \n words \n .LP supressing .PP

Line starting with ## words - .NH 2 \n words \n .LP supressing .PP 

Line starting with ### words - .NH 3 \n words \n .LP supressing .PP

And then 

Line starting with .EQ | .TS | .PS | .RS | .G1 -> pass all lines through verbatim until

Line starting with .EN | .TE | .PE | .RE | .G2 -> lines after processed as normal

This is not a markdown to -> ms converter as such it is just saving time 
and allowing drafting of text before doing the markup.

For added points, once substitutions made, each line broken into hard 
break lines again in one sentence per line mode while preserving the 
troff code.

August 17th 2024
----------------

The ftp function on OpenBSD has more functionality than the one
in Linux. It can fetch Web pages. So below is a preliminary mad
science hack that can fetch a Web page, get rid of one level
of html tags, dump the resulting textish stuff into format and then
into less with 'squash lines'.

ftp -o - https://www.theregister.com | sed -e 's/<[^>]*>//g' | fmt | less -s

Sort of works, but misses style sheets and scripts so a couple
more sed lines needed for {css} and <script> and stuff.

Has legs. Mad science idea: OpenBSD base comes with mandoc which
can format to pdf, html, ps and so on out of the box. Can also
format to plain text.

<https://stackoverflow.com/questions/19878056/sed-remove-tags-from-html-file>

The last suggestion looks very interesting as a filter

August 16th 2024
----------------

Stuff about SSDs

https://easylinuxtipsproject.blogspot.com/p/ssd.html

August 12th 2024
----------------

Use hdparm from a live usb to reset an SSD using the ata secerase command.

Arch wiki has good information

https://wiki.archlinux.org/title/Solid_state_drive/Memory_cell_clearing

Then re-partition the 60Gb SSD for OpenBSD

August 7th 2024
---------------

Current .exrc contents

set showmode
set showmatch
set ruler
set shiftwidth=4
set tabstop=4
set verbose
"set leftright (not sure if I want wrap or scroll so I try both)
map     #4      !}fmt^M
map     #5      !}ospl^M
map     ;       :
map #6 i\fB^M
map #7 a\fR^M
map #8 ^[i\fI^[Ea\fR^[

Had to retype the escaped characters because ksh on OpenBSD
actually uses some kind of termcap translation malarkey which
bash on Slackware just ignores. 
So ^M is a new line and entered as Ctrl-V and enter key
And ^[ is escape, entered as Ctrl-V and the escape key 

http://urbanjost.altervista.org/LIBRARY/public_html/VI/exrc_files/exrc_BEGINNER.html

Above comically complex but I raided it for a few things.

July 26th 2024
--------------

nvi on Slackware 15 segfaults if you try to use the cedit option to make
ex command history editable.

https://www.linuxquestions.org/questions/slackware-14/nvi-segfaults-in-command-edit-and-cflags-aren't-set-properly-slackbuild-current-4175693589/#post6240766

suggests a work around

Recompile nvi. Configure as normal.
At the make stage, pass a variable as follows

OPTFLAG="$SLKCFLAGS" make

some fiddling with the slackbuild might be needed. Works fine on Debian.

Above does not work

https://github.com/johnsonjh/OpenVi

Removed the nvi package and compiled OpenVI (alas no UTF-8).
As per instructions

* unzip the git file somewhere
* cd OpenVi-master
* make
* make install

Me being a lasy person, the default compile goes into 
/usr/local/bin/ovi
and the manual pages get put in /usr/local/share/man/
which is not on manpath

So I just simlinked

ln -s /usr/local/share/man/man1/ovi.1 /usr/man/man1/vi.1
ln -s /usr/local/share/man/man1/oview.1 /usr/man/man1/view.1
ln -s /usr/local/share/man/man1/oex.1 /usr/man/man1/ex.1
ln -s /usr/local/share/man/man8/ovi.recover.8 /usr/man/man8/vi.recover.8

and I simlinked the binary to vi as follows

ln -s /usr/local/bin/ovi /usr/bin/vi
ln -s /usr/local/bin/oview /usr/bin/view
ln -s /usr/local/bin/oex /usr/bin/ex

When you remove the nvi package it simlinks vi to vim
so I had to delete those simlinks first.

current .exrc is

set showmode
set showmatch
set ruler
set shiftwidth=4
set tabstop=4
set verbose
"set leftright (not sure if I want wrap or scroll so I try both)
map     #4	!}fmt^M
map     #5	!}ospl^M
map     ;	:
set cedit=^[

May 13th 2024
-------------

Terminus bitmap font on OpenBSD 7.5 so I can use xterm with nice sharp
characters.

foo$ pkg_info -Q terminus
terminus-font-4.49.1p1 (installed)
terminus-font-4.49.1p1-centered_tilde
terminus-font-4.49.1p1-symquotes
terminus-font-4.49.1p1-symquotes-centered_tilde
terminus-nerd-fonts-3.0.2

I went for the plain terminus font as you can see that is the one that 
is installed. Build a list of the fonts in the directory...

# cd /usr/local/share/fonts/terminus
# mkfontdir

Temporary Xorg font path can be set with xset (e.g. in .xsession)

$ xset fp+ /usr/local/share/fonts/terminus

Then use xfontsel to find the 'terminus' family and try out various 
sizes. On the X201's screen I found the 24 pixel size to be best as
default...

-*-terminus-medium-*-*-*-24-*-*-*-*-*-iso8859-1

So I added the following into .Xdefaults

foo$ cat .Xdefaults                                                            
! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
XTerm*loginShell:true
xterm*font5: -*-terminus-medium-*-*-*-28-*-*-*-*-*-iso8859-1
xterm*font: -*-terminus-medium-*-*-*-24-*-*-*-*-*-iso8859-1
foo$

The font5 size is the 'large' font in the xterm menu.

Below is the rest of the basic .Xdefaults (still need the xft stuff)

foo$ cat .Xdefaults                                                            
! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
XTerm*loginShell:true
xterm*font5: -*-terminus-medium-*-*-*-28-*-*-*-*-*-iso8859-1
xterm*font: -*-terminus-medium-*-*-*-24-*-*-*-*-*-iso8859-1
*xterm*reverseVideo: true
xterm*scrollBar: true
xterm*rightScrollBar: true
! Pinched from a blog post
! https://aduros.com/blog/xterm-its-better-than-you-thought/
*xterm.vt100.translations: #override \n\
    Ctrl Shift N: scroll-back(1, halfpage) \n\
    Ctrl Shift T: scroll-forw(1, halfpage) \n\
    Ctrl Shift C: copy-selection(CLIPBOARD) \n\
    Ctrl Shift V: insert-selection(CLIPBOARD) \n\
    Ctrl Shift H: set-altscreen(toggle)
!xterm*allowBoldFonts: false


May 10th 2024
-------------

# Function to name icon and window
# ]0 names both icon and window
# ]1 names only icon
# ]2 names only window
# https://unix.stackexchange.com/questions/265760/what-does-it-mean-to-set-a-terminals-icon-title
twmname () {
echo -e '\e]0;tty: '$1'\a'
return 1
}

Can name the window and icon in twm and other window managers.
Icons on root window easier to manage.

May 6th 2024
------------

Xterm and Alt key fixed - below all works under twm on slackware
Need to check with NetBSD on T42 and the other minimal DEs. Also
on the xfce where I use xterm.

bash-5.1$ cat Xdefaults-May-24-Alt-key-fixed 
! Set some basic ttf font settings for Firefox
Xft.dpi: 96
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
! xterm basics
*xterm*reverseVideo: true
*XTerm*scrollBar: true
*XTerm*rightScrollBar: true
! Pinched from a blog post but see man xterm as well
! https://aduros.com/blog/xterm-its-better-than-you-thought/
XTerm*vt100.translations: #override \n\
    Ctrl Shift <Key>N: scroll-back(1, halfpage) \n\
    Ctrl Shift <Key>T: scroll-forw(1, halfpage) \n\
    Shift Ctrl <Key> C: copy-selection(CLIPBOARD) \n\
    Shift Ctrl <Key> V: insert-selection(CLIPBOARD)
! Do not want bold as the m turns into a solid block
XTerm*allowBoldFonts: false
! Fix Alt key especially Alt . in bash and Alt f for readline
XTerm*metaSendsEscape: true
XTerm*eightBitInput: false
XTerm*vt100.eightBitInput: false
bash-5.1$ 

April 9th 2024
-------------- 

Firefox scroll bar settings for an always visible 
chubby scroll bar that stays the same with when you
mouse over it.

widget.non-native-theme.scrollbar.size.override 20
widget.non-native-theme.scrollbar.style 3

OpenBSD: installed xfce and all fine on the guest wifi in the
exchange.

Had to manually delete /var/db/pkg/partial* entries (these are 
directories) as pkg_check had checked them and suggested they were not a 
problem because partial but pkg_delete could not delete them.

Having done that, I was able to install pythons and ghostscript and the 
dependencies fanning out from those into stuff like Abiword and 
Gnumeric.

April 8th 2024
--------------

OpenBSD 7.5 out and seems to have performance improvements.

Below is the .Xresources file I'm using with xterm.

XTerm*loginShell:true
! Font settings                                                                 
Xft.dpi: 96                                                                    
Xft.autohint: 0                                                                 
Xft.lcdfilter: lcddefault                                                       
Xft.hintstyle: hintslight                                                       
Xft.hinting: 1                                                                  
Xft.antialias: 1                                                                
Xft.rgba: rgb                                                                   
! Use a nice truetype font and size by default...                               
xterm*faceName: DejaVu Sans Mono Book                                           
xterm*faceSize: 16
*.vt100.reverseVideo: true
! Pinched from a blog post
! https://aduros.com/blog/xterm-its-better-than-you-thought/
XTerm.vt100.translations: #override \n\
    Ctrl Shift <Key>N: scroll-back(1, halfpage) \n\
    Ctrl Shift <Key>T: scroll-forw(1, halfpage) \n\
    Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
    Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\
    Ctrl Shift <Key>H: set-altscreen(toggle)

Other applications include alpine for mail and w3m for Web browsing with 
its odd mashup of emacs and vi style keyboard shortcuts. Xpdf3 version 
has very few dependencies. Groff and grap are available. mpg123 has no 
dependencies and 'just works' with the OpenBSD sound system including 
the volume keys on the old ThinkPad T61.

This is on a 500Gb 7200rpm spinning rust hard drive *with* full-disk
encryption set up using the installer.

March 16th 2024
---------------

NetBSD RC 6 out now so trying an upgrade using the binary package tools. 
Sysupgrade may itself be a binary package that you have to install and 
not part of the base.

#sysupgrade auto https://cdn.netbsd.org/pub/NetBSD/NetBSD-10.0_RC6/amd64/

https://www.netbsd.org/docs/pkgsrc/using.html

adjust repositories in /usr/pkg/etc/pkgin/repositories.conf
(not sure about that bit - see how it goes)

then 

#pkgin upgrade

"An existing installation can be upgraded by booting an installation 
image and selecting the Upgrade option."

https://www.netbsd.org/releases/formal-10/NetBSD-10.0.html

March 7th 2024
--------------

NetBSD 10.5 RC out now so might try an install on one of the old 
slightly broken Thinkpads. T60:

https://www.unitedbsd.com/d/1028-lenovo-t60-netbsd-100-beta-i386-install-wpi-fatal-firmware-error

Suggests using

wpa_supplicant_flags="-B -i wpi0 -D bsd -c /etc/wpa_supplicant.conf"

in rc.conf to get around the firmware error messages and sporadic wifi 
drops.

Also NetBSD does cpu frequency control from userspace so install `estd`.

https://www.unitedbsd.com/d/923-high-cpu-usage-misconfigured-video-drivers/2

https://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/sysutils/estd/index.html

Section "Device"
 Identifier "Intel Graphics"
 Driver "intel"
 Option "AccelMethod" "uxa"
EndSection

Xorg.conf above - forum post suggests dropping the `uxa` line.

https://www.unitedbsd.com/d/6-netbsd-a-little-guide-for-newcomers

Above looks handy

https://www.unitedbsd.com/d/236-mailmailx/2

Actual heirloom-mailx

February 25th 2024
------------------

Convert eps or pdf to svg

svg files import into OpenOffice and LibreOffice well. troff based 
preprocessors can produce .ps or .pdf files well. So investigate the use 
of a converter.

https://superuser.com/questions/198460/converting-from-eps-to-svg-format

pdf2svg is in slackbuilds and has no dependencies. Suggested conversion 
commands are:

ps2pdf -dEPSCrop infile.eps
pdf2svg infile.pdf outfile.svg

Or later in thread...

epspdf infile.eps
pdf2svg infile.pdf outfile.svg 

Remember that ps2pdf is basically Adobe Distiller for Linux.

February 9th 2024
-----------------

Hilarious fun with my newly aquired external usb webcam on its gooseneck stand 
with integrated ring light, autofocus and mirror buttons. Expensive for what it 
is but useable immeadiatley and just great for writing out solutions to maths 
problems with a pen on paper in Zoom. Should be good for demonstrating 
constructions as well.

lsusb shows
Bus 001 Device 006: ID 1bcf:28c4 Sunplus Innovation Technology Inc. USB Camera

dmesg shows
[  345.481794] usb 1-6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  345.481802] usb 1-6.2: Product: USB Camera
[  345.481809] usb 1-6.2: Manufacturer: FPL-230221X
[  345.481814] usb 1-6.2: SerialNumber: 01.00.00
[  345.495958] usb 1-6.2: Found UVC 1.00 device USB Camera (1bcf:28c4)
[  345.572705] input: USB Camera: USB Camera as /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.2/1-6.2:1.0/input/input9

Then some stuff about not liking the microphone which is great as there isn't 
one.

'Just works' on the X220 i7 with KDE's Kamoso applet. Also fine in Chromium on 
Zoom.

The Webcam test site works on all my laptops.

On X60 i386, Kamoso preview won't work but does take snaps but you can't see 
what you are getting. Kamoso preview shows just a green rectangle. 

https://wiki.archlinux.org/title/webcam_setup

Arch Wiki gives a command line to use mplayer.
Now in my .bashrc as an alias.
'S' to take a screenshot which is dropped into current directory.

alias camsnap="mplayer tv:// -tv driver=v4l2:width=1920:height=1920:device=/dev/video0 -fps 15 -vf screenshot"

I want to try the mplayer alias on the X250 with just xfce4.

February 4th 2024
-----------------

Ulog alias to make this year's log page with links to the last two years 
pages.

# Make log page including links to previous years
alias ulog="cat ~/Documents/log/2024-*.txt | \
markdown > ~/Documents/log/log.html && \
echo '<hr id=\"bottom\">kpb \
[ <a href="log-2022.html">2022</a> | \
<a href="log-2023.html">2023</a> \
]' >> ~/Documents/log/log.html"

February 3rd 2024
-----------------

https://serverfault.com/questions/54949/how-can-i-use-rsync-with-a-fat-file-system

Sorting out using an rsync command line to sync my T60 folder with a USB 
stick with FAT format. Used to have problems with it copying all the 
files every time, even the unchanged ones. Using the --size-only option 
seems to sort that one (FAT records file modification time with limited 
accuracy).

# Backup Documents folder to T42DOCS/T60 which is FAT format
alias r-back="rsync --progress \
--size-only \
--update \
--recursive  ~/Documents /run/media/keith/T42DOCS/T60/"

The plan: I've disabled the radios in BIOS on the T60 so the only way 
you connect this machine to the Web is using the yellow ethernet cable 
to the router downstairs. Once a day for backup is the plan...

January 28th 2024
-----------------

# echo 90  > /sys/class/backlight/intel_backlight/brightness

On the X250 the brightness keys don't work in fluxbox and xbacklight 
can't find any outputs, so can write as root to the sys file above.

90 is pretty dim but not dimest, and 852 is value at highest brightness 
setting (bright enough to light a film scene).

January 27th 2024
-----------------

https://github.com/snorerot13/grap

Grap for groff. Preprocessor for the pic preprocessor for troff. 
Produces data plots and (by computing coordinates) plots functions.

Slackbuild from 12.1 does not work as compilers changed.

The grap-master.zip can be unzipped, and then

$ cd grap-master
$ aclocal && autoheader && automake --add-missing && autoconf

Warnings about some missing stuff

$ make

Compiles as user ok. Then as root...

# make install

Puts the man pages in correct places in all.

As user, copy examples back to a suitable directory in your home

$ cp /usr/local/share/examples/grap/* ~/Documents/troff/grap/

bash-5.1$ grog example.ms
groff -T ps -e -G -ms example.ms

So use

groff -T ps -e -G -ms example.ms > eg.ps

as a starting point. All the examples compile OK so the warnings at 
configure were probably just the effect of version changes and the 
compiler.

January 12th 2024
-----------------

The command below...

ps2pdf -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -dPDFSETTINGS=/printer formula.ps

embeds a subset of the fonts in the formula.ps file into a formula.pdf 
file in such a way that evince/atril/and all pdf viewers are happy with 
especially the maths fonts with the expanding brackets and square root 
signs. The file sizes are reasonable. If I use the -P -e option as an 
argument to -Tpdf I get the whole font embedded and the file size is 
huge. See below...

groff -e -ms  -Tpdf -P -e test.ms > test.pdf

So my workflow now is something like

groff -e -ms  -Tps formula.ms > formula.ps

Then the big ps2pdf command above to generate the pdf.

Just using default setting results in missing bracket segments for 
expanding brackets and in mis-aligned square root signs. But this ONLY 
happens on Slackware. Mint linux with Atril &c works fine. Xpdf works 
fine on both systems. Everything works fine on Slackware 14.2. I'm 
guessing this has something to do with the font paths that Atril and all 
try to use.

This is all with groff 1.24.x

https://www.reddit.com/r/groff/comments/1416o78/eqn_font_is_distorted_when_converting_postscript/

December 28th 2023
------------------

Recycled Thinkpad X250 off ebay for 100 notes. Very nice once you get 
past the chicklet keyboard (which is solid and has some reasonable key 
travel).

This model has an internal (cased) 'bridging battery' which is a cause 
of concern. By booting off a live Mint linux stick with the 3-cell 
external battery removed on battery power, running a upower command told 
me the following...

mint@mint:~$ upower -i /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               LGC
  model:                45N1113
  serial:               2193
  power supply:         yes
  updated:              Thu Dec 28 17:42:00 2023 (114 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              20.91 Wh
    energy-empty:        0 Wh
    energy-full:         21.59 Wh
    energy-full-design:  23.48 Wh
    energy-rate:         5.709 W
    voltage:             12.359 V
    charge-cycles:       N/A
    time to empty:       3.7 hours
    percentage:          96%
    capacity:            91.9506%
    technology:          lithium-ion
    icon-name:          'battery-full-symbolic'

So the (cased and socketed) internal battery still holds 21.59/23.58 
*100 % = 91.5% of its new power. OK for now. Spares are currently still 
available for £25 or so off ebay.

With the tiny 3 cell external battery in addition to the internal 
battery power manager claims around 7 hours of battery. Lid close 
suspend just works as well.

The external battery shows...

mint@mint:~$ upower -i /org/freedesktop/UPower/devices/battery_BAT1
  native-path:          BAT1
  vendor:               LGC
  model:                45N1127
  serial:               9200
  power supply:         yes
  updated:              Thu Dec 28 17:55:58 2023 (48 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    warning-level:       none
    energy:              19.79 Wh
    energy-empty:        0 Wh
    energy-full:         19.79 Wh
    energy-full-design:  23.48 Wh
    energy-rate:         0 W
    voltage:             12.652 V
    charge-cycles:       N/A
    percentage:          100%
    capacity:            84.2845%
    technology:          lithium-ion
    icon-name:          'battery-full-charged-symbolic'
  History (charge):
    1703786158	100.000	fully-charged

So 19.79 / 23.48 * 100 = 84% of original. Shows more wear so may 
replace.

December 21st 2023 
------------------

## Squeeze on T42 project: loop mount an iso image so apt-get recognises it

<https://forums.debian.net/viewtopic.php?t=1325>

Text by 'Harold' below (from 2005)

PS Squeeze goes like rocket fuel on the T42

I downloaded http://cdimage.debian.org/debian-cd/3.1 ... nary-1.iso into /usr/src.

I made two new directories on my hard drive:
# mkdir /iso_image/
# mkdir -p /media/debian/

I mounted the iso image, saved its contents, then unmounted it.
# mount -t iso9660 -o ro,loop /usr/src/debian-31r0a-i386-binary-1.iso /iso_image
# cp /iso_image/* -R /media/debian/
# umount /iso_image

I backed up /etc/apt/sources.list, rem'ed all existing lines and added the following line:
deb file:/media/debian/ stable main contrib

Finally, I opened dselect and updated the Debian package list.
dselect recognized /media/debian as a valid local Debian package repository. :-)
Top

## Later answer without having to copy the files from iso



Try this

mkdir /media/mountpoint  
mount -t iso9660 -o loop /pathtoiso.iso /media/mountpoint  

then add 

deb file:///media/mountpoint distro main contrib 

to /etc/sources.list with text editor and not with some GUI tool, then 
update from package manager.

<https://askubuntu.com/questions/4694/how-to-use-a-iso-image-as-a-cd-rom-repository>

October 19th 2023
-----------------

OpenBSD 7.4: convert a man page to a pdf

man -Tpdf man >man.pdf

mandoc is doing the lifting underneath.

https://unix.stackexchange.com/questions/444767/export-a-man-page-in-pdf

Also, OpenBSD's sed in base does not know the \n or \0 substitutions for 
new line and content of first match. I've copped out for now and 
installed gsed from packages but I want to do cross platform scripts 
eventually.

October 2nd 2023
----------------

xfce 4.18 how to swap Esc and CapsLk without using an .xsession file
and xsetkb. Make an .Xmodmap file as below...

keith@X60d:~$ cat .Xmodmap
! Swap caps lock and escape
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock

Then Settings -> Session and Startup -> Application Autostart

Click new and add a command

xmodmap /home/user/.Xmodmap

Save and make sure ticked. Logout and log in again.

Full path needed, not like on the unix stack exchange

<https://unix.stackexchange.com/questions/66775/how-to-permanently-swap-esc-and-caps-lock-in-xfce-xubuntu>


September 24th 2023
-------------------

.exrc
-----

Currently used with nvi

set showmode
set showmatch
set ruler
set shiftwidth=4
set tabstop=4
set verbose
"set leftright
map     #4      !}fmt^M
map	#5	!}ospl^M

The opsl script in my ~/bin folder looks like this...

keith@T60m:~$ cat ~/bin/ospl
# This command breaks a paragraph with hard line breaks
# into one clause per line (sentence, comma or question mark)
# It reverses the effect of fmt
# Meant for use with }!ospl from nvi
tr '\n' ' ' | sed "s/[.,?][ ]*/\0\n/g"

Remember that the ^M in .exrc means Ctrl-V Ctrl-M (escaped new line)
The two complimentary commands are bound to F4 and F5 respectively.

One Sentence Per Line script
----------------------------

$ sed "s/[.,?][ ]*/\0\n/g" <<< "This is, for example, another sentence.  And I'm using double space, after the fullstop.  Why not?  Indeed?"

The sed expression above will insert a new line after any commas, full stops or question marks in a sentence.  So the snippet converts from filled paragraphs back to one clause per line. Undoes fmt.

The [.,?] bracket contains the list of punctuation marks to break on.
The [ ]* bit says to match one or more spaces after the punctuation mark.
In the substitution term, the \0 prints the first match in the replacement text.

Turn this into a script.

<https://unix.stackexchange.com/a/708540>

cat file | tr '\n' ' ' | sed "s/[.,?][ ]/\0\n/g"

Above works for one paragraph with hard line breaks as produced by fmt.

The tr term removes the hard line breaks and replaces with a space so the
paragraphs are all one line long separated by a blank line.

The sed term then does its stuff correctly. 
Need to turn this command into a script.

August 9th 2023
---------------

bash-5.1$ cat .vimrc
set nocompatible
if has('gui_running')
    colorscheme evening
    set guifont=DejaVu\ Sans\ Mono\ 14
endif
set wrap
set linebreak

Above allows me to have bigish font in gVim with normal terminal font in 
vim. Note how the guifont name has to have escaped spaces and no speech 
marks. Took a bit of working out and some StackOverflowing.

July 22nd 2023
--------------

NetBSD 9.3 on T42 saga: Installs OK. Issue with Seamonkey and Surf (both 
gtk3) segfaulting with missing bits. Need to check the update process 
perhaps packages out of sync with the main system. Netsurf and links 
fine. Wifi uses iwi0 driver. Needs an acceptance of eula in sysctl.conf 
otherwise xconsole prints warnings every second. S3 suspend does not 
work, just reboots. May need kernel options and rebuild.

Notes below found from various sources.

Install overview
----------------

https://www.unitedbsd.com/d/
6-netbsd-a-little-guide-for-newcomers

Choose keyboard -> Install to hard disk -> Full 
installation -> Use the entire disk, then set the sizes 
of the partitions, / 30GB swap 2Gb

let dhcp configure my network connection automatically, 
set the console keyboard, created a root password, set 
the root shell to /bin/ksh and configure the system to 
use the correct pkgin mirror.

Copy init scripts for everybody's fave
--------------------------------------

# cp /usr/pkg/share/examples/rc.d/dbus /etc/rc.d/

Add these to /etc/rc.conf with the following:

rpcbind=YES
dbus=YES

Microcode (wifi?)
-----------------

# pkgin install intel-microcode-netbsd

copy the start-up script to /etc/rc.d

# cp /usr/pkg/share/examples/rc.d/intel-microcode /etc/
rc.d/

add

microcode=YES

to your rc.conf and reboot

Add non-root user
-----------------

# useradd -g wheel -G users -s /bin/ksh -c "your real 
name" -m user_name
# passwd user_name

doas
----

Edit /usr/pkg/etc/doas.conf

#doas.conf
permit :wheel
permit nopass user_name cmd reboot
permit nopass user_name cmd shutdown


Post install
------------

http://netbsd.org/docs/misc/index.html#pkgin

# export PKG_PATH=https://cdn.NetBSD.org/pub/pkgsrc/
packages/NetBSD/$(uname -p)/$(uname -r | cut -d_ -f1)/All
# pkg_add pkgin

Use pkgin to install binaries

# pkgin search ???
# pkgin install ???
# pkgin upgrade

TLS certs (may be OK)
---------------------

# pkgin install mozilla-rootcerts
# mozilla-rootcerts install

Daemons
-------

# service dhcpcd restart
Edit /etc/rc.conf to start system wide services
Edit /etc/rc.local for desktoppy things

Sysctl
------

$ sysctl hw.disknames
hw.disknames = wd0 dk0 dk1 dk2 cgd0

WiFi
----

iwn0 is the appropriate driver - not sure if installed
as part of core.

https://www.unitedbsd.com/d/672-question-about-netbsd-
wireless-and-wpa-supplicant/24

Edit /etc/rc.conf to include

dhcpcd=YES
dhcpcd_flags="${dhcpcd_flags} -b" (don't wait on boot)
wpa_supplicant=YES
wpa_supplicant_flags=
"-i iwn0 -c /etc/wpa_supplicant.conf"

Then create and edit /etc/wpa_supplicant.conf as usual...

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="myssid"
psk="mypassword"
}

For iwi0 driver the firmware is provided on the install image but you 
have to add a line to /etc/sysctl to 'accept' the EULA...

# Accept EULA for iwi0 wifi interface
hw.iwi.accept_eula=1

Will need to see if the wpa_supplicant GUI is available 
and does not bring in qt. Restart method...

# sh /etc/rc.d/network start

July 15th 2023
--------------

Downloading i386 DVD-1 iso from

https://cdimage.debian.org/mirror/cdimage/archive/6.0.10/i386/iso-dvd/

Will need to check if it is isohybrid or not. If not install from the 
live iso which is isohybrid.

I have what I think is the wifi firmware. Archive sources.list includes 
non-free so we can check.

July 13th 2023
--------------

Debian Squeeze archaeology project (part of Old Computer Challenge).

https://stackoverflow.com/questions/36080756/archive-repository-for-debian-squeeze

sources.list

deb http://archive.debian.org/debian-archive/debian/ squeeze main contrib non-free
deb http://archive.debian.org/debian-archive/debian/ squeeze-lts main contrib non-free

Sort the release file error

echo 'Acquire::Check-Valid-Until "false";' >/etc/apt/apt.conf.d/90ignore-release-date

Makes the release file date check go away. See

https://wiki.debian.org/RepositoryFormat#Date.2CValid-Until

Idea: download DVD-1 and DVD-2 of Squeeze and build my own little empire 
on the T42. Fly in the ointment: Web browser as always. With glibc at 
something like 2.11 there could be issues with binaries from 
Seamonkey/Firefox not being recent enough to get round the TLS upgrades.

June 25th 2023
--------------

# Screen grab
alias screenie='sleep 10 && xwd -root | convert \
xwd:- screenie-$(date +"%Y%m%d-%H%M").png'

xwd is the screen grap program that is part of x11. Imagemagick convert 
is needed because xwd files are bitmaps - no compression - and few 
graphics programs can read them. GNU Imp can convert xwd files as well.

June 14th 2023
--------------

Below on a Slackware 14.2 install on the T42. Less kde/xfce4 but with 
the Thunar basic stand alone packages added back. Seamonkey is current 
and seems OK with the legacy noscript plugin.

It has just occured to me that I may not actually have the terminus font 
installed but whatever font family is in use seems OK.

bash-4.3$ cat .Xresources 
! Font settings
Xft.dpi: 96
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
! Bitmap screen fonts for sharpness
UXTerm*font: -*-terminus-bold-*-*-*-22-*-*-*-*-*-iso10646-1
UXTerm*font1: -*-terminus-bold-*-*-*-12-*-*-*-*-*-iso10646-1
UXTerm*font2: -*-terminus-bold-*-*-*-14-*-*-*-*-*-iso10646-1
UXTerm*font3: -*-terminus-bold-*-*-*-16-*-*-*-*-*-iso10646-1
UXTerm*font4: -*-terminus-bold-*-*-*-22-*-*-*-*-*-iso10646-1
UXTerm*font5: -*-terminus-bold-*-*-*-24-*-*-*-*-*-iso10646-1
UXTerm*font6: -*-terminus-bold-*-*-*-32-*-*-*-*-*-iso10646-1
*.vt100.reverseVideo: true
UXTerm*scrollBar: true
UXTerm*rightScrollBar: true
! Pinched from a blog post
! https://aduros.com/blog/xterm-its-better-than-you-thought/
UXTerm.vt100.translations: #override \n\
    Ctrl Shift <Key>N: scroll-back(1, halfpage) \n\
    Ctrl Shift <Key>T: scroll-forw(1, halfpage) \n\
    Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
    Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\
    Ctrl Shift <Key>H: set-altscreen(toggle)
! Pinched from an old HN discussion
! Convert Meta-x into "ESC x", not "ø"
UXTerm.VT100.metaSendsEscape: true
! No bold bitmap fonts - the 'm' looks like a block on
! smaller sizes otherwise
UXTerm*allowBoldFonts:       false
bash-4.3$

May 24th May 2023
-----------------

SeaMonkey set larger font in UI using userChrome.css

http://kb.mozillazine.org/Pane_and_menu_fonts

/* Global UI font */
* { font-size: 12pt !important;
  font-family: Verdana !important; 
}

'Verdana' isn't on the laptop but obviously some kind of font 
substitution is happening. Need to check linux names.

Using TDE Trinity Desktop Environment on Slackware 15 on X61s. Just the 
tdebase and tdepowersave packages. Three hours to compile on core duo. 
About 120Mb packages.

https://github.com/Ray-V/tde-slackbuilds

The script works fine and puts the packages in /tmp as usual.

May 1st 2023
------------

UXterm .Xresources file is this...

UXTerm*font: -*-terminus-bold-*-*-*-22-*-*-*-*-*-iso10646-1
UXTerm*font1: -*-terminus-bold-*-*-*-12-*-*-*-*-*-iso10646-1
UXTerm*font2: -*-terminus-bold-*-*-*-14-*-*-*-*-*-iso10646-1
UXTerm*font3: -*-terminus-bold-*-*-*-16-*-*-*-*-*-iso10646-1
UXTerm*font4: -*-terminus-bold-*-*-*-22-*-*-*-*-*-iso10646-1
UXTerm*font5: -*-terminus-bold-*-*-*-24-*-*-*-*-*-iso10646-1
UXTerm*font6: -*-terminus-bold-*-*-*-32-*-*-*-*-*-iso10646-1
*.vt100.reverseVideo: true
UXTerm*scrollBar: true
UXTerm*rightScrollBar: true
! Pinched from a blog post
! https://aduros.com/blog/xterm-its-better-than-you-thought/
UXTerm.vt100.translations: #override \n\
    Ctrl Shift <Key>N: scroll-back(1, halfpage) \n\
    Ctrl Shift <Key>T: scroll-forw(1, halfpage) \n\
    Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
    Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\
    Ctrl Shift <Key>H: set-altscreen(toggle)
! Pinched from an old HN discussion
! Convert Meta-x into "ESC x"
UXTerm.VT100.metaSendsEscape: true

Crisp sharp bitmapped fonts at larger sizes. Sensible copy/paste.

April 29th 2023
---------------

Dell E5420 boatanchor with Slackware64 15.0. Has an ALPS GlidePoint 
trackpad. On one occasion did not work on resume from S3 sleep. Not the 
smbios thing, found a GenToo Wiki page...

https://wiki.gentoo.org/wiki/Alps_PS/2

Added this file in xorg.conf.d (nothing else there)

FILE /etc/X11/xorg.conf.d/30-touchpad.conf

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"

        Option "Tapping" "on"
        Option "Accel Speed" "1.0"
EndSection

dmesg | grep ALPS 

to find what it is

libinput list-devices

to check settings

Seems to be happier with resuming

April 13th 2023
---------------

Installing extra fonts in OpenBSD 7.3

Higari and Indian language fonts: install noto-cjk and lohit-fonts 
packages from ports. The install script runs the font cache. Firefox 
picks them up straight away so no more funny boxes on pages.

Apache fonts to deal with OpenOffice docs: manual install of Tinos, 
Arimo and OpenSans fonts from Ascender fonts. I used fontsquirrel.

https://www.fontsquirrel.com/fonts/list/foundry/ascender-fonts

Unzip in Downloads, you get the .ttf files
Copy to /usr/X11R6/lib/X11/fonts/TTF/
Run
/usr/X11R6/bin/fc-cache -v

Restart LibreOffice and Writer picks up Tinos, Arimo and OpenSans when a 
document written in OpenOffice is opened.

March 29th 2023
---------------

Text to pdf using a cups filter. Command below processes file thing into 
thing.pdf with no page junk. Just a nice PS typewriter font.

/usr/lib/cups/filter/texttopdf 1 1 1 1 1 thing > thing.pdf

From

https://lists.debian.org/debian-user/2023/03/msg00292.html

The 1 1 1 1 1 stuff is just putting dummy values into the arguments to 
the cups filter. Just run without arguments to see the options. Not 
utf-8 and probably letter paper size nominal.

bash-4.3$ /usr/lib/cups/filter/texttopdf
Usage: texttopdf job-id user title copies options [file]

Might wrap a function around this to use a less long command.

 CHARSET=utf-8 /usr/lib/cups/filter/texttopdf 1 1 1 1 1 UTF-8-demo.txt >out.pdf

Above gets round utf-8 from

https://lists.debian.org/debian-user/2023/03/msg00329.html

for ODT files:

    odt_files=(...)
    for odt_file in "${odt_files[@]}"
    do
        echo "Processing ${odt_file}"
        lowriter --convert-to pdf "${odt_file}"
    done

Above for scriptable conversion of odt files from

https://lists.debian.org/debian-user/2023/03/msg00357.html

March 17th 2023
---------------

Debian 11 and TeXmacs
=====================

1) No package in repos

2) Advice is to download the static build from texmacs web site and unpack

3) Because static needs to find libaries so if unpacking in /opt need to 
add paths to /etc/profile...

    keith@L440:~$ cat /etc/profile
    # /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
    # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
    
    if [ "$(id -u)" -eq 0 ]; then
      PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    else
     export TEXMACS_PATH=/opt/TeXmacs-2.1.1-x86_64-pc-linux-gnu/TeXmacs 
     PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:$TEXMACS_PATH/bin"
    fi
    export PATH

4) Then added a texmacs.desktop file at ~/.local/share/applications

    keith@L440:~$ cat .local/share/applications/texmacs.desktop
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Terminal=false
    MimeType=text/x-texmacs.doc;text/x-texmacs.sty;text/plain;text/x-tex;
    Exec=/opt/TeXmacs-2.1.1-x86_64-pc-linux-gnu/TeXmacs/bin/texmacs %f
    Name=TeXmacs
    Icon=/home/keith/.icons/texmacs-icon.png

The icon was pinched from some github and looks more in keeping with 
Gnome Shell than the official xpm files.

The %f bit in the Exec path is the feature that means you can right 
click on a .tm file and select TeXmacs as the application to Open 
With... in nautilus file manager.

Upgrade from Debian Bullseye 11 to Bookworm 12

https://wiki.debian.org/DebianUpgrade

Basically full upgrade of Bullseye

Change /etc/apt/sources.list to Bookworm

Add non-free-firmware (new sub repository)

Full update & upgrade

Autoremove old packages

Reboot

March 16th 2023
---------------

Fedora 37 (Gnome 44.3)

https://discussion.fedoraproject.org/t/touchpad-dont-work-after-suspended/73733/22

1) On waking after a suspend, trackpoint/trackpad frozen. Rest of GUI fine

2) This happens on wayland or Xorg

3) Turns out the trackpad kernel module gets unloaded somehow

4) you have to run this...

sudo modprobe -r -v rmi_smbus  && sudo modprobe -v rmi_smbus

[keith@~]$ sudo modprobe -r -v rmi_smbus  && sudo modprobe -v rmi_smbus
[sudo] password for keith: 
rmmod rmi_smbus
rmmod rmi_core
insmod /lib/modules/6.1.18-200.fc37.x86_64/kernel/drivers/input/rmi4/rmi_core.ko.xz 
insmod /lib/modules/6.1.18-200.fc37.x86_64/kernel/drivers/input/rmi4/rmi_smbus.ko.xz 

Can't make this up. With Gnome GUI only way to be able to enter the 
command is to find a USB mouse and plug it in unless you write the 
incantation down and copy it into a terminal.

Debian 11 has a fix (actually Ubuntu board)

https://askubuntu.com/questions/1097080/ubuntu-18-04-mouse-on-lenovo-thinkpad-x240-not-working-after-suspend-hibernate

Make the file

keith@L440:~$ cat /lib/systemd/system-sleep/rmi-driver
#!/bin/sh

case $1 in
  post)
    rmmod rmi_core
    rmmod rmi_smbus
    modprobe rmi_core
    modprobe rmi_smbus
    ;;
esac

And make executable

chmod +x /lib/systemd/system-sleep/rmi-driver

And it works by basically reloading the driver each time the laptop 
wakes up. Hacky but works.

Note from the future Nov 8th 2023: below works in Slackware 15.0 (elogind)

root@L440f:~# cat /lib64/elogind/system-sleep/rmi-driver
#!/bin/sh

case $1 in
  post)
    rmmod rmi_core
    rmmod rmi_smbus
    modprobe rmi_core
    modprobe rmi_smbus
    ;;
esac

root@L440f:~# 

and make executable as before.

March 5th 2023
--------------

gVim on Slackware 15.0
======================

The two settings below produce a menu bar font that isn't microscopic 
and a text font that is fairly large.

/home/keith$ cat .gvimrc
set guifont=Monospace\ 14

/home/keith$ cat .config/gtk-3.0/settings.ini 
[Settings]
gtk-font-name = Sans 12

Below is a starter .vimrc for general editing (influences the command 
line vim as well). I took it off some tutorial site. Blank and commented 
lines omitted.

/home/keith$ grep '^[^"]' .vimrc
set nocompatible
syntax on
set shortmess+=I
set number
set relativenumber "numbers *increase* from current line - interesting
set laststatus=2
set backspace=indent,eol,start
set hidden
set ignorecase
set smartcase
set incsearch
nmap Q <Nop> " 'Q' in normal mode enters Ex mode. You almost never want this.
set noerrorbells visualbell t_vb=
set mouse+=a " mouse support might be more useful in gVim
nnoremap <Left>  :echoe "Use h"<CR>
nnoremap <Right> :echoe "Use l"<CR>
nnoremap <Up>    :echoe "Use k"<CR>
nnoremap <Down>  :echoe "Use j"<CR>
inoremap <Left>  <ESC>:echoe "Use h"<CR>
inoremap <Right> <ESC>:echoe "Use l"<CR>
inoremap <Up>    <ESC>:echoe "Use k"<CR>
inoremap <Down>  <ESC>:echoe "Use j"<CR>

mg and backspace delete
=======================

Add following to .Xresources...

xterm.*backarrowKey: false 

Add following to .emacs...

(if (not window-system) (normal-erase-is-backspace-mode 0))

Then emacs works as you'd expect and mg compiled from the slackbuild 
also does backspace delete.

Meta key in `Xterm` is a problem with `mg` so try...

/home/keith$ cat .inputrc
    set meta-flag on
    set convert-meta off
    set output-meta on

and add the following to .Xresources...

! meta key for emacs
XTerm*metaSendsEscape: true
!XTerm*eightBitInput: false

Bottom line does nowt in a UTF-8 terminal anyway.

Both emacs and mg work as expected in the tty console.

Feb 3rd 2023
------------

Alpine mail client setup
========================

<https://ratfactor.com/slackware/alpine>

Alpine has a very portable configuration. The .pinerc file has every 
possible option with comments in it so it is a bit long to copy here. 
Below is a rough pattern for three mail boxes, one at name@domain, 
another at alias@domain and a third separate one at name@anothermail. 
Just the set lines in .pinerc

bash-4.3$ cat .pinerc | grep -v '^#' | grep -v '=$' | grep -v '^$'
personal-name=YourName
user-domain=your.domain
smtp-server=smtp-auth.isp.com:587/tls/user=name@domain
inbox-path={mail.isp.com:143/starttls/user=name@domain}Inbox
customized-hdrs=From: yourname@domain
default-fcc={mail.isp.com:143/starttls/user=name@domain}Sent
read-message-folder={mail.isp.com:143/starttls/user=name@domain}Read
literal-signature=--\nFull Name \nhttps://domain\n\n
feature-list=signature-at-bottom,
	enable-incoming-folders,
	auto-move-read-msgs,
	expunge-without-confirm
initial-keystroke-list=i
sort-key=Arrival/Reverse
image-viewer=/usr/bin/geeqie
url-viewers=/usr/bin/firefox
incoming-folders=nickname-anothermail {mail.anothermail.com:143/starttls/user=name}Inbox,
	anothermail-sent {mail.anothermail.com:143/starttls/user=name}sent-mail,
	anothermail-read {mail.anothermail.com:143/starttls/user=name}read-mail
folder-collections=mail/[keith],
	alias {mail.isp.com:143/starttls/user=alias@domain}[Inbox],
	Sent {mail.isp.com:143/starttls/user=name@domain}[Sent],
	Sent-alias  {mail.isp.com:143/starttls/user=alias@domain}[Sent],
	Read {mail.isp.com:143/starttls/user=name@domain}[Read]
last-time-prune-questioned=123.2
last-version-used=6.25

Slackware 14.2 and 15.0 uses .alpine.passfile as the name of the file to 
store passwords. Alpine demands that you set a master password when 
storing passwords. You can set one, store all the passwords for various 
accounts, then rename the master password hash code and reencrypt as 
follows...

<https://askubuntu.com/questions/1349401/how-to-remove-the-master-password-for-the-alpine-pine-e-mail-client>

$ cd /home/nicholas/.alpine-smime/.pwd
$ mv MasterPassword.key MasterPassword.key.orig # rename the key
$ openssl rsa -in MasterPassword.key.orig -out MasterPassword.key

Texmacs 2.1.1 spell check on Slackware 14.2
===========================================

Texmacs 2.1.1 will compile on Slackware64 14.2 using the 14.2 slackbuild 
with the source version modified. The only dependency is guile1.8, an 
old version of guile which must be installed before compiling Texmacs. 
You will need to compile the hunspell-en package as well to get spell 
check working - if you don't you get an error console with loads of 
"can't find en_GB" errors. I compiled all five english dictionaries. The 
spell check is old school: you run spell and it finds errors which it 
displays in a pane below the document, offering possible corrections for 
you to select from. Useful for catching typos and less intrusive than 
the underline in red kind.

Dec 14th 2022
-------------

    /home/keith/bin$ cat webster 
    #!/bin/sh
    if [ -e $HOME/bin/.webster/$1 ]
    then
        cat $HOME/bin/.webster/$1
    else
        links -dump https://www.websters1913.com/words/$1 > $HOME/bin/.webster/$1
        cat $HOME/bin/.webster/$1
    fi

Above script sits in my user bin and when I invoke it with a single word 
argument it checks if I have asked for that word before. If I have, it 
prints the definition from the Webster's 1913 Web site. If I haven't, 
the script fetches the definition and saves it as a file in 
~/bin/.websters and then displays the definition.

Amusingly if the word is not found the 404 page is saved for that word 
so I get the 404 if I ask for the missing word again.

    /home/keith/bin$ cat webster 
    #!/bin/sh
    w="$1"
    if [ -e $HOME/bin/.webster/"$w" ]
    then
        cat $HOME/bin/.webster/"$w"
    else
        links -dump https://www.websters1913.com/words/"$w" > $HOME/bin/.webster/"$w"
        cat $HOME/bin/.webster/"$w"
    fi

Above version can cope with phrases with spaces *provided* you put them 
in quotes when using webster.


October 13th 2022
-----------------

Recompile gcc and emacs slackbuilds on Slackware-15.0 to enable native 
compilation of elisp code for lutz and giggles.

Compiling emacs 28.2 with native compilation of elisp requires
rebuilding the gcc slackpackage and then modifying some of the emacs
compile options.

Download the Slackware 15.0 emacs source code to slackbuilds using...

rsync -av rsync://slackware.uk/slackware/slackware-15.0/source/d/gcc/ .

Add following line to emacs.SlackBuild script (becomes line 357) to add 
the ./configure option for just in time compilation so libgccjit gets 
built...

     --enable-host-shared \

...then add `jit` to the list of languages in line 358

     --enable-languages=ada,brig,c,c++,d,fortran,go,lto,objc,obj-c++,jit \

Finally, I usually increase the BUILD number in line 60 by 1 so that I
can upgrade the gcc packages once compiled using upgradepkg. I DON'T
blacklist gcc in slackpkg as I want to know if this fundamental
package is upgraded at all.

You end up with these eight gcc packages

/tmp/gcc-11.2.0-i586-4.txz
/tmp/gcc-brig-11.2.0-i586-4.txz
/tmp/gcc-g++-11.2.0-i586-4.txz
/tmp/gcc-gdc-11.2.0-i586-4.txz
/tmp/gcc-gfortran-11.2.0-i586-4.txz
/tmp/gcc-gnat-11.2.0-i586-4.txz
/tmp/gcc-go-11.2.0-i586-4.txz
/tmp/gcc-objc-11.2.0-i586-4.txz

It is an overnight compile on a core duo laptop with 3Gb ram.

I upgraded my gcc as follows...

#  upgradepkg /tmp/gcc*-11.2.0-i586-4.txz

Now fetch the emacs source and SlackBuild script

rsync -av rsync://slackware.uk/slackware/slackware-15.0/source/e/emacs/ .

Delete the emacs version 27 source files

    emacs-27.2.tar.xz
    emacs-27.2.tar.xz.sig 

Go to a GNU mirror and download the most recent release sources

    emacs-28.2.tar.xz
    emacs-28.2.tar.xz.sig 

Then edit the SlackBuild as follows

Line 74 becomes

    PDUMPER=${PDUMPER:-"--with-dumping=pdumper"}

This option is needed for native compilation - you'll get an error 
without it. I've compiled and run the no-X emacs binaries (see below) 
and I am not seing any errors (yet) when running `emacs -nw`. I might 
redo this with explicit options for jit and pdumper in with-X build and 
no pdumper or jit in no-X build if there are any problems.

Line 106 is where the ./configure options for the X version (GUI) of
emacs starts. Add

  --with-native-compilation \

somewhere in there, I put mine on line 117 just before the with-X
option.

I also put the same option in the /configure options for the no-X
build, starting at line 146 (145 in the unmodified SlackBuild).

It is a two hour compile on the core duo. Then upgrade the emacs
package...

upgradepkg /tmp/emacs*.txz

October 12th 2022
-----------------

Slackware 14.2 on X61s upgrading to firefox-102 esr generated a crash 
which turned out to be to do with the profile from the earlier version 
somehow. I created a fresh profile with my usual settings and tarred it 
just in case.

October 8th 2022
----------------

Trisquel 10 (Ubuntu 20. something LTS) get iwlwifi firmware installed on 
Thinkpad L440 without rebooting. This is 'naughty' use of non-free 
firmware.

https://askubuntu.com/questions/750064/how-to-change-the-wifi-firmware-in-use

    # dmesg | grep iwlwifi 

Output will look something like below. 

    [3775.484091] iwlwifi 0000:02:00.0: Direct firmware load for     
    iwlwifi-7260-17.ucode failed with error -2

    # echo 1 >  /sys/bus/pci/devices/0000:02:00.0/remove 

(executing line above will kill your wifi connection)

    # echo 1 > /sys/bus/pci/rescan (find new wifi device)

    # killall wpa_supplicant (might be needed)

Use your system's applet or process to reconnect your wireless adapter. 

August 8th 2022
---------------

Slackware 14.2 back on the L440 for... reasons (hinge on T61p gone 
crack)

Needs a synaptic conf file in /etc/X11/xorg.conf.d to get middle and 
right click on the trackpad...

https://gist.githubusercontent.com/samoylenko/44410645c6e305f802d7/raw/40e4b930fb2e9cc592587372203ffc211b6b0d51/50-synaptics.conf

Reproduced below just in case...

    bash-4.3$ cat 60-synaptics.conf 
    # This is a standard file from /usr/share/X11/xorg.conf.d/50-synaptics.conf
    # With added and slightly modified example from https://wiki.debian.org/SynapticsTouchpad
    # Put it to /etc/X11/xorg.conf.d/50-synaptics.conf
    #
    Section "InputClass"
            Identifier "touchpad catchall"
            Driver "synaptics"
            MatchIsTouchpad "on"
    # This option is recommend on all Linux systems using evdev, but cannot be
    # enabled by default. See the following link for details:
    # http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
    #       MatchDevicePath "/dev/input/event*"
    EndSection
    
    Section "InputClass"
            Identifier "touchpad ignore duplicates"
            MatchIsTouchpad "on"
            MatchOS "Linux"
            MatchDevicePath "/dev/input/mouse*"
            Option "Ignore" "on"
    EndSection
    
    # This option enables the bottom right corner to be a right button on clickpads
    # and the right and middle top areas to be right / middle buttons on clickpads
    # with a top button area.
    # This option is only interpreted by clickpads.
    Section "InputClass"
            Identifier "Default clickpad buttons"
            MatchDriver "synaptics"
            Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
            Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
    EndSection
    
    # This option disables software buttons on Apple touchpads.
    # This option is only interpreted by clickpads.
    Section "InputClass"
            Identifier "Disable clickpad buttons on Apple touchpads"
            MatchProduct "Apple|bcm5974"
            MatchDriver "synaptics"
            Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
    EndSection
    
    # Custom config by pm
    Section "InputClass"
    	Identifier	"Touchpad"			# required
    	MatchIsTouchpad "yes"				# required
    	Driver          "synaptics"			# required
    #	Option          "MinSpeed"		"0.5"
    #	Option		"MaxSpeed"		"1.0"
    #	Option		"AccelFactor"		"0.075"
    	Option		"TapButton1"		"1"
    	Option		"TapButton2"		"3"	# multitouch
    	Option		"TapButton3"		"2"	# multitouch
    	Option		"VertTwoFingerScroll"	"1"	# multitouch
    	Option		"HorizTwoFingerScroll"	"1"	# multitouch
    #	Option		"VertEdgeScroll"	"1"
    #	Option		"CoastingSpeed"		"8"
    #	Option		"CornerCoasting"	"1"
    #	Option		"CircularScrolling"	"1"
    #	Option		"CircScrollTrigger"	"7"
    #	Option		"EdgeMotionUseAlways"	"1"
    #	Option		"LBCornerButton"	"8"     # browser "back" btn
    #	Option		"RBCornerButton"	"9"     # browser "forward" btn
    #	Option		"EmulateTwoFingerMinZ"	"35"
    #	Option		"EmulateTwoFingerMinW"	"8"
    EndSection

... also backed up on shell account backups.

July 23rd 2022
--------------

### Thunar stand-alone with fluxbox

https://bbs.archlinux.org/viewtopic.php?id=48531

Tell thunar which terminal to use to open when you right click in a 
directory and select 'open in terminal'...

    bash-5.1$ cat .config/xfce4/helpers.rc 
    TerminalEmulator=xterm

Works well with a handful of packages from xfce4 package set in 
Slackware.

July 21st 2022
--------------

### Slackware 15.0 just fluxbox no kde or xfce automount

Below are the Slackware 15.0 packages you need to add back to an install 
without kde or xfce to enable automounting of volumes with thunar. I'm 
using fluxbox.

bash-5.1$ ls -1
exo-4.16.3-x86_64-1.txz
libxfce4ui-4.16.1-x86_64-1.txz
libxfce4util-4.16.0-x86_64-3.txz
thunar-4.16.10-x86_64-1.txz
thunar-volman-4.16.0-x86_64-3.txz
tumbler-4.16.0-x86_64-4.txz
xfconf-4.16.0-x86_64-3.txz

June 18th 2022
--------------

Software achaeology

https://www.mark-gilbert.co.uk/fixing-yum-repos-on-centos-6-now-its-eol/

How to ressurect a Centos 6 / PUIAS box with gnome



June 5th 2022
-------------

https://askubuntu.com/questions/1179179/abcde-what-is-an-abcde-conf-file-to-rip-to-multiple-formats

abcde conf file. I just removed all the options other than flac, mp3 and 
ogg. Works fine on slackware with the following packages 'compiled' 
(mostly perl libraries) from the slackbuilds.

bash-5.1$ ls
abcde-2.9.3-x86_64-1_SBo.tgz
abcde.conf
cd-discid-1.4-x86_64-1_SBo.tgz
perl-Mojolicious-8.11-x86_64-1_SBo.tgz
perl-MusicBrainz-DiscID-0.06-x86_64-1_SBo.tgz
perl-WebService-MusicBrainz-1.0.5-noarch-1_SBo.tgz

Invoke with abcde -o flac for just the flac version or whatever. 

May 24th 2022
-------------

Sed edit in place to remove Windows/Dos end of line characters from a 
file I downloaded. The extra end of line character shows in vi as ^M.

    sed -i 's/^M$//g' ~/Downloads/hosts.txt

You can't just write ^M, you have to enter control characters in bash 
using Ctrl-V. So here we need to type Ctrl-V and Ctrl-M to enter the ^M 
control character (line feed?) after the / and before the $ for end of 
line.

I've got Slackware 15.0 on the 32bit X60 with fluxbox, thunar for 
external stick management, a couple of system try applets for nm-applet 
and for battery level. I've customised the `~/.fluxbox/init` and `keys` 
files and hacked my own style. Menu items to suit my software. All nice. 
Xfce4 is nice but getting heavy as it moves to GTK3.


March 18th 2022
---------------

On Slackware 14.2 on the X61s I use firefox-esr downloaded from Mozilla 
and repackaged using the `firefox-latest.sh` script. This means you get 
nags each time there is a minor upgrade to the Web browser in the form 
of an annoying button on the toolbar that cannot be removed or silenced. 
The work around is to use a policy, which must be in the /etc/ directory 
(so machine wide policy).

$ cat /etc/firefox/policies/policies.json 
{
 "policies": {
   "DisableAppUpdate": true,
   "DisableFirefoxAccounts": true,
   "DisableFirefoxStudies": true,
   "DisablePocket": true,
   "DisableTelemetry": true,
   "DontCheckDefaultBrowser": true,
   "SearchBar": "separate"
   }
}

From https://linuxreviews.org/HOWTO_Make_Mozilla_Firefox_Stop_Nagging_You_About_Updates_And_Other_Annoying_Idiocy

Added from the future 6th November 2023 for Slackware 15.0 and Firefox 
ESR 115.4.

Firefox Suggest keeps giving bonkers one word web addresses with .com or 
.org on the end as the first match when I already have a perfectly fine 
history entry.

{
 "policies": {
   "DisableAppUpdate": true,
   "DisableFirefoxAccounts": true,
   "DisableFirefoxStudies": true,
   "DisablePocket": true,
   "DisableTelemetry": true,
   "DontCheckDefaultBrowser": true,
   "SearchBar": "separate",
    "FirefoxSuggest": {
      "WebSuggestions": false,
      "SponsoredSuggestions": false,
      "ImproveSuggest": false,
      "Locked": false
       }
   }
}

Background

https://www.codeproject.com/Tips/5356799/How-to-Place-Mozilla-Firefox-Browser-under-Lockdow

and

https://mozilla.github.io/policy-templates/

February 27th 2022
------------------

Console font on X60 with 1024x768 display. The Terminus font series is a 
good compromise and the one below (setconsolefont script in Slackware) 
fits around 72 characters in width.

bash-5.1$ cat /etc/rc.d/rc.font
#!/bin/sh
#
# This selects your default screen font from among the ones in
# /usr/share/kbd/consolefonts.
#
setfont -v ter-928b.psf.gz

see

https://www.linuxquestions.org/questions/slackware-14/changing-slackware%27s-raw-console-font-4175510763/

from 2014. Gradual evolution in Slackware is one of the things I like.

February 14th 2022
------------------

X60 with OpenBSD i386 install using cwm. Seamonkey needs following...

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
* {
 font-size: 12pt !important;
 }

as userChrome.css in the profile/chrome directory. Key is the asterisk - 
matches all elements.

Also had to munge the hosts.txt file from WinHelp to use with unwind.

1) Get rid of windows returns with sed

2) Grep for lines starting with # character and -v them so only lines 
that don't start with # included

3) Use the cut -c 9- command to get rid of the 0.0.0.0 prefix for use 
with unwind on OpenBSD.

February 12th 2022
------------------

cwm on OpenBSD getting a coherent set of fonts on the L440 with its 1600 
by 900 screen.

I've got 96dpi set in .Xdefaults...

! Font settings
Xft.dpi: 96
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

! Use a nice truetype font and size by default... 
xterm*faceName: DejaVu Sans Mono Book
xterm*faceSize: 14

...and 14pt font size for xterm and other Xft apps. I have the following 
in gtkrc-2.0 for GTK+2 apps...

foo$ cat .gtkrc-2.0
gtk-font-name = "DejaVu Sans 16"

...and in .config/gtk-3.0/settings.ini...

foo$ cat .config/gtk-3.0/settings.ini                                          
gtk-font-name = Sans 16

...but as always Firefox is the odd one out and does not respond to font 
settings in styles. Firefox *does* respond to dpi settings but that 
tends to increase the size of the space around the menu buttons and 
tabs. You can use a userChrome.css setting to set a font for the menus 
and buttons...

...and in .config/gtk-3.0/settings.ini...

foo$ cat .config/gtk-3.0/settings.ini
gtk-font-name = Sans 16

...but as always Firefox is the odd one out and does not respond to font
settings in styles. Firefox *does* respond to dpi settings but that
tends to increase the size of the space around the menu buttons and
tabs. You can use a userChrome.css setting to set a font for the menus
and buttons...

https://www.userchrome.org/how-create-userchrome-css.html

Use the about:profiles window to find current profile then go to that 
profile's directory and create another directory called 'chrome'

In the chrome directory create the file userChrome.css with contents like 
this...

foo$ cat userChrome.css                                                        
/* global font */
* {
  font-family: DejaVu, sans-serif !important;
  font-size: 16pt !important;
}

Then use about:config to switch on 'legacy' user style sheet settings 
by setting the key...

toolkit.legacyUserProfileCustomizations.stylesheets

...to true

Fairly coherent set of font sizes all through then.

February 4th 2022
-----------------

Slackware 15.0 is out so reinstalled from iso on X60 as test machine. 
Used encypted home drive as per README_CRYPT.TXT. Didn't want to lose 
configs so used idea from

https://stackoverflow.com/questions/4572973/archiving-hidden-directories-with-tar

Basically, tar up your whole home drive to /var/tmp (user writable)

tar czpf /var/tmp/home.tgz .

Trailing dot is important. Wildcards won't expand to dotfiles.

Copy the home.tgz to external hard drive.

Reinstall.

Copy home.tgz back to /home/user and untar using...

tar xvf home.tgz

...log out/log into xfce4 and resume browsing the tabs you had open in 
Firefox...

December 10th 2021
------------------

Slackware 15.0RC: the version of ssh installed is depreciating RSA 
keys for ssh sessions. Below is a work around until I check with 
mythic about updating their ssh.

    [17:50]~$ cat .ssh/config
    Host some-server.com
        HostKeyAlgorithms +ssh-rsa
        PubkeyAcceptedKeyTypes +ssh-rsa
        RSAMinSize=1024 

Otherwise all good. 

Added 16th March 2023: Last line is for Fedora 37+ because they now set 
minimum RSA key length to 2048. See

https://community.netgear.com/t5/Managed-Switches/M4300-RSA-key-lenth-too-short/m-p/2287837

August 1st 2021
---------------

Pandoc on 32bit Slackware 14.2

https://www.linuxquestions.org/questions/slackware-14/installing-pandoc-in-slackware-with-stack-4175601111/#post5679376

http://slackware.uk/salix/i486/14.2/salix/ap/pandoc-1.17.0.1-i686-1gv.txz

Just works on Slackware 14.2 32 bit, all dependencies already installed.

Convert .odt doc to a (relatively clean) Web page

https://superuser.com/questions/885429/how-can-i-convert-odt-to-html-or-md-from-the-commandline

    pandoc -t html -s input.odt -s -o output.html

Exploring images, formulas and so on in a bit but this will save heaps 
of time especially if I can add a style sheet to the basic template.

June 8th 2021
-------------

Debian 11 Bullseye on the L440 because no work related teams or zooms needed for 
a bit, so replaced the Mint install as zoom and teams client friendly linux. 
Debian Buster and Bullseye both have issues with trackpad/trackpoint not working 
after resume from suspend. Link below works fine on Debian Bullseye testing...

https://askubuntu.com/questions/1159957/thinkpad-trackpoint-and-trackpoint-keys-disabled-after-suspend

My version...

keith@L440:~$ cat /lib/systemd/system-sleep/trackpad
#!/bin/bash

case $1/$2 in
  pre/*)
    echo "Going to $2..."
    # Place your pre suspend commands here, or `exit 0` if no pre suspend action required
    modprobe -r psmouse
    ;;
  post/*)
    echo "Waking up from $2..."
    # Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required
    sleep 2
    modprobe psmouse
    ;;
esac

Set the executable bit as root...

# chmod +x /lib/systemd/system-sleep/trackpad

and all good. Older Thinkpads have no issues with this at all. Will try it on 
the X220 and see what happens.

June 6th 2021
-------------

Run this every week or so

root@foo:~# /sbin/fstrim /

I did some stuff to enable trim on ssd with cryptsetup but I can't find 
the reference now for Slackware 14.2. Much easier with Slackware current 
going 15.

HP M15w laser printer just works on current (hpcups with the M14-M17 ppd 
autodetected once rc.cups and rc.cups-browsed set executable in 
/etc/rc.d/. Not so much on 14.2 still researching...

RStudio and R on current...

RStudio 1.4.1 converted from rpm using rpm2tgz. Needs ssh 0.1 so you 
need a compat library. Also postgres (yes, a complete dbms for one 
desktop application). R 4.0 needs pcre2 and R.

May 25th 2021
-------------

https://github.com/martinwguy/xvi

xvi is a stevie based vi clone from back in the day. If you install the 
POSIX version you get a bare bones vi that does not recognise backspace 
or the arrow keys thus forcing you to use the hjkl and other movements. 
The INSTALL and doc/README instructions for posix work fine but on 
Slackware I need to symlink the man file as follows...

ln -s /usr/local/share/man/man1/xvi.1 /usr/man/man1/

Having run make within the docs folder, I have a nice pdf formatted man 
page as well.

May 16th 2021
-------------

https://wiki.c2.com/?UnixCulture

Half way down page. Could be useful for removing duplicates from the 
year based teaching files...

"When I take a backup of my Psion, I simply copy the contents of the disk 
to a directory whose name is today's date. This gives me a large 
collection of directories, nearly one per day, whose contents are nearly 
identical. I then index each one using this comment:

	find $new -type f -exec md5sum '{}' ';' | sort -k 2 > $new.ndx

Now I delete all the identical files from the older directory like this

	diff -rqsb $old $new | gawk '/identical$/{print $2}' | xargs rm

It has a problem if there are filenames with spaces."

May 8th 2021
------------

Below is the minimal(ish) book mark up for an LaTeX book style

See https://tex.stackexchange.com/questions/23403/how-can-i-produce-an-unnumbered-chapter-for-the-introduction

\documentclass[11pt,a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\begin{document}
  \frontmatter
  \tableofcontents

  \chapter{Introduction}

  \mainmatter
  \chapter{Theorie}
  \chapter{Practice}

  \appendix
  \chapter{Notes}

  \backmatter
  \begin{thebibliography}{9}
    \bibitem{key} Bibliogrpahy Item
  \end{thebibliography}
\end{document}


May 3rd 2021
-------------

T60 with the Slackware 14.1 install with seamonkey.

https://www.linuxquestions.org/questions/slackware-14/how-do-i-change-default-sound-card-in-slackware-14-2-without-x-4175644839/

How to reorder the sound devices using the module loading order. What we 
want...

    bash-4.2$ cat /proc/asound/modules
    0 snd_hda_intel
    1 snd_pcsp
    29 thinkpad_acpi

Originally the pcsp was listed first. So make a file 
/etc/modprobe.d/alsa-base.conf and add following...

    options snd slots=snd_hda_intel,snd_pcsp,thinkpad_acpi
    options snd_hda_intel index=0
    options snd_pcsp index=1

After reboot, Audacity &c work as expected. Recording in Audacity before 
this was glitch special as it sampled the power rails for the bleep!

LibreOffice 6.4 binaries won't pick up the gtk theme as the gtk3 version 
is too old to use with libreoffice-gtk rpm from CentOS 7. Using default 
fallback vcl=x11 produces very small fonts. Using .Xresources at dpi:120 
to make them bigger. My backport the 14.2 gtk3 and see what happens...

April 29th 2021
---------------

Slackware64 14.1 install on 60Gb SSD on the Atheros X61s with kernel 
packages from 14.2 /patches. I'm also using Seamonkey 2.53.7.1 binaries 
from the Seamonkey project site - unpack, mv to /opt/seamonkey and set 
paths and preferences. Along with Apache OpenOffice you get a very 
usable desktop.

Lyx from slackbuilds provides a WYSIWYW interface for writing - it is 
limited by the TeX backend, in the case of Slackware prior to 
15.0/current that was basic as provided by XeTeX. Part of this is rough 
looking fonts in pdf files.

https://askubuntu.com/questions/98664/how-can-i-get-smooth-fonts-in-lyx

Native TeX is provided by XeTeX which is, as mentioned, *old*...

    bash-4.2$ tex --version
    TeX 3.141592 (Web2C 7.5.4)
    kpathsea version 3.5.4
    Copyright (C) 1997-2004 D.E. Knuth.
    Kpathsea is copyright (C) 1997-2004 Free Software Foundation, Inc.
    There is NO warranty.  Redistribution of this software is
    covered by the terms of both the TeX copyright and
    the GNU General Public License.
    For more information about these matters, see the files
    named COPYING and the TeX source.
    Primary author of TeX: D.E. Knuth.
    Kpathsea written by Karl Berry and others.
 
So when compiling Lyx against this, you will end up with poor quality 
fonts in Lyx 2.1.4 from slackbuilds, strange, as TeX and LaTeX give fine 
sharp fonts. The work around is to add this...

    % set fonts for nicer pdf view
    \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}

to the Documents | Settings | LaTeX Preamble window. 


April 13th 2021
---------------

Change it up...

https://forum.xfce.org/viewtopic.php?id=13405

mkdir -p ~/.themes/blank/xfwm4 && touch ~/.themes/blank/xfwm4/themerc

Make a blank theme file in xfce4 as above. You will have *no title bar* 
at all. Alt F10 to maximise, Alt drag to move a window. You can't resize
windows except by making a keyboard shortcut to the resize command

https://www.xfce-look.org/p/1016214/

Borders only theme...much better. Can resize by dragging and get the 
window menu by right clicking and can move with some mouse accuracy.

Tiny panel in top right with just the notifications and wifi/volume.
Using xclock for time.

April 6th 2021
--------------

     #
     # Creates incremental backups of ~/Documents/blah directory
     # use tar -xopf to unpack earliest tar file first for a
     # full restore
     #
     tar --create \
                --file ~/Backups/k58.$(date +%Y%m%d-%H%M%S).tar \
                --listed-incremental ~/Backups/k58.snar \
                ~/Documents/blah

Above saved as .blah-backup.sh and chmod +x 

I've decided not to use compression (.tar.gz) as most files are

* text files (size is rounding error)
* packages or image files or audio files (compressed already)

You can directly open an incremental tar and extract a dated
version of a given file.


March 27th 2021
---------------

csplit notes.md /===/-1 {*}

Takes a large markdown format file with top level headings and splits 
the file at the title, i.e. one line above the ===... delimited 
headings. Gives xx01 &c file names. Use

csplit notes.md /#/ {*}

if headings use the # Title # style. See

https://www.reddit.com/r/Markdown/comments/8sjeui/splitting_markdown_files/

sed '$!N;/.*\n.*====.*/P;D' notes.md

Prints line above the line containing the matching pattern in this case 
====. Won't work if there are two consecutive lines that match the 
pattern. Makes use of something called the N;P;D cycle. See

https://unix.stackexchange.com/questions/264489/find-each-line-matching-a-pattern-but-print-only-the-line-above-it

and

https://unix.stackexchange.com/questions/216544/how-to-print-a-line-if-that-line-or-the-next-line-do-not-contain-a-particular-st/216550#216550
 
March 25th 2021
---------------

Trick for avoiding the file system full errors on / on a cheap linode
or similar server setup

As root, in good times

# xfs_mkfile 10240m 10gig
# chmod 777 10gig

As user, when disk space runs out

$ > 10gig

Above redirection from nowt over rites the 10gig file with a 0 byte 
file, freeing some space. Other tricks include patitioning / /var and 
/home separately. As well as partitions not filling the disk &c

https://news.ycombinator.com/item?id=26583791

and

https://brianschrader.com/archive/why-all-my-servers-have-an-8gb-empty-file/

March 21st 2021
---------------

Updating current slackware
++++++++++++++++++++++++++

https://stackoverflow.com/questions/9522631/how-to-put-a-line-comment-for-a-multi-line-command

and especially

https://stackoverflow.com/a/12797512

Clever use of backticks: cost is one shell spawned and closed for each 
comment. And extra lines in your history. It is a bashism.

Makes possible this rsync command line to sync my local current 
folder, run as user, chmod +x and use ./syncslack...

rsync -av  \
--delete   \
--exclude=slackware64/kde \
--exclude=slackware64/y \
--exclude=source \
--exclude=pasture \
rsync://rsync.mirrorservice.org/ftp.slackware.com/pub/slackware/slackware64-current/ /home/keith/Downloads/current

With plenty of hard drive space (500Gb spinning rust) I just copy the 
current folder and change the name of the copy to a date, then sync the 
current folder. If anything nukes the installation, I can revert to the 
previous one.

As root use

# upgradepkg --install-new /home/keith/Downloads/current/slackware64/*/*.txz

to upgrade packages. Find new configuration files with

# find /etc -name *.new

Then use diff to see what the changes are...

# diff /etc/someapp.conf /etc/someapp.conf.new

Slackware 15.0 Alpha looking really good by the way. Plasma is even 
usable, the UX seems to have become more sensible.

KDE Plasma and Apache OpenOffice
++++++++++++++++++++++++++++++++

Change permissions on the desktop files as below...

# chmod +x /opt/openoffice4/share/xdg/*.desktop

Runs fine from Application Launcher then. No need to change executable 
path in the desktop file.

January 26th 2021
-----------------

All good with 14.2 32 bit on X61s. New current mass build with Plasma and 
new glibc looks good. Will install on another test machine from AlienBob's 
current iso

July 19th 2020
--------------

Slackware 14.2 on the T61p with nvidia drivers 340.xxx installed from 
the nvidia bin file. It clobbers some of the *.la files needed to 
reference libraries. It saves the files it overwrites in /var/lib/nvidia 
but as files with integer names! To find which integer is what file you 
have to grep the nvidia log...

bash-4.3# grep ".la" /var/lib/nvidia/log
101: /usr/X11R6/lib64/modules/libglamoregl.so
102: /usr/X11R6/lib64/modules/libglamoregl.la
104: /usr/X11R6/lib64/libGLESv2.la
105: /usr/X11R6/lib64/libGLESv1_CM.la
106: /usr/X11R6/lib64/libGL.la
110: /usr/X11R6/lib64/libEGL.la
1: /usr/src/nvidia-340.108/uvm/cla06f.h
1: /usr/src/nvidia-340.108/uvm/cla06fsubch.h
1: /usr/src/nvidia-340.108/uvm/cla0b5.h
1: /usr/share/doc/NVIDIA_GLX-1.0/html/configlaptop.html
1: /usr/share/doc/NVIDIA_GLX-1.0/html/displaydevicenames.html
1: /usr/share/doc/NVIDIA_GLX-1.0/html/installationandconfiguration.html
1: /usr/lib64/libGL.la

To get some compiles to complete you 
have to copy some of the *.la files back as follows...

bash-4.3# cp /var/lib/nvidia/106 /usr/X11R6/lib64/libGL.la 
bash-4.3# cp /var/lib/nvidia/110 /usr/X11R6/lib64/libEGL.la 

I did...

bash-4.3# cp /var/lib/nvidia/110 /usr/lib64/libEGL.la 
bash-4.3# cp /var/lib/nvidia/106 /usr/lib64/libGL.la 

...because that is where the libraries are on slack.

See https://www.linuxquestions.org/questions/slackware-14/slackware-14-1-libeegl-la-not-found-after-installing-nvidia-drivers-4175493420/#post5288018

Some versions of the driver clobber *.la and some don't!

July 13th 2020
--------------

The drawing below is from

https://stackoverflow.com/questions/9953005/should-the-bashrc-in-the-home-directory-load-automatically/9954208#9954208

and it has clarified the relationship between .profile and .bashrc nicely

                     +-----------------+   +------FIRST-------+   +-----------------+
                     |                 |   | ~/.bash_profile  |   |                 |
login shell -------->|  /etc/profile   |-->| ~/.bash_login ------>|  ~/.bashrc      |
                     |                 |   | ~/.profile       |   |                 |
                     +-----------------+   +------------------+   +-----------------+
                     +-----------------+   +-----------------+
                     |                 |   |                 |
interactive shell -->|  ~/.bashrc -------->| /etc/bashrc     |
                     |                 |   |                 |
                     +-----------------+   +-----------------+
                     +-----------------+
                     |                 |
logout shell ------->|  ~/.bash_logout |
                     |                 |
                     +-----------------+


July 11th 2020
--------------

Using suckless st terminal. When ssh into here, nano complains of 
unknown terminal type and won't open files. Fine on local machine. So
just launch nano with

TERM=xterm nano

Need to check the termcap settings on local mc. See

https://bbs.archlinux.org/viewtopic.php?id=192449

TWM setup. Looks OK

.twmrc - lots of copypasta

#
# Default twm configuration file; needs to be kept small to conserve string
# space in systems whose compilers don't handle medium-sized strings.
#
# Sites should tailor this file, providing any extra title buttons, menus, etc.
# that may be appropriate for their environment.  For example, if most of the
# users were accustomed to uwm, the defaults could be set up not to decorate
# any windows and to use meta-keys.
#

NoGrabServer
RandomPlacement
ForceIcons
RestartPreviousState
DecorateTransients
TitleFont "-adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-*-*-16-*-100-100-*-*-*-*"
IconFont "-adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*"
#ClientBorderWidth 0 { "xclock" }
BorderWidth 3 
NoTitle {"xclock"}
NoHighlight {"xclock"}

Color
{
    BorderColor "WebMaroon"  {"xclock" "Gray50"}
    BorderTileBackground "Gray30"
    BorderTileForeground "Gray30"
    DefaultBackground "PaleYellow"
    DefaultForeground "Gray20"
    TitleBackground "Gray50"
    TitleForeground "Gray85"
    MenuBackground "Gray85"
    MenuForeground "Gray20"
    MenuBorderColor "slategrey"
    MenuTitleBackground "WebMaroon"
    MenuTitleForeground "Gray85"
    IconBackground "Gray85"
    IconForeground "Gray20"
    IconBorderColor "gray85"
    IconManagerBackground "rgb:2/a/9"
    IconManagerForeground "gray85"
}


#
# Define some useful functions for motion-based actions.
#
MoveDelta Function "move-or-lower" { f.move f.deltastop f.lower }
Function "move-or-raise" { f.move f.deltastop f.raise }
Function "move-or-iconify" { f.move f.deltastop f.iconify }

#
# Set some useful bindings.  Sort of uwm-ish, sort of simple-button-ish
#
Button1 = : root : f.menu "defops"
Button3 = : root : f.menu "system"
Button2 = : root : f.menu "winops"

Button1 = m : window|icon : f.function "move-or-lower"
Button2 = m : window|icon : f.iconify
Button3 = m : window|icon : f.function "move-or-raise"

Button1 = : title : f.function "move-or-raise"
Button2 = : title : f.raiselower

Button1 = : icon : f.function "move-or-iconify"
Button2 = : icon : f.iconify

Button1 = : iconmgr : f.iconify
Button2 = : iconmgr : f.iconify

### close window
### https://darrengoossens.wordpress.com/tag/twm/
LeftTitleButton "/home/keith/.icons/close4.xbm" = f.delete
### Maximise button
RightTitleButton "/home/keith/.icons/maximise.xbm" = f.fullzoom

### Keyboard shortcuts ###
       "z"    = m4     : all    : f.iconify
       "x"    = m4     : all    : f.raiselower
       "w"    = m4     : all    : f.exec "exec firefox &"
       "l"    = m4     : all    : f.exec "exec leafpad &"
       "t"    = c | m1 : all    : f.exec "exec st &"
       "p"    = m4     : all    : f.exec "dmenu_run -l 15 &"
       "l"    = c | m1  : all    : f.exec "exec xlock -mode clock &"

### Set up the WindowRing for Alt-Tab ###
WindowRing {
"abiword"
"Midori"
"audacity"
"leafpad"
"lowriter"
"localc"
"mtpaint" 
"Firefox"
"Mozilla"
"gimp"
"xpdf"
"xterm"
"spacefm"
"xcalc"
"xcalendar"
"st"
}
# Provided the window and class names above match
# this should work like Alt-Tab
"Tab" =             m     : all         : f.warpring "next"
"Tab" =             m | s : all         : f.warpring "prev"

#
# And a menus with the usual things
#
menu "defops"
{
"Twm"	f.title
"st"            f.exec "exec st  &"
"spacefm"       f.exec "spacefm  &"
"midori "       f.exec "exec midori &"
"leafpad"       f.exec "exec leafpad &"
"xterm"         f.exec "exec xterm -geometry 80x24+50+50 &"
"xcalc"         f.exec "exec xcalc &"
"xcalendar"     f.exec "exec xcalendar -fn 10x20 &"
""              f.nop
"night"         f.exec "exec /home/keith/bin/xsct 3900 &"
"day"           f.exec "exec /home/keith/bin/xsct - &"
""		f.nop
"suspend"       f.exec       "exec sudo /usr/sbin/pm-suspend &" 
"restart"	f.restart
""              f.nop
"exit"		f.quit
}
 
menu "system"
{
"System"        f.title
""              f.nop
"Shutdown"      f.exec "exec sudo /sbin/shutdown -Ph now"
""              f.nop
"Reboot"        f.exec "exec sudo /sbin/reboot"
}

menu "winops"
{
"Window Ops"    f.title
""              f.nop
"Iconify"       f.iconify
"Resize"        f.resize
"Move"          f.move
"Raise"         f.raise
"Lower"         f.lower
""              f.nop
"Focus"         f.focus
"Unfocus"       f.unfocus
"Show Iconmgr"  f.showiconmgr
"Hide Iconmgr"  f.hideiconmgr
""              f.nop
"Kill"          f.destroy
"Delete"        f.delete
""              f.nop
}

ForceIcons
Icons
               {
                       "Firefox" "/home/keith/.icons/app.xbm"
                       "Midori"  "/home/keith/.icons/app.xbm"
                       "Leafpad"  "/home/keith/.icons/app.xbm"
                       "Abiword"  "/home/keith/.icons/app.xbm"
                       "Gnumeric"  "/home/keith/.icons/app.xbm"
                       "GIMP"  "/home/keith/.icons/app.xbm"
                       "Xpdf"  "/home/keith/.icons/app.xbm"
               }

.xinitrc - xcalc from the example docs on system. xclock from

https://unix.stackexchange.com/questions/89304/facelifting-xclock-while-using-xrender-a-long-and-winding-road

! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
XTerm*loginShell:true
!
! Above automatically generated by OpenBSD (Xenodm?)
! Below pinched from 
! https://scarygliders.net/2011/12/01/customize-xterm-the-original-and-best-terminal/?PageSpeed=noscript
! and adapted
!
! Font settings
Xft.dpi: 96
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

! Use a nice truetype font and size by default... 
xterm*faceName: DejaVu Sans Mono Book
xterm*faceSize: 11

! Every shell is a login shell by default (for inclusion of all necessary environment variables)
xterm*loginshell: true

! I like a LOT of scrollback...
xterm*savelines: 16384

! double-click to select whole URLs :D
xterm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48

! DOS-box colours...
xterm*foreground: rgb:00/00/0f
xterm*background: rgb:f8/f8/a8

! right hand side scrollbar...
xterm*rightScrollBar: true
xterm*ScrollBar: true

! stop output to terminal from jumping down to bottom of scroll again
xterm*scrollTtyOutput: false

! xclock styles
XClock*foreground: #fbfbfb
!XClock*background: #000018
XClock*background: Gray50
XClock*update: 60
XClock*geometry:          -0-0
!XClock.Clock.majorColor:  rgba:f0/f0/19/7b
!XClock.Clock.minorColor:  rgba:a0/c0/f0/c0
!XClock.Clock.hourColor:   rgba:c9/66/11/72
!XClock.Clock.minuteColor: rgba:00/82/9f/72
!XClock.Clock.secondColor: rgba:50/93/30/6f
XClock.Clock.majorColor:  Gray20
XClock.Clock.minorColor:  Gray40
XClock.Clock.hourColor:   Gray20
XClock.Clock.minuteColor: Gray20
XClock.Clock.secondColor: Gray20

! below from example for XCalc-color
!#include "XCalc"

XCalc*ti.backgroundPixmap:		gray3?foreground=gray70&background=gray85
XCalc*.bevel.background:		gray80
XCalc*.bevel.displayList:		foreground gray90;lines -1,0,0,0,0,-1;lines 3,-4,-4,-4,-4,3

XCalc*.bevel.borderColor:		gray60
XCalc*.bevel.borderWidth:		1
XCalc*.bevel.vertDistance:		4
XCalc*.bevel.defaultDistance:		4
XCalc*.bevel.screen.vertDistance:	4
XCalc*.bevel.screen.horizDistance:	4
XCalc*.bevel.screen*left:		chainLeft
XCalc*.bevel.screen*right:		chainRight
XCalc*.bevel.screen*top:		chainTop
XCalc*.bevel.screen*bottom:		chainBottom
XCalc*.bevel.screen*background:	rgb:9/a/9
XCalc*.bevel.screen.borderColor:	gray50
XCalc*.bevel.screen*LCD.foreground:	gray20
XCalc*.bevel.screen*INV.vertDistance:	2

!	T e x a s   I n s t r u m e n t s   T I - 3 0

XCalc*ti.Command.shapeStyle:		roundedRectangle
XCalc*ti.Command.displayList:		foreground rgb:a/b/c;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90

XCalc*ti.Command.borderColor:		rgb:8/9/a
XCalc*ti.Command.background:		rgb:c/d/e
XCalc*ti.Command.foreground:		gray5

XCalc*ti.button20.foreground:		gray5
XCalc*ti.button20.background:		rgb:e/d/c
XCalc*ti.button20.displayList:		foreground rgb:a/9/8;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button20.borderColor:		rgb:9/8/7

XCalc*ti.button25.foreground:		gray5
XCalc*ti.button25.background:		rgb:e/d/c
XCalc*ti.button25.displayList:		foreground rgb:a/9/8;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button25.borderColor:		rgb:9/8/7

XCalc*ti.button30.foreground:		gray5
XCalc*ti.button30.background:		rgb:e/d/c
XCalc*ti.button30.displayList:		foreground rgb:a/9/8;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button30.borderColor:		rgb:9/8/7

XCalc*ti.button35.foreground:		gray5
XCalc*ti.button35.background:		rgb:e/d/c
XCalc*ti.button35.displayList:		foreground rgb:a/9/8;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button35.borderColor:		rgb:9/8/7

XCalc*ti.button40.foreground:		gray5
XCalc*ti.button40.background:		rgb:e/d/c
XCalc*ti.button40.displayList:		foreground rgb:a/9/8;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button40.borderColor:		rgb:9/8/7

XCalc*ti.button22.background:		gray95
XCalc*ti.button22.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button22.borderColor:		gray65

XCalc*ti.button23.background:		gray95
XCalc*ti.button23.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button23.borderColor:		gray65

XCalc*ti.button24.background:		gray95
XCalc*ti.button24.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button24.borderColor:		gray65

XCalc*ti.button27.background:		gray95
XCalc*ti.button27.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button27.borderColor:		gray65

XCalc*ti.button28.background:		gray95
XCalc*ti.button28.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button28.borderColor:		gray65

XCalc*ti.button29.background:		gray95
XCalc*ti.button29.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button29.borderColor:		gray65

XCalc*ti.button32.background:		gray95
XCalc*ti.button32.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button32.borderColor:		gray65

XCalc*ti.button33.background:		gray95
XCalc*ti.button33.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button33.borderColor:		gray65

XCalc*ti.button34.background:		gray95
XCalc*ti.button34.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button34.borderColor:		gray65

XCalc*ti.button37.background:		gray95
XCalc*ti.button37.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button37.borderColor:		gray65

XCalc*ti.button38.background:		gray95
XCalc*ti.button38.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button38.borderColor:		gray65

XCalc*ti.button39.background:		gray95
XCalc*ti.button39.displayList:		foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
XCalc*ti.button39.borderColor:		gray65

.xinitrc - just setting the root colour

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    /usr/bin/xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    /usr/bin/xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    /usr/bin/xmodmap $usermodmap
fi

# start some nice programs

xsetroot -solid Gray50
xsetroot -cursor_name left_ptr
xclock -geometry -0-0  & 
/usr/bin/twm 
#/usr/bin/xclock -brief -digital -fn 12x20 &
#exec /usr/bin/xterm -name login
#exec startxfce4


Compiling Midori (WebKit rendered Web browser)
----------------
Try out a WebKit based browser

network/midori
    development/vala
    libraries/webkit2gtk # Takes 6 hours or so on the X60
         system/geoclue2
         libraries/json-glib
         development/woff2
             development/ninja
             development/brotli
         libraries/hyphen
         libraries/libwebp

network/surf  # not done yet Midori isn't crashing too much
    desktop/dmenu # I compiled version 6.2 from suckless sources
    libraries/webkit2gtk
         system/geoclue2
         libraries/json-glib
         development/woff2
             development/ninja
             development/brotli
         libraries/hyphen
         libraries/libwebp
    desktop/dmenu

July 10th 2020
--------------

Compiling Abiword and Gnumeric on the X60 with a 32 bit minimalish 
(thin?) install of Slackware 14.2

office/gnumeric {medium}
    libraries/goffice {medium}
office/abiword {long}
    libraries/goffice {medium}
    libraries/wv {seconds}
    evince (runtime only -> xpdf redirect)

~/.gtkrc-2.0 file:  gtk-print-preview-command="xpdf -q %f"

All works fine. Abiword 3 versions alas use the GTK3 style hide and seek 
scroll bars.

As this is a thin install, I have not installed xap, xfce, kde, emacs at 
all. Using twm as the window manager, and a customised .xinitrc file to 
start Xorg.

Below is the .twmrc

#
# Default twm configuration file; needs to be kept small to conserve string
# space in systems whose compilers don't handle medium-sized strings.
#
# Sites should tailor this file, providing any extra title buttons, menus, etc.
# that may be appropriate for their environment.  For example, if most of the
# users were accustomed to uwm, the defaults could be set up not to decorate
# any windows and to use meta-keys.
#

NoGrabServer
RandomPlacement
ForceIcons
RestartPreviousState
DecorateTransients
TitleFont "-adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-*-*-16-*-100-100-*-*-*-*"
IconFont "-adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*"
#ClientBorderWidth

NoTitle {"xclock"}
NoHighlights {"xclock"}


#Color
#{
#    BorderColor "slategrey"
#    DefaultBackground "rgb:2/a/9"
#    DefaultForeground "gray85"
#    TitleBackground "rgb:2/a/9"
#    TitleForeground "gray85"
#    MenuBackground "rgb:2/a/9"
#    MenuForeground "gray85"
#    MenuBorderColor "slategrey"
#    MenuTitleBackground "gray70"
#    MenuTitleForeground "rgb:2/a/9"
#    IconBackground "rgb:2/a/9"
#    IconForeground "gray85"
#    IconBorderColor "gray85"
#    IconManagerBackground "rgb:2/a/9"
#    IconManagerForeground "gray85"
#}

Color
{
BorderColor         "#303639"
DefaultBackground   "White"
DefaultForeground   "Black"

TitleBackground     "Firebrick"
TitleForeground     "White"

MenuTitleBackground "Firebrick"
MenuTitleForeground "White"

MenuBackground      "#FFFFFF"
MenuForeground      "#303639"

MenuShadowColor     "#303639"
MenuBorderColor     "#303639"
}

#
# Define some useful functions for motion-based actions.
#
MoveDelta Function "move-or-lower" { f.move f.deltastop f.lower }
Function "move-or-raise" { f.move f.deltastop f.raise }
Function "move-or-iconify" { f.move f.deltastop f.iconify }

#
# Set some useful bindings.  Sort of uwm-ish, sort of simple-button-ish
#
Button1 = : root : f.menu "defops"
Button3 = : root : f.menu "system"
Button2 = : root : f.menu "winops"

Button1 = m : window|icon : f.function "move-or-lower"
Button2 = m : window|icon : f.iconify
Button3 = m : window|icon : f.function "move-or-raise"

Button1 = : title : f.function "move-or-raise"
Button2 = : title : f.raiselower

Button1 = : icon : f.function "move-or-iconify"
Button2 = : icon : f.iconify

Button1 = : iconmgr : f.iconify
Button2 = : iconmgr : f.iconify

### close window
### https://darrengoossens.wordpress.com/tag/twm/
LeftTitleButton "/home/keith/.icons/close4.xbm" = f.delete
### Maximise button
RightTitleButton "/home/keith/.icons/maximise.xbm" = f.fullzoom

### Keyboard shortcuts ###
       "z"    = m4     : all    : f.iconify
       "x"    = m4     : all    : f.raiselower
       "w"    = m4     : all    : f.exec "exec firefox &"
       "l"    = m4     : all    : f.exec "exec leafpad &"
       "t"    = c | m1  : all    : f.exec "exec xterm &"
       "l"    = c | m1  : all    : f.exec "exec xlock -mode clock &"

### Set up the WindowRing for Alt-Tab ###
WindowRing {
"abiword"
"audacity"
"leafpad"
"lowriter"
"localc"
"mtpaint" 
"Firefox"
"Mozilla"
"gimp"
"xpdf"
"xterm"
"*"
}
# Provided the window and class names above match
# this should work like Alt-Tab
"Tab" =             m     : all         : f.warpring "next"
"Tab" =             m | s : all         : f.warpring "prev"

#
# And a menus with the usual things
#
menu "defops"
{
"Twm"	f.title
"Xterm"         f.exec "exec xterm -geometry 80x24+50+50 &"
"Firefox"       f.exec "exec firefox &"
"Leafpad"       f.exec "exec leafpad &"
"GIMP"          f.exec "exec gimp &"
"mtPaint"       f.exec "exec mtpaint &"
"Xpdf"          f.exec "exec xpdf &"
"Writer"        f.exec "exec /opt/openoffice4/program/swriter &"
"Calc"          f.exec "exec /opt/openoffice4/program/scalc &"
"Impress"       f.exec "exec /opt/openoffice4/program/simpress &"
""              f.nop
"Night"         f.exec "exec /home/keith/bin/xsct 3900 &"
"Day"           f.exec "exec /home/keith/bin/xsct - &"
""		f.nop
"Suspend"       f.exec       "exec sudo /usr/sbin/pm-suspend &" 
"Restart"	f.restart
""              f.nop
"Exit"		f.quit
}
 
menu "system"
{
"System"        f.title
""              f.nop
"Shutdown"      f.exec "exec sudo /sbin/shutdown -Ph now"
""              f.nop
"Reboot"        f.exec "exec sudo /sbin/reboot"
}

menu "winops"
{
"Window Ops"    f.title
""              f.nop
"Iconify"       f.iconify
"Resize"        f.resize
"Move"          f.move
"Raise"         f.raise
"Lower"         f.lower
""              f.nop
"Focus"         f.focus
"Unfocus"       f.unfocus
"Show Iconmgr"  f.showiconmgr
"Hide Iconmgr"  f.hideiconmgr
""              f.nop
"Kill"          f.destroy
"Delete"        f.delete
""              f.nop
}

Below is the .xinitrc

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    /usr/bin/xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    /usr/bin/xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    /usr/bin/xmodmap $usermodmap
fi

# start some nice programs

xsetroot -solid DarkSlateGray
xsetroot -cursor_name left_ptr
xclock -brief -digital -fn 12x24 -geometry -0-0  & 
#/usr/bin/twm &
#/usr/bin/xclock -brief -digital -fn 12x20 &
#exec /usr/bin/xterm -name login
exec /usr/bin/twm

It all seems to work fine

September 12th 2019
-------------------

Slackware 14.2 on the Thinkpad L440 with its horrid trackpad. 

https://askubuntu.com/questions/370505/how-to-use-trackpoint-but-keep-touchpad-disabled-on-lenovo-thinkpad-e531

Turns out you can stop the trackpad acting as a mouse and use it just to provide 
the left, middle, right buttons as below...

bash-4.3$ cat /etc/X11/xorg.conf.d/50-synaptics.conf
# DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN ON UPGRADES
# Copy this file to /etc/X11/xorg.conf.d/ and edit the copy
#
# Use "synclient -l" to see all available options
# Use "man synaptics" for details about what the options do
#
Section "InputClass"
#       Identifier "touchpad"
#       Driver "synaptics"
#       MatchDevicePath "/dev/input/event*"
#       MatchIsTouchpad "on"
#       Option "TapButton1" "1"
#       Option "TapButton2" "2"
#       Option "TapButton3" "3"
    Identifier "Default clickpad buttons"
    MatchDriver "synaptics"
    Option "SoftButtonAreas" "64% 0 1 42% 36% 64% 1 42%"
    Option "AreaBottomEdge" "1"
EndSection

The commented out lines are the example lines from /usr/share and they tell you 
the default.

August 22nd 2019
----------------

Mystery now solved for Slackware using the default KDE 4.14 as used in 
Slackware current and 14.2. A default install gives a nice usable 
desktop BUT Firefox will show tiny fonts in menus and other parts of the 
UI. To allow adjustment of font sizes in GTK applications you need to 
install a slackbuild package, kde-gtk-config. For current, I just 
compiled the 14.2 slackbuild and it is working fine. Compile, install 
the package, log out of KDE and log in again. You will find a new 
component in Application Appearance - just set the font size to 12 to 
generate the configs.

http://slackbuilds.org/repository/14.2/desktop/kde-gtk-config/?search=kde-gtk-config

This has been bugging me for ages...

July 6th 2019
-------------

Mirrorservice PKG_PATH for NetBSD

https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/8.1/All/

Warnings about libraries for 8.0 on 8.1 and dependency errors for 
harfbuzz when installing OpenBox on i386 arch.

Digging around.

July 4th 2019
-------------

head -c 1000 /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15 | head -n 10

Generates 10 lines each with 15 random alphanumeric characters. Adapted 
(minimally) from...

https://serverfault.com/questions/283294/how-to-read-in-n-random-characters-from-dev-urandom/481171

March 23rd 2019
---------------

$ nano .profile and add lines below to add ~/bin to path.

if [ -d "$HOME/bin" ] ; then
  PATH="$PATH:$HOME/bin"
fi

https://askubuntu.com/questions/60218/how-to-add-a-directory-to-the-path

Slackware 14.1 back on the X60. Current binary firefox 66.01 and 
libreoffice 6.2.2 working fine so removed the slackware firefox, 
seamonkey and thunderbird. Compiled the freetype 2.10 and powertop 2.10 
from current using the SlackBuild scripts. Freetype needed the lzip 
library compiled from the slackbuilds for 14.1

March 17th 2019
---------------

OpenBSD on X220 with a 100Gb SSD. Using cwm with firefox, audacious, 
libreoffice, gimp, vlc, audacity, viewnior and pcmanfm installed. 
Running nicely with around 7h battery (apmd -A option).

foo$ df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a     1005M   90.0M    865M     9%    /
/dev/sd0k     57.1G    540M   53.8G     1%    /home
/dev/sd0d      3.9G    1.1M    3.7G     0%    /tmp
/dev/sd0f      2.0G    711M    1.2G    37%    /usr
/dev/sd0g     1005M    192M    763M    20%    /usr/X11R6
/dev/sd0h     16.0G    2.7G   12.5G    18%    /usr/local
/dev/sd0j      5.9G    2.0K    5.6G     0%    /usr/obj
/dev/sd0i      2.0G    2.0K    1.9G     0%    /usr/src
/dev/sd0e     13.1G   38.1M   12.4G     0%    /var

foo$ cat .profile
# $OpenBSD: dot.profile,v 1.5 2018/02/02 02:29:54 yasuoka Exp $
#
# sh/ksh initialization

PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games
export PATH HOME TERM
export ENV=$HOME/.kshrc

foo$ cat .kshrc   
alias cls=clear
alias sct=~/bin/xsct

foo$ cat .cwmrc
borderwidth 2
color activeborder blue
color inactiveborder darkblue
gap 0 0 0 16
bind CM-r reload
fontname "sans-serif:pixelsize=18:style=Regular"
command firefox /usr/local/bin/firefox
command office /usr/local/bin/soffice
command "pdf viewer" /usr/local/bin/evince
command "music player" /usr/local/bin/audacious
command "video player" /usr/local/bin/vlc
command "photo viewer" /usr/local/bin/viewnior
command "photo editor" /usr/local/bin/gimp
command "audio editor" /usr/local/bin/audacity 
command "file manager" /usr/local/bin/pcmanfm

https://unix.stackexchange.com/questions/476065/openbsd-how-does-one-set-an-alias

https://github.com/faf0/sct

Along with the usual increase in memory for 'staff' in the login config 
and...

foo$ cat /etc/rc.conf.local
apmd_flags="-A"          # Laptop power saving
xenodm_flags=""          # Starts xenodm graphical login

foo$ ls /etc/fonts/conf.d
10-autohint.conf                        42-luxi-mono.conf
10-scale-bitmap-fonts.conf              45-latin.conf
10-sub-pixel-rgb.conf                   49-sansserif.conf
11-lcdfilter-default.conf               50-user.conf
20-unhint-small-dejavu-sans-mono.conf   51-local.conf
20-unhint-small-dejavu-sans.conf        60-latin.conf
20-unhint-small-dejavu-serif.conf       65-fonts-persian.conf
20-unhint-small-vera.conf               65-nonlatin.conf
30-lucida-aliases.conf                  69-unifont.conf
30-metric-aliases.conf                  80-delicious.conf
30-urw-aliases.conf                     90-synthetic.conf
31-nonmst.conf                          README
40-nonlatin.conf

foo$ cat .Xdefaults
! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
Xft.dpi: 120
Xft.autohint: 0
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
XTerm*loginShell:true
XTerm*saveLines:32767
XTerm*background:black
XTerm*foreground:white
XTerm*scrollBar:true
XTerm*scrollBar_right:true
XTerm*faceName:Mono
XTerm*faceSize:12

The .Xdefaults Xft.dpi setting gets around the tiny font problem.

February 28th 2019
------------------

Installing Chromium on slackware current or 14.2. When the program 
starts, it asks for a keyring password for its own password store 
function on xfce4. I don't use a local keyring, so I set chromium to use 
unsafe storage by adding an argument to the exec line in the desktop 
file...

nano --nowrap /usr/share/applications/chromium.desktop

Line 108 now reads...

Exec=/usr/bin/chromium --password-store=basic %U

I also switch off the password store setting in Chromium preferences...

February 9th 2019
-----------------

Slackware current installing LibreOffice 6.2 from the libreoffice.org 
binaries has got a bit more complex than it usually is.

At present you need to

* Unpack libreoffice and convert the rpms to tgz using rpm2tgz

* Install the rpms

* Set an environment variable to tell LO not to look for wayland

* Install avahi, which has a dependency on libdaemon, so install libdaemon.

* Set avahi up to start on boot and stop on shutdown using /etc/rc.d/rc.local

Set environment variable
------------------------

Temporary: just run 

export SAL_USE_VCLPLUGIN=gtk

as user in bash, then run Writer or Calc

Permanent 

Add a script to /etc/profile.d/libreoffice.sh with contents

   #!/bin/sh

   export SAL_USE_VCLPLUGIN=gtkbash-5.0$ 

Install avahi and configure daemon
----------------------------------

Impress now has a dependency on avahi daemon, because someone decided 
that the ability to remote control Impress was really vital. See the bug report at

https://bugs.documentfoundation.org/show_bug.cgi?id=119408

Avahi depends on libdaemon, so

https://github.com/Ponce/slackbuilds/tree/current/libraries/libdaemon

Build and install libdaemon

Then *before* building avahi, create an avahi group and user

   # groupadd -g 214 avahi
   # useradd -u 214 -g 214 -c "Avahi User" -d /dev/null -s /bin/false avahi

Then build and install avahi using

https://github.com/Ponce/slackbuilds/blob/current/network/avahi/

Then add the following to the /etc/rc.d/rc.local script

# Start avahidaemon
if [ -x /etc/rc.d/rc.avahidaemon ]; then
  /etc/rc.d/rc.avahidaemon start
fi
# Start avahidnsconfd
if [ -x /etc/rc.d/rc.avahidnsconfd ]; then
  /etc/rc.d/rc.avahidnsconfd start
fi

And create /etc/rc.d/rc.local_shutdown and add the following

# Stop avahidnsconfd
if [ -x /etc/rc.d/rc.avahidnsconfd ]; then
  /etc/rc.d/rc.avahidnsconfd stop
fi
# Stop avahidaemon
if [ -x /etc/rc.d/rc.avahidaemon ]; then
  /etc/rc.d/rc.avahidaemon stop
fi

Then you can load Impress and Draw without error messages.

February 6th 2019
-----------------

Fedora 29 on the L440.

Make powertop settings persistent

https://fedoramagazine.org/saving-laptop-power-with-powertop/

$ sudo systemctl start powertop.service

To set all settings to good for current session

$ sudo systemctl enable powertop.service
Created symlink /etc/systemd/system/multi-user.target.wants/powertop.service → /usr/lib/systemd/system/powertop.service.

Above unit file symlink makes changes permanent.

Fonts: set slight hinting and rgba sub-pixel hinting as follows

https://askubuntu.com/questions/70606/how-to-enable-sub-pixel-hinting

Find out what settings are now...

$ gsettings get org.gnome.settings-daemon.plugins.xsettings hinting

$ gsettings get org.gnome.settings-daemon.plugins.xsettings antialiasing

Change settings if you need to...

$ gsettings set org.gnome.settings-daemon.plugins.xsettings hinting slight

$ gsettings set org.gnome.settings-daemon.plugins.xsettings antialiasing rgba

Sub-pixel hinting should 'just work' after updating Fedora 29 as the new 
unencumbered freetype is provided.

January 29th 2019
-----------------

Slackware: to make Powertop changes permanent on boot, add the lines 
below to /etc/rc.d/rc.local

    powertop --auto-tune
    exit 0

The exit 0 line is the last line of the script. The default rc.local 
file just has a comment at the top explaining what it is for.

https://askubuntu.com/questions/112705/how-do-i-make-powertop-changes-permanent

When using a window manager (i.e. no conveniences such as a system try 
with a battery icon) the following bash alias can be useful...

alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"'

Slackware comes with a choice of built-in light window managers. 
Blackbox with the panel turned off is a favourite of mine. Copy the 
/usr/share/blackbox/menu file to ~/.blackbox/menu and set permissions to 
something like 755 for your user. Then edit to customise the menu.


January 25th 2019
-----------------

Alien Bob's Plasma 5 running on Slackware current.

https://www.reddit.com/r/kde/comments/6b6793/how_do_i_hide_window_decorations_of_maximized/

Add these lines to ~/.config/kwinrc

    [Windows]
    BorderlessMaximizedWindows=true

and when you maximise a window you don't waste 30 pixels of precious 
vertical space...

November 16th 2018
------------------

Debian Stretch live iso

Networking with usb driver rtl8187, network-manager can see the driver, 
kernel module loaded &c but new long interface names prevent using 
network-manager from connecting. Had to fall back on 
/etc/network/interfaces file like this...

oot@debian:~# cat /etc/network/interfaces
#auto lo
#iface lo inet loopback

auto wlx0026f2gunge
iface wlx0026f2gunge inet dhcp
    wpa-ssid wifiname
    wpa-psk wifipass

To stop network-manager and restart the networking service from within 
an existing session, you need to do following

# /etc/init.d/network-manager stop
# systemctl restart networking.service

To find out the long name for the wifi interface, use

# ip a

To scan for the ssid use

# ip link set wlx0026f2gunge up
# iwlist scan

For permanent install, probably easier to just set the configuration to 
use the old non-unique interface names like wlan0 &c or hope they fixed 
the bug.

You can set the old names at boot by pressing Tab and adding

net.ifnames=1

to the kernel bootline like we used to do with nomodeset back in the 
day.

Bug is #842422 and relates to older generation 802.11bg wifi devices!

Example sources.list

deb http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian-security/ stretch/updates main
deb http://deb.debian.org/debian stretch-updates main

October 6th 2018
----------------

Stock Xubuntu install on X61s. To compile sct (set colour temperature) 
you need to install a couple of libraries in addition to 'build 
essential'...

sudo apt install libx11-dev
sudo apt-get install libxrandr-dev

...then sct compiles fine with the command line

cc -std=c99 -O2 -I /usr/X11R6/include -o sct sct.c -L /usr/X11R6/lib -lm -lX11 -lXrandr

...as in the gitbub page at

https://github.com/faf0/sct

I pop the compiled program in ~/bin which is on my path.

September 17th 2018
-------------------

https://sanctum.geek.nz/arabesque/actually-using-ed/

Just in case you actually have to use the unix editor ed
Perhaps you have foobar'ed the whole of usr but ed is
hanging on in there.

September 16th 2018
-------------------

Installing Sage Math 8.3 from binary on Slackware current

* Download the Fedora 28 binary Linux 64 bit tar.bz2 file, all 1.6Gb

* As user extract with tar xvjf sage-8.3-Fedora_28-x86_64.tar.bz2 

* As root mv SageMath /opt/

* As user /opt/Sage/Math/sage

* Will start in command line

* To run notebook() in Web browser, you need an extra library

* Download libxcrypt-4.1.2-1.fc28.x86_64.rpm

* As user convert to tgz with rpm2tgz

* As root installpkg libxcrypt-4.1.2-1.fc28.x86_64.tgz

* From within a sage cli session run notebook()

* You will be asked to set a password

* Browser will open and allow choices such as new workbook

* Local doc tree at file:///opt/SageMath/local/share/doc/sage/html/en/index.html

* Slackware current has texlive and ffmpeg so should be OK for 
plots/animations

September 11th 2018
-------------------

Using procmail as MTA instead of sendmail. You need to add a line to the 
.fetchmailrc file from yesterday...

    # set username
    set postmaster "user5"
    # set polling time (5 minutes)
    set daemon 600

    poll pop.gmail.com with proto POP3
       user 'spammesilly@gmail.com' there with password 'secretpassword' is use$
    mda "/usr/bin/procmail -m '/home/user/.procmailrc'"

And then set up a 'recipe' in .procmailrc

    LOGFILE=$HOME/.procmail.log
    MAILDIR=$HOME
    VERBOSE=on
    
   :0
   Mail/inbox/

The :0 bit is the start of a recipe. The trailing slash on Mail/inbox 
says to use the Maildirs format (each message in its own file) as 
opposed to the mbox format (all messages in one large file). I will 
match various mail accounts to different folders in the future by using 
different recipes. It will also be possible to have e.g. mailing list 
messages sorted into different mail boxes.

Then use the verbose command line to (re)fetch the email again...

$ fetchmail -d0 -vk pop.gmail.com

I deleted the spool file and then did

# touch /var/spool/mail/user

So there was a spool file to re-read. The spool has remained empty 
since.

I have not included commands to delete mail off the server in 
.fetchmailrc as yet so I can play about with settings &c. You need to 
delete the .fetchids file and the .procmail.log file if you want to 
refetch the mails left on the server for testing purposes.

Next move is to set up mutt to read the folders. Then sort out how to 
send mail, copy the sent mail to a sent folder and use the smtp auth 
settings for my ISP.

September 10th 2018
-------------------

Fetchmail on Slackware 14.2

https://www.axllent.org/docs/view/gmail-pop3-with-fetchmail/

Examples below show gmail download as on original site but I've tested 
this with mythic's pop3 and mail server and it works fine.

First check certificates are installed correctly for ssl

openssl s_client -connect pop.gmail.com:995

Then make a .fetchmailrc configuration file like this...

    # set username
    set postmaster "user5"
    # set polling time (5 minutes)
    set daemon 600

    poll pop.gmail.com with proto POP3
       user 'spammesilly@gmail.com' there with password 'secretpassword' is user5 here options ssl

Then for Slackware default install, you have to run sendmail so 
fetchmail has something to hand the mail onto

# chmod +x /etc/rc.d/rc.sendmail
# /etc/rc.d/rc.sendmail start
# exit

Then run fetchmail with flags that let you see the dialogue with the 
remote server

fetchmail -d0 -vk pop.gmail.com

The mail should be downloaded from the pop3 mailbox and be 'sent' to 
your mail spool at /var/mail/user by smtp

The mail is in a single spool file and has an extra header on each 
message recording the send date from sendmail

After testing, I just disabled sendmail

# /etc/rc.d/rc.sendmail stop
# chmod -x /etc/rc.d/rc.sendmail
# exit

because I want to use procmail to sort my stuff into folders.

But 'fetchmail and grep' is entirely feasible.

August 14th 2018
----------------

Slackware current 14.2+ as of today's date, audacity needs the following 
packages from Ponce's current repo at

http://ponce.cc/slackware/slackware-current/packages/

audacity-2.2.2-i586-1ponce.txz
jack-audio-connection-kit-0.125.0-i586-1ponce.txz
lilv-0.22.0-i486-1ponce.txz
serd-0.22.0-i486-1ponce.txz
sord-0.14.0-i486-1ponce.txz
soundtouch-1.9.2-i486-1ponce.txz
sratom-0.4.6-i486-1ponce.txz
suil-0.8.2-i486-1ponce.txz
twolame-0.3.13-i586-1ponce.txz
vamp-plugin-sdk-2.7.1-i586-1ponce.txz
wxGTK3-3.0.4-i586-1ponce.txz

The packages are all dated yesterday so I gather this is some form of 
slackbuild continuous integration test.

There is a page for 14.2 stable as well

http://ponce.cc/slackware/slackware-14.2/packages/

and corresponding pages for 64 bit...

http://ponce.cc/slackware/slackware64-14.2/packages/

April 1st 2018
--------------

w3m -dump https://news.ycombinator.com/news > out.txt
cat out.txt | exim -bm kpb@sohcahtoa.org.uk

Commands above at shell dump the hn front page then send it as an email 
(no subject as yet) to my local box. I want to hack on this to have web 
pages sent as emails.

February 25th 2018
------------------

Installing audacity on Slackware 14.2 64bit requires the following packages 
from slackonly.

audacity-2.2.1-x86_64-2_slonly.txz
celt-0.11.3-x86_64-3_slonly.txz
jack2-1.9.10-x86_64-2_slonly.txz
lame-3.99.5-x86_64-2_slonly.txz
soundtouch-1.9.2-x86_64-1_slonly.txz
twolame-0.3.13-x86_64-2_slonly.txz
wxGTK3-3.0.3.1-x86_64-4_slonly.txz

The GTK3 buttons look a bit strange but everything appears to be working 
including export to mp3

November 7th 2017
-----------------

Removed OpenOffice 4.1.3 and installed OpenOffice 4.1.4

Because OpenOffice is installed by converting the rpms to tgz packages 
from the binary distribution on the OpenOffice Web site, you have to 
remove all the packages using removepkg. You can generate a list of the 
packages on one line with spaces separating them using the command

ls /var/log/packages | grep openoffice | tr '\n' ' '

Then I just copy that list from the terminal into the argument line of 
removepkg. Finally, install OpenOffice from the converted tgz files in 
the usual way.

https://stackoverflow.com/questions/15580144/how-to-concatenate-multiple-lines-of-output-to-one-line

October 29th 2017
-----------------

A way of upgrading a current slackware install without using slackpkg. All as root

Below backs up the currently working slackware package sets

tar cvfz /slackback/current-$(date +%Y%m%d-%H%M).tar.gz -g /slackback/current.snar /slackware

Below syncs current sets with local mirror

rsync -av --exclude=source* --exclude=slackware/kde* --exclude=slackware/kdei* --exclude=slackware/y* --delete rsync://rsync.mirrorservice.org/ftp.slackware.com/pub/slackware/slackware-current/ /slackware/

Below upgrades any changed packages

upgradepkg /slackware/slackware/*/*.t?z

Need to check about config files - they may be saved as .new

October 21st 2017
-----------------

note () {
# https://www.linuxquestions.org/questions/slackware-14/bash-brainteaser-get-ra$
read -e -r  Line
echo $(date +%Y%m%d%H%M%S) "$Line" >>.notes
}

Above added to .bashrc and sourced will provide a basic note recording 
function in a terminal window. Use of the built-in bash command read 
with the -e flag provides line editing (backspace delete and arrows as 
well as emacs style keyboard shortcuts). The -r option disables the \ 
expansion. No other expansion takes place so you can have " and ! and ' 
in your note.

Currently one line per note prefixed with the date/time down to the 
second so can use cat .notes | grep 201710 to list all October notes.

October 13th 2017
-----------------

Slackware 14.2 current on ancient T42

Scanner: you need to add user to scanner group

# gpasswd -a <username> scanner

https://www.linuxquestions.org/questions/slackware-14/sane-is-driving-me-insane-4175528250/

September 19th 2017
-------------------

Incremental backups using tar. The idea is to back up a directory of my 
home drive under my user and then keep a series of snapshots.

$ tar cvfz /home/keith/backups/$(uname -n)-$(date +%Y%m%d-%H%M).tar.gz -g /home/keith/backups/$(uname -n).snar Documents

Each time the above command is run, the current contents of the Teaching 
directory is checked against the previous contents and the differences 
are saved as the next archive. 

The first time you run the command the *.snar file is created and the 
whole directory is copied to an archive and compressed. That is called a 
level 0 backup.

The second time you run the command, a second tar.gz file is created 
that contains the differences between the current state of the directory 
and the first archive. This is the level 1 backup.

The third time the command is run, a new archive is created with just 
the differences between the second and third archive. And this is a 
level 2 backup.

You are creating a chain of backups.

To restore the current state of the directory, you use the command

$ tar xvf backups/<each archive in turn, highest level first>.tar.gz

So you are unwinding the chain from the earliest to latest.

I'm interested in using this to 1) save storage space and duplication 
and 2) preserve snapshots of my home drive say each week to allow 
reverting to an earlier state.

References: man tar, the GNU tar page and

http://www.tuxradar.com/content/quick-guide-backups-using-tar

August 16th 2017
----------------

Slackware 14.0 32 bit on X61s for giggles

Removed Firefox, Seamonkey and Thunderbird as a little old and insecure

Added firefox-esr from mozilla.org as binary and copied to /opt with an 
appropriate desktop file.

Slackbuild: leafpad

Also bob-infinality-bundle from here

https://github.com/nihilismus/bob-infinality-bundle

Cairo would not compile as the version of pixman-1 in Slackware 14.0 is 
too old, needs 0.30 or higher. After some searching, I removed pixman-1 
and compiled pixman-0.30.2 from the LFS version 7.

http://www.linuxfromscratch.org/blfs/view/7.4/general/pixman.html

Added the webcore fonts and all fine.

OpenOffice installed from the binary rpms.

Syncing patches to upgrade packages, command is

rsync -av --delete --exclude=mozilla-firefox* --exclude=mozilla-thunderbird* --exclude=seamonkey* --exclude=freetype* --exclude=fontconfig* --exclude=cairo* rsync://slackware.uk/slackware/slackware-14.0/patches/packages/ /home/keith/Downloads/slackware/patches

July 24th 2017
--------------

I nearly always get a time that is one hour wrong on a slackware install. 
This includes the Plasma 5 (5.9 libaries) installed from Alien Bob's 
KDE5/Plasma live iso following current on the X200s at present.

http://www.pc-freak.net/blog/how-to-fix-clock-on-slackware-slackware-and-this-old-incorrect-bios-time-troubles/

bash-4.1# date -s "19:24"  # pick the correct time
bash-4.1# hwclock --systohc  # fix that time between boots by setting the hardware clock

July 12th 2017
--------------

Fedora 26 on X220 with texlive-scheme-full and the usual suspects.

https://www.reddit.com/r/Fedora/comments/5nfenw/better_looking_fonts_for_fedora/

Installing nicer font defaults and sub-pixel rendering leads to conflict 
with a texlive font family, the 'cabin' fonts, and they are a dependency 
of the copr package. Don't want to remove the whole of texlive 
especially, so fell back on the hack below...

https://www.reddit.com/r/Fedora/comments/36ssd7/how_to_replace_one_package_with_another_using_dnf/

rpm --nodeps -e foo
dnf install foo-alt

Font package from texlive removed and that allows installation of the 
conflicting font package (hopefully supplying identical fonts, but we 
shall see).

https://ma.ttias.be/yum-update-db_runrecovery-fatal-error-run-database-recovery/

If you get a recover database error from rpm, try above commands

$ mv /var/lib/rpm/__db* /tmp/
$ rpm --rebuilddb
$ yum clean all

Having enabled RPMfusion, I'm now getting a load of updates.

July 6th 2017
------------

Installing RStudio from the .deb binary downloaded from the Web site 
fails on Debian Stretch. The binary installation expects to find three 
libraries from Jessie vintage. As a quick hack, downloading debs of 
those libaries and installing them using dpkg on stretch does not appear 
to have broken anything. We'll see what happens when libraries are 
upgraded.

rstudio-1.0.143-amd64.deb
dpkg -i libgstreamer0.10-0_0.10.36-1.5_amd64.deb 
libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
libssl1.0.0_1.0.2l-1~bpo8+1_amd64.deb

Also using lxde or MATE desktop, the fonts within the RDesktop 
application are not antialiassed. Adding an appropriate fonts.conf file 
to ~/.config/fontconfig sorts that out.

https://www.reddit.com/r/linuxmint/comments/4na1p9/font_rendering_problem/

http://antakb.blogspot.co.uk/2016/03/installing-rstudio-on-debian-stretch.html

July 2nd 2017
-------------

Installed Debian Stretch on X61s with LXDE interface. Comes with wicd 
and wireless-tools rather than network-manager. Wicd depends on iwlist 
scan command (or appears to) to discover list of wifi connections. 
iwlist barfs with ~200+ connections, each with 30 lines of info. So Wicd 
can't connect because can't list any connections. The 'iw wls3 scan' 
command will list connections, and, for unencrypted public wifi you can 
connect just using...

# iwconfig wls3 essid "some daft name"
# dhclient wls3

For encrypted connections it gets tricker, so I used logical interfaces 
within the /etc/network/interfaces file having uninstalled 
wicd/wireless-tools (so no ifconfig and no iwconfig)...

keith@saucer:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

iface home inet dhcp
     wpa-ssid name-of-home-wifi
     wpa-psk home-passphrase

iface phone inet dhcp
     wpa-ssid name-of-phone-wifi
     wpa-psk phone-passphrase

iface open-wifi-nick inet dhcp
     wpa-ssid "name of open wifi with quotes if spaces"
     wpa-key-mgmt NONE

invoke logical interfaces above by
# ifup wls3=home
do stuff, go out, switch on phone hotsopot
# ifdown wls3=home 
# ifup wls3=phone
do stuff outside
# ifdown wls3=phone
# ifup wls3=open-wifi-nick
do stuff using free wifi
# ifdown=open-wifi-nick
Go and read a book instead

Reference: 10.6.2 High level network configuration using ifupdown 
logical interface definitions in Debian reference. Need to see what to 
do with open interfaces.

To connect to unencrypted wifi just use

# iw dev wls3 connect your_essid
# dhclient wls3 (I'm guessing)

Above won't work if logical interfaces defined in 
/etc/network/interfaces

https://donnutcompute.wordpress.com/2014/04/20/connect-to-wi-fi-via-command-line/

June 21st 2017
-------------

https://lists.debian.org/debian-user/2016/02/msg00137.html

Debian Stretch from blu-ray iso dd'ed to a USB stick. You have to do a 
waggle dance to get the USB stick recognised by Stretch as a deb 
repository. The steps are...

# umount /dev/sdb1  # unmounts the automatic mount to /media/keith/"Debian 9.0.0 amd64 1"
# mkdir /media/cdrom/"Debian 9.0.0 amd64 1"  # puts a mount point somewhere with appropriate permissions
# mount /dev/sdb1 /media/cdrom/"Debian 9.0.0 amd64 1" # mount the stick as an image
# cat /etc/apt/sources.list # entry below needed in sources.list

deb [trusted=yes] file:/media/cdrom/"Debian 9.0.0 amd64 1"/ stretch main contrib

And finally, after downloading a 21Gb iso using jigdo, you can't install 
texlive-full because of a missing file called 
http://ftp.debian.org/debian/pool/main/f/fragmaster/fragmaster_1.7-5_all.deb. 
So I downloaded that 120Kb package and used

# deb -i --force-depends fragmaster_1.7-5_all.deb

Then installed texlive-full, got a tonne of errors and ran 

# apt-get --fix-broken install

That seems to have worked. Will raise a bug.

June 17th 2017
--------------

Installing infinality patched font rendering libraries on Slackware. See

http://www.linuxquestions.org/questions/slackware-14/how-to-optimize-fonts-in-slackware-640468/page34.html

First install the lxml library and its dependencies...

BeautifulSoup4-4.4.1-x86_64-1_slack.txz
html5lib-0.9999999-x86_64-3_slonly.txz
lxml-3.8.0-x86_64-1_slonly.txz
six-1.10.0-x86_64-2_slonly.txz

Then clone the git repository and run the script to compile the infinality patched libraries

$ mkdir infinality
$ git clone https://github.com/archfan/bob-infinality-bundle.git ~/infinality
$ cd infinality
$ pwd
# su -
# cd cd /home/keith/infinality
# chmod +x install.sh 
# ./install.sh

Finally symlink the font specification files...

# ln -s /etc/fonts/conf.avail.infinality/ms/* /etc/fonts/conf.d/

Note: this replaces the following stock slackware libraries


    Freetype 2.6.5
    Cairo 1.4.6
    Fontconfig 2.11.95

so keep an eye on patches for those. I copied the contents of the tmp folder back to a slackbuilds folder...

$ bash-4.3$ ls /tmp/bob-infinality-bundle/
cairo-1.14.6               fontconfig-2.11.95-x86_64-1.txz  package-cairo
cairo-1.14.6-x86_64-1.txz  freetype-2.6.5                   package-fontconfig
fontconfig-2.11.95         freetype-2.6.5-x86_64-1.txz      package-freetype

$ cp -r /tmp/bob-infinality-bundle/* ~/Downloads/slackware/slackbuilds/infinality/


March 7th 2017
--------------

http://www.linuxquestions.org/questions/slackware-14/slackware64-14-2-encrypted-with-luks-and-lvm-initrd-gz-issue-after-kernel-update-4175601174/#post5680138

"In general, I typically don't update my kernels using slackpkg. It 
isn't recommended, even if it is enabled by default (see the below text 
from /etc/slackpkg/blacklist). Rather, I will download the kernels 
manually, run installpkg on them (instead of upgradepkg so it keeps the 
old kernels in place in case something goes wrong), generate a new 
initrd if requires, then update my lilo.conf to add the new kernel. Then 
I'll run lilo and reboot. If there are no glaring problems, I can then 
removepkg the old kernel packages."

March 4th 2017
--------------

Installed Slackware Current on X61s from alienbob's 64bit iso (dated 1st 
March). Installed everything including kdei except games (Y) - can't 
stand the fortune cookies. Using KDE with effects off and Dolphin set to 
double click to open &c.

To get Amarok to play an mp3, you need to install the gst-plugins-ugly 
package from slackbuilds. I just used the 14.2 version from slackonly.

I've installed LibreOffice 'still' (4.2.5) version from the LO Web site 
using rpm2tgz. Works fine. As usual, you need to pick a theme that 
allows the tickboxes to be visible within LO. I added the UK English 
help and LangPack files.

Inkscape had to be compiled using the new slackbuild for version 0.92 as 
previously compiled binaries won't find ImageMagick library as version 
is higher in Slackware Current (previous binaries want 0.6 and install 
has 0.7).

https://github.com/Ponce/slackbuilds/tree/current/graphics/inkscape

Shows two dependencies, numpy and lxml. I did not install either of 
those, locate finds a numpy and a couple of xml like libraries. There 
could be missing functionality. Compiled in around 2 hours.

R installs fine from a previous 14.2 compile, and the RStudio Desktop 
.rpm file converts easy using rpm2tgz. No extra libraries needed.

February 14th 2017
------------------

Upgraded the 14.1 installation on the X220 with the 500Gb hard drive. 
New kernel. Forgot to update lilo. Boot complains about invalid lzma. So 
booted of Ubuntustudio live USB and chrooted into the Slackware root as 
follows (straight out of the docs)...

$ sudo su  # becomes root in Ubuntu live session, no password
# mount /dev/sda2 /mnt   # as per slackware installer and docs
# mount -o bind /proc /mnt/proc
# mount -o bind /sys /mnt/sys
# mount -o bind /dev /mnt/dev
# chroot /mnt
# lilo # generates the new vmlinuz I think or at least new links

I'm being lazy and using the huge kernal and no initrd image. I might 
reinstall with full hard drive encryption and then I would need to 
generate a new initrd (see down the page).

MATE desktop with no xfce or KDE. I had to install a few xfce4 packages 
to get xfburn working, and I have to use evince to be able to print to 
file with 4 or 16 pages on one page (I do this to create flashcards). 
Otherwise all fine.

February 7th 2017
-----------------

Installing on slackware 14.1 without xfce or kde but with mate.

xfce4 needs the following slackbuilds...

root@lavazza:/home/keith/Downloads/slackware/slackbuilds/xfburn# ls -1
libburn-1.4.0-i486-1_slack.txz*
libisoburn-1.4.0-i486-1_slack.txz*
libisofs-1.4.0-i486-1_slack.txz*
vala-0.26.2-i486-1_slack.txz*
xfburn-0.5.2-i486-2_slack.txz*

You need following libraries from slackware/l and slackware/xfce if 
installing without xfce (just mate)

root@lavazza:/home/keith/Downloads/slackware/slackbuilds/xfburn# ls -1 xfce
exo-0.10.2-i486-2.txz
gtk-xfce-engine-3.0.1-i486-1.txz
libxfce4ui-4.10.0-i486-2.txz
libxfce4util-4.10.1-i486-1.txz
xfwm4-themes-4.10.0-i486-1.txz

root@lavazza:/home/keith/Downloads/slackware/slackbuilds/xfburn# ls -1 l   
hicolor-icon-theme-0.12-noarch-2.txz

February 4th 2017
-----------------

Installed Shotwell and Hugin on Slackware 14.1 from slackonly packages. 
Trust is involved (no checksums for packages compiled from slackbuild 
scripts). Package lists below...

bash-4.2$ ls -1
LibRaw-0.17.0-i486-1_slack.txz
gst1-plugins-base-1.4.5-i486-1_slack.txz
gstreamer1-1.4.5-i486-1_slack.txz
json-glib-0.14.2-i486-1_slack.txz
libgee-0.16.1-i486-3_slack.txz
libgexiv2-0.7.0-i486-3_slack.txz
libunique-1.1.6-i486-4_slack.txz
libwebp-0.4.3-i486-1_slack.txz
orc-0.4.23-i486-1_slack.txz
rest-0.7.91-i486-1_slack.txz
shotwell-0.20.2-i486-3_slack.txz
webkitgtk3-2.4.9-i486-1_slack.txz
bash-4.2$ cd ../hugin
bash-4.2$ ls -1
enblend-enfuse-4.1.2-i486-3_slack.txz
exiftool-10.00-i486-1_slack.txz
gsl-1.16-i486-1_slack.txz
hugin-2015.0.0-i486-2_slack.txz
libpano13-2.9.19-i486-1_slack.txz
tclap-1.2.1-i486-1_slack.txz
vigra-1.10.0-i486-3_slack.txz
wxPython-2.8.12.1-i486-2_slack.txz


January 28th 2017
-----------------

Installing R and RStudio Desktop on a Centos 6 based system has become 
complicated because of the age of the libraries. Basically, recent 
RStudio versions need a newer QT library and won't install. Older legacy 
RStudio versions won't work fully with the current R version 3.2.x 
branch because the way R does graphics has changed. So I compiled an 
older R version from source and used a legacy version of RStudio 
Desktop. RStudio Desktop *looks as if* it has hard wired paths for 
certain libraries so you have to force installation using the --nodeps 
option with rpm. The required libraries are there but at 
/usr/local/lib/R/lib and not where the rpm package thinks they need to 
be. All good fun.

On a fresh install of Stella Linux updated to 6.8 it goes like this...

#yum grouplist # Install compilers, X headers and texlive and headers for readline
#yum groupinstall 'Development Tools'
#yum groupinstall 'Desktop Platform Development'
#yum groupinstall 'TeX Support'
#yum install readline-devel 
#cd Downloads
#wget -c https://cran.r-project.org/src/base/R-2/R-2.15.2.tar.g # extracted using nautilus
#cd R-2.15.2
#./configure  --enable-R-shlib
#make
#make install
#rpm -i --nodeps http://download1.rstudio.org/rstudio-0.97.449-i686.rpm

And all is gooey and sweet.

December 29th 2016
------------------

Download and install the libraries below to enable Gnome Sound Converter 
to convert a wav file to mp3. Roll on the patents expiry expected 2018. 

http://download1.rpmfusion.org/free/fedora/releases/25/Everything/x86_64/os/repoview/index.html

  115  rpm -i lame-libs-3.99.5-6.fc25.x86_64.rpm
  118  rpm -i libmad-0.15.1b-17.fc25.x86_64.rpm
  121  rpm -i opencore-amr-0.1.3-4.fc24.x86_64.rpm
  124  rpm -i libmpeg2-0.5.1-11.fc25.x86_64.rpm
  130  rpm -i lame-3.99.5-6.fc25.x86_64.rpm
  135  rpm -i twolame-libs-0.3.13-5.fc25.x86_64.rpm
  136  rpm -i twolame-0.3.13-5.fc25.x86_64.rpm
  139  rpm -i x264-libs-0.148-13.20160924git86b7198.fc25.x86_64.rpm
  142  rpm -i a52dec-0.7.4-21.fc25.x86_64.rpm
  143  rpm -i gstreamer-plugins-ugly-0.10.19-19.fc24.x86_64.rpm

December 26th 2016
------------------

Commands to disable automatic software updates on Fedora Workstation 25

  140  systemctl disable dnf-makecache.service # as root or gksudo
  141  systemctl disable dnf-makecache.timer   # as root or gksudo
  143  gsettings set org.gnome.software download-updates false # as user I think

Last command is a hangover that will be removed in Fedora 26 they claim

http://superuser.com/questions/1143925/how-to-disable-automatic-updates-on-fedora-25

(The makecache service runs after every boot, but, of course, laptop is 
not connected to Internet then so auto update fails and then asks again 
at an inconvenient time. At least that is my experience.)

November 25th 2016
------------------

Ubuntu 16.04: installing the ms web core fonts. Checksums don't tally, 
so command line workround needed!

TMP=`mktemp -d`   
cd $TMP
grep Url: /usr/share/package-data-downloads/ttf-mscorefonts-installer | awk '{print $2}' | xargs -n 1 wget  
sudo /usr/lib/msttcorefonts/update-ms-fonts $TMP/*  
cd -  
rm -rf $TMP

Reference 

http://askubuntu.com/questions/463754/how-to-make-ttf-mscorefonts-installer-package-download-fonts-after-it-says-it-i

So much for easy to use Ubuntu!

November 1st 2016
-----------------

Staying sane on Fedora 24

    3  dnf update
   10  dnf install libreoffice
   21  dnf install vlc
   22  dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
   23  dnf install gstreamer1-plugins-base gstreamer1-plugins-good gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free gstreamer1-plugins-bad-freeworld gstreamer1-plugins-bad-free-extras ffmpeg
   24  dnf install inkscape krita karbon
   25  dnf install inkscape 
   28  dnf install audacious audacious-plugins
   31  dnf install htop
   41  dnf install clementine
   49  ls /etc/dnf/protected.d
   50  ls /etc/dnf/plugins
   51  nano /etc/dnf/dnf.conf
   64  dnf --refresh update
   73  dnf install chromium
   88  dnf install shotwell
   89  dnf install gimp
   91  dnf install cups-pdf
   93  dnf install splix
  107  dnf install pdfBooklet.noarch
  110  dnf install pdfjam
  112  dnf install texlive
  118  dnf install redshift-gtk redshift
  121  dnf install stellarium
  123  dnf install rdesktop
  126  dnf install f24-backgrounds-extras-kde.noarch
  128  dnf install eclipse
  131  dnf install xsane
  136  dnf install sane-backends-drivers-scanners
  139  dnf install wget

October 22nd 2016
-----------------

Installing the Pure Data music syntheis package using the slackbuild without 
jack audio on a 64 bit Slackware installation, you run into an issue about hard 
wired path names in the main file of pure data.

https://www.mail-archive.com/pd-list@iem.at/msg61548.html

The mailing list thread above contains the details. Pure data expects /usr/lib 
and on Slackware 64 we are in /usr/lib64. My gonzo workround is to edit line 517 
of s.main.c as shown below...

#ifdef _WIN32
    sys_libdir = gensym(sbuf2);
#else
    strncpy(sbuf, sbuf2, MAXPDSTRING-30);
    sbuf[MAXPDSTRING-30] = 0;
    strcat(sbuf, "/lib64/pd");
    if (stat(sbuf, &statbuf) >= 0)
    {
            /* complicated layout: lib dir is the one we just stat-ed above */
        sys_libdir = gensym(sbuf);
    }
    else
    {
            /* simple layout: lib dir is the parent */
        sys_libdir = gensym(sbuf2);
    }
#endif
}

I really must learn how to make a patch file! There might be an environment 
variable called LIBDIRSUFFIX defined by the make script so one respondent in the 
mailing list suggests

sed -i -e "517s|lib/pd|lib${LIBDIRSUFFIX}/pd|" src/s_main.c

as a patch method. I'd like to make an actual .patch file that can be put in the 
slackbuild directory as a project.

October 19th 2016
-----------------

http://www.linuxquestions.org/questions/slackware-14/where-might-i-find-the-kernel-source-slackbuild-4175591547/

How to manage a self-built kernel. Remember that Slackware 
will always need an initrd.

Installed Plasma 5 on 14.2 after trying out OpenSuse 42.1. 
OpenSuse multimedia appears to be completely broken so just 
went with Alien Bob's Plasma 5 build for stable Slackware.

Steps

1) Install Slackware 14.2 without kde/kdei

2) Create a directory somewhere convienient 
(~/Downloads/slackware) and use the following command...

$ rsync -av --exclude=x86 rsync://alien.slackbook.org/alien/ktown/14.2/5 .

(above is run as the update method as well together with the 
commands below at 4)

The trailing full-stop means 'copy to here' and avoids all 
the crud directories you get with wget.

3) Log out of X (I use startx)

4) As root go into the directory '5' and issue the commands...

# upgradepkg --reinstall --install-new x86_64/deps/*.t?z
# upgradepkg --reinstall --install-new x86_64/deps/telepathy/*.t?z
# upgradepkg --reinstall --install-new x86_64/kde/*/*.t?z

5) Run xwmconfig as user and set Plasma (last on the list for 
me) as the window manager.

6) startx and enjoy

7) Add the following kde apps

calligra-2.9.11-x86_64-5.txz
k3b-2.0.3-x86_64-2.txz
kplayer-0.7.2-x86_64-2.txz
kwebkitpart-1.3.4-x86_64-2.txz
oxygen-gtk2-1.4.6-x86_64-2.txz

So you can run Krita and all. No issues so far. 

September 24th 2016
-------------------

Removed the kde packages and then just added

installpkg calligra-2.9.11-i586-5.txz kde-runtime-4.14.3-i586-3.txz kde-workspace-4.11.22-i586-4.txz kdelibs-4.14.21-i586-1.txz kactivities-4.13.3-i586-2.txz oxygen-gtk2-1.4.6-i586-2.txz oxygen-icons-4.14.3-i586-2.txz libkexiv2-4.14.3-i586-2.txz

and Krita and Karbon seem to run ok (as do other parts of Calligra for 
some values of OK).

See

https://forum.kde.org/viewtopic.php?f=137&t=96675

for the basics then just running krita from terminal and tracking down 
the missing libraries.

September 23rd 2016
-------------------

Installed the kde/kdei packages to try out karbon and krita, both part 
of a monolithic Calligra package, and both needing kde libraries. 
Removed most of the KDE applications to de-clutter the menus. Krita 
apparently does not rely on the plasma desktop itself, just the 
underlying libraries, so it may be possible to remove most of the kde 
desktop.

Fetched the patches using the wget line

wget -r -nH --no-parent --reject=index.html* --cut-dirs=1 --no-clobber http://slackware.uk/slackware/slackware-14.2/patches/packages/

The --no-clobber option means that I can just use the same directory to 
incrementally add the changed packages. Running upgradepkg over that 
directory installs just the changed ones.

September 20th 2016
-------------------

Slackware 14.2 continues to be stable. Compiled inkscape from the 
slackbuild with a minor tweak to allow for having to use a different 
location for the source code for one library (lxml).

August 13th 2016
----------------

Fedora/Korora install on X61 with 3Gb ram. Automatic partitioning does 
huge root on the tiny ssd. Using lvm commands to resize from Live 
session.

    3  mount | grep sda                    # check the boot drive isn't mounted
    4  e2fsck -f /dev/mapper/korora-root
   14  lvresize -L 24G /dev/mapper/korora-root
   16  vgdisplay                           # lists /dev/sda
   17  lvdisplay                           # lists the lvm names
   18  resize2fs /dev/mapper/korora-root   # no options resizes to max in LV
   19  lvresize -l +100%FREE /dev/mapper/korora-home # uses up all free space
   21  e2fsck -f /dev/mapper/korora-home
   22  resize2fs  /dev/mapper/korora-home  # no options again resizes to max in LV

July 2nd 2016
-------------

Slackware 14.2 has been released.

http://www.linuxquestions.org/questions/slackware-14/readme_crypt-txt-needs-updating-hid-generic-kernel-module-is-also-required-if-using-usb-kebyoard-4175583546/#post5569010

Above about extra modules needed for encryption kernel

Keeping the X220 on 14.1 for a bit

X200 upgraded as follows...

root@lavazza:~# history | tail -20
  483  cat /etc/lilo.conf
  484  nano /etc/slackpkg/mirrors
  485  slackpkg update gpg
  486  slackpkg update 
  487  slackpkg install-new
  488  nano /etc/slackpkg/blacklist
  489  slackpkg install-new
  490  slackpkg upgrade-all
  491  slackpkg update gpg
  492  slackpkg update 
  493  slackpkg install-new
  494  slackpkg upgrade-all
  495  ls /boot
  496  mkinitrd -c -k 4.4.14-smp -m ext4 -f ext4 -r /dev/cryptvg/root -h /dev/cryptvg/swap -C /dev/sda2 -L -l uk
  497  nano /etc/lilo.conf
  498  ls /boot
  499  lilo
  500  reboot
  501  history | tail
  502  history | tail -20

All good. Mirror set to 14.2 on mirrorservice now. I always select 
Prompt(P) when slackpkg tells me that there are new config files, and I 
accepted the Overwrite(O) option for most except for slackpkg mirrors 
and blacklist.

After the initial slackpkg update-all command, I got a notification 
about slackpkg itself being updated, then had to reinstate the blacklist 
(I block kde/* and kdei/* as I don't use KDE).

June 16th 2016
--------------

Installing the Oracle Virtualbox on Slackware 14.1 32 bit

I used the microlinux packages available from

http://www.microlinux.fr/microlinux/extras-14.1-32bit/slackware/xap/

and downloaded the four packages

bash-4.2$ ls vir*
virt-manager-1.2.1-i486-2_microlinux.txz
virtualbox-5.0.20-i486-1_microlinux.txz
virtualbox-extension-pack-5.0.20-i486-1_microlinux.txz
virtualbox-kernel-5.0.20_3.10.17_smp-i486-1_microlinux.txz

Then I installed those using

$su -
# installpkg vir*

Then I went to /etc/rc.d and found the following new init scripts...

# ls -1 /etc/rc.d/rc.v*
/etc/rc.d/rc.vboxautostart-service
/etc/rc.d/rc.vboxballoonctrl-service
/etc/rc.d/rc.vboxdrv

I just enabled one of those

# chmod +x /etc/rc.d/rc.vboxdrv

Then, as per the slackbuild 14.1 README.SLACKWARE at

https://slackbuilds.org/slackbuilds/14.1/system/virtualbox/README.SLACKWARE

I installed the vboxdrv kernel drivers...

# modprobe vboxdrv
# modprobe vboxnetadp
# modprobe vboxnetflt

and created the vboxusers group and added my user to it...

# groupadd -g 103 vboxusers
# usermod -G vboxusers keith

Then I started the kernel drivers manually...

# /etc/rc.d/rc.vboxdrv start

And ran Virtualbox from the XFCE4 application menu, and set up a VM for 
Linux,Other to try out the Trisquel 64 bit iso. The speed is quite good 
on the X220 - slower than native and 2d graphics but quite nice given 
the arch difference (64 bit iso running on 32 bit host).

Then so the kernel drivers load each time I reboot, I added the lines to 
/etc/rc.d/rc.local and /etc/rc.d/rc.local_shutdown recommended in the 
slackbuild readme...

/etc/rc.d/rc.local

	# Start vboxdrv
	if [ -x /etc/rc.d/rc.vboxdrv ]; then
	  /etc/rc.d/rc.vboxdrv start
	fi

Loads kernel module.


/etc/rc.d/rc.local_shutdown

	# Stop vboxdrv
	if [ -x /etc/rc.d/rc.vboxdrv ]; then
	  /etc/rc.d/rc.vboxdrv stop
	fi

Stops the process. I have not done anything about suspend yet as I don't 
usually run vbox that long, just to try out ISOs.

June 12th 2016
--------------

How to reinstall base packages after system stops working properly.

http://www.linuxquestions.org/questions/slackware-14/curent-upgrade-failed-after-glibc-solibs-so-nothing-will-run-4175582032/#post5559476

It is possible to spanner the basic libraries and/or slackpkg. Chrooting 
into your installation won't help then because the tools you need within 
the installation have been damaged or have depend on libraries that have 
been damaged.

Solution referenced here is to boot off DVD and *not* chroot but to stay 
in the installer system, and mount the partition containing the damaged 
slackware to /mnt, and then mount the DVD packages directory to 
somewhere like /slack

Then CD into the /slack/path/to/package/sets and run something like

# "ROOT=/mnt upgradepkg --reinstall --install-new"

for at least package sets A, AD, P and L. That should restore basic 
tools to the hard drive's slackware partition. Then you can chroot into 
the installed slackware and reinstall patches and packages &c. or run 
slackpkg as needed.

June 9th 2016
-------------

Put 14.1 back on the X220 with XFCE4 and a 100Gb SSD. All fine. I'm 
using the 'wget patches and save to folder with date' approach to the 
(infrequent) updates. Just bookmark changelog and you are away.

Added most of kikinovak's microlinux builds except XFCE4 which is still 
at 4.10 and for the configurations. Using OpenOffice 4.1.2 because it 
does not crash and I know the bugs...

May 12th 2016
-------------

X200: Kernel 4.4.9 lasted but a few days, we hardly new thee.

Today's update brought Kernel 4.4.10 and I decided to risk using 
slackpkg for the update. I used the Prompt option to check the new 
config files for lvm and slackpkg (mirror and blacklist). I (K)ept the 
old ones. All went fine, just had to generate a new initrd as I use LUKS 
on this laptop.

# mkinitrd -c -k 4.4.10-smp -m ext4 -f ext4 -r /dev/cryptvg/root -h /dev/cryptvg/swap -C /dev/sda2 -L -l uk

Then change /etc/lilo.conf to something like this...

    # Linux bootable partition config begins
    image = /boot/vmlinuz-generic-smp-4.4.10-smp
     initrd = /boot/initrd.gz
     root = /dev/cryptvg/root
     label = linux4_4_10
    read-only
    # Linux bootable partition config ends

Then run lilo and check that you get the usual LBA error message. And 
reboot.

May 7th 2016
------------

Audacity slackbuild
-------------------

Audacity
    wxGTK3
    lame

Just using the 14.1 slackbuild, version 2.2 Audacity is fine. Works 
great with the wxGTK3 widgets that must be used with maxima as a 
replacement for the wxPython widgets. The lame library needed for mp3 
export.

MATE GTK3 build
===============

http://www.linuxquestions.org/questions/slackware-14/call-for-testers-comparison-of-mate-1-14-mix-build-vs-fully-gtk-3-build-4175579215/

Installing the binary packages of slackware.uk just worked in the same 
way as it did on April 23rd 2016 except using

http://slackware.uk/msb/testing/1.14-gtk3/

The command

upgradepkg --reinstall --install-new deps/*.txz base/*.txz extra/*.txz

removes the old packages before installing the new ones and adds the new 
GTK3 bits. This GTK3 version seems a tad faster and more responsive.

Maxima computer algebra
=======================

Maxima computer algebra slackbuild on -current 64bit (14.2RC2 updated to 
May 5th, no multiarch libs, just 64 bit)

Just used the 14.1 slackbuilds as follows

maxima itself as command line package (xmaxima when you read the 
manuals) and works with texlive and gnuplot.

Then

wxGTK3
wxMaxima

All builds in about half an hour.

May 6th 2016
------------

Texlive install but using only http mirrors for sources - fast guest 
wifi at college blocks ftp. Current 14.2RC2 updated to yesterday. You 
have to remove the tetex and tetex-docs packages from stock slackware to 
install the new texlive packages over the top. Remember to blacklist in 
/etc/slackpkg/blacklist to avoid re-installation and watch out for a 
library that needs blacklisting as well possibly because I'm using 2014 
texlive.

Used the 14.1 slackbuilds to build the Texlive 25th May 2014 version 
which is fine for my needs.

http://ftp.stu.edu.tw/FreeBSD/distfiles/TeX/

Above is an http mirror somewhere in Tiwan - I'm ever so grateful for 
whoever is putting this up as I can't use ftp protocol on the guest wifi 
at work. I was seeing 7Mbytes/s download speeds on the big files over guest 
wifi which is about 20 times faster than at home.

Slackbuilds
-----------

texlive
   texi2html
   libsigsegv (replaces a version in stock Slackware - might be because older)
texlive-texmf-extra
texlive-texmf-docs

The texlive slackbuild needs two source files, 
texlive-20140525-source.tar.xz (I got this from the .tw mirror) 
texlive-texmf-tetexish-20140525.tar.xz (This one is from an http 
address)

The texlive-texmf-extra slackbuild requires a source file on an http 
address

The texlive-texmf-docs slackbuild needs a huge 1Gb source file from an 
http Web address.

All compile fine. May recompile with 14.2 slackbuilds on release to 
avoid the library problem. I don't like over-writing stock libraries if 
I can avoid it.

April 24th 2016
---------------

### Installing ms core fonts. 

There is a slackbuild with more fonts than the web core ones in it but I 
prefer to just grab the appropriate .rpm package and use rpm2txz then 
install that.


If you do that, the fonts will end up at /usr/share/fonts/msttcorefonts

You have to copy or move the .ttf files back into /usr/share/fonts/TTF 
then issue the appropriate font commands on that folder. As root

# cp /usr/share/fonts/mstt*/*.ttf /usr/share/fonts/TTF/
# mkfontscale /usr/share/fonts/TTF/
# mkfontdir /usr/share/fonts/TTF/
# fc-cache -f -v /usr/share/fonts/TTF/

Log out of MATE then log in again and you get Times New Roman in 
OpenOffice

### OpenOffice works on all supported slackware versions

LibreOffice is surging ahead with the code refactoring and removal of 
legacy code. The programmers contributing to LibreOffice are working 
hard to replace the classes that provide functions that the host system 
can provide, such as font scaling and window drawing. The upside is a 
faster running package and better integration and screen font 
appearance. The downside is dependencies on specific versions of 
libraries supplied by the host system. The result is that you can't 
install the LibreOffice supplied binaries on Slackware Current (halfbuzz 
library difference). Alien Bob is providing compiled binaries for 
Current. He has had to patch out a failing test in order to complete the 
compilation. The video display *looks* a little unstable (windows flash 
black when redrawing under some circumstances). Orbea's build script 
fails on my fairly stock system and it looks like an issue with the 
build environment.

OpenOffice issued by Apache Foundation (Oracle's insistance on issuing 
it under a different licence) still uses the older internal systems with 
the consequence that you can download the binary from OpenOffice and use 
the rpm2txz script to produce a suite of packages that you can install 
on Slackware Current. Works fine. Identical to the OpenOffice version 
used under Windows at Work. All the familiar bugs still in place. 
Reassuring.

April 23rd 2016
---------------

Replacing KDE with MATE 1.14 on slackware current (14.2 RC2)

1. Grab the testing MATE 1.14 packages from slackware.uk

Make a new directory somewhere (I used ~/Downloads/mate) and cd into that 
directory locally.

I used lftp with command

$ lftp slackware.uk

Then cd'd to /msb/testing/1.14/ then ls to see the x86_64

Then I just used the lftp command

> mirror x86_64

to make a local copy of the entire set of packages. Next time, I'll try 
the

> mirror -n x86_64

command so that only newer packages on the remote server are downloaded.

2. Install MATE

Once download has completed, close the lftp session and become root in 
the ~/Downloads/mate/ directory and install the packages...

upgradepkg --reinstall --install-new deps/*.txz base/*.txz extra/*.txz

The extra/ folder has the pluma text editor and other stuff that will be 
useful for a complete desktop.

3. Remove the kde/kdei and xfce4 package groups (optional)

using slackpkg

# slackpkg remove kde       # takes kdei packages with it
# slackpkg remove xfce4     # leaves Audacious which is good news!

4. Blacklist the kde/kdei/xfce4 package groups (Optional with step 3) 

Just so they don't get added back on the next upgrade, nano 
/etc/slackpkg/blacklist and add these lines at the end

kde/*
kdei/*
xfce4/*

5. set inittab to run level 3 at first and reboot, then startx

You'll get a nostalgic reminder of Gnome 2 that starts very quickly and 
that takes relatively little memory (something like 350Mb on 64bit with 
8Gb on Thinkpad X220).

I personally like to have one panel at the bottom, and I could not 
resist installing the classic-windows theme. I also had to set the 
kyboard layout. Just adding UK keyboard layout resulted in MATE always 
starting with US layout, irrespective of the order that the layouts 
where in the keyboard settings, so I just deleted the US layout and left 
the UK layout.

To install a theme, just go into Appearance, click the Install Theme 
link at bottom of the window and find the .tar.gz file. Don't manually 
try to unpack the theme or anything.

References

http://www.linuxquestions.org/questions/slackware-14/mate-desktop-installation-procedure-upgrade-4175577975/#post5534342

http://gnome-look.org/content/show.php/Classic95?content=157298

April 7th 2016
--------------

Back up (actually syncronise) whole sytem to a dedicated external hard 
drive.

The backup can be restored to another laptop.

Make a copy of files on laptop

Plug in an ext4 formatted external hard drive and allow it to be 
automounted at /run/media/keith/biglongUUID

Run following command in root window and make tea the first time (57Gb)

root@lavazza:~# rsync -aAXv \
  --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/home/keith/.gvfs"} /* \
  /run/media/keith/biglongUUID/  --delete

When command completes the external drive has a copy of everything under 
the root of the local disk.

Restoring the copy to the hard drive in (another) laptop

Boot off the Slackware DVD (or any live image) and log into root

Run fdisk /dev/sda and make a swap and root partition on the local drive 
(assumed /dev/sda1 for swap and /dev/sda2 for root)

Run mkfs.ext4 /dev/sda2 on the new root partition to format that to ext4

Switch on swap on the local drive using something like

# swapon /dev/sda1 [ not sure if I did this second time ]

Attach the external hard drive that contains the copy of the files and 
use dmesg to check what device name (/dev/sdb)

Mount the /dev/sda2 partition of the local hard drive somewhere like 
/localdisk

Mount the /dev/sdb1 partition of the external hard drive somewhere like 
/usbdisk

(Slackware DVD complains if you mount stuff in /mnt)

Copy the entire contents of external drive to the local drive using

# cp -a /usbdisk/. /localdisk/

The -a switch recursively copies folders and keeps permissions and 
attributes. The trailing . ensures that dotfiles and symlinks get copied

Unmount both drives, disconnect the external drive

Summary: you have all the files needed to run Linux in the /dev/sda2 
partition. Now you need to sort out fstab and lilo.conf so they can find 
the huge kernel in the /boot partition and mount the root by chrooting 
into the linux on /dev/sda2

# mount /dev/sda2 /mnt   # as per slackware installer and docs
# mount -o bind /proc /mnt/proc
# mount -o bind /sys /mnt/sys
# mount -o bind /dev /mnt/dev
# chroot /mnt

# nano /etc/lilo.conf

On the system I've copied I had an initrd with whole drive encryption so 
I just comment all that out and add the default lines below to the last 
section of lilo.conf

# Linux bootable partition begins
image = /boot/vmlinuz
  root = /dev/sda2
  label = lifeboat
  read-only
# end of entries

Then run lilo to generate a new config

# lilo
(about 3 warnings usually)

Then alter fstab to suit arrangement of partitions on /dev/sda so first 
few lines look like this...

bash-4.3$ cat /etc/fstab
# Whole drive encryption with LUKS on original laptop - comment these lines out
#/dev/cryptvg/swap swap             swap        defaults         0   0
#/dev/cryptvg/root /                ext4        defaults         1   1
# dev/sda1        /boot            ext4        defaults         1   2
# Add lines below...
/dev/sda1 swap             swap        defaults         0   0
/dev/sda2 /                ext4        defaults         1   1
# Leave the rest 

Then reboot into your restored system and remove the DVD. My experiment 
coped with a change in wifi card and video resolution well.

March 15th 2016
---------------

Ran into trouble with the openssh update (I think, not sure) leading to 
network-manager not working and then leading to fresh install of 14.1 on 
X220. I just accepted the 'overwrite' option for config files which I 
suspect was part of the problem. I could stop network-manager and 
install wicd but I like modem-manager for usb broadband.

Now experimenting with a local packages cache and upgrading packages 
individually from /patches/packages.

Using these commands from a linuxquestions forum post...

# MIRROR="rsync://rsync.slackware.org.uk/slackware/slackware-14.1"
# DESTDIR="/srv/"
# rsync -avz --delete --delete-excluded       --partial --timeout=60       --exclude='source/'       --exclude='kde/'       --exclude='kdei/'       "$MIRROR" "$DESTDIR"

To save download from mirror on stable release, I just copied the 
slackware directory from the DVD to /srv/slackware-14.1/slackware as the 
contents of that directory never changes on a stable release, all 
updated packages go into patches/packages.

References...

http://www.linuxquestions.org/questions/slackware-14/after-23-years-i-am-considering-abandoning-slackware-4175574436/page3.html#post5513201

Above shows use of upgradepkg *.t?z command within the /patches/packages 
directory to only patch anything that is *newer* than the installed 
packages. Might cause the same problem as just using slackpkg though.

http://www.linuxquestions.org/questions/slackware-14/after-23-years-i-am-considering-abandoning-slackware-4175574436/page3.html#post5513361

http://www.linuxquestions.org/questions/slackware-14/after-23-years-i-am-considering-abandoning-slackware-4175574436/page3.html#post5513870

Above two posts about another semi-automatic script solution and the 
wget command I've put above. Might want to do 'big' patches or patches 
with consequences for configuration, manually though.

http://www.linuxquestions.org/questions/slackware-14/after-23-years-i-am-considering-abandoning-slackware-4175574436/page2.html#post5512981

Post above mentions the --dry-run option for upgradepkg. He uses this 
command...

# ls -rt | xargs upgradepkg --dry-run> summary.txt 2> error_resumen.txt

...but does not download all the non-package files. I want to use an 
exact mirror and then upgrade changed packages manually, so comparing 
dates or working through the changelog. I've also subscribed to 
slackware-security.

February 27th
-------------

Commands to get you on wifi from command line in Debian
-------------------------------------------------------

Off the Arch wiki after some googling. Tested on Debian 'standard' 
(command line) Live iso for Jessie and used on a Wheezy minimal install.

https://wiki.archlinux.org/index.php/Wireless_network_configuration#Manual_setup

Below for wpa encrypted connections...

root@debian:/home/user# history
    1  ifconfig -a                        # find what wireless card   
    2  ifconfig wlan0 up                  # bring up interface to card
    3  iwlist wlan0 scan | grep ESSID     # find the wifiname of a network
    #  Line below does the work. -B switch puts into background, might want to omit and use
    #  another window at first so you can see any error messages
    #  -D lists the drivers, these two work. -i selects the interface. -c indirection
    #  brings in the information about the wifi connection.
    4  wpa_supplicant -B -D nl80211,wext -i wlan0 -c <(wpa_passphrase "wifiname" "wifipasswd")
    5  dhclient wlan0                     # get an ip address
    6  ping google.co.uk                  # check its working
    7  dhclient -r                        # after your session, get rid of the route in the table

/etc/network/interfaces file backup
-----------------------------------

/etc/network/interfaces showing logical interface names for
fixed location wifi networks. Debian but will work on Slack
I think.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# Emergency home account wifi details
# This will get you started after
# installing a command line system.
# I keep this commented out just in
# case of foobaring the file below
#auto wlan0
#iface wlan0 inet dhcp
#    wpa-ssid home-wifi-name
#    wpa-psk home-wifi-passwrd

# logical interfaces for wifi as per Debian wiki
# invoke from command line as follows
# ifup wlan0=home 
# and it should just connect...
# when done with that network command
# ifdown wlan0=home
# will release the dhclient release and make it
# possible to connect somewhere else

# home connection is encrypted
iface home inet dhcp
     wpa-ssid home-wifi-name
     wpa-psk home-wifi-passwrd

# work is open
# use ifup wlan0=work to start
iface work inet dhcp
        wireless-essid work-guest-wifi
        wireless-mode Managed
        wireless-keymode open

# Third places here! Use these commands to scan for wifi
# 
# ifdown wlan0=another-network # free interface and release dhcp lease
# ip a                         # shows list of interfaces
# iwconfig                     # identifies the wifi card
# ip link set wlan0 up         # brings up the wifi interface
# iwlist wlan0 scan            # scans for available wifi networks
# iwlist wlan0 scan | grep keyword # helps narrow the search 
# 
# Then look at the scan output for wpa &c
#
# "Encryption key:off" shows open connection
#
# "IE: IEEE 802.11i/WPA2 Version 1" shows encrypted
#

February 27th 2016
------------------

Burn a cdrom from an image using wodim

$ wodim --devices

To list the CDROM device

wodim -v dev=/dev/sg1 image.iso

To burn .iso file to the cdrom

Above on Debian Wheezy minimal, see

https://wiki.debian.org/BurnCd

February 19th 2016
------------------

I've put Slackware64 -current Xfce4 on the X200 and I am keeping 
Slackware 32bit 14.1 on the X220 with it's encrypted LVM as 'production'.

This posted from ChromiumOS as provided by neverware (oddly worrying name) 
on the X61s. Very interesting. Video stack seems very clean with good font
rendition.

http://www.neverware.com/

Slackware -current: you need to compile libreoffice against halfbuzz 1.3. 
The binaries from LibreOffice Web site won't run as they are compiled
against halfbuzz 1.2. You get the 'Application Error' message (segfault
on loading).

http://www.linuxquestions.org/questions/slackware-14/libreoffice-5-1-0-3-a-4175572051/

See also AlienBob's builds.

January 2nd 2016
----------------

Compiled conkey on Slackware 14.1/mled from the slackbuild so I can do a 
clock on the desktop. I've gone for a basic textual clock with date 
underneath as the analogue ones need lua scripting.

Compilation easy - just needed to set the audacity-plugin option in the 
slackbuild file to 'no' to get a compile. The relevant flags section is 
as follows...

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LBIDIRSUFFIX} \
  --sysconfdir=/etc \
  --mandir=/usr/man \
  --enable-shared=yes \
  --enable-static=no \
  --enable-ibm \
  --enable-hddtemp \
  --enable-xft \
  --enable-weather-metar \
  --enable-weather-xoap \
  --enable-portmon \
  --enable-audacious=no \   # had to change this line to stop error(1) about audacious library of some kind
  --enable-mpd=yes \
  --enable-rss=yes \
  --enable-wlan=yes \
  $lua_params \
  --build=$ARCH-slackware-linux \
  --host=$ARCH-slackware-linux

I used the .conkyrc file below found somewhere on the Web. It produces a 
display of the current hours/mins in large font then the date underneath 
in a much smaller font.

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Use Xft?
use_xft yes
xftfont Trebuchet MS:size=9
xftalpha 0.8
text_buffer_size 2048
background yes
# Update interval in seconds
update_interval 1
xftalpha 0.8
own_window_argb_visual yes
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 180 0
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_margin 5
# border width
border_width 1
# Default colors and also border colors
# default_color white
# own_window_colour white
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes
# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none
#borders
draw_borders no
border_margin 10
# Position en bas a droite
alignment top_right
# Decalage par rapport aux bordures
gap_x 10
gap_y 20
TEXT
${color EAEAEA}${font GE Inspira:pixelsize=65}${alignr}${time %H:%M }${font GE Inspira:pixelsize=18}
${voffset 10}${alignr}${color EAEAEA}${time %A} ${color EAEAEA}${time %d} ${color EAEAEA}${time %B   }
#${font Ubuntu:pixelsize=10}${alignr}${color D12122}HD  $color${fs_used /} / ${fs_size /}    ${color D12122}RAM  
#$color$mem / $memmax     ${color D12122}CPU  $color${cpu cpu0}% 
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I might cut all the actual ram/processor stuff out sometime.

January 1st 2016
----------------

I run mled/slackware with init 4, and so GUI applications like 
unetbootin can't run from a terminal - you get error messages about no 
protocol and unable to open display.

Workaround from 

http://www.linuxquestions.org/questions/slackware-14/can't-connect-to-xserver-717518/#post4466285

$ xhost local:root
# su - -c unetbootin

and we are away...

Slackonly 14.1 has unetbootin 6.08 and p7zip dependency both in system. 
They seem to work on --current.

December 29th 2015
------------------

X200 news

On a roll now: reinstalled current from an old snapshot and upgraded 
through the eudev transition, still running on hugesmp. Installed the 
mled packages (see below) and then built R from the 14.1 slackbuild 
(worked fine, the resulting package is a healthy 32Mb and 
demo("graphics") runs). Then installed RStudio desktop (version 
0.99.489-i686) from the .tgz package created on 14.1 running rpm2tgz 
over the .rpm package downloaded from RStudio. Just installs as mled has 
the jdk already. No need for apache-ant (I suspected that was a build 
time dependency for RStudio).

Not running .cleanmenu or .trim, and adjusted /etc/profile.d/lang.sh 
back to C locale. Will set up an initrd for this kernel in a bit.

December 28th 2015
------------------

Fresh Slackware 14.1 install minus the kde/kdei package sets.

Installed R 3.2.2 ("Fire Safety" - where do they get the names?) from 
slackonly.com all fine.

The rstudio-desktop 0.98x version when installed with dependencies 
apache-ant and the 8.x jdk gives the 'pointers' error when loading. See 
the discussion below...

http://www.linuxquestions.org/questions/slackware-14/rstudio-install-problem-using-sbopkg-4175545576/

So I followed the advice there and downloaded rstudio-0.99.489-i686.rpm 
from the RStudio Web site and used the rpm2tgz script to produce a 
Slackware package. Installing that results in RStudio not giving errors 
and working fine by the look of it.

December 26th 2015
------------------

Comedy half hour with a debian Jessie install - the sources list 
generator is sneaking a 'testing' line in when you select Jessie. 
Aptitude hits 50 suggestions and bails at that point.

Use this sources.list

deb http://ftp.uk.debian.org/debian jessie main
deb http://ftp.debian.org/debian/ jessie-updates main
deb http://security.debian.org/ jessie/updates main

for sanity preservation!

All slackwares chugging along fine...

November 29th 2015
------------------

MLED 14.1 fine on the X200 and X60, and a new Web site with HowTo's 
including offline installation (basically wget the entire repo and use 
the command below to install all the packages, see 
http://www.microlinux.eu/faq.php#offline).

$ mkdir mled
$ cd mled
$ wget -c -r -np -nH --cut-dirs=1 http://www.microlinux.fr/microlinux/desktop-14.1-32bit/ 
$ su -
# cd /home/user/mled # or where ever you put it including external storage
# upgradepkg --reinstall --install-new *.t?z 

Then you have to run the ./cleanmenu.sh and possibly ./trim.sh scripts 
from the toolsfolder

I've experimented with a stock slackware-current with a few extra bits 
from mled including inkscape (one extra library compared to 14.1) and 
libreoffice (just the one huge package).

Inkscape is

atkmm-2.22.7-i486-1_microlinux.txz
cairomm-1.10.0-i486-1_microlinux.txz
glibmm-2.36.2-i486-1_microlinux.txz
gsl-1.16-i486-1_microlinux.txz
gtkmm-2.24.4-i486-1_microlinux.txz
inkscape-0.91-i486-1_microlinux.txz
libsigc++-2.2.11-i486-1_microlinux.txz
pangomm-2.34.0-i486-1_microlinux.txz

all from the microlinux 14.1 32 bit repository. I saved the packages 
above to a folder in Downloads, then ran the following command in that 
folder as root...

# upgradepkg --reinstall --install-new *.t?z

The result is Inkscape 0.91.

November 15th 2015
------------------

Switch on sub-pixel rendering using the cleartype patch for freetype

http://www.linuxquestions.org/questions/slackware-14/how-to-optimize-fonts-in-slackware-640468/page29.html#post5067546

Rebuild freetype base package in Slackware 14.1 to incorporate the 
cleartype patch that switches on sub-pixel rendering.

I just downloaded the slackware source for the freetype package from

http://slackware.org.uk/slackware/slackware-14.1/source/l/freetype/

and then issued the commands below from a root terminal in my 
slackbuilds directory...

# cd /home/keith/slackbuilds/cleartype
# ls
# patch -p1 < freetype_cleartype.diff 
(a couple of messages about cleartype.diff file and slackbuild script being patched)
# ls
# chmod +x freetype.SlackBuild
# ./freetype.SlackBuild
Takes a minute or so
# cp /tmp/freetype-2.5.0.1-i486-1.txz freetype-2.5.0.1-i486-1.txz
I always copy the packages to my slackbuild directory
# ls

The rebuilt package has the same name as the original freetype so will 
need to blacklist it...

The patch file starts under the double row of stars and ends after the 
next double row. Save as freetype_cleartype.diff

***********************************************************************
***********************************************************************
diff -rupN freetype.orig/cleartype.diff freetype/cleartype.diff
--- freetype.orig/cleartype.diff	1969-12-31 16:00:00.000000000 -0800
+++ freetype/cleartype.diff	2013-11-19 15:32:04.811346576 -0800
@@ -0,0 +1,12 @@
+diff -rupN freetype-2.5.0.1.orig/include/freetype/config/ftoption.h freetype-2.5.0.1/include/freetype/config/ftoption.h
+--- freetype-2.5.0.1.orig/include/freetype/config/ftoption.h	2013-06-19 14:20:04.000000000 -0700
++++ freetype-2.5.0.1/include/freetype/config/ftoption.h	2013-11-19 15:27:47.456737625 -0800
+@@ -591,7 +591,7 @@ FT_BEGIN_HEADER
+   /*   This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be    */
+   /*   defined.                                                            */
+   /*                                                                       */
+-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ 
+ 
+   /*************************************************************************/
diff -rupN freetype.orig/freetype.SlackBuild freetype/freetype.SlackBuild
--- freetype.orig/freetype.SlackBuild	2013-11-19 15:31:53.895891885 -0800
+++ freetype/freetype.SlackBuild	2013-11-19 15:33:17.885864416 -0800
@@ -78,7 +78,8 @@ zcat $CWD/freetype.illadvisederror.diff.
 # for doing so.
 # Please see this web site for more details:
 #   http://www.freetype.org/patents.html
-#zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
+patch -p1 --verbose < $CWD/cleartype.diff
 
 chown -R root:root .
 CFLAGS="$SLKCFLAGS" make setup CFG="--prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --build=$ARCH-slackware-linux"
********************************************************************
********************************************************************

The ~/.config/fontconfig/font.conf XML file starts under the next double 
row

********************************************************************
********************************************************************
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
	<match target="font">
		<edit mode="assign" name="antialias">
			<bool>true</bool>
		</edit>
		<edit mode="assign" name="hinting">
			<bool>true</bool>
		</edit>

		<edit mode="assign" name="hintstyle">
			<const>hintslight</const>
		</edit>

		<!-- Ignore any embedded bitmaps in TTF, etc (Microsoft's Calibri and others from Office 07/Vista have these) -->
		<edit mode="assign" name="embeddedbitmap">
			<bool>false</bool>
		</edit>

		<!-- MS fonts use full hinting -->

		<test name="family">
			<string>Andale Mono</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Arial</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Arial Black</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Calibri</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Cambria</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Candara</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Comic Sans MS</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Consolas</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Constantia</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Corbel</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Courier New</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Georgia</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Impact</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Symbol</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Tahoma</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Times New Roman</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Trebuchet MS</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Verdana</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Webdings</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Wingdings</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
	</match>
</fontconfig>
***********************************************************
***********************************************************

Don't you just *love* XML configuration files?


November 15th 2015
------------------

Updates for X60 with Slackware 14.1 from Nov 6th. Firefox-esr and 
Seamonkey as usual. No install-new packages as expected.

Change permissions on Web pages recursively...

sudo find /var/www -type d -print0 | xargs -0 chmod 711
sudo find /var/www -type f -print0 | xargs -0 chmod 644

To upload a whole directory using sftp, you have to create the target 
directory first then use the put command...

sftp>  mkdir mypages
sftp>  put -r /home/keith/Documents/mypages

http://askubuntu.com/questions/30629/how-can-i-recursively-change-the-permissions-of-files-and-directories 

November 14th 2015
------------------

Clonezillad the test machine then installed Slackware current and 
microlinux 14.2 on top of old partitions. Would not run the slackpkg 
upgrade and slackpkg install microlinux-desktop commands so wgetted the 
packages and installed those. Used netconfig to set networkmanager to 
run network and changed /etc/inittab to run level 4. Mostly works. 
nm-applet complains about permissions (needs to run as root, seeing user 
so far).

November 13th 2015
------------------

Successful install of microlinux 14.1 on X61s test machine. Runs like a 
champ in 512Mb with one core switched off and a spinning rust hard 
drive. A few MD5 errors on download of packages so I just used wget on 
the address of the package given by slackpkg and then used installpkg.

Once installed, edit /etc/inittab and change run level to 4 and run 
netconfig and select Use Network Manager option (last on list). Then 
reboot into the graphical log-in. Language currently set in 
/etc/profile.d/lang.sh as

export LANG=en_EN.utf8

Will try the procedure with microlinux 14.2 on Slackware current 
manyana.

Firefox bogs down with advert heavy Web sites, so used the hosts file at

http://winhelp2002.mvps.org/hosts.txt

and added these to /etc/hosts below the loopback entry. Wonderful.

November 10th 2015
------------------

Installed Slackware current on X61s for testing as we get near release.
Used the snapshot DVD dated 6th Nov 2015 from

http://taper.alienbase.nl/mirrors/slackware/slackware-current-iso/

Used fdisk to partition (apparently cfdisk does not work to block 
boundaries automatically) and did an install in /dev/sda2 with swap in 
/dev/sda1.

Then updated and attempted to install microlinux desktop using the 
migration instructions. Github was asking for a user name for a bit and 
slackpkg is disclaiming all knowledge of microlinux-desktop when 
pointing at the 14.2-32bit repository on microlinux.fr. Also md5 errors 
on extras. I imagine there is a lot of updating going on so I'll try 
another time.

I just wgetted the directory with all the packages in and then used 
installpkg to install the lot! Works fine but will make upgrading with 
slackpkg impossible.

Clean install and try again later in Week.

November 8th 2015
-----------------

R and RStudio on Slackware 14.1 with the MLED desktop

apache-ant-1.8.2-noarch-1alien.tgz (not needed)
R-3.1.1-i486-1_SBo.tgz
rstudio-desktop-0.98.501-i486-5_slack.txz

Versions of R later than about 3.1.x when used with versions of RStudio 
later than around 0.98.7x give an error about comparisons within RStudio 
- comparisons limited to atomic and list types. Avoid this by using 
these versions of the packages. apache-ant is listed as a dependency for 
RStudio but it is a run-time dependency. Not needed when you install the 
packages on another computer from the one you build these on.

Printing on the Samsung ML-1640

Install the splix printer driver slackbuild along with the optional 
jbigkit. Package names are

splix-2.0.0-i486-2_SBo.tgz
jbigkit-2.1-i486-1_SBo.tgz

The splix driver must be the -2 version and it looks like you need the 
jbigkit dependency as well.

Then on microlinux/MLED install as below 7th Nov, start the CUPS daemon 
as usual on slackware by setting its rc.d script executable and running 
the script

# chmod +x /etc/rc.d/rc.cups
# /etc/rc.d/rc.cups start

Plug the USB printer in. The MLED desktop has the xfce4 printers 
configuration widget so just search for printers in the whiskermenu or 
find Manage Printer in the Settings menu. The Manage Printer widget will 
pick up the printer and will find the appropriate pd file for it.

November 7th 2015
-----------------

Fresh install of Slackware 14.1 on X200 with whole drive encryption.

http://slackware.org.uk/slackware/slackware-14.1/README_CRYPT.TXT

and

http://blog.darknedgy.net/technology/2014/07/27/1/

Latter helpful for screen shots and for recovery commands if something 
goes wrong (boot off installer, attempt to open the Luks container and 
activate the volumes and then chroot into the installation)

Commands used on 32-bit with SATA hard drive identified as /dev/sda

Boot installer, select uk as keyboard and log in as root

# cfdisk /dev/sda                           # Created /dev/sda1 about 200Mb and rest on /dev/sda2 both as physical partitions
# cryptsetup -s 256 -y luksFormat /dev/sda2 # Specified the key phrase and retyped it
# cryptsetup luksOpen /dev/sda2 sluks       # Asked to type the key phrase, opens the 'block device' sluks for writing
# pvcreate /dev/mapper/sluks                # 'physical' volume created in the block device - success message
# vgcreate cryptvg /dev/mapper/sluks        # LVM group named cryptvg created - success message
# lvcreate -L 20G -n root cryptvg           # 15G partition for what will be /root
# lvcreate -L 80G -n home cryptvg           # what will become /home
# lvcreate -L 4G -n swap                    # what will become /swap
# vgscan --mknodes                          # writes the inodes to the 'block device'
# vgchange -ay                              # activates (-a) all (-y) the volumes created by lvcreate
# mkswap /dev/cryptvg/swap                  # makes swap space available will format

Now run the Slackware installer script 'setup'

# setup
Select keyboard
Finds the swap volume
Loads an ncurses screen that lets you choose the /root partition.
You choose /dev/cryptvg/root then format it to ext4
Installer shows other partitions found so you
choose /dev/sda1 format it to ext4 and then map it to /boot
choose /dev/cryptvg/home format it to ext4 and map it to /home
Don't touch the /dev/mapper/* entries! 
Install LILO stage: choose expert mode
Then the MBR option and select /dev/sda as the device then keep selecting options (defaults!) until you get to the Begin
Linux: Add a linux partition screen you select /dev/cryptvg/root and give it a one word label like 'linux'
Install lilo

Do the rest of the install options: I just mostly go with defaults and 
install all the package sets. EXIT the installer (the DVD will eject) 
then select the return to root prompt. The installer leaves the 
partitions you installed to mounted at /mnt/root, /mnt/boot, /mnt/home

# chroot /mnt          # chroot into your installation
# mkinitrd -c -k  3.10.17-smp -m ext4 -f ext4 -r /dev/cryptvg/root -h /dev/cryptvg/swap -C /dev/sda2 -L -l uk 
# # above command makes an initrd with drivers for hibernate to disk, the file system in use and the uk keyboard layout
# pico -w /etc/lilo.conf

Should look something like this at the end

    # Linux bootable partition config begins
    image = /boot/vmlinuz-generic-smp-3.10.17-smp
      initrd = /boot/initrd.gz
      root = /dev/cryptvg/root
      label = Generic
      read-only  # Partitions should be mounted read-only for checking
    # Linux bootable partition config ends

You also need to change the 'append' line further up for hibernate to 
disk so it looks like this

    # Append any additional kernel parameters:
    append= "vt.default_utf8=0 resume=/dev/cryptvg/swap"

Then save changes and run the lilo command

# lilo

You will get a few warnings about video modes &c

Use the three finger salute to reboot into the new installation as the 
'reboot' command itself does not seem to work at this stage.

Emergencies...

Boot of the installer to get a working kernel and

# cryptsetup luksOpen /dev/sda2 sluks # will ask for pass phrase
# vgscan --mknodes                    # sets up the inodes
# vgchange -ay                        # finds the volumes
# lvscan                              # finds all the logical volumes and gives you their names
# mount /dev/cryptvg/root /mnt        # mount the slackware root into mnt
# mount /dev/cryptvg/home /mnt/home
# mount /dev/sda1 /mnt/boot
# mount -o bind /proc /mnt/proc       # imposes the running kernel's gunge at /mnt/proc
# mount -o bind /sys /mnt/sys
# mount -o bind /dev /mnt/dev         # makes the device nodes available at /dev/*
# chroot /mnt                         # changes root to the local slackware

Now you can investigate lilo.conf and such and make new initrd's if 
needed. Or mount an external hard drive and back up your (plain text 
now) data!

To get network access going you could jack into a wired network and

# netconfig                           # dialogue appears just go for dhclient
# /etc/rc.d/rc.inet1 eth0_start       # starts networking on eth0

The dhclient should kick in. Once stuff fixed, just comment out every 
live entry in /etc/rc.d/rc.inet1.conf file so network-manager/Wicd start 
on restart. You might have to change permissions on the rc scripts...

November 1st 2015
-----------------

http://www.microlinux.fr/microlinux/desktop-14.1-32bit/slackware/

http://www.microlinux.fr/mled.php

kikinovak on linuxquestions does this refit ontop of slackware with a 
full xfce4 desktop. I pinched the inkscape 0.91 build, which involved 
downloading and installing these packages...

atkmm-2.22.7-i486-1_microlinux.txz
cairomm-1.10.0-i486-1_microlinux.txz
glibmm-2.36.2-i486-1_microlinux.txz
gsl-1.16-i486-1_microlinux.txz
gtkmm-2.24.4-i486-1_microlinux.txz
inkscape-0.91-i486-1_microlinux.txz
libsigc++-2.2.11-i486-1_microlinux.txz
pangomm-2.34.0-i486-1_microlinux.txz

ChangeLog showed some security updates so did the upgrade today. Had to 
pin my ancient GIMP 2.4 install to prevent it being upgraded to 2.8.6 as 
would be reasonable for most people. Just added this pattern

gimp-2.8.6

to /etc/slackpkg/blacklist

October 18th 2015
-----------------

Search and replace html tags across all the pages in the Web site...

find . -name "*.html" -print | xargs sed -i 's/<\/h1>/<\/h1> <hr \/>/g'

Replaces </h1> with </h1> <hr /> in any html files in the current 
directory.

http://www.brunolinux.com/02-The_Terminal/Find_and%20Replace_with_Sed.html
https://rushi.wordpress.com/2008/08/05/find-replace-across-multiple-files-in-linux/

You only need to escape the close-tag slashes, not the angle brackets.

September 29th 2015
-------------------

Debian networking: how to choose between networks using logical 
interfaces in the /etc/network/interfaces file

root@spoon:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# To use the configs below, you run the command
#   ifup wlan0=landline 
# or
#   ifup wlan0=coffeehouse
# you may need to take previous connection down using
#   ifdown wlan0
# use
#   iwlist scan
# to find new connections to add to the file

# Home connection on ADSL using a logical interface
iface landline inet dhcp
    wpa-ssid home-adsl
    wpa-psk secret-words

# Open wifi connections example
iface coffeehouse inet dhcp
        wireless-essid some-coffee-bar
        wireless-mode Managed

Above works with Squeeze, Wheezy and Jessie, therefore gNewSense 3 and 4

September 23rd 2015
-------------------

Upgrade to Firefox. Slackpkg wanted to upgrade exiv as well. Allowing 
the exiv upgrade broke Shotwell, as it was expecting libexiv2.so.10 but 
Slackware 14.1 has libexiv2.so.12. I just had to recompile the libgexiv2 
library against the new libexiv2 and then recompile the Shotwell 
executable itself against the new libexiv2. I decided to do the

# slackpkg clean-system

to dump all the old 13.37 and 14.0 slackbuilds and reinstall one by one. 
I somehow acquired both libexiv2.so.12 and libexiv2.so.10 so the 
clean-system command took the install back to single versions. 
OpenOffice reinstalled fine. Adobe 9.5.5 was ok and Shotwell runs fine 
without errors. I'll see how Audacity goes in a bit.

September 20th 2015
-------------------

Slackbuilds for 14.1: Xarchiver, Shotwell, Hugin

xrchiver and thunar-archive-plugin fine and took a minute. 
Works the moment you install the packages and reload thunar.

Shotwell: the old 13.37 slackbuild I donwloaded from slacky isn't happy 
with current library versions so recompiling using slackbuilds using 
following schema...

Shotwell (10 mins)
    json-glib (1 min)
    libunique (1 min)
    webkitgtk3 (4 hours)
        gst1-plugins-base (seconds)
            gstreamer1 (minutes)
        libwebp (seconds)
    libgee (minutes)
        vala (minutes)
    LibRaw (minute)
    rest (minute)
    libgexiv2 (minute)

I run the slackbuilds depth first so gstreamer1 | gst1-plugins-base | 
webkitgtk (all four hours of it!) then the other libraries with 
dependencies then the top level libraries and last of all Shotwell 
itself. I extract all the slackbuilds in a folder, drag the source code 
archives into each, then chmod +x and run each slackbuild in turn from a 
root terminal. After each package builds in /tmp, I copy it back into 
the slackbuild folder and install it so that I don't need to keep track 
of build or runtime dependencies, they will all be in place. The whole 
tree can get tarred up for future use.

Hugin;

hugin (about 45 min)
    tclap (minutes)
    exiftool (3 minutes)
    wxPython (using slacky build)
    libpano13 (less than 15 mins)
    enblend-enfuse (20 minutes)
        gsl (minutes)
        vigra (minute)

Using the slacky build of the same version of wxPython to save time. 

September 19th 2015
-------------------

http://www.linuxquestions.org/questions/slackware-14/upgrading-via-slackpkg-4175483892/

Using these commands to upgrade the distribution from 14.0 to 14.1 Will 
save downloads compared to the UPGRADE.TXT procedure. Will need to 
regenerate the initrd and modify the lilo.conf file as per last time. 
Need to check the hints file for any dodgy packages.

Commands as root...

Edit mirrors file.
slackpkg update
slackpkg upgrade slackpkg
slackpkg update
slackpkg install-new
slackpkg upgrade-all
(slackpkg clean-system)

The clean-system command will try to remove all the slackbuilds so may 
decide to risk not running it. I will run the commands in a tty session 
I think.

Commands work fine if you have a reliable internet connection. Not so 
good if the slackpkg upgrade-all command gets interrupted and you can't 
reconnect. The usual ifconfig commands failed to work. I was running a 
different kernel to the one that had been installed(!) as the internet 
connection was lost around openssl package (packages upgraded in 
alphabetical order of name I think). So I booted off a live iso and 
chrooted into the slackware partition and modified lilo.conf and ran 
lilo. Error about detecting graphics hardware from within the live 
session, so rebooted and re-ran lilo from slackware. Then resumed 
upgrade. Completed, but X refusing to start. Ran slackpkg update found 
more updates within the 14.1 release, running those resulted in X 
running.

You get asked about config files. I elected to (O)verwrite all with new 
configs as I don't have tweaked rc files or anything. Running on Huge 
kernel 3.10.x at present, need to redo the initrd. The (O)verwrite 
option overwrites the lot, including slackpkg backlist and mirrors 
config. I reran the

# slackpkg blacklist kde kdei freetype-2.5.5 

command to ensure I didn't end up dragging down the KDE desktop or 
clobbering my pixel sub-rendering.

September 17th 2015
-------------------

ChangeLog shows a certificates update to Slackware 14.0 so decided to 
set up blacklist properly to be able to update using slackpkg.

I didn't install the kde and kdei package sets as I don't use KDE...

# slackpkg blacklist kde kdei 

then accept the whole list. This writes a list of all the kde / kdei 
packages into /etc/slackpkg/blacklist

I use a patched freetype from slackbuilds to enable sub-pixel rendering 
so I need to manually add a line to /etc/slackpkg/blacklist that 
prevents a slackbuild upgrade command overwriting that one package. I 
used this patterin in the blacklist file...

freetype-2.5.5

Now issuing

# slackpkg update

Then 

# slackpkg install-new
# slackpkg update-all

produces no output, so all up to date and packages blacklisted. 
Satisfyingly uncomplicated.

August 29th 2015
----------------

Since upgrading to Slackware 14.0 the location that Thunar mounts 
external drives has changed so the rsync command to copy the hard drive 
to the external hard drive is now...

rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /* /run/media/keith/long-UUID/

UUIDs have started to be used to identify external drives rather than 
the label ('disk').

I swapped the external drive into the X200 and tried to boot but got the 
L 99 99 99 99... message that indicates that the bootloader can't find 
the kernel. So, booted off a live image (Void Linux happened to be 
handy!) and did a chroot along the lines here...

http://superuser.com/questions/111152/whats-the-proper-way-to-prepare-chroot-to-recover-a-broken-linux-installation

http://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media

From a terminal in Void (Void uses sudo just use su - if you are using 
(say) a Debian live CD)...

1. Make sure that the hard drive in the machine is unmounted

2. My / is at /dev/sda2 (swap is at /dev/sda1) so I mount that...

sudo mount /dev/sda2 /mnt

3. Then I mount the various system directories as follows

sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /proc /mnt/proc
sudo mount -o bind /sys /mnt/sys

4. Then I chrooted into the system on the disk

sudo chroot /mnt /bin/bash

The bash prompt will change to the familiar unsourced Slackware root 
prompt, and now you are issuing commands from your Slackware install but 
running the kernel provided by the live CD. Neat trick! Takes a couple 
of seconds.

5. All I needed to do was configure Lilo

# lilo

Some warnings about not being able to detect the graphics card running 
probably because the config files are different to Void. My two kernels 
(generic and huge) 'added'.

6. Come out of the Slackware prompt (undoing step 4)

# exit

Prompt should come back to Void

7. Now just unmount all the mounts in the reverse order...

sudo umount /mnt/{proc,sys,dev}
sudo umount /mnt

Any errors about /mnt being busy means that something has not unmounted 
or something is still running (unlikely)

Now you can reboot into the copied Slackware or carry on with the live 
session.

Looking at Void Linux for the x200.
----------------------------------

Downloaded the Live image with xfce4. Less than a CD-ROMs worth.
Default repos in Europe.

Commands for checking libreoffice and then installing what you need to 
run my 3g modem
Comes with xfce version 4.12 so added whiskermenu
Very few fonts out of the box.

sudo xbps-install -S htop
sudo xbps-install -S nano [ yes, I know... ]
sudo xbps-install -S libreoffice
xbps-query -R -s libre* [ shows a good range of bits and language packs]
sudo xbps-install -S alsa-utils
alsamixer [ had to unmute the main output ]
sudo xbps-install -S audacious audacious-plugins
sudo xbps-install -S xfce4-whiskermenu-plugin
sudo xbps-install -S usb-modeswitch usbutils

Install guide from base system and the underlying logic described at

http://www.cupoflinux.com/SBB/index.php?topic=2300.0

Looks to be close to a BSD base + ports/packages model.

23rd/24th August 2015
---------------------

$  wget -r -nH --exclude-directories=/slackware/slackware-14.0/slackware/kde* --cut-dirs=4 -nc ftp://ftp.slackware.org.uk//slackware/slackware-14.0/slackware

Command above pulls down the packages from Slackware 14.0 ready for 
doing an upgrade off the hard drive. Saves about a gig of download as I 
don't use the KDE desktop.

-r is recursive downloading of contents of folders

-nH option means directories not prefixed by path from root of ftp server

--exclude-directories= needs full path to miss out kde and kdei

--cut-dirs=4 means that the path from root of ftp server is cut off

-nc is no-clobber so won't overwrite already downloaded files if interrupted

No user or password needed for anonymous download. Full path to target 
directory needed

I need the /kernels and /extras/Wicd and Java from extras as well I suspect.

23rd August 2015
----------------

Freetype sub-pixel rendering patch.

[DVD or any mirror]/slackware/slackware-13.37/patches/source/freetype/

Uncomment the line in the slackbuild script like this...

# The line below enables code patented by Microsoft, so don't uncomment it
# unless you have a license to use the code and take all legal responsibility
# for doing so.
# Please see this web site for more details:
#   http://www.freetype.org/patents.html
zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || 
exit 1

Then 

# chmod +x 
# ./freetype.SlackBuild

Takes a minute or so and then 

# cp /tmp/freetype-2.5.5-i486-1_slack13.37.txz 
freetype-2.5.5-i486-1_slack13.37.txz

and then 

# installpkg freetype-2.5.5-i486-1_slack13.37.txz

and reboot. Check version as follows...

$ freetype-config --ftversion

I'm getting 2.5.5 as opposed to 2.4.4

May need to blacklist this package to prevent the patched version from 
being clobbered on updates. Then I added a .fonts.conf to my user as per 
the Debian wiki, as below...

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>
</fontconfig>

21st August 2015
----------------

$ tar -vxzf somefile.tar.gz to unpack the slackbuilds.
# chmod +x somescript to make executable

Audacity on 13.37

Using binaries from AlienBob and slacky to get Audacity running.

wxGTK-2.8.12-i486-1alien.tgz
audacity-2.0.0-i486-1sl.txz
soundtouch-1.5.0-i486-5sl.txz
vamp-plugin-sdk-2.2.1-i486-1sl.txz
flac-1.2.1-i486-3.txz
glibc-solibs-2.13-i486-4.txz
libogg-1.2.2-i486-1.txz
libsndfile-1.0.24-i486-1.txz
libvorbis-1.3.2-i486-1.txz
twolame-0.3.13-i486-1sl.txz
opus-1.1-i486-1alien.tgz
jack-1.9.9.5-i486-2alien.txz


7th August 2015
---------------

Made an initrd and booting from generic kernel as option at boot.
As per instructions on the 13.37 DVD. Commands below...

# cd /boot
# mkinitrd -c -k 2.6.37.6-smp -m ext4 -f ext4 -r /dev/sda2

Then

# nano /etc/lilo.conf

and added a second entry for generic kernel

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot = /dev/sda
lba32
... loads of stuff about vesa framebuffers ......
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz-huge-smp-2.6.37.6-smp
  root = /dev/sda2
  label = Linux
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-smp-2.6.37.6-smp
  initrd = /boot/initrd.gz
  root = /dev/sda2
  label = generic
  read-only
# Linux bootable partition config ends

Then reconfigure lilo with the 'lilo' command

# lilo

Looks like entries go in order of their appearence in the file.
More recent kernel coming up...

Note: Needed to add the lba32 line when I decided not to use the symlink
to vmlinuz. Lilo gave a warning. 

Can't see any obvious difference between huge and generic to be honest. 

6th August 2015
---------------

Swapping an 80Gb hard drive for a 64Gb ssd. 80Gb drive has just two 
partitions, swap and root, root formatted as ext4. Just a normal BIOS 
based X60 laptop and MS-DOS style partition tables in the drives. No GPT 
or LVM stuff.

My steps...

1) Booted off live CD, turned swap off (# swapoff -a) and used Gparted 
to shink the root partition so the total was slightly less than the 
capacity of the ssd.

2) Powered down and swapped the drives over so the (blank) ssd is in the 
laptop and the 80Gb hard drive is in the USB caddy.

3) Booted into the live CD again and used fdisk -l to check the hard 
drive locations.

# fdisk -l

On my X60, the ssd was /dev/sda and the drive in the USB caddy was 
/dev/sdb

4) Used the dd command below as root to do a binary copy of the hard 
drive to the ssd

# dd if=/dev/sdb of=/dev/sda bs=4096 conv=sync,noerror

The conv=sync,noerror option will ignore any bad blocks on the drive in 
the USB caddy and fill them in with zeros. You don't want to many bad 
blocks anyway! There appears to be a lot of differing opinions on the 
block size value to use. Arch Wiki goes for bs same size as the block 
size on the hard drives. Others go as high as 4M. I've compromised. Copy 
takes about 1 hour at roughly 30Mb/s.

5) Used another terminal to issue the command below (user will do)

$ watch -n60 'sudo kill -USR1 $(pgrep ^dd)'

dd will then spit out a progress report every 60 seconds in the root 
terminal. Because the hard drive was larger than the ssd, the copy 
operation finished like this...

63422849024 bytes (63 GB) copied, 2062.75 s, 30.7 MB/s
dd: writing `/dev/sda': No space left on device
15630679+0 records in
15630678+0 records out
64023257088 bytes (64 GB) copied, 2083.22 s, 30.7 MB/s

6) Unmount the hard drive in the USB caddy and shut down. Then remove 
the live CD and reboot into your smaller faster OS.

This works I think because your *filing system* and all its partitions 
are intact even though you ran out of space on the SSD - the last bit 
was empty.

7) You can do a read/write (non-destructive) bad block test on the hard 
drive in the USB caddy using the command below...

# badblocks -nsv /dev/sdb

Google this command first! the -n option sets up a non-destructive test. 
Otherwise, badblocks just writes to each block on the drive and wipes 
it. Takes about 4 hours on an X60 with an 80Gb drive.

8) The 80Gb drive is now mounted in an external case. I use the 
following command from the running system to synchronise the 80Gb drive 
with the ssd. As root...

# rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} --delete /* /media/disk

Command line above should be all on one line! It gets justified when I 
forget to start nano with the --nowrap option.

Works a treat. All the dot files (and the endless mozilla cache files - 
might put an exclude in for them). The braces command is for bash or zsh 
shell. See Arch Wiki

Refs

http://unix.stackexchange.com/questions/161859/can-dd-be-used-to-clone-to-a-smaller-hdd-knowing-that-partitions-will-need-ed

https://wiki.archlinux.org/index.php/Disk_cloning

https://wiki.archlinux.org/index.php/Badblocks

25th October 2014
-----------------

glibc, openssl and messenger app updates yesterday. All seem fine. 
Memory is a bit high for Firefox, may reboot.

bash-4.2$ uptime
 21:50:00 up 12 days, 13:21,  5 users,  load average: 0.07, 0.21, 0.18
bash-4.2$ free -m
             total       used       free     shared    buffers     
cached
Mem:          2933       2752        181          0         57       
1595
-/+ buffers/cache:       1099       1834
Swap:         5999          2       5997


20th October 2014
-----------------

Slackware: just updated the openssl as per ChangeLog.txt. No issues at 
all, this thing just keeps chugging away.

bash-4.2$ uptime
 22:14:41 up 5 days, 13:46,  4 users,  load average: 0.17, 0.29, 0.21
bash-4.2$ 

27th September 2014
-------------------

keith@kona:~$ env VAR='() { :;}; echo Bash is vulnerable!' bash -c "echo 
Bash Test"
bash: warning: VAR: ignoring function definition attempt
bash: error importing function definition for `VAR'
Bash Test

Above on Trisquel 6 (stable release) on X60 with netgear usb wifi dongle 
(runs a lot cooler as well as fully libre).

ChangeLog.txt updates for bash and nss went on fine and the vuln test 
is showing bash is OK on Slackware.

24th September 2014
-------------------

All basic functions working fine; another niggle, rdesktop sessions 
don't select gb keyboard automatically. Not sure if slack terminal is 
ignoring a suggstion from remote server or if local setting wrong.

Dragora Linux: one of the fully free ones the FSF recommend with a slack 
style installation and runit init daemon. All works, uses wicd for wifi, 
can't see how to install LibreOffice, no rpm2cpio in repos so 
downloading Trisquel 6.01 (based on Ubuntu 12.04)

8th September 2014
------------------

bash-4.2$ uptime
 08:15:39 up 27 days,  9:29,  3 users,  load average: 0.79, 0.76, 0.68
bash-4.2$ free -m
             total       used       free     shared    buffers     
cached
Mem:          2933       2455        478          0         44       
1726
-/+ buffers/cache:        684       2249
Swap:         5999          6       5993

Firefox and Thunderbird updates Friday so actually rebooting today!

4th September 2014
------------------

bash-4.2$ uptime
 20:00:26 up 23 days, 21:14,  3 users,  load average: 0.29, 0.42, 0.73
bash-4.2$ free -m
             total       used       free     shared    buffers     cached
Mem:          2933       2520        413          0         65       1581
-/+ buffers/cache:        873       2059
Swap:         5999          6       5993

Seems OK. One update for firefox-nss on the 28th

30th August 2014
----------------

Only issues to date: slackpkg update wants to replace the patched freetype 
package (see fonts) each time. Learn about pinning packages.

Webkit library needed for RStudio gets a lot of updates and takes ages to 
compile.

NB: both of these are slackbuilds/customisation issues, nothing to do with 
a default Slackware install.

24th August 2014
----------------

Used

dd if=/dev/zero of=/dev/sdb bs=512 count=30000

where /dev/sdb was a 16Gb USB stick with a Debian live isohybrid 
image written to it using dd. Tried the commands at

http://www.cyberciti.biz/faq/linux-clearing-out-master-boot-record-dd-command/

but the command 

dd if=/dev/zero of=/dev/sdc bs=512 count=1

did not write over enough of whatever the original dd put on the mbr. 
I just guessed 30000, resulting in writing 15Mb of zeros to the 
beginning of the USB stick.

Once blanked, I was able to use gparted to make an msdos partition 
table and create a FAT32 partition. 

A reference...

"One other important thing. Now that you've dd'd your stick with an 
isohybrid image, if you want to use it for anything else, you'll need 
to zero the first 2MB of the stick. Maybe twice. And maybe more than 
2MB. I've had inconsistent results with that."

http://forums.debian.net/viewtopic.php?f=10&t=116610#p549301

23rd August 2014
----------------

Dell doing fine on suspend to RAM

bash-4.2$ uptime
 10:16:56 up 11 days, 11:31,  4 users,  load average: 0.06, 0.06, 0.13
bash-4.2$ free -m
             total       used       free     shared    buffers     cached
Mem:          2933       2585        348          0        120       1501
-/+ buffers/cache:        963       1969
Swap:         5999         10       5989

18th August 2014
----------------

Actually Debian Wheezy on X60 but still putting it here 
just in case. Added following lines to /etc/hdparm.conf 
to stop the hard drive trying to spin down on battery. 
Was causing 'stutter' on wakeup.

man hdparm for the settings, they increase the time 
between spin down attempts (-S) and reduce the 
aggresiveness of the power saving (-B). Change in battery 
life reports not *huge*, something like 20 minutes less. 

# 
http://unix.stackexchange.com/questions/107165/hard-disk-spins$
command_line {
     hdparm -B 255 /dev/sda
}

# 
http://unix.stackexchange.com/questions/107165/hard-disk-spins$
command_line {
     hdparm -S 255 /dev/sda
}


10th August 2014
----------------

Dell: Using a cheap external USB audio card (Griffin iMic) to improve 
playback quality (it does). All works except when suspending. Amarok 
crashes on waking up and other music players report errors.

It looks as if alsa can't find the iMic device when waking up from a 
suspend. Leaving the ncurses alsamixer running in a terminal through a 
suspend gives an error about sound card being unplugged on resume (plus 
a quote from the Jabberwocky of all things).

Discretion is better part of valour so I have reverted to internal 
sound card. Had to delete a KDE config so iMic was forgotten by KDE 
settings, and had to reboot so Amarok could find new settings.

Pausing mpg123
--------------

"The general job control commands in Linux are:

    jobs - list the current jobs
    fg - resume the job that's next in the queue
    fg %[number] - resume job [number]
    bg - Push the next job in the queue into the background
    bg %[number] - Push the job [number] into the background
    kill %[number] - Kill the job numbered [number]
    kill -[signal] %[number] - Send the signal [signal] to job number 
[number]
    disown %[number] - disown the process(no more terminal will be 
owner), so command will be alive even after closing the terminal.

That's pretty much all of them. Note the % infront of the job number in 
the commands - this is what tells kill you're talking about jobs and 
not processes."

http://superuser.com/questions/268230/how-can-i-resume-a-stopped-job-in-linux/268268

Just Ctrl-Z to pause and then type fg to resume

9th August 2014
---------------

openssl updates issued yesterday installed ok.

Nano: To find and replace text within the current document:

Ctrl \
Enter your search term [press return]
Enter your replacement term [press return]
A [to replace all instances]

nano .nanorc and add lines to turn on the syntax highlighting.

include "/usr/share/nano/java.nanorc"
include "/usr/share/nano/html.nanorc"

Find out what highlighting schemes are available using

ls /usr/share/nano

8th August 2014
---------------

https://bugs.kde.org/show_bug.cgi?id=281207

Skanlite same as Scanlite on Gnome, crashes when trying to save a file. 
If you leave the Save As... dialogue up it eventually does list the 
local disk directories. Apparently looking for (non-existant) Samba 
shares and hogging the process while it does. Renders this simplified 
scanning program useless, so just use the venerable and annoying Xsane.

Xsane works fine of course. The boody dinosaur always does. Canon LiDE 
20 and simple line art scans of sketchbook.

6th August 2014
---------------

Codec fun: to play m4a (aac) files from my old iPod Shuffle, you have 
to 1) install faad codec package from slackbuilds then 2) re-compile 
gst-plugins-bad so the .configure stage recognises the presence of the 
faad codec package and compiles the appropriate plug in. 3) Uninstall 
the old gst-plugins-bad package and install the new one. See...

http://www.linuxquestions.org/questions/slackware-14/songbird-and-m4a-in-slackware-13-a-779419/

On Dell, used slackpkg clean-system to remove all slackbuilds, 
rebooted, then ran installpkg *.tgz in a directory with all the 
slackbuild .SBo.tgz package files built on the X60. The files installed 
in name order but all the applications (Eclipse, RStudio &c) seem to be 
working fine. Yes, if the right files are where the applications expect 
them to be, the applications will work!

Forgot to copy libpano, part of Hugin, only 300kb. Found out when 
starting hugin from terminal, error gives missing library .so name.

5th August 2014
---------------

root@moka:~# uptime
 21:52:52 up 7 days, 1 min,  4 users,  load average: 0.81, 0.86, 0.83

Doing fine. Compiling Hugin had gcc using half a gig of RAM, 100% 
processor and temp held ok at 65. I've logged out/logged into KDE a couple 
of times but not had to reboot (using run level 4).

Set up sbopkg to make compiling Slackbuilds a bit easier and compiled 
Hugin.

http://docs.slackware.com/howtos:slackware_admin:building_packages_with_sbopkg

Download the binary sbopkg.tgz.SBo and install as usual, then, as root

# sbopkg                      ## sets up the paths in /var
# sbopkg -r                   ## fetches 140+Mb of Slackbuild scripts
# git clone 
git://gitorious.org/sbopkg-slackware-queues/sbopkg-slackware-queues.git 
queues

The git clone copies a set of tag files or queue files with file extension 
.sqf. The tag file for a package contains a list of the dependencies for 
the package in reverse order so the base of the dependency tree comes 
first. The package itself is listed last. The (corrected) tag file for 
hugin is

libxmi
vigra
gsl
enblend-enfuse
exiftool
libpano13
tclap
wxPython
hugin


Running the ncurses sbopkg; you can load the tagfile ('manage the 
queue/Load a saved queue') and then install the packages from Slackbuild 
using the 'Process the current queue' command. As wxPython is already 
installed (Audacity) I unticked that package at the 'Load a Saved Queue' 
stage.

Sbopkg can also find *updates* to the Slackbuilds currently installed.

root@moka:~# sbopkg -c
[ Checking for potential updates ]
This may take a few moments. Press <ESC> to abort.
100%[==========================================================================]
Listing installed SBo repository for Slackware 14.1 packages and flagging
potential updates...

libreoffice:
  POTENTIAL UPDATE
  Installed version:  libreoffice-4.2.5-i586-1_SBo
  Repo version:  libreoffice-4.3.0-i486-1_SBo
webkitgtk:
  POTENTIAL UPDATE
  Installed version:  webkitgtk-2.4.2-i486-1_SBo
  Repo version:  webkitgtk-2.4.4-i486-1_SBo

I'm sticking with 4.2.5 Libreoffice, but I might recompile webkit to see 
if replacing that library impacts on RStudio at all.

Hugin built fine, but the queue file hugin.sqf left out a couple of 
dependencies for emblend-enfuse (vigra and gsl, Visual Graphics library 
and Gnu Scientific Library). Once those were added it built fine. The 
largest bit was hugin itself, then enfuse-emblend.

KDE Panorama (Kipi plug in, possibly arrived with DigiKam) recognises 
emblend-enfuse and libpano13, so could possibly have skipped hugin itself.

4th August 2014
---------------

Doing fine on Moka...

moka ~ $ uptime
 07:15:37 up 5 days,  9:24,  3 users,  load average: 0.20, 0.50, 0.74
moka ~ $ free -m
             total       used       free     shared    buffers     cached
Mem:          1498       1354        144          0         61        719
-/+ buffers/cache:        573        925
Swap:         6499         16       6483

A few KDE rough edges: Dragon Player is the default video player and will 
only work with the Xine backend in System Settings | Multimedia | Phonon | 
Backend. Amarock and Audacious will only work with the gstreamer backend. 
Trying to set Kplayer as default video player. Looking at Device Options 
for DVDs. Ongoing font rendering issues with GTK applications (Firefox and 
some issues with LibreOffice). Copy / paste into Gimp won't work from 
Screenshot. Ksnap reproduces the translucent window effect *even when 
grabbing a region* so you always get the translucent image of the Ksnap in 
the background of your screen grab.

Update a couple of days ago (see ChangeLog.txt for 1st Aug 2014) brought 
freefont package as well as the three listed, not sure if that has 
clobbered the patched one I got from slackbuilds, *and* a new 
Firefox/Thunderbird. I thought I'd had those updates before. Nothing 
broken.

2nd August 2014
---------------

One million row by 6 column LibreOffice Calc sheet for monte carlo 
analysis. Running a macro that recalculates and copies results.

top - 18:14:16 up 18 min,  3 users,  load average: 0.44, 0.52, 0.44
0.0%st
Mem:   3004244k total,  2811492k used,   192752k free,    61108k buffers
Swap:  6143996k total,     6784k used,  6137212k free,   222468k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 1317 keith     20   0 2141m 1.9g  60m S    1 66.7   5:34.00 soffice.bin        
 1002 keith     20   0  600m 132m 2312 S    0  4.5   0:01.20 mysqld             
  986 keith     20   0  360m  90m  30m S    0  3.1   0:08.23 

About 25 seconds per iteration. Fails completely on the X60 with forcequit errors after heroic 
swapping.

28th July 2014
--------------

Digikam build sequence (Slackware 14.1)

digikam
  liblqr
  ffmpeg
    lame
    x264
  lensfun
  opencv
    ffmpeg
    qt5 (optional, not used)
  eigen3 (optional)
  libpgf (optional)
  libdc1394 (optional)
  QtGStreamer (optional)
  
Compile/install sequence

1) lame (already on system from Audacity)
2) x264 (c code, 1 min)
3) libdc1394 (1 min)
4) ffmpeg (use DC1394=yes ./ffmpeg.SlackBuild) About 10 min
5) liblqr 1 min
6) lensfun less than 1 min
7) opencv (85 Mb C++ so long one) oddly enough, about 1 hour
8) eigen3 seconds
9) QtGStreamer 5 min
10) Digikam (60 Mb C++ so long one again) just over the hour

Functions fine. Will test raw input from Canon in a bit.

27th July 2014
--------------

Eclipse 4.4 from slackbuilds
----------------------------

Dependencies look like this...

Eclipse
  JDK
  Webkitgtk
    libweb
    gst1-plugin-base
      gstreamer1
	orc
	
So build/installpkg order is this...

1) Orc
2) gstreamer1  -  *don't* remove default gstreamer 
3) gst1-plugin-base
4) libwebp
5) webkitgtk [ takes *hours* on the X60 ]
6) JDK current (1.7.0.65 from Slackbuild already)
7) eclipse (all 200Mb of it, just jar files so copying, takes seconds)

To get Eclipse to use GTK2 themes so buttons look OK under KDE, you need 
to add a line that says

--launcher.GTK_version
2

under the openFile line. The '2' (argument of the variable) is on a new 
line!

to the /opt/eclipse/eclipse.ini file

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
    --launcher.library 
    plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20140603-1326
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    --launcher.GTK_version
    2
    --launcher.appendVmargs
    -vmargs
    -Xms40m
    -Xmx512m

You can test the GTK2 theme setting by using

export SWT_GTK3=0

from bash then invoking eclipse before modifying the ini file.

Refs

http://forums.debian.net/viewtopic.php?f=8&t=115477

http://www.eclipse.org/swt/R4_4/new_and_noteworthy.html#m3

http://www.linuxquestions.org/questions/slackware-14/eclipse-luna-on-java8-looks-wrong-4175509412/


Java
----

Just use the JDK slackbuild. Readme says

"This is a SlackBuild that will repackage Oracle Java into a package that 
can be easily installed, upgraded, or removed using Slackware's native 
package management tools. This will also package JRE so you will not need 
a separate JRE build. You must Agree to Oracle's download agreement before 
this can be downloaded. This means you have to use a web browser to 
download it. Sorry wget folks. The mozilla plugin is no longer activated 
by default."

Not compiled from source, just copies binaries out of Oracle into a 
Slackware package format.

You have to log out and log in again so /etc/profile.d/jdk.sh runs so 
that the $JAVA_HOME variable is exported, cat jdk.sh to see. If you 
don't do that, the command java -version will return command unknown 
and eclipse will complain about not finding a java version when 
starting up.

You can use the 'source' command...

#. /etc/profile.d/openjdk.sh

See http://docs.slackware.com/howtos:software:java

Wine 1.6.1
----------

Wine
    fontforge
        freetype 2.10
        cidmaps
    webcore fonts
    

Needs fontforge and web core fonts installed already

fontforge needs the source for a specific version of freetype and cidmaps 
in the slackbuild directory when slackbuilding, so these source files are 
'co-requisites' I imagine.

.SBo packages install fine on the Dell, so portable, and no need to 
installpkg freetype or cidmaps.

Webcore fonts
-------------

Just slackbuild and installpkg

Add following to /etc/fonts/local.conf

<!-- Globally use embedded bitmaps in fonts like Calibri? -->
<match target="font" >
<edit name="embeddedbitmap" mode="assign">
<bool>false</bool>
</edit>
</match>

Remove /etc/fonts/conf.d/60-liberation.conf as substitutions not needed. 
Renaming didn't work

RStudio and R
-------------

Slackbuild of RStudio
---------------------

RStudio
    R	(easy one file)
    apache-ant (another slackbuild)
    core-dictionaries (code in with this slackbuild)
    gin (code in with this slackbuild)
    gwt (code in with this slackbuild)
    junit (code in with this slackbuild)
  mathjax (code in with this slackbuild)

Needs apache-ant as prerequisite.

You need the five source files from author's amazon storage plus the 
RStudio code from the RStudio GIT repository for the slackbuild script!

GWT is huge, so will take ages to build, unless it just unpacks the needed 
jar files (suspect it might). It seems to be a java app and have something 
to do with ajax so I suspect this is RStudio server related.

Become root as 

su -

and not just

su

This makes sure the /etc/profile.d/jdk.sh script gets run and that the 
system variable $JAVA_HOME is correctly populated. The GWT thing refuses 
to run if it can't find the java run time.

I'm not sure if a clean Slackware has Java, perhaps an old one.

GWT is some cross-platform build tool that makes the boost objects for the 
GUI for RStudio. The final product runs fine when installed.

R itself
--------

Easy, just one file, takes about 15 minutes to compile from source

Play DVDs on KDE's native Dragon Player
---------------------------------------

Two slackbuilds needed

libdvdcss
libdvdnav

Then use System Settings | Multimedia | Phonon | Backend tab and set Xine 
as the prefered backend at top of the list

Log out/Log into KDE and pop a DVD into the player. One of the actions 
will be Open with Video Player (Dragon Player). Menus all work &c.


Audacity
--------

audacity
    lame
    wxPython

Install the wxPython package first, then lame then audacity. wxPython 
takes an hour or so to compile on the X60 and raises the temperature! I 
didn't use any of the optional dependencies for wxPython.

Can't get Audacity to find internal microphone on the X60 or Dell. 
Microphone works as will howl back when volume turned up in 'capture' but 
won't act as input. Might be KDE/Phonon thing.

Amarok does not play mp3 out of box
-----------------------------------

In a couple of years the US mp3 patents will expire and we won't have to 
do this little dance.

Install gst-plugins-ugly from slackbuilds.org

http://wiki.linuxquestions.org/wiki/Slackware-FAQ

Useful page from the linuxquestions.org site. Slackware forum on there is 
main channel for support.

Libreoffice
-----------

A 'binary' slackbuild, so just repackaging the binary distribution from 
libreoffice.org. 4.5.2 is fine for me (pivot tables and conditional 
formatting in Calc)

   mv /opt/libreoffice4.2/program/libvclplug_kdelo.so{,.orig}
   mv /opt/libreoffice4.2/program/libkdebe1lo.so{,.orig}

These mysterious commands have something to do with getting LibreOffice to 
look ok. I think they *disable* KDE integration provided by LO so that the 
gtk2-oxygen engine can provide it. I'm making that bit up. It works on the 
Dell.

I think I did the symlink .gtkrc-3.0 to 
/usr/share/themes/oxygen-gtk/gtk-3.0 thing on the X60.

Using xwmconfig to start in XFCE4 once seems to help as well. You get all 
the usual folders set up then. There is something about setup.ini in 
/etc/skel on some Google results but /etc/skel directory is empty on X60.

Slackbuilds
-----------

Compiling from source uses /tmp and puts the final packages in /tmp with 
.SBo extensions. I copy packages back to slack-stuff folder on X60 and if 
they are OK I install them on the Dell. 

X60 using networkmanager and did not configure network during install
---------------------------------------------------------------------

I didn't config networks on X60 installation because I was going to use 
network manager to manage the networks including wired.

Google tells you to change /etc/hosts and /etc/HOSTNAME &c. Doesn't work 
on Slackware. NetworkManager.conf overrides these settings (makes sense 
when you think about it)

    moka ~ $ cat /etc/NetworkManager/NetworkManager.conf
    # /etc/NetworkManager/NetworkManager.conf
    #
    # See NetworkManager.conf(5) for more information on this file
    
    [main]
    plugins=keyfile
    dhcp=dhcpcd
    
    [keyfile]
    hostname=moka

X60, X61s, Dell
---------------

Thinkpad X60 iwlwifi firmware found. Everything works. Thinkfan 
available 
as a slackbuild and works but running without it at present.

Make /etc/modprobe.d/thinkpad_acpi.conf with one line
options thinkpad_acpi fan_control=1

Thinkfan needs a permissions change on /etc/rc.d/rc.thinkfan then
/etc/rc.d/rc.thinkfan start


Dell E5420 i5 with an Atheros Ath9k wifi card fitted previously: All 
works

oxygen-gtk firefox looks funny
------------------------------

There was something to do about getting Firefox and LibreOffice to look 
integrated and not 'slabby'. It was renaming some KDE options but I have 
lost the info at present (hence these notes). The gtk2-oxygen and 
gtk3-oxygen packages are both installed using a default install.

Update default packages
-----------------------

Keep an eye on 

ftp://ftp.osuosl.org/pub/slackware/slackware-14.1/ChangeLog.txt

No automatic updates just the ChangeLog. Each release seems to get about 5 
years of support judging by older changelogs.

slackpkg provides a degree of automated updating

#nano /etc/slackpkg/mirrors

Uncomment one mirror (mirror service for me). This list is a bit out of 
date so you could copy in a new mirror.

# slackpkg update gpg
# slackpkg update

Fetches a list of updates and resets database after setting a key. Then 
try this lot

slackpkg update
slackpkg install-new
slackpkg upgrade-all
slackpkg clean-system

Clean system wants to remove your slackpackages so you don't actually 
accept any of the choices!

http://docs.slackware.com/slackware:beginners_guide

http://docs.slackware.com/slackware:slackpkg

Updates for a given version of Slackware (e.g. 14.1) seem to be provided 
for a number of years, usually 5. However updates depend on upstream 
making updates to source. That may vary from project to project. Looks 
like the slackware team isn't backporting patches in the way Redhat/Centos 
do.

http://www.reddit.com/r/slackware/comments/1vl5vl/how_many_years_can_i_expect_to_get_security/ 

21st July 2014 
--------------

Installation
------------

General advice is

1) Use a live CD to partition disks before hand

2) Just have a swap and one large / (saves problems with running out of 
space on /). Example: after compiling Eclipse + webkitgtk and a few other 
slackbuilds I have 3.5Gb in the /tmp folder which is in / by default.

3) Install the lot (selected by default on the slackware setup program) as 
that cuts out any dependency issues when installing stuff later from 
slackbuilds

References to discussions

http://www.linuxquestions.org/questions/slackware-installation-40/how-to-install-minimal-slackware-4175506934/

http://www.linuxquestions.org/questions/slackware-14/slackware-partition-scheme-4175435307/

http://www.reddit.com/r/slackware/comments/1rv4kt/im_going_for_it/cdsunq6

"You begin by booting from the CD or DVD, and are dropped into a root 
prompt. From there, if you need to format your disk you can choose between 
fdisk or the slightly more user-friendly cfdisk to partition your disk. 
Then you can run the Slackware setup utility, which walks through the 
installation of package sets. At that point you can pick and choose 
software from package sets that range from "a" for base packages (such as 
the kernel, glibc, and so on) to "xap" for X applications like Firefox. 
The suggested method is to simply proceed with a full install, which 
should be around 5.5GB of software when all is said and done."

"At the end of the install, you're prompted to set up networking ? which is 
only really useful if you have a wired connection ? the bootloader 
(Slackware still opts for LILO), and set up a root password. Then you may 
reboot and begin using your freshly installed Slackware system. If you 
want to run KDE, Xfce, or another desktop you need to either edit the 
inittab to boot to an X login, (Volkerding has not embraced Upstart as a 
replacement for init, nor is it likely Slackware would take a chance on 
systemd just yet) or run startx. KDE, Xfce, and other desktops are 
presented with very minimal changes from upstream ? another difference 
between Slackware and most modern Linux distributions."

http://lwn.net/Articles/434815/

Brockmeier's review of 13.37, still true, except the full installation is 
8.5Gb now.

Quotes
------

"I try very hard with Slackware to defer to the wishes of the upstream 
developers. This isn't the place to be patching in new features, or 
packaging beta versions (if that can be helped). Lao Tzu said that in 
order to lead, one must follow." - Patrick Volkerding

This of course means that as new packages themselves based on new 
libraries and sub-systems flow through from upstream, Slackware will 
reflect those changes. KDE4 transition in the past and systemd in the 
future will probably come through when they need to

"I really couldn't have predicted the course of events, and the majority 
of it is determined by upstream projects and the ever changing needs of 
the users. So, I like to stay focused on more immediate goals. As those 
are accomplished, what needs to happen next comes into focus. It's been 
more a process of evolution than directed design." Volkerding

Both from

http://www.linuxquestions.org/questions/interviews-28/interview-with-patrick-volkerding-of-slackware-949029/

Marketing/perceptions

Recent marketing seems to be moving away from the Subgenius stuff (funny 
for about 5 minutes then gets old, some of the web sites are scutty). The 
'neutrality' of packaging upstream projects really shows.

http://www.reddit.com/r/slackware/comments/1yx7oc/what_do_you_hate_of_slackware/

http://www.reddit.com/r/slackware/comments/1wwn0h/slackware_on_enterprise_environment/

http://www.reddit.com/r/slackware/comments/1jg1w4/raise_your_hand_if_you_would_like_to_work_in_a/

Any discussion of slackware in a server context seems to come down to 1) 
pam 2) systemd 3) remote admin 4)RHEL as standard (US)

Perhaps market to makers and tinkerers hardware people and hipsters as 
client and small server system?

"Slackware is the shibui operating system. Shibui objects, in Japanese 
aesthetics, bear a simple, unostentatious design that incorporates and 
reflects the natural grain of the materials it's made out of rather than 
trying to hide them; the opposite might be "flashy" or "plasticky". 
Slackware is close to being the simplest possible distro, with minimal 
package management and virtually no specialized tools for managing /etc 
like Red Hat and Debian have; its texture reflects the natural grain of 
Unix." --bitwise on Reddit

http://www.reddit.com/r/slackware/comments/1t5hg6/dang_this_is_a_real_nice_workstation_distro_so_far/ce5ml5x