Huawei B525 4G router: new firmware – no more changing DNS server manually?

Recently I upgraded my Huawei B525s-23a 4G router’s firmware (new software version 81.191.13.00.1134, Web UI version 81.100.31.02.1134) only to find out the trick to change DNS servers has stopped working:

No more DNS settings for you

After brief inspection with browser’s developer console, worry not, DNS settings are still here (hidden of course). To show the settings navigate to Router -> DHCP, press F12 and enter this into developer’s console:

$('#dhcp_dns').show();

Press enter, and the settings are back:

Change DNS server on your Huawei B525 again!

Tested with Firefox, Chrome and Chromium based Edge.

GOG Galaxy 2.0 wrong currency

Recently I had a problem with GOG Galaxy 2.0 client’s store displaying wrong currency with no way of changing it (no such option in the client itself and under gog.com account settings correct currency was already selected).

I fixed it by following this post on GOG forums and deleting everything under C:\ProgramData\GOG.com\Galaxy\webcache (closing Galaxy client beforehand).

Ricing Firefox for Usability, Privacy and Distraction Free Browsing

Motivation

Preventing ADHD, computer AIDS and returning browser back to what it was supposed to be – a tool to read and learn, not to consoome content.

Introduction

While Mozilla engages in an open warfare against their users, somehow they still haven’t managed to completely kill their only product that matters. Firefox continues to be the only major (that sweet < 4 % market share) usable browser which is not beholden to Google’s browser engine. In this article I’ll explain how to minimize your web footprint, read what you want to read without distractions, and be quicker and more efficient about it.

This article is written as a series of notes to myself (and others) and follows after a fresh installation of Firefox 72.0.2 (everything should work with later Firefox versions with no or minimum changes).

Changing visual browser options

So the first thing I do after installing Firefox is changing the following settings in about:preferences.

General section

  1. Check Restore previous session.
  2. Make Firefox default browser & uncheck Always check if Firefox is your default browser.
  3. Uncheck Ctrl+Tab cycles through tabs in recently used order.
  4. Check When you open a link in a new tab, switch to it immediately.
  5. Check Always ask you where to save files in Downloads subsection.
  6. Under Digital Rights Management (DRM) Content leave Play DRM-controlled content checked if you can’t stop consoooming netflix.
  7. In the Firefox Updates subsection check Check for updates but let you choose to install them.
  8. Uncheck Use a background service to install updates.
  9. Uncheck Automatically update search engines.
  10. In the Browsing subsection uncheck the following options
    1. Show a touch keyboard when necessary
    2. Search for text when you start typing
    3. Enable picture-in-picture video controls
    4. Recommend extensions as you browse
    5. Recommend features as you browse
  11. Under Network Settings make sure Enable DNS over HTTPS is unchecked.

This is how general settings section looks like after applying these settings (click to open full-sized image in a new tab):

Home section

  1. Under New Windows and Tabs select Homepage and new windows and New tabs to open Blank page.
  2. Uncheck everything in the Firefox Home Content subsection.

This is how home settings section looks like after applying these settings (click to open full-sized image in a new tab):

Search section

  1. Set DuckDuckGo as your default search engine.
  2. Uncheck everything under Search Suggestions.
  3. Remove everything except DuckDuckGo from the list under One-Click Search Engines.

This is how search settings section looks like after applying these settings (click to open full-sized image in a new tab):

Privacy & Security section

  1. In the Enhanced Tracking Protection subsection Select Custom radio button and leave everything checked as is (we’ll return to cookies and tracking with our add-ons).
  2. Leave Send websites a “Do Not Track” signal that you don’t want to be tracked set as Always (never-mind that no big web spy conglomerate like google cares about that setting)
  3. In the Permissions subsection click on Settings under Location, Camera, Microphone and Notifications, check Block new requests asking to access your [..] and save.
  4. In the Autoplay settings click Block Audio and Video as default behavior (or leave default Block Audio if you must).
  5. Check Prevent accessibility services from accessing your browser and restart Firefox.
  6. Uncheck everything under Firefox Data Collection and Use.
  7. Uncheck everything under Deceptive Content and Dangerous Software Protection unless you are a literal child or your computer is used by children.

This is how search settings section looks like after applying these settings (click to open full-sized image in a new tab):

Uninstall Mozilla Maintenance Service (Windows OS specific)

