Using Amaze file manager to transfer data between your PC and your Android phone

Instead of using a USB cable to transfer data between your PC and your smartphone using MTP, you can also use a wireless connection and Amaze file manager app and an FTP client.

  1. Install the Amaze file manger on your Android phone (e. g. available at F-Droid app store).
  2. Establish a connection to your wireless router, i. e. activate WiFi.
  3. Open Amaze and navigate to the hamburger menu
  4. Click on “FTP Server”
  5. Optional: Configure the settings
  6. Click on “Start” to launch the FTP server
  7. After starting the server, Amaze will show the IP address and port number of the FTP server (if it does not work, chek your router settings – DHCP should be configured to automatically assign an IP address to connecting devices)
  8. Use the shown IP address and port number on your FTP client (on your PC) as to connect to the FTP server. Good FTP clients are FileZilla or Nautilus.
In the hamburger menu, click on “FTP Server”

notes:

This dialog will be shown

DVD playback issues in Totem and VLC solved with mplayer

The default video player on my Gnome desktop (Mageia 6) is totem. It did not play the DVD yesterday that I wanted to watch. Fortunately, VLC did start the playback when I checked the option “No disc menus” under “Media | Open Disc”. Though I had to manually select the correct video under “Playback | title” (it was the last element on the list). It worked for the first 30-40 minutes but then the playback stopped and the error message indicated that the next blocks/sectors of the DVD could not be read. Surprisingly, the issue was reproducible yesterday but not today.

The workaround was to use mplayer which has only a commandline interface:

mplayer dvd://12

12 is the number of the corresponding title which I chose in VLC. It worked flawlessly. Important hotkeys to control the playback (consider the man page for mplayer for all hotkeys):


f: Fullscreen toggle
space: Start/Stop playback
o: Onscreen information toggle
arrows: Jump forward/backward (small steps)
page up/down: Jump 10 minutes forward/backward
v: Enable/Disable subtitles
Esc: Quit mplayer

Removing Wolfram stuff from RaspberryPi’s NOOBS system

Identify the packages:

$ dpkg -l | grep "wolfram"
ii  wolfram-engine                        11.3.0+2018052403                    armhf        Mathematica® and the Wolfram Language
ii  wolframscript                         1.2.0-18                             armhf        WolframScript (for the Command Line)

Remove the packages:

# apt remove wolfram-engine wolframscript
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  coinor-libipopt1v5 libexiv2-14 libgmime-2.6-0 libmumps-seq-4.10.0 libraw15 lxkeymap python-cairo
  python-gobject python-gobject-2 python-gtk2 python-xklavier realpath
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  wolfram-engine wolframscript
0 upgraded, 0 newly installed, 2 to remove and 16 not upgraded.
After this operation, 833 MB disk space will be freed.
Do you want to continue? [Y/n] Y

Remove anything unneeded:

# apt auto-remove

Download partial content

You want to download a video stream but in your browser you only see several GET requests which point to resources of type “mp2t” (and maybe have a “.ts” ending) and the status code is “206 Partial Content”?

Try this:

  1. Copy one of the URLs which are pointing to the partial content.
  2. Copy the URL to the address bar of your browser and hit return and download the file.

P. S. I’m experiencing slightly crackling audio tracks when the clips are short (length of approx. one minute). I don’t know what to do about it.

npm Error: EACCES: permission denied, access ‘/usr/lib/node_modules’

You try to install a package with npm globally and you get this? npm install –global …

npm ERR! Linux 4.14.78-desktop-1.mga6
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--global" "web-ext"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

Cause: Your user does not have write permission to the folder ‘/usr/lib/node_modules’.

Clean Solution: Relocate the the folder where npm stores globally installed packages to some folder in your home directory:

mkdir ~/.nodejs_global
npm config set prefix ~/.nodejs_global

And now you can run npm install -g … =)

Installing a new Ubuntu version from scratch without any effort

Scenario: You have an existing Ubuntu installation and you want to install a newer version (e. g. Ubuntu 18.04) from scratch, i. e. drop the old installation completely and install the new version in place.

The trick/precondition which makes the installation effortless: On the current system, you already have your “/home” directory and your “/” (root) directory on different partitions. Then you can drop the old Ubuntu installation on the root partition and install the new Ubuntu version on this partition and the home partition can simply be adopted. If you don’t have your root directory and your home directory on different partitions, make a backup of your home folder and restore it later.

Prerequisites

  1. Important: Backup important data first!
  2. Download the latest Ubuntu release here: https://www.ubuntu.com/download/desktop

Let’s go: Create a bootable pen drive

Write the downloaded Ubuntu ISO file to a pen drive using dd (existing data on the pen drive will be lost after this process). First: Make sure that the pen drive is NOT mounted. Then: Open a terminal and login as root and call dd:

$ sudo su

# dd bs=50M if=/home/YOUR_NAME/Downloads/ubuntu-18.04.1-desktop-amd64.iso of=/dev/sdX && sync

Please change the path after “if=” to the path where the downloaded ISO file actually lies and change the path after “of=” to the device which represents your pen drive. You can use “lsblk” or “df -h” on the terminal to view your devices and spot your pen drive. It is really important to identify the correct device name as dd will overwrite existing partitions which can result in data loss if you aren’t cautious!

The installation

Now you have to boot from the newly created Ubuntu pen drive. Reboot your machine and select the pen drive as boot drive and boot from the pen drive. This step is a bit tricky (but not too hard) and differs from hardware to hardware. On Acer notebooks, you can try hitting F12 or F2 as described in this article.

When the pen drive is booted, you can follow the installation wizard most of the time. When it comes to partitioning: If you already have a separate “/” (root) and “/home” partition: Configure the old root partition as new root partition and check the format checkbox. Configure the old home partition as new home partition (do NOT check the format checkbox this time).

If you are asked whether to install proprietary software: choose NO. The proprietary things can mess up the whole system (at least this is what I experienced in the past).

When the installation is done: Confirm to reboot the machine and remove the pen drive when instructed.

Post-installation actions

Update the system

$ sudo su
# apt-get update
# apt-get upgrade

Install the multimedia codecs

$ sudo su
# apt-get install ubuntu-restricted-extras

Install support for encrypted DVDs

So as to play encrypted DVDs you have to install the package libdvdcss2 which is not in the official repositories. That’s why you have to add a new repository to your “/etc/apt/sources.list”. Just add the following line:

deb https://download.videolan.org/pub/debian/stable/ /

Then run:

$ wget -O - https://download.videolan.org/pub/debian/videolan-apt.asc | sudo apt-key add -

…and finally install the package:

# apt-get update
# apt-get install libdvdcss2

If you still cannot watch DVDs, try to disable the DVD menu in VLC media player: “Media | Open Media (Ctrl+D)” and check “No disc menu” and click on “Playback”.

Hints: http://www.videolan.org/developers/libdvdcss.html

Remove Amazon app

Open Ubuntu Software Center, go to tab “Installed” and click on remove next to the Amazon app.

Enabling the touchpad of your notebook

If your touchpad does not work out of the box then go to “System settings | Devices” and enable your touchpad.

Install your favourite software

apt-get install clementine keepass vlc zim...

Installing Fairphone Open on Fairphone 2 and app advices

In this article I’m going to explain how to install Fairphone Open (the Android version without the Google Mobile Services) on my Fairphone 2 using my Linux system (Mageia 6). The official Installation Guide can be found here.

  1. Install the package android-tools:
    urpmi android-tools
  2. The package above installs the command-line tool fastboot-android. But the flashing script (see below) expects the command-line tool fastboot. Because of this we need to create a link fastboot which points to fastboot-android:
    ln -s /usr/bin/fastboot-android /usr/bin/fastboot
  3. Download the switcher package and unzip it (see Official Installation Guide).
  4. Boot your phone into the fastboot mode (hold the volume down button while you power on your phone). Your phone is in fastboot mode when you see a static screen with a simple Fairphone lettering, black background and the lettering “Fairphone powered by android”.
  5. Connect your phone with your computer via USB cable.
  6. Execute the flash script which is contained in the switcher package:
    sh flash-for-unix.sh
    If you see something like:

     

    WARNING: No Fairphone 2 found in fastboot mode.
    WARNING: Make sure that a Fairphone 2 is connected.
    WARNING: To check for devices, type ‘/usr/bin/fastboot devices’.

    …then try to execute the command as root.

  7. When done you will see something like:

    Flashing successful!
    Your Fairphone 2 will now run Fairphone Open 18.02.0.

    Press Enter to reboot the device and complete the installation…

    Just hit ‘Enter’ and your device will reboot.

  8. The reboot takes a while, so be patient =)

After all, you end up in a fresh Android system without the proprietary Google Mobile Services. As the Play app store is also part of the Google Mobile Services, you might want to install an alternative app store like F-Droid. F-Droid is really awesome because it only contains open source software.

Some apps can even be installed without app store (e. g. WhatsApp, Threema) so if you rely on these apps you can just download the APK files using your browser and install them manually. Two apps I highly recommend:

  • Firefox Focus (german version: Firefox Klar): Firefox browser for android with pre-installed ad-blocker and tracking protection. It clears your browsing history automatically when you close it (really ace!).
  • Öffi: Provides information about means of public transportation (e. g. trains and busses). Works well in Germany (and other european countries) and can replace the DB Navigator app completely.