Setting a root password for a Docker image created with USER

If you have a Docker image created with a non-root user using USER in your Dockerfile, but you need to su to root to install or update something owned by root, without setting a root password you won’t be able to su to root.

Instead, add a password for root in your Dockerfile (this is described here):

RUN echo "root:Docker!" | chpasswd

This is probably not a good idea for security reasons (especially if you are sharing your Dockerfile), but I needed to create something in a container to reuse when creating other new containers, so did this one-time to get the file I needed and then reused the file in containers with another image without the root user/password.

Direwolf soundcard packet on Linux, with ax25 and LinPac

I’ve been playing around with Direwolf soundcard packet radio decoder on Linux. On Windows I use the packet terminal app that comes with the UZ7 soundcard modem, which you can connect to Direwolf’s AGW port over a network. The only comparable app on Linux that I’ve found seems to be LinPac.

Linpac connects over an ax25 port. To get LinPac to connect to Direwolf there’s a few steps to jump through.

Install Direwolf

Download the source from: https://home.comcast.net/~wb2osz/site/?/home/

(or after Oct 8 2015, https://github.com/wb2osz/direwolf)

Install libasound2-dev:

sudo apt-get install libasound2-dev

Compile Direwolf:

make
sudo make install

If you get this error when compiling Direwolf then you missed the libasound-dev step:

audio.c:80:28: fatal error: alsa/asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>

Copy the supplied direwolf.conf file (from the downloaded source) to your home dir. To find out what input and output sound devices you have, run

aplay - l

and

arecord -l

You’ll see something like this:

**** List of CAPTURE Hardware Devices ****

card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 0: NVidia [HDA NVidia], device 2: ALC1200 Alt Analog [ALC1200 Alt Analog]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

Get the device numbers for the soundcard you are using and edit direwolf.conf. For device 0 subdevice 0, edit this line and set 0,0:

ADEVICE  plughw:0,0

Using a Rigblaster Plug and Play on Ubuntu 14.04, it was automatically recognized and showed up per the docs on /dev/ttyUSB0. Direwolf will use this for PTT on your radio. I uncommented this line to enable this:

PTT /dev/ttyUSB0 RTS

To give my current user access to ttyUSB0 (and avoid running with sudo) I had to add my user to the dialout group (per post here):

sudo usermod -a -G dialout $USER

Start up alsamixer and make sure the mic inputs and outputs are not muted (M), and the volume levels are around 3/4.

Install the ax25 network suport:

sudo apt-get install libax25 ax25-apps ax25-tools

To enable an ax25port, edit /etc/ax25/axports, I added a line like this:

1 KK6DCT-1 1200 255 2 2m packet

The first column is the port name. Start up direwolf with the -p option to enable a KISS port, you’ll see something like this (-t 0 t0 suppress the colors):

kev@kevs-ubuntu:~$ direwolf -t 0 -p
Dire Wolf version 1.2
Audio device for both receive and transmit: plughw:0,0  (channel 0)
Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate.
Ready to accept AGW client application 0 on port 8000 ...
Ready to accept KISS client application on port 8001 ...
Virtual KISS TNC is available on /dev/pts/0
WARNING - Dire Wolf will hang eventually if nothing is reading from it.
Created symlink /tmp/kisstnc -> /dev/pts/0

Note the /dev/pts/X value, and use this with a kissattach command to connect Direwolf to ax25:

sudo /usr/sbin/kissattach /dev/pts/0 1 44.56.4.118

The 1 value following /dev/pts/0 is the port number from the axports file.

Per the Direwolf PDF doc, if you see this error:

kissattach: Error setting line discipline: TIOCSETD: Device or resource busy
Are you sure you have enabled MKISS support in the kernel
or, if you made it a module, that the module is loaded?

Then try this instead:

sudo /usr/sbin/kissattach /dev/pts/ptmx 1 44.56.4.118

Install LinPac

Download the LinPac source. Build and install:

./configure
make
make install

The first time you startup LinPac it creates a LinPac dir in your home folder. Edit macro/init.mac in this folder and change the port value to match the port name from your axports change (1 in the above example):

;; Default port
port 1

Start LinPac with:

linpac -m

(I’m not sure what the -m option is for, I found this in a post online, but without it I get errors on startup about ax25 port not found).

Connect to a node with :c nodename

Done!

Ubuntu 14.04 with nvidia drivers

I’ve been on a kick installing various flavors of OS recently (I’ve been repurposing an older desktop and starting with an empty hdd). In the past the brownish/orange colors of Ubuntu have just put me off, and the Unity desktop I thought was just a bit too unusual to be useful. So I started with Mint Cinnamon, That’s been my main desktop OS for a couple of months. Then I started looking at Fedora 22. This gave me no end of installation pain.

I’m installing on a HP Pavillion with an AMD quadcore, and nvidia 6150 onboard graphics. Seems this older gpu is killing me. Fedora 22 hangs on install around 33%. Fedora 21 will install in simple graphics mode. Trying to get the nvidia graphics installed though gave me a few late nights. No matter which instructions I’d follow, I could not get the nouveau graphics unloaded, and so would always get the error messages about the nouveau kernel modules are still loaded. I tried various tips from online sources, and eventually gave up.

A while back I noticed the noobslab site with a easy to follow apt-get steps to install new themes for Ubuntu. Huh, so if I can install a different theme then I can get rid of the brown default theme? I’ve played with Ubuntu Tweaks a while back and didn’t spend enough time playing with it to end up with something that I liked. but ready to give it another go. So I installed Tweak:

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

Installed Crunchy themes from noobslab, and now I’m all set. Looks pretty cool too… this will do for a while.

My previous steps for installing nvidia-304 work fine on Ubuntu 14.04 too. So all set.

‘New’ Windows 10 features inspired from other OSes

Every time I hear or read about one the ‘new’ features introduced in Windows 10, I can’t help but think ‘hang on, hasn’t [Linux|OS X] already had that feature for years?

The past few OS X releases have been minimizing the visual window decorations to have borderless windows and minimal icons, and Ubuntu 14.04 has done the same too (since it was released over a year ago). Seems to be the current fashion. I’m not a historian of UI design, but I had to dig back to around 2011 when OS X Lion I think introduced borderless windows, although windows in OS X have had this look n feel for long enough now that I’ve taken it for granted as normal.

One the features I’ve always missed in Windows that 10 now has is multiple virtual desktops, because this is something I always use in OS X and Linux – it seems like it’s always been there, and again, one of those features you take for granted. I like to keep related windows for one task on one desktop and windows for another task on another. Anyway, welcome to 1990’s, Windows 10.

If you want to see some more examples, itsfoss.com has a comparison of other ‘new’ Windows 10 features that have been borrowed from Linux.