Open Windows Control Panel and uninstall Mozilla Maintenance Service. This service is supposedly only used to update Firefox and Thunderbird without triggering UAC confirmation dialog. After uninstalling this service the checkbox named Use a background service to install updates under Firefox Update subsection in General settings tabs will disappear.

Remove Pocket

Open about:config, search for extensions.pocket.enabled and set it to false.

Essential extensions for privacy and minimizing distractions

Install the following extensions:

uBlock Origin settings

Subscribe to additional Filter lists: Adblock Warning Removal List from Ads category; Fanboy’s Cookie List, Fanboy’s Annoyance List and Fanboy’s Social Blocking List from Annoyances, Select your country specific block-list from Regions, languages and click Apply changes. So your filter lists look something like this:

Containing with Multi-Account containers

If you must use google’s services, but don’t like all that tracking business too much – this extension is for you. It spares you the inconvenience of disabling cookies altogether and prevents cross-site tracking by creating sandboxes for specified websites. Works best when combined with Cookie AutoDelete extension (explained further on).

Rename default containers to suit your needs. I name mine as follows: Google sandbox, Social media, Banking and Shopping. Then we force Google domains, like google.com, mail.google.com, youtube.com (and their country specific versions if needed) to always open in Google sandbox. After that we force all the twitters, facebooks and reddits to open in Social media container, your bank to open in Banking container and so on, you get the idea. To do that you open add-on’s menu, select desired container, open website you want to contain in that container and click Always open in [container], repeat with all the websites you want to contain.

Preventing tracking with Cookie AutoDelete

Open Cookie Autodelete extension settings and check these options:

  • Enable Automatic Cleaning? Delay Before Cleaning
  • Enable Support for Firefox’s Container Tabs

Your options should look something like this:

Cookie AutoDelete settings

Now you white-list or grey-list the sites you visit by opening them in an appropriate sandbox (read above paragraph). For example, when visit www.google.com, Firefox loads it as pre-configured in Google sandbox, and then I press Cookie AutoDelete icon in Firefox toolbar and add *.google.com to white-list as shown in the image bellow.

Repeat this step with other often-visited sites by white-listing cookies in their corresponding containers. This is more convenient than always deleting cookies, because you do not need to login and go through two-factor authentication every time you want to open you mail and at the same time confines those cookies to their corresponding sandboxes.

Every other site not in a white-list will get its cookies deleted 15 seconds after closing its tab (as per Cookie AutoDelete settings above). You can use grey-list to preserve site’s cookies until you close your browser (I find it most useful for e-shopping websites, so cookies won’t get deleted while you were redirected to the payment processor).

Stop CDN tracking with Decentraleyes

Decentraleyes stops requests to various content delivery networks (CDN) for various resources like JS libraries. It comes bundles with commonly used resources on the web and injects them locally instead of making remote request to some CDN. Works good out of the box.

Protecting uBlock Origin with Nano Defender

The purpose of Nano Defender is to stop anti-adblock measures by certain sites. To make it work with uBlock Origin, follow these steps as laid out by the author of Nano Defender.

Forcing HTTPS with HTTPS Everywhere

HTTPS Everywhere forces HTTPS usage if you make HTTP request but server also supports HTTPS. Works out of the box.

Tidying up Firefox

I like my software compact and not wasting any space, so default Firefox install needs some clean-up. I mean wtf is this:

To fix this right-click on the marked empty space and select Customize. Now right click on empty rectangles and select Remove from toolbar, or simply drag them away to the space bellow.

While you are here drag Add-ons, Zoom Controls, Options and New Private Window items to the toolbar.

In the strip down bellow click Toolbars and check both Menu Bar and Bookmarks Toolbar, also click Density, select Compact and uncheck Use Touch for Tablet Mode.

If you are using Linux, uncheck Title bar, if enabled, to make this:

into this:

Click Done, populate (with time) your bookmarks bar and marvel at its beauty:

about:config settings

browser.tabs.closeWindowWithLastTab = false //Do not close Firefox window after closing last tab.

Usability Extensions

Install the following extensions:

Improving your tab game with Tree Style Tab extension

Tree Style Extension allows you to organize and manage your open browser tabs hierarchically in the process saving that sweet vertical space by moving your tabs to the side.

