<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Jerry Penner</title><link href="https://www.jpen.ca/" rel="alternate"></link><link href="https://www.jpen.ca/feeds/all.atom.xml" rel="self"></link><id>https://www.jpen.ca/</id><updated>2020-04-27T12:18:00-06:00</updated><subtitle>bit by bit</subtitle><entry><title>Sorting Directories on FAT File Systems</title><link href="https://www.jpen.ca/sort-fat-directories.html" rel="alternate"></link><published>2020-04-27T12:18:00-06:00</published><updated>2020-04-27T12:18:00-06:00</updated><author><name>Jerry Penner</name></author><id>tag:www.jpen.ca,2020-04-27:/sort-fat-directories.html</id><summary type="html">&lt;p&gt;Sort files in FAT file system directories&lt;/p&gt;</summary><content type="html">&lt;p&gt;I have a car stereo in which I can plug a USB stick and play music or
audio book files.  It handles MP3, OGG, FLAC, and so on, so it's great
that way.  Newer vehicles let you play music from your phone, but I
have no music on my phone, so that's not something I use.  However,
the software on the stereo that reads the files off the USB stick does
not sort the files.  If the tracks are copied onto the USB stick in
order 10, 3, 8, 1, 4, 9, 7, 5, 8, 6, 2, then that is the order they
will be played (unless using shuffle mode, in which case the original
order does not matter).&lt;/p&gt;
&lt;p&gt;Note that this technique applies only to FAT (FAT-32, VFAT) file
systems.&lt;/p&gt;
&lt;p&gt;To sort the files, I copy the MP3 files I want into a directory on the
USB stick, and then run this script:&lt;/p&gt;
&lt;pre&gt;
#!/bin/bash
#
#  Sort files alphabetically in the current directory.

FILES=()

for FILE in *; do
    FILES+=("${FILE}")
done

TEMPDIR=$(mktemp -d work_XXXXXXX)

echo ${#FILES[@]} files
for FILE in "${FILES[@]}"; do
    mv "${FILE}" "${TEMPDIR}"
done

for FILE in "${TEMPDIR}"/*; do
    mv "${FILE}" .
done


rmdir ${TEMPDIR}
&lt;/pre&gt;

&lt;p&gt;I have this script, named &lt;code&gt;sort-dir&lt;/code&gt;, in my PATH, so I type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cd /media/usb/ARTIST/ALBUM
sort-dir
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;and now that directory is sorted and plays in-order on my car stereo.&lt;/p&gt;
&lt;p&gt;Back when I wrote this script, I looked around for FAT file system
directory sorters, and there a variety out there, some commercial
offerings, but this tool does the job simply, quickly, and reliably.&lt;/p&gt;</content><category term="How To"></category><category term="fat-fs"></category><category term="usb-stick"></category></entry><entry><title>Finding Files in a Relative Time Range</title><link href="https://www.jpen.ca/find-files-by-date-range.html" rel="alternate"></link><published>2020-04-27T11:53:00-06:00</published><updated>2020-04-27T11:53:00-06:00</updated><author><name>Jerry Penner</name></author><id>tag:www.jpen.ca,2020-04-27:/find-files-by-date-range.html</id><summary type="html">&lt;p&gt;How to use the find command to locate files modified in a relative range of days&lt;/p&gt;</summary><content type="html">&lt;p&gt;The &lt;code&gt;find&lt;/code&gt; command allows you to find files within a range of dates.
For example, let's say you wish to find all files modified in the past
month, and show the file's size, modification date, and pathname.  Use
this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;find . -type f -mtime -31 -printf &amp;#39;%10s %TY-%Tm-%Td %P\n&amp;#39;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Each flag is described here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-type f&lt;/code&gt;: restricts results to plain files; no directories or
   links&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-mtime 31&lt;/code&gt;: restricts results to files less than 31 days old&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-printf '%10s %TY-%Tm-%Td %P\n'&lt;/code&gt;: custom output format to show
   file size in bytes, modification date, and pathname relative to the
   directory given to &lt;code&gt;find&lt;/code&gt;, which in this example is the current
   directory (&lt;code&gt;.&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now if you wanted to find all files modified between 6 months and a
year ago, you would use two &lt;code&gt;-mtime N&lt;/code&gt; directives like so:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;find . -type f -mtime +180 -mtime -365 -printf &amp;#39;%10s %TY-%Tm-%Td %P\n&amp;#39;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The changes from the first command, &lt;code&gt;-mtime +180&lt;/code&gt;, and &lt;code&gt;-mtime -365&lt;/code&gt;,
instruct &lt;code&gt;find&lt;/code&gt; to filter out files older (&lt;code&gt;+&lt;/code&gt;) than 180 days and
younger (&lt;code&gt;-&lt;/code&gt;) than 365 days.&lt;/p&gt;</content><category term="How To"></category><category term="bash"></category><category term="find"></category><category term="shell"></category><category term="linux"></category></entry><entry><title>Debian Packages: Finding Modified Files</title><link href="https://www.jpen.ca/deb-modified-files.html" rel="alternate"></link><published>2020-04-22T10:52:00-06:00</published><updated>2020-04-22T10:52:00-06:00</updated><author><name>Jerry Penner</name></author><id>tag:www.jpen.ca,2020-04-22:/deb-modified-files.html</id><summary type="html">&lt;p&gt;Find and show modified .deb files&lt;/p&gt;</summary><content type="html">&lt;p&gt;You have an installed package and you would like to see the
if any of its installed files have been changed.  If there are
changes, you would like to see the differences.&lt;/p&gt;
&lt;h1&gt;Verify Package&lt;/h1&gt;
&lt;p&gt;The solution to finding modified package files is the &lt;code&gt;dpkg -V
*PACKAGE_NAME*&lt;/code&gt; command.  It lists any files whose md5sums do not
match those in the package metadata.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    $ dpkg -V minidlna
    ??5?????? c /etc/minidlna.conf
&lt;/pre&gt;&lt;/div&gt;


&lt;h1&gt;Show Differences in Modified Package Files&lt;/h1&gt;
&lt;p&gt;get the package locally&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    apt-get download minidlna
    PKG=minidlna.*deb
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;look at the list of files in the package&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    dpkg-deb --contents &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;PKG&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Get the tarfile of the package and extract the file of interest to
stdout:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    dpkg-deb --fsys-tarfile &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;PKG&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; \
      | tar xfO - ./etc/minidlna.conf
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now put it all together.  Given a debian package, DEB, and a file of
interest, FILE, produce a difference listing using the following bash
script:&lt;/p&gt;
&lt;pre&gt;
#!/bin/bash

DEB="$1"
shift
FILES=("${@}")


error() {
    echo "$@" 1&gt;&amp;2
    exit 1
}


WORKDIR=$(mktemp -d)
trap "rm -rf ${WORKDIR}" 0 1 2 15

(cd ${WORKDIR}; apt-get download ${DEB})
DEB_FILE=$(eval echo ${WORKDIR}/${DEB}*.deb)

[ -f "${DEB_FILE}" ] || error "${DEB}: ${DEB_FILE} not found."

for FILE in "${FILES[@]}"; do
    MEMBER=$(dpkg-deb --contents ${DEB_FILE} |grep "${FILE}" |awk '{print $NF}')
    if [ -n "${MEMBER}" ]; then
        diff -u &lt;(dpkg-deb --fsys-tarfile ${DEB_FILE} \
                  |tar xfO - "${MEMBER}") "${FILE}"
    fi
done
&lt;/pre&gt;

&lt;p&gt;Here is a sample run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    $ debdiff minidlna /etc/minidlna.conf
    Get:1 http://ports.ubuntu.com/ubuntu-ports bionic/universe arm64 minidlna arm64 1.2.1+dfsg-1 [128 kB]
    Fetched 128 kB in 2s (61.7 kB/s)
    --- /dev/fd/63  2020-04-22 10:51:12.718656103 -0600
    +++ /etc/minidlna.conf  2019-03-01 22:34:52.672223536 -0700
    @@ -78,11 +78,11 @@

     # Name that the DLNA server presents to clients.
     # Defaults to &amp;quot;hostname: username&amp;quot;.
    -#friendly_name=
    +friendly_name=My Media Server

     # Serial number the server reports to clients.
     # Defaults to the MAC address of nework interface.
    -#serial=
    +serial=104857665536

     # Model name the server reports to clients.
     #model_name=Windows Media Connect compatible (MiniDLNA)
&lt;/pre&gt;&lt;/div&gt;</content><category term="Sysadmin"></category><category term="ubuntu"></category><category term="debian"></category><category term="sysadmin"></category></entry><entry><title>Swapping CapsLock and LeftCtrl</title><link href="https://www.jpen.ca/swap-capslock-lctrl.html" rel="alternate"></link><published>2020-04-08T22:32:00-06:00</published><updated>2020-04-08T22:32:00-06:00</updated><author><name>Jerry Penner</name></author><id>tag:www.jpen.ca,2020-04-08:/swap-capslock-lctrl.html</id><summary type="html">&lt;p&gt;Reconfiguring the CapsLock key&lt;/p&gt;</summary><content type="html">&lt;p&gt;Some folks prefer the &lt;em&gt;Left Control&lt;/em&gt; key just to the left of the &lt;em&gt;A&lt;/em&gt;
key on their keyboards.  If this is you, read on.&lt;/p&gt;
&lt;h1&gt;Linux&lt;/h1&gt;
&lt;p&gt;If you are the only user of your machine, you can edit
&lt;code&gt;/etc/default/keyboard&lt;/code&gt; and add or change the &lt;code&gt;XKBOPTIONS&lt;/code&gt; line so it
reads as:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    XKBOPTIONS=&amp;quot;ctrl:swapcaps&amp;quot;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;em&gt;[I don't think this affects X sessions, so there is more to do.]&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;XFCE4&lt;/h2&gt;
&lt;p&gt;If you share your machine with others, change the keyboard mapping in
your own account.  Under the Xfce4 desktop environment (Xubuntu), open
the &lt;em&gt;Session and Startup&lt;/em&gt; settings in your &lt;em&gt;Settings&lt;/em&gt; menu or &lt;em&gt;System
Settings&lt;/em&gt; application (&lt;code&gt;xfce4-settings-manager&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;img alt="Session and Startup settings" src="https://www.jpen.ca/swap-caps-autostart.png"&gt;&lt;/p&gt;
&lt;p&gt;Select the &lt;em&gt;Application Autostart&lt;/em&gt; tab and click &lt;img alt="Add
button" src="https://www.jpen.ca/swap-caps-add-btn.png"&gt; and the application configuration
dialog opens:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Add Application entry dialog" src="https://www.jpen.ca/swap-caps-add-app.png"&gt;&lt;/p&gt;
&lt;p&gt;Fill in the fields:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Name: &lt;strong&gt;&lt;code&gt;Swap CapsLock/LCtrl&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Description: &lt;strong&gt;&lt;code&gt;swap CapsLock and LeftCtrl&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Command: &lt;strong&gt;&lt;code&gt;/usr/bin/setxkbmap -option "ctrl:swapcaps"&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This creates a file in &lt;code&gt;$HOME/.config/autostart&lt;/code&gt; called &lt;code&gt;Swap
CapsLock-Ctrl.desktop&lt;/code&gt; that contains:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Desktop&lt;/span&gt; &lt;span class="n"&gt;Entry&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;Encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;UTF&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;
    &lt;span class="n"&gt;Version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.9.4&lt;/span&gt;
    &lt;span class="n"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Application&lt;/span&gt;
    &lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Swap&lt;/span&gt; &lt;span class="n"&gt;CapsLock&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Ctrl&lt;/span&gt;
    &lt;span class="n"&gt;Comment&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;swap&lt;/span&gt; &lt;span class="n"&gt;CapsLock&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="n"&gt;Left&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;Ctrl&lt;/span&gt;
    &lt;span class="n"&gt;Exec&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;setxkbmap&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;option&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;ctrl:swapcaps&amp;quot;&lt;/span&gt;
    &lt;span class="n"&gt;OnlyShowIn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;XFCE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;StartupNotify&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;
    &lt;span class="n"&gt;Terminal&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;
    &lt;span class="n"&gt;Hidden&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Variations&lt;/h2&gt;
&lt;p&gt;If &lt;code&gt;ctrl:swapcaps&lt;/code&gt; does not tweak your keyboard as you like, read the
manual page for &lt;code&gt;keyboard(5)&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    man keyboard
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In its &lt;em&gt;FILES&lt;/em&gt; sections it suggests looking at
&lt;code&gt;/usr/share/X11/xkb/rules/xorg.lst&lt;/code&gt; for a complete list of options.
Here are some of them:&lt;/p&gt;
&lt;table&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:nocaps&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Caps Lock as Ctrl&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:lctrl_meta&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Left Ctrl as Meta&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:swapcaps&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Swap Ctrl and Caps Lock&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:ac_ctrl&lt;/code&gt;&lt;/td&gt;&lt;td&gt;At left of 'A'&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:aa_ctrl&lt;/code&gt;&lt;/td&gt;&lt;td&gt;At bottom left&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:rctrl_ralt&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Right Ctrl as Right Alt&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:menu_rctrl&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Menu as Right Ctrl&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:swap_lalt_lctl&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Swap Left Alt with Left Ctrl&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:swap_lwin_lctl&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Swap Left Win with Left Ctrl&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:swap_rwin_rctl&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Swap Right Win with Right Ctrl&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ctrl:swap_lalt_lctl_lwin&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Left Alt as Ctrl, Left Ctrl
as Win, Left Win as Left Alt&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</content><category term="How To"></category><category term="sysadmin"></category><category term="linux"></category><category term="ubuntu"></category><category term="keyboard"></category><category term="capslock"></category></entry><entry><title>Odroid-C2 Media Server</title><link href="https://www.jpen.ca/odroid-c2-media-server.html" rel="alternate"></link><published>2019-03-23T15:26:00-07:00</published><updated>2020-04-18T12:38:00-06:00</updated><author><name>Jerry Penner</name></author><id>tag:www.jpen.ca,2019-03-23:/odroid-c2-media-server.html</id><summary type="html">&lt;p&gt;Set Up a Home Media Server on a Small Computer&lt;/p&gt;</summary><content type="html">&lt;p&gt;An Odroid-C2 single-board computer makes a decent home media server.
It has gigabit ethernet, it runs Linux, and it's faster than a
Raspberry Pi.&lt;/p&gt;
&lt;p&gt;The Odroid-C2 has the ability to display 4K video and I am hoping to
actually have this machine play movies out to the TV.  So far, that
part is not working.&lt;/p&gt;
&lt;p&gt;What does work, however, is serving media to the Xbox 360, iPads,
phones, and other computers.  This it does without a hitch.&lt;/p&gt;
&lt;h2&gt;Operating System&lt;/h2&gt;
&lt;p&gt;There are at least two choices for operating systems on the C2:
Ubuntu Linux or Android.  &lt;a href="https://wiki.odroid.com/odroid-c2/getting_started/os_installation_guide#operating_systems_we_re_providing" title="Odroid-C2 Operating Systems"&gt;Official Odroid-C2 operating system
links.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On my system, I chose to go with the microSD-card storage as opposed
to the faster eMMC storage.  So far, I've had no trouble related to
storage speed.&lt;/p&gt;
&lt;h2&gt;Post O/S Configuration&lt;/h2&gt;
&lt;p&gt;Once the operating system is installed, it's time to customize the
system.  We'll do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Update the system software.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# sudo apt-get update &amp;amp;&amp;amp; sudo apt-get dselect-upgrade -y
&lt;/pre&gt;&lt;/div&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install additional software.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# sudo apt-get install aptitude firefox minidlna samba -y
&lt;/pre&gt;&lt;/div&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the hostname.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# sudo sed -i -e &amp;#39;iYOUR_HOSTNAME&amp;#39; -e &amp;#39;1,$d&amp;#39; /etc/hostname
&lt;/pre&gt;&lt;/div&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the time zone and locale.&lt;/p&gt;
&lt;p&gt;Edit &lt;code&gt;/etc/default/locale&lt;/code&gt; to (for example):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;LANG=&amp;quot;en_CA.UTF-8&amp;quot;
LANGUAGE=&amp;quot;en_CA:en&amp;quot;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Edit &lt;code&gt;/etc/locale.gen&lt;/code&gt; and uncomment your desired locale names.
For example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;en_CA ISO-8859-1
en_CA.UTF-8 UTF-8
en_US ISO-8859-1
en_US.ISO-8859-15 ISO-8859-15
en_US.UTF-8 UTF-8
&lt;/pre&gt;&lt;/div&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add a new admin user.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# GRP=&amp;quot;$(grep &amp;#39;:.*odroid&amp;#39; /etc/group
         |awk -F: &amp;#39;{print $1}&amp;#39;
         |tr &amp;#39;\n&amp;#39; &amp;#39;,&amp;#39; |sed &amp;#39;s/,$//&amp;#39;)&amp;quot;
# useradd -r -m -G &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;GRP&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add a regular (family) user.  Upon startup, the C2 will auto-login
to this account.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Create a passwordless SSH configuration from your development
machine to the C2.&lt;/li&gt;
&lt;li&gt;Tighten up SSH security.&lt;/li&gt;
&lt;li&gt;Connect USB storage containing media (music, videos).&lt;/li&gt;
&lt;li&gt;Configure MiniDLNA.&lt;/li&gt;
&lt;li&gt;Configure Samba.&lt;/li&gt;
&lt;/ol&gt;</content><category term="How To"></category><category term="odroid-c2"></category><category term="ubuntu"></category><category term="media server"></category></entry></feed>