A beginner’s primer for the Amazon Fire

00-post

I have a dream of being able to use a tablet as a personal computer. I bought an Amazon Fire tablet to see if it was possible. This is my first time buying either an Android or Amazon product. I gave the tablet a good going over. I had a good experience and thought I would share my observations to people new to the Amazon Fire or could use a few tips.

The good

  • the display is pleasant to look at, it has good color reproduction and a wide viewing angle
  • the glass is hardened, though I’ve been good to it it has more to do with the thoughtful quality of the construction
  • the CPU runs the apps reasonably fast and the graphic animation is usually smooth
  • a SD card slot
  • the files can be organized (either by plugging in the tablet to a personal computer or by a file manager app)
  • the price of $50
  • many apps are available, some quite good

What I would like to see improved

  • built-in storage if it can be done, it is currently four gigabytes after OS updates
  • memory, it is 500MB which makes apps usually have to save states rather then be retained in memory
  • edge tapping, this might be my big, clumsy fingers but I have a hard time with buttons recognition on the edges
  • SD card write access for third party apps for conventional file saves, this would be nice though I know is currently prevented because of a security precaution
  • file organization by folders only, currently Android OS tries to index all the files into four libraries (Documents, Images, Movies, Music) and some apps use these libraries; knowing all file types is a big task and folder organization would mean my family photos don’t get grouped with my web development photos
  • the calendar app to get a notification daemon, currently the app needs to be open to display reminders
  • a setting to define the Text to Speech (TTS) default app; I selected the online TTS app by accident and now when I want to hear pronunciations I have to be online

Book’em

The tablet has a great reader, for both books and the newsstand. It has easy to look at text and is enjoyable to use. I get the feeling the Amazon tablet was created with the intention of expanding on the Kindle stand-alone reader. The Kindle app behaves just like a Kindle product: intuitive to use, responsive, and the standard extra features. The tablet is worth the price, IMHO, if used just for reading.

Doggie in the window

I like the Amazon store and use it occasionally. The first time I bought something I used the web browser, but I learned since the Shop Amazon app provides a better interface: increased font/image size, good organization, a shelf to compare products… it made it kinda fun. I also found it good to write the reviews in.

Power

Battery discharge time depends on screen brightness and wireless. I’ve noticed that using Bluetooth uses a good amount of power. With a slightly dimmed screen and no wireless, I will get about eight hours from the battery. Recharge time with slightly dimmed screen and no wireless takes about four hours to charge; with Bluetooth it takes about seven hours. When not in use about four percent battery discharge will occur in about eight hours.

Accessories that will probably be needed

  • a $10 stylus will help keep the screen clean
  • a $10 cover will help with accidental bumps
  • a $5 microfiber cloth will help clean the screen
  • a $30-$50 keyboard will help typing a lot
  • a SD card will help if planning to use for any amount of time

Tips

  • to move/delete/categorize an app press the app for a few seconds
  • to save home page space categorize the Amazon apps that have a content-page/tab
  • to save home page space turn off to display “Recent Items”, these will still show in the “Recent” content page; Settings > Apps and Games > Amazon Application Settings > Home Screen Settings
  • to switch apps more efficiently with the app switcher touch the window’s title bar
  • to help efficiency consider using the tablet with the orientation as upright – the Android OS is used on many phones where this orientation is common and many apps are designed with this in mind
  • to help performance, it appears to me, it is improved with only a few apps open; apps can be closed in the app switcher by swiping them
  • screenshots are done by holding down power and volume down at the same time for two seconds, a click will sound if successful; it will be saved in Internal Storage/Pictures/Screenshots
  • the tablet will shutdown on its own on a low battery, it does so at zero percent

Keyboard shortcuts

system:

alt   + tab    app switch
ctrl  + t      tablet notifications
space          page down (in browser or readers)
shift + space  page up
alt   + space  search
space + space  lock screen quit

typing:

alt   + left/rght  cursor move to line beginning/end
alt   + up/down    cursor move to doc. beginning/end
ctrl  + left/rght  cursor move to word before/after
shift + arrow      cursor move and select text
                   (+alt/ctrl use as modifiers)
shift + backspace  cursor erase forward character
alt   + backspace  cursor erase line
ctrl  + x/c/v/a    cut/copy/paste/all-select

Silk browser (generally the same as Chromiums):

ctrl + t    tab new
ctrl + tab  tab switch
ctrl + w    tab close
ctrl + l    location bar
ctrl + f    find
ctrl + h    history
ctrl + m    menu
ctrl + r    reload

apps:

menu + b          browser
menu + c          contacts
menu + e          email
menu + l          calendar
menu + p          player (music)
menu + backspace  desktop

Apps I liked

basic:

Converter Free                a unit converter
Dictionary - Merriam-Webster  offline, good defs
DroidEdit                     a nice text editor
File Commander + Cloud        very nice file manager
LastPass                      password manager
MapQuest
NPR News
Podcast Republic
Radar Express
ruler(cm, inch)
Stellarium Mobile Sky May     a nice star chart for a few
TK Music Tag Editor
Weather by MacroPinch
WordWeb - English Dictionary

entertainment:

IMDb
TED
Watch ABC

games:

CSI: Hidden Crimes
Cut the Rope: Time Travel HD
Doodle Numbers
Geometry Dash
Monument Valley
Pocket Mine
Quick Logic Puzzles
Simple Mahjong
Solitaire
Survival Run by Bear Grylis
Temple Run: Oz
The Hunger Game Adventures
The Secret Society–Hidden Mystery
Where's my Water?

Question(s)

01-screenshot

  • Unicode, never could find a way to enter unicode characters… no character map and no key combinations possible
  • are there finger covers I can buy to keep from smudging the screen?

A beginner’s primer for the iPad

blaues_Tablet-150px

I got an opportunity lately to try out and setup an iPad. This was my first time trying an Apple IOS device and I wanted to share a beginner’s perspective for those any who have thought about trying it. I will discuss how to operate it, its design philosophy, and some basic settings that helped me.

Good

  • top quality hardware, all of it, runs smoothly and dependably
  • software is well designed and the user interface intuitive
  • plenty of good apps are available

Could be better

  • no file organization, nor file manager
  • apps often have to reload every time they are switched to

Interoperability

Almost all interoperability is done with three finger gestures: tap, for buttons; finger pinches, for resizing; and swipes, for page flipping. The Home button is used to return to the Desktop.

Design philosophy

Having used computers since the 1980’s, I expected common computer operations to be carried to the IOS. I had the notion to use my iPad as I had my laptop, hoping to get a likewise functionality out of it. One thing I learned definitively though is that the iPad is designed only to be a companion device. To elaborate: it is designed to be a supplemental piece to a personal computer for the purpose of doing specific tasks in an intuitive manner. I did attempt to add common computer functionality to it through apps and settings but it just isn’t designed to do so.

The following point is an expression meant in a positive attitude. However, just for note, I am very peculiar about how I control my files.

The functionality that I expected, that I considered necessary for any computer user, was to be able to manage files. I thought I would be able to rename, organize, copy…. However, there is no file manager. The design philosophy of the IOS is centered around apps. To open a file a user has to adapt their behavior to first recall the app that created it. To transfer files to/from the IOS device requires the user either to: plug the IOS into the personal computer and use iTunes (if the app has iTunes support built in); or use the iCloud app (which I only learned about after returning the iPad). So the process just appears complicated.

Tips

  • a $10 stylus will help keep the screen clean
  • a $10 cover will help keep the tablet safe from common bumps
  • a $30 tablet-sized keyboard is nice for typing… common keyboard shortcuts may not always be available, for Safari hold Command to see them
  • apps can be moved or removed from the desktop, press and hold the app for a few seconds to do so
  • close unused apps for better performance (double-click Home and swipe up)
  • for *nix tools a remote shell account can be used with a SSH app

Apps I liked

  • Apple Store
  • Apple Trailers
  • CBS, NBC, FOX
  • Coda \$10
  • Does not Commute
  • Microsoft Word is free, but Papers is supposed to be real good if it can be afforded
  • Rayman Adventures
  • Vim
  • Weather Channel
  • Wallpapers
  • Yahoo Mail

Feedback

For users that have other ideas, consider giving Apple your iPad Feedback.

decompress—a wrapper script to decompress various archive types

00-post

The Arch Linux BBS has a thread where people put up their scripts so that others can peruse them. A long time ago someone came up with the idea to create a script that would detect various archive formats and decompress them. That post is unfortunately gone now, but I kept the idea and have expanded on it a bit: I’ve added a couple archive types, file detection, program detection, and archive list support. I gave it a good, overall test so I feel comfortable with it.

Options can be in any order:

$ decompress archive-r.zip --help
decompress [*-l] ... — wrapper script to decompress various archive types
  -l, --list  - list archive contents

If an archive’s existence isn’t detected it will be displayed:

$ decompress archive-r.zip
archive non-existent: archive-r.zip

If a program’s existence isn’t detected it will be displayed:

$ decompress archive-q.zip
program required: unzip

Listing support is available:

$ decompress -l archive-q.zip
 archive-q.zip
       32  2016-04-11 10:39   file-q1
       32  2016-04-11 10:39   file-q2

Listing and decompressing can be done for multiple documents:

$ ls
archive-a.tar.bz2  archive-f.tgz       archive-k.txz  archive-p.xz
archive-b.tb2      archive-g.tar.lz    archive-l.7z   archive-q.zip
archive-c.tbz      archive-h.tar.lzma  archive-m.bz2
archive-d.tbz2     archive-i.tlz       archive-n.gz
archive-e.tar.gz   archive-j.tar.xz    archive-o.lz
$ decompress archive-*
archive-a.tar.bz2...
archive-b.tb2...
archive-c.tbz...
archive-d.tbz2...
archive-e.tar.gz...
archive-f.tgz...
archive-g.tar.lz...
archive-h.tar.lzma...
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
archive-i.tlz...
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
archive-j.tar.xz...
archive-k.txz...
archive-l.7z...
archive-m.bz2...
archive-n.gz...
archive-o.lz...
archive-p.xz...
archive-q.zip...

.exe and .rar files are untested because I was lazy. If there is an error its error message will be displayed.

decompress can be found in my general-scripts repository.

compress—a tar wrapper script to simplify archiving files

00-post

I have become accustomed to using long options over the years as they are easier to remember. I do however use tar in numerous ways. I needed to have a quick way to remember how to archive files; I wrote this script to make it real basic:

$ cd ~
$ compress .local/bin/ Development/general-scripts/
archive name [archive.tar.gz]: /dev/sda4/sc
scripture.css  scripts.tar.xz
archive name [archive.tar.gz]: /dev/sda4/scripts.tar.xz
archive exists, overwrite? (y/n): y
archive created: scripts.tar.xz

The compression type to be used will depend on which extension is typed; tar has a nice option called --auto-compress. So, in the above example, typing ...tar.xz will use the LZMA compression algorithm. Just typing Enter on the archive name and the default archive.tar.gz will be used. The script also supports tab-completion for typing the archive name to help navigate folders and files.

compress can be found in my general-scripts repository.

Perl module installation

If doing Perl programming or if another package requires a Perl module, learning how to install one may become necessary. The recommended way to install a Perl module is through the distribution’s repositories, however, they can be installed manually with Perl.

Configure

Perl has its own repository where programmers make available their modules called the comprehensive Perl archive network, which is better known as the CPAN. Perl includes a built-in module that can download, build, and install from the network. For some distributions this module may already be built, however, it is probably a good idea for all to build it… to be sure it is set up correctly. Begin by starting the CPAN module shell so that it may be configured:

perl -MCPAN -e shell

A configuration message will appear… most users will be good with the automatic configuration it recommends. If additional configuring needs to be done later typing o conf init will re-run the configuration dialog. To leave the shell type exit.

Install

The first requirement most people will need to do is build and/or update the CPAN module. Modules can be installed with the built-in module in three ways: from the module shell, from the perl command, or from the CPAN module binary.

From the shell (which was entered in the configuration section), the following command will install a new module, or in this case, update the CPAN module:

install Bundle::CPAN

From the perl command:

perl -MCPAN -e 'install HTML::Template'

From the cpan module binary:

cpan Module::Name

Note: CPAN itself recommends using the cpanm module for installation. Modules will need to be reloaded after being updated: reload cpan.

Execute

Modules are sometimes executable binaries and if they are known to the shell can be executed like any other command. Some modules are support modules and can only be used for programming or by use of another module. Information of installed modules can be discovered with the command perldoc perllocal.

Uninstall

Module maintenance is typically unexpected after installation and the built-in CPAN module has no ability to be able to do so. If the cpanm module is installed it does have the ability with the --uninstall/-U option. It will display the files to be removed and prompt for approval before uninstalling.

System backup to DVD

Splitting Files

The purpose of this article is to detail how to backup a Linux system using a DVD writer; this will likely take multiple DVDs.

Rational

A backup can be done to multiple DVDs in situations where it is necessary. However, keep in mind DVDs can be damaged and that the organic dye in DVDs deteriorates over time… backing up to external hard drives is recommended.

System backup

Start an install CD or other likewise media to be able to access the drive/partition without system operation interference. Backups must be done from an external medium as files are constantly written to on a live system.

mkdir /mnt/distro
mount /dev/sd[#] /mnt/distro
cd    /mnt/distro
tar   -czvf distro_`date +%F`.tar.gz .  # (c)reate (z)ip (v)erbose (f)ile

Backup split

The backup can be split into multiple files so they will fit on a DVD.

Note 1: A DVD’s storage capacity may be smaller then some expect. The reason is because the original computer developers wanted to use binary as the base storage measurement (a kilobyte to be 1024 bits) and erred when they adopted metric prefixes. Data storage manufacturers began using these 1000 base prefixes because they displayed larger values. A 4.7 GB DVD in binary units with the later and gradually being adopted binary prefix is 4.37721 GiB— this is the number that computer veterans typically expect. (GB to GiB conversion fraction: 1,000,000,000/[1024 * 1024 * 1024] = 0.9313226)

Note 2: The UDF file system, typically used for DVD data storage, at the time of this writing was still experimental on Linux and I choose to use the ISO-9660 file system for reliability. However, this file system has a file size limit of four GiB. Since my writable DVDs had a capacity of 4.7 GB I had to split up the files to two per DVD. File system overhead also has to be factored in and I reduced 2.188608100 GiB to 2.188000 GiB.

tar usage

With tar create a Length-defined, Multi-volume archive (length is in 1 KiB units):

tar -cML 2188000 -f distro_`date +%F`.tar.gz_00 distro_`date +%F`.tar.gz

After the first segment is split a prompt will request the name of the next file (Prepare volume #2 for 'distro_DATE.tar.gz_00):

n distro_DATE_tar.gz_01

(This command, tar and multi-voluming, can also be done from the beginning of the backup if archive compression is unnecessary.)

split usage

Splitting can also be done with the split command. Here 2.188000 GiB is converted to 2240.512 MiB and -d adds a numerical suffix:

split -b 2240M -d distro_`date +%F`.tar.gz distro_`date +%F`.tar.gz_

DVD write

To use growisofs to burn the files to a writable DVD disc:

growisofs -Z /dev/dvd -rJ distro_`date +%F`_00.tar.gz distro..._01.tar.gz

System restore

Boot from the Install CD or other boot medium (boot with a caching option if available in the boot menu if another DVD reader is unavailable).

$ umount /dev/dvd && eject
mount /dev/dvd /mnt/dvd
mkdir /mnt/distro

Create the file system on the drive/partition if necessary and mount it.

Backup join

With tar:

tar -xMf distro_`date +%F`.tar.gz_00 distro_`date +%F`.tar.gz

With cat (for the split files):

cat distro_`date +%F`.tar.gz_* > distro_`date +%F`.tar.gz

Backup restore

tar xvf distro_`date +%F`.tar.gz -C /mnt/distro

Resources

Patterns and textures

These patterns were originally for Nautilus, the GNOME file manager (now called “Files”), when it supported having images as backgrounds. They are still good for some other programs though so I touched them up a bit.

I designed these so readability was good with them which was the key factor. A background I feel is to help with the comfort-ability of the area. They are barely noticed and add grip to the area. An original example:

screenshot-jpasd-file-browser.png

And here is a view of them all:

example

Enjoy!

Firefox profile on a flash drive

firefox-tuning

I regularly use a computer at my workplace. This computer multiple people use so it is setup not to save Firefox’s settings. I use it enough, in specific ways, that I decided to find a way to use it with settings available.

I take a flash drive with me to be able to access various personal documents and programs. I had heard about web browsers being installed on flash drives; after I thought about it awhile, I realized all I would be required to do is put a profile on it.

The flash drive I have is formatted FAT32 to be able to use with Windows (my work computer) and I keep my flash drive organized similar to my Linux home directory for convenience. First I created a directory for the profile:

mkdir -p ~/.mozilla/firefox/profile/ANAME

Then I create the profile—from the command prompt this command will get the job done:

start firefox.exe -CreateProfile "MyName D:\.mozilla\firefox\profile\ANAME"

start-menu-example

(Or alternately I could have typed firefox.exe -P from the start menu and used the GUI version.)

I started the profile then to have the necessary files created. After it got done loading, I quit Firefox and I deleted the profile managers knowledge of the profile but not the profile itself (see example picture).

With the profile created all required effort left to be done is to instruct Firefox of the profile’s location. I put this in a batch script so that I can regularly use it:

@echo off

:: http://stackoverflow.com/a/15815897
:: http://stackoverflow.com/q/154075

set HOMEDRIVE=%cd:~0,2%

if exist C:\PATH\TO\firefox.exe start /b C:\PATH\TO\firefox.exe -profile %HOMEDRIVE%\.mozilla\firefox\profile\toddweed && exit

if exist C:\PATH\TO\firefox.exe start /b C:\PATH\TO\firefox.exe -profile %HOMEDRIVE%\.mozilla\firefox\profile\toddweed && exit

if exist C:\Program Files\Mozilla Firefox\firefox.exe (
  start /b C:\PATH\TO\firefox.exe -profile %HOMEDRIVE%\.mozilla\firefox\profile\toddweed
) else (
  echo Firefox executable not found.
)

GNU love for Windows

gwindows_logo

I wanted to be able to type in Windows with a familiar text editor. I downloaded a terminal text editor called gvim, which I think is a good text editor, and it was able to be installed portably—this last is necessary as the computer I use I am not able to install anything on. However, even with having that, I discovered that I wanted to be to use the GNU tools I had become familiar with… hence a dilemma.

There are several projects that provide GNU utilities on Windows… I have learned. I am not an expert in these mind you—I have tried only one—however, I’ve heard good things about them all. The following are all terminal emulators and they include the GNU utilities: Cygwin, Gow (GNU on Windows), and Git-bash.

I have only tried the later one. The reason for this is because I’ve had it already installed as it comes installed with the Git program that I use at times. I would have like to tried for the first two, however I’m not too picky and Git-bash has done me well enough; it has the basic utilities and is pretty much ready to go.

Having GNU utilities available is handy for me and saves me a bit of time because of familiarity; another bonus is time saved that would be required to learn the Windows command line. The tools run just like they do on Linux/Unix and can be used on the whole file system. Many of the tools are there: sed, awk, mkdir…. For example, I can type:

$ find /c/Windows/Web/ -type f -name "*Think*"
/c/Windows/Web/Wallpaper/Think/Think_Black.jpg
/c/Windows/Web/Wallpaper/Think/Think_Blue.jpg

By default the terminal emulator uses the already set Windows %HOMEPATH% variable for shell’s $HOME directory—this is usually C:\Users\USERNAME. I decided to use my flash drive as the $HOME directory where all my documents and settings could be kept. I had to create a batch script that defined the %HOMEPATH% and then have it start Git-bash:

@echo off

set HOMEDRIVE=%cd:~0,2%
set HOMEPATH=\

start /B %HOMEDRIVE%\Downloads\Git\git-bash.exe

01-git-bash-example

I then created a shortcut to flash drive root directory for quick access and to have a custom icon. I icon I choose was taken from the git-bash.exe file when I was asked for the icon location.

Git setup

An error was the first thing I had to fix… and it may just be for my particular version of Git; it complained to me when I tried to use it and I had to specify the certificate location. I did this by:

git config --system http.sslcainfo /d/Downloads/Git/mingw32/ssl/certs/ca-bundle.crt

After this I added ssh-agent to my ~/.bashrc launch it:

# SSH agent auto-launch
# 0 = agent running with key; 1 = agent running w/o key; 2 = agent not running
agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?)
if   [ $agent_run_state = 2 ]; then
  eval $(ssh-agent -s)
  ssh-add
elif [ $agent_run_state = 1 ]; then
  ssh-add
fi

And likewise I added to the bash_logout file ssh-agent -k as Windows would think that it was still running if I didn’t.

Now I’m working pretty good in Windows.

lnk—forward thinking file linking

When I first used ln I tried using it before reading the documentation. I had assumed that linking was a basic enough operation to make the syntax ln [source-target] [linkname] all I needed to do. I learned though the common deployment of ln is otherwise. Since I created enough links, and because I felt the syntax should be basic, I created a script to get this behavior.

Besides a basic syntax that was logical to me, there are a few other reasons why I created the script. To know what they are, it helps to know the basics of linking.

Principalia linkathica

The default/non-optioned use of ln creates a hard link. A “hard link” is essentially just another name for an existing file. Because the hard link and its source (“target” in the documentation’s wording) share the same file system inode, they are almost indistinguishable (the inode contains all the information about a file).

Hard links are rarely used however. For several reasons its alternative a symbolic link is. While the ln default behavior does create a hard link, its existence is likely a inherited artifact—hard links came before symbolic links and program syntax had to be maintained to run as the users expected.

A symbolic link is more versatile than a hard link. It is sometimes referred to as a “symlink” or a “soft link” and it has some advantages. It can be:

  • readily used on directories
  • used across file system boundaries
  • created if the source/target doesn’t exist
  • color formatted with the ls command (and often is by default)

Further explanation of what a symbolic link is (as explained in the ln Info page, lightly paraphrased):

A symbolic link is a special type of file that refers to a different file by name. Most operations that are passed to the link file (opening, reading, writing…) are deferred by the kernel to operate on its target. Some operations (e.g. removing) work on the link file itself. The owner and group of a symlink have no effect on the file access of the target — they only have an effect on the removing of the symlink itself. On the GNU system, the file mode bits of a symlink have no significance and cannot be changed.

A symlink can be defined either with absolute or relative paths, the later being commonly used on removable media.

Examples:

cd $HOME
touch  file.txt
ln                 file.txt  file_hrdlink.txt
ln -s  /home/$USER/file.txt  /home/$USER/file_symlink-absolute.txt
ln -s     ../$USER/file.txt  file_symlink-relative.txt
ln -s     ../$USER/FILE.txt  file_symlink-relativebroken.txt

“Dance with the one that brung ya”

A basic syntax was what I wanted to be able to link by and why I created the script, additionally, a couple more benefits were able to be added:

  • symbolic links used by default as they are more flexible
  • absolute paths used for consistency and because they are usually more inductive to resolve
  • existence tests used on the source target and destination directory

Usage:

lnk [source-target] [directory-or-linkname] — a generic linker

Examples:

lnk can be found in my general-scripts repository.

Keyboard outlines for key mapping

When I work with a program long enough I will at times like to write down the key mappings so I may refer to them later. I had done this enough that I decided I might as well make a keyboard outline to use for key mapping. I did four of them for the basic US-English models. The fonts Arial and Arial MT Rounded are required to see properly. Enjoy.

Compact layout

Full layout

Laptop layout

Mini layout

Example key mapping