However to save that sweet vertical space there are some extra steps involved. First you must create a folder named chrome in you Firefox profile folder. To do that open a new tab, in the address field enter and load about:support, then press Open Folder button next to Profile Folder field. In this opened location you need to create aforementioned chrome folder and in this new folder you must place a file called userChrome.css, which must contain the following content:

.titlebar-spacer[type="pre-tabs"] {
  visibility: collapse !important;
}
#TabsToolbar {
    visibility: collapse;
    overflow: visible;
}
#TabsToolbar > * {
    visibility: collapse;
}
#TabsToolbar .titlebar-buttonbox-container {
    visibility: visible !important;
    position: absolute;
    right: 0;
}

Now open new tab in your Firefox browser, visit about:config, search for toolkit.legacyUserProfileCustomizations.stylesheets setting and set it to true.

Now you can restart Firefox and, voilà – Firefox’s tab toolbar disappeared and only Tree Style Tab side bar shows (press F1 if it doesn’t).

Post updated 2020-06-22. Everything works with Firefox 77.0.1.

Prevent hard disk drive from sleeping/spinning down/power saving

Modern hard drives have this annoying power saving feature of spinning down when disk is not in use for a couple of minutes. This often results in a few seconds pause when accessing files, game freezing until disk spins up and so on.

To fix it, first thing you wanna check is a setting Turn off hard disk after in advanced power options (Fig. 1).

Fig. 1 Advanced power settings

Make sure it is set to 0. After saving settings, give it a go – if it helps, then great, problem solved. However usually this is not enough, because modern HDD’s have hardware level power saving features which ignore this Windows setting. My go-to tool to prevent drives from sleeping is CrystalDiskInfo (just get Standard edition). Upon installing it, select Function -> Advanced Feature -> AAM/APM Control from top bar menu, select your hard drive(s) and click on Disable under Automatic Acoustic Management (AAM) and Advanced Power Management (APM) sections (if applicable) (Fig. 2).

Fig. 2 AAM/APM Control

Then check option Function -> Advanced Feature  -> Auto AAM/APM Adapation. Lastly check Function -> Startup to make CrystalDiskInfo run on Windows logon (Fig. 3).

Fig 3. Menu

Raspberry Pi NFS server and Windows client

Introduction

Microsoft supplied NFS client is available only in the Enterprise and Ultimate Windows editions. In this article I’ll explain how to setup and run NFS server on the Raspberry Pi 3 computer running Raspbian operating system and connect to it from Windows 10 Home client (everything should work with other Windows versions and editions).

Raspberry Pi server

titulinis

Mounting disc

Connect disc to the Raspberry Pi and run command fdisk -l. Check the name your drive got:

fdisk_eng

Create mounting point:

sudo mkdir /media/transcend

Connected drive is NTFS formatted, so we make sure that NTFS read – write driver is installed:

sudo apt-get update

sudo apt-get install ntfs-3g

Add this entry to the /etc/fstab file:

Restart Raspberry Pi and create a new folder where you’ll keep your NFS share:

mkdir /media/transcend/NFS

Setting up NFS server

Install:

sudo apt-get install nfs-common nfs-server

Add this entry to your /etc/exports file:

exports

192.168.8.0/255.255.255.0 means that NFS server will accept connections from local IP addresses in range of 192.168.8.1 – 192.168.8.254. Option insecure is added because otherwise Windows clients can’t connect.

Windows client

Download NFS Windows client binaries from here.

Extract them and follow these steps:

  1. Install (if not installed) vcredist*.exe libraries.
  2. Double click nfs41_driver.cer file, select Install Certificate and put it in Trusted Root Certification Authorities store.
  3. Open cmd.exe as administrator.
  4. Run install.bat file.
  5. Copy config files:
    1. mkdir C:\etc
    2. copy etc_netconfig C:\etc\netconfig
    3. copy ms-nfs41-idmap.conf C:\etc\
  6. Allow windows to load test-signed drivers:
    bcdedit /set testsigning on
  7. Restart your PC.
  8. Disable the DFS client:
    1. Run regedit and navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Mup
    2. Add DWORD value named DisableDfs with value 1.
    1. If there is none, add DNS suffix: dns_suffix
    2. Reboot your PC.
  9. Test NFS client by running:
    nfsd_debug.exe --noldap --uid 1000 --gid 1000 -d 3
  10. If client didn’t crash, open other command window and mount NFS share as Z drive:
    nfs_mount.exe Z: 192.168.8.103:\media\transcend\NFS

    where 192.168.8.103 is Raspberry Pi IP address.

It works:

veikia

If trying to mount NFS share you are getting similar error:

failed_mount

but NFS server is running and restarting it

sudo /etc/init.d/nfs-kernel-server restart

fixes the problem, it’s possible that nfs-kernel-server is starting earlier than external drive is mounted. To fix this you can delay nfs-kernel-server starting for, say 10 seconds, by editing /etc/init.d/nfs-kernel-server file and adding sleep 10 line after start section:

sleep_nfs_kernel

Running and mounting automatically

If you made sure that everything is running, run command line as administrator, return to extracted NFS client folder and install NFS client as a service:

nfsd.exe -install

Then run services.msc, find pnfs client entry and change its startup type to automatic:

servicesmsc

To auto-mount NFS share, run Task Scheduler tool, in the left pane select Task Scheduler Library and create a new task by clicking Create Task in the right pane. Give your task a name, in the Triggers tab create a trigger which will run on system startup with 30 seconds delay, in the Actions tab create Start a program action, which will point to a script with similar command:

C:\Users\User\Desktop\ms-nfs41-client-x64\nfs_mount.exe Z: 192.168.8.103:\media\transcend\NFS

In the Conditions tab remove the check from start the task only if computer is on AC power.

taskscheduler

Press OK.

Next time you restart your Windows PC, NFS client will run and mount NFS share automatically.

Sources

  1. Raspberry Pi: How to Create an NFS Server
  2. NFSv4.1 Client for Windows
  3. NFSv4.1 Client for Windows (Mailing list)
  4. nfs-kernel-server starts too early

Boscam HD19 and Raspberry Pi

There seems to be only one way to feed live video from Boscam HD19 FPV camera to Raspberry Pi over wire. To do that you’ll need composite AV to USB capture card. The one I had lying around is called KWorld VS-USB2800D Composite/S-Video to USB 2.0 (see Pic 1 and 2).

KWorld VS-USB2800D

Pic 1. KWorld VS-USB2800D front side

KWorld VS-USB2800D

Pic 2. KWorld VS-USB2800D back side

Connect Boscam camera to capture card with supplied mini USB to composite AV cable. Insert supplied multifunctional port’s power cable and connect it to 12 V battery (as per Boscam’s specification). I used Turnigy 3S 11.1 V battery which seems to do the job. See pics bellow.

Pic 3. Boscam HD19 with composite and power cables connected

Pic 3. Boscam HD19 with composite and power cables connected

Pic 4. Turingy 3S 11.1 V battery

Pic 4. Turnigy 3S 11.1 V battery

Pic 5. Everything's connected

Pic 5. Everything’s connected

Connect capture card to Raspberry’s USB port (Pic 6).

Pic 6. And... It's a mess

Pic 6. And… It’s a mess

Turn on your Boscam camera by holding its power button and start Raspberry. If you’re lucky Raspberry will detect your capture card on boot and it’ll be ready to use. You can quickly test it with software like guvcview. You can find an incomplete list of supported devices here.

In my case, even though everything was detected, all I got was black screen. The problem was that KWorld’s capture card has two inputs: S-Video and composite and it defaults to using S-Video.

To fix this I listed available channels:

enum_channels

Pic 7. Listing available channels

and selected composite channel:

select_channel

Pic 8. Selecting channel

It works!

Pic 7. guvcview works

Pic 9. guvcview works

Making Samsung Galaxy S2 i9100 and Samsung Galaxy Note 10.1 N8000 faster

I bought Samsung Galaxy S2 & Samsung Galaxy Note 10.1 couple of years ago and for the better part of the last half a year both devices became unbearably slow. I went through the usual motions of cleaning junk and cache and memory but nothing helped, so I just kinda written of bad performance as a case of “applications becoming more bloated and device performance staying the same”. However, recently I read that Android didn’t have TRIM support until 4.3 version (more about this here). Problem is, that highest supported version of Android by Galaxy S2 and Galaxy Note 10.1 is 4.1.2. I didn’t want to try custom roms, so I tried fixing my performance using third party software Trimmer (fstrim). Before trying this program you need to have your device rooted, you can read about it here (Galaxy S2) and here (Galaxy Note 10.1).

Running Trimmer (fstrim) software alleviated performance problems significantly.

P. S. There is a chance to brick your device by either rooting or running trimming software, so do it at your own risk.