Ubuntu 20.04 update and MSQL issues

My thinkzinc.com server was updated to 20.04 from 18.04 and the wordpress install was failing. Apparently there were issues with Mysql. I tried many things; it was so frustrating that I actually left it alone for over a week. Today I decided to try to fix the issue. So many things on the net would not work but at last I did find a solution here. If you find yourself in the same situation, try this – it might help:

$ sudo systemctl stop apparmor.service
$ sudo update-rc.d -f apparmor remove

$ sudo apt-get remove --purge mysql-server mysql-client mysql-common
$ sudo apt-get autoremove
$ sudo apt-get autoclean
$ sudo apt-get install mariadb-server

$ sudo systemctl start apparmor.service
$ sudo update-rc.d apparmor defaults

Private Internet Access VPN for Ubuntu

I can confirm that this method works for Ubuntu 20.04 and looks and works very different from the old method of connecting to Private Internet Access on Ubuntu.


Archive: This is the OLD method of installing PIA on Ubuntu. Please use the method above:

PIA updated their guide to installing their VPN software on Ubuntu and I can confirm that it works! I’ll summarize this method here:

sudo apt-get install curl network-manager-openvpn-gnome
wget https://www.privateinternetaccess.com/installer/pia-nm.sh
sudo bash pia-nm.sh

You will need to enter in your PIA user name so keep that handy. Hit enter twice for the network & encryption methods for default if you are unsure which to choose.

Under your network icon on the upper right-hand side of your menu, left-click your network icon, select VPN and find which location you want to connect to.

Happy safe browsing!

Commodore 64 BBS with Petscii on your PC using SynchTERM

Would you like to enter the exciting world of Commodore 64 BBS?

If you do not own an actual Commodore computer, you can visit a Commodore BBS with full Petscii (similar to ASCII) graphical support! The open source program SynchTerm allows you to do that.

If you are using a Windows or Mac OSX machine, you can download a binary here:
https://sourceforge.net/projects/syncterm/

Windows and Mac users can skip to the part below titled, “To *use* SynchTerm


If you are using Linux (preferably Ubuntu or something Debian based), you can install the program using these instructions. In a terminal:

wget 'http'://syncterm.bbsdev.net/syncterm-src.tgz
(downloads the program)
tar xvzf syncterm-src.tgz
(extracts the program)
cd syncterm-20200223/src/syncterm
(enter into the program's directory; replace "20200223" with your directory name)
pwd
(tells you what directory you are in)
sudo make SRC_DIR=/home/user/syncterm-20200223/src/syncterm
(replace "20200223" with the number you see when you type "pwd")
(replace "user" with your username)
In my case, the program refused to "make" because I was missing ncurses.
If you run into this, install ncurses:
sudo apt-get install libncurses-dev
Then install the program:
sudo make install

If everything goes well, your computer will crunch away for a while and then install SynchTerm.

*SynchTerm homepage for more details:
http://syncterm.bbsdev.net/

For reference,  here’s a list of BBSs: http://cbbsoutpost.servebbs.com/
Example of a BBS listing with name, address and port:Screenshot from 2020-02-23 13-11-08

To *use* SynchTerm, click on the icon.

Click in the area of the “Directory” (First box)Screenshot from 2020-02-23 12-50-45

Select your keyboard’s “insert” key and type in the BBS nameScreenshot from 2020-02-23 12-51-58

Select “Telnet” for connection typeScreenshot from 2020-02-23 12-52-17

Enter in the address of the BBS you want to visit. Screenshot from 2020-02-23 12-52-34

Select F2 to edit the entry you just created for fine tuning:

TCP Port: 6400 (that’s just an example)Screenshot from 2020-02-23 12-52-54
Choose “C64” for Screen ModeScreenshot from 2020-02-23 12-53-10
Esc to save
Now highlight the new entry and hit enter. If the BBS is available and you entered in the information properly, you should see something like this. You will need to create an account. Enjoy!

Screenshot from 2020-02-23 12-50-01

Screenshot from 2020-02-23 12-50-23

Ripping compact discs with Ubuntu OS

The two main Linux programs I use in Ubuntu to rip CDs are Sound Juicer and XCFA.

Sound Juicer is the easiest to use and setup. However there are limitations. If a CD is not in the MusicBrainz database, the program will error out. Also, the type of encoders you choose cannot be fine tuned (AAC, mp3, FLAC). You can’t choose the level of compression. There’s also no apparent way to add album art.

XCFA has much more fine tuning, however, this increases the complexity. You can chose the level of compression. There are many more encoders like APE, WavP, Ogg, Mpc, etc. Another caveat is that it is more confusing and difficult to setup in Ubuntu. I had to do some workarounds to get it going.

The best way to figure out your CD ripping process is likely to try them both. I tend to use Sound Juicer for the mainstream artists and XCFA for CDs I’m having trouble with (like no entry in the MusicBrainz database).

The easiest way to install Sound Juicer in Ubuntu is to open the Ubuntu Software store, type “sound juicer” in the search and select install. If you want to install it in the terminal, here’s how:

sudo apt-get install sound-juicer

Once you install, you will simply need to update the settings from the “preferences” pull-down.

Installing XCFA is a bit more complicated. First you need to install the program, then the “goodies”, then any missing programs (like the ripper).

sudo apt-get install xfce4
sudo apt-get install xfce4-goodies

Once these two programs are installed, you will need to launch the program and install the missing programs. These include: a52dec, mp3check, faac, and so on. You can see which programs are present and missing under the “Applications externes” tab. I couldn’t figure out how to install some of these programs, including ‘aacplusenc’ and ‘monkeys-audio’ but for now I’m not interested in that functionality. Once you update your system with the missing external programs, restart XCFA and fill out your settings with the “preferences’ tab.

Once you have completed your burning task, you will probably want to verify and update some metadata/tags. A great program for this is ‘Kid3-qt’. To install, do a search for “kid3” in the Ubuntu Software store or:

sudo apt-get install kid3-qt

There are other programs too; if you find a good one, let me know!

Good luck and happy burning.

Unrar multiple files + file name spaces in the terminal

First, when dealing with the spaces in a file name while using the terminal, you can use a back-slash before the space.

Example:

File name with spaces.txt

For the terminal:

File name with spaces.txt

Sometimes we run across a downloaded file online that was created by utilizing the winrar multiple-file feature to make a huge file downloadable. A good example would be an ISO image that is more than 1GB in size. The rar program can break up the file into smaller pieces. Example:

bigiso.part01.rar
bigiso.part02.rar
bigiso.part03.rar
bigiso.part04.rar
and so on

To unrar multiple files into one, first install the unrar program in linux. In this case, I’m assuming you are using Ubuntu or any Debian-based distribution (like Raspbian):

sudo apt install unrar-free
sudo apt install unrar

Then use the unrar command to unrar. Remember to use the before any spaces.

unrar x -e bigiso.part01.rar

This should build the large file back up into its uncompressed state.

Install Retropie on Ubuntu 18.04.03

I found a nice guide to installing Retropie on Ubuntu 18.04.03 at a website called markontech and it works brilliantly.

sudo apt-get install -y git dialog unzip xmlstarlet
git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git
cd RetroPie-Setup
sudo ./retropie_setup.sh

Once the Retro-Pie install script is running, you will want to do a Basic Install and then navigate back to the menu and install the desired optional packages.

One thing I have learned: if you copy the retropie directory to a thumb drive (once it’s setup) each time you have a new setup, if you plug the thumb drive in, the computer will automatically copy the roms and bios files to the new install when emulation station is running. 🙂

Private VPN on Ubuntu Server or Raspberry Pi

I can run my own VPN that becomes an encrypted, point-to-point connection from anywhere? Say what? Relatively safe and secure using public wifi?

Yes, it’s true. You can setup PiVPN on your Ubuntu Server or Raspberry Pi device. There are three components to this: PiVPN running on the server, the UFW firewall configuration, and the mobile device app.

First, install PiVPN

curl -L https://install.pivpn.io | bash

Most of the suggested configuration options should be applicable.

Once PiVPN is installed, you will need to add a user.

pivpn -a

Give it a profile name and password. The file will be saved in a folder in your home directory called ‘ovpn’. You will want to save that to a flash drive and then import to your phone/tablet. I used FTP. There are many other ways to do this, but the flash drive method is most secure.

Configure UFW

sudo ufw allow 1194/udp
sudo ufw allow OpenSSH

Ask UFW to generate a list to make sure there are no double entries and delete them! Those double entries can mess up the PiVPN’s ability to connect.

sudo ufw status numbered

sudo ufw delete x ("x" is the double entry)

Now, download “OpenVPN” app in your smartphone app store. It’s free. Then open the app and choose the third option, “OVPN Profile”.

Add the ovpn file you generated on your server. You can choose the “save private key password” if you would like. I use this because my phone has a fingerprint security feature. Once you connect, you will be connected to your home network from anywhere! Perfect security for pubic wifi.

 

 

 

 

Clone a Hard Drive using Ubuntu Live CD

I have a hard drive-duplicator device. It works great if you two of the same drive. But I’ve had issues transferring from an SSD to a regular hard drive (and vice versa).

I looked into buying the EaseUS Disk Copy program (only works in Windows) but now they want a subscription? Hell no to that. So here we are, looking to Ubuntu for our solution!


EDIT: I used the following method to duplicate my Ubuntu Server backup and the copied disk booted into grub (no boot loader). All things considered, one of those duplicators found easily on ebay and Amazon are the best bet. They are much faster and more accurate. For the error I did get using the physical drive duplicator, it was easy to fix. I booted with an Ubuntu Desktop Live USB and used the Disks program to repair. No issues after that. The model I have is a Sabrent EC-HD2B and I have to say it’s pretty nice.

I found a great guide to duplicating hard drives using an Ubuntu Live CD/USB.
Balena Etcher will help you write the Ubuntu Live ISO to a USB disk.


Once you run the Ubuntu Live disk, open a terminal.

Plug in your first drive (the one that you want to copy).

sudo fdisk –l

Take note of what fdisk reports for this drive. It is likely /dev/sda

Now, plug in your second drive (the one you want to overwrite).
Run ‘sudo fdisk –l’ again.
fdisk will likely report this drive as /dev/sda.

Do not confuse the two drives. Here’s a sample statement that will allow your computer to copy the first drive to the second. Replace the drive names as necessary. In this example, sda is the source and sdb is the target:

sudo dd if=/dev/sda of=/dev/sdb

This process can take several hours. Do not turn your machine off until you see a report in your terminal that the process is complete. In my case, it took over 24 hours to copy a 1TB drive with a Mac Mini (Mid 2012)!

Example output when done:

1953525167+0 records in
1953525167+0 records out
1000204885504 bytes (1.0 TB, 932 GiB) copied, 102499 s, 9.8 MB/s

Connect a PC to a Commodore 1541/1571 drive

Did you ever want to transfer files from your old Commodore 1541/1571 drive between your computer and a real drive? Did you also want to use a real Commodore floppy drive with the VICE emulator? Me too! 😉 Both of these things are possible with the zoomfloppy device being offered by Retro Innovations. You can download basically anything you want from arnold.c64.org (or any other commodore software source) and transfer it right to your floppy device so it can be used on a real Commodore 64 or Vic 20.

This device is unlike other solutions that only worked with specially built cables and DOS. You simply plug a USB cable between your zoomfloppy and your computer and then the serial cable between the zoomfloppy and the floppy drive. Once the physical connections are made, you simply run the OpenCBM software to transfer files or backup disks.

Here’s how to install a zoomfloppy device to your Ubuntu computer.

sudo apt-get install libusb-dev build-essential linux-headers-generic git

Install the CC64 Compiler:

cd ~
git clone https://github.com/cc65/cc65.git
cd cc65
make
sudo prefix=/usr make install

Compile and install OpenCBM

cd ~
git clone git://git.code.sf.net/p/opencbm/code opencbm
cd opencbm/opencbm
make -f LINUX/Makefile
sudo make -f LINUX/Makefile install install-all install-plugin-xum1541
sudo ln -s /usr/local/lib/libopencbm.so.0 /usr/lib/libopencbm.so.0

Add udev rules for the ZoomFloppy hardware itself:

sudo pico /etc/udev/rules.d/45-opencbm-parallel.rules

Add this to the bottom of the file, then save and quit:

SUBSYSTEM!="usb_device", ACTION!="add", MODE="0666", GOTO="opencbm_rules_end"
# zoom floppy
ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0504", GROUP="users", MODE="0666"
LABEL="opencbm_rules_end"

Restart udev:

sudo service udev restart

Check the ZoomFloppy and IEC device status:

cbmctrl detect

Bonus: Get VICE to use the zoomfloppy interface to utilize a real 1541 Commodore Floppy Drive!

1. Settings -> Peripheral Settings -> Device #8 -> Enable IEC Device
2. Settings -> Peripheral Settings -> Device #8 -> Device Type -> Real Device Access

Subsonic issues on Ubuntu Server?

HTTP ERROR: 503 Can’t load server

My subsonic installation was not working! I tried everything (or so I thought) including reinstalling subsonic, looking at my router settings (is 4040 configured properly?) etc. Finally I found the solution: cleaning up a corrupt Subsonic Database. If you are being met with a 503 html error, this could be your fix.

Stop Subsonic

sudo service subsonic stop

Backup your /var/subsonic/db/subsonic.script file
This file contains a handful of SQL statements that will be used later to recreate your users, media directory settings, etc.

sudo cp /var/subsonic/db/subsonic.script /root/

Delete the contents of your /var/subsonic/db/ directory

sudo rm /var/subsonic/db/*

Restore your subsonic.script file

sudo cp /root/subsonic.script /var/subsonic/db/

Start Subsonic

sudo service subsonic start

Your Subsonic media library will now be empty, you’ll want to go to “Settings…” “Media Folders…” and click “Scan media folders now”