Surveillance cam HWI-B140H-M (HIKVISION HiWatch Series)

I recently bought the HWI-B140H-M from HIKVISION in order to test it on Linux. But the results were quite disappointing:

  • You can access the cam via browser but for some features (e. g. configuring areas for motion detection) you need either their windows client software (iVMS) or you need an old browser (Chrome 44.x, Firefox 51.x or lower) with browser plugins. Fun fact: They don’t tell you which plugins are meant. So without windows, you have a hard time.
  • Interestingly enough, the manual says that when the WebSocket function is activated, you could use all features in your current browser without plugins (which contradicts the information at the beginning). But there is no such function (in the windows client not either) although the most recent firmware is installed.
  • I updated the firmware to the most recent version (V5.5.80 build 180911) using the windows client in a VirtualBox Windows VM. After the update, I could not access the web interface anymore. It turned out, that they are blocking my browser’s user-agent ID. How dare you! With the Firefox addon user-agent switcher and manager and an IE 11 user-agent the web interface is accessible again.
  • My FritzBox router has a NAS function. So i set up a Samba (SMB) share and finally configured it in the web interface of the cam. It worked but the cam showed the Samba device as “uninitialized”. The cam’s manual instructs you to click on “Format” to solve this but it did not work. I tried several configurations, tested the Samba share on nautilus but I always got an error (permission blabla). Some folks had the same trouble in 2014 ( No working solution, so I gave it up.
  • The user manual of the cam is the worst manual I’ve ever seen. It contains contradicting informations (see above) and many sections only apply to a certain device but the don’t mention the device. Furthermore, it’s more a listing of features than explaining hands-on how to configure the device properly. “Here are the information, deal with it”.

My advice: Don’t buy it.

Best open source music player for Android (custom rom)

I’m now using VLC from the repository. You can navigate to any folder you want and hit play and VLC will play back all tracks in the current folder. So no need for setting up indexing on particular folders and having trouble with files outside of that folder.

Before that, I used the App Vanilla Music but yesterday, it drove me up the wall. Every time when I copy new music or audio books to my smartphone, I had to restart the entire phone because only then Vanilla Music updated its file index and displayed the new tracks. Furthermore, I had files outside of the indexed folder. The playback of these files was nearly impossible. Although you could navigate to these files within Vanilla Music, the playback did not work. You could start the playback from the file manager but you had to enqueue file by file – m3u playlists did not seem to work either. That’s why I switched to VLC.

Setting up dnf on Mageia 7

As you can see with dnf repolist, only the core repository and the update repository are activated on Mageia 7 by default.

The repositories nonfree and tainted are pre-configured in configuration files within /etc/yum.repos.d/ but disabled by default. You can easily activate them by executing the following command:

# dnf config-manager --set-enabled mageia-x86_64-nonfree updates-x86_64-nonfree mageia-x86_64-tainted updates-x86_64-tainted

That’s it. Now, when you try to install a package or upgrade the system, the nonfree and the tainted repository are considered as well.

Watching maxdome video streams on Linux

Edit: Currently (about two month later), it does not seem to work anymore =(

It worked on my machine with a Firefox 60.9.0esr. But at first, there were two things that hindered the playback:

  • The Ad-Blocker – I had to disable it.
  • The user agent setting of Firefox has to be something like “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3835.0 Safari/537.36”. This can easily be achieved with the Firefox addon User-Agent Switcher and Manager.

You also have to make sure, that the Firefox Addon “Widevine Content Decryption Module provided by Google Inc.” is installed and activated (see Watch DRM content on Firefox).

In my opinion, it is pretty silly that you have to fake your user agent in order to watch the movies. But according to the customer support this is done on purpose:

Da wir Linux nicht unterstützen ist ein funktionierender Abruf über die entsprechenden Systeme nicht vorgesehen.

Reply from the “maxdome Kundenservice” on my inquiry (December 8th, 2019)


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. Important: Do NOT lock your device i. e. leave the screen on – otherwise, the following connection attempt might fail.
  9. 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”
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.


  1. Important: Backup important data first!
  2. Download the latest Ubuntu release here:

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 /

Then run:

$ wget -O - | 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”.


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...