How to uninstall dnscrypt-proxy and revert to previous DNS settings on the Raspberry Pi 3 Model B+

Oh, you thought this was gonna be easy? This is Linux.

Writing this because while there’s a lot of documentation about installing dnscrypt-proxy, there’s very little about removing it.

This guide assumes a few things:

  • Raspbian Stretch or later with default desktop environment
  • dnscrypt-proxy was manually installed (read: not installed via a package manager or from a repository)
  • resolvconf was not uninstalled and/or removed from Raspbian
  • The DNS server for the LAN is determined via a router setting or a separate DHCP server (such as a Pi-hole instance running on a separate machine)

Here’s how you do it:

  1. Open a terminal command prompt at /opt/dnscrypt-proxy
  2. Run ./dnscrypt-proxy -service stop
  3. Run ./dnscrypt-proxy -service uninstall
  4. Delete the /dnscrypt-proxy folder
  5. In the taskbar, right-click the network icon
  6. Click Wireless & Wired Network Settings
  7. Ensure the 1st dropdown next to Configure is set to interface
  8. Set the 2nd dropdown to eth0
  9. Check the Automatically configure empty options box
  10. Clear the DNS Servers and DNS Search fields
  11. Click Apply
  12. Click Close
  13. In the terminal, run sudo service resolvconf start
  14. Run sudo systemctl enable resolvconf
  15. Reboot the Raspberry Pi

Upon reboot your network connection and DNS functionality should be returned to its previous normal state.

Sources:

dnscrypt-proxy Github (see Steps 4 & 6)

AskUbuntu

Project Trident/FreeBSD/TrueOS beginner tips and tricks

Fun with “that other OS” paradigm

I recently set up my 1st Unix machine running Project Trident (based on TrueOS, which is in turn based on FreeBSD.) Here, in no particular order, are some things you might need to know.

All commands are to be entered into QTerminal and followed with an Enter keystroke, and it’s assumed you’re running (Project) Trident.

BSD is not Linux

If you have Linux experience, it’s tempting to think BSD is more of the same. It isn’t. For one, while Linux emphasizes performance and modularity, BSD emphasizes monolithic technical correctness and consistency (read: on the OS scale, not just at the kernel level.)

How to prepare your PC’s BIOS for BSD installation

  1. Enter your PC’s BIOS.
  2. Disable Secure Boot.
  3. Switch boot mode from UEFI to Legacy.
  4. Enable booting from external devices.
  5. Change your boot order so that the PC boots from the external device first.
  6. Check that your BIOS is set to the correct time. If it’s wrong, the time in BSD will be wrong too.
  7. If your PC currently runs Windows, install the latest BIOS version before you replace it with BSD. Technically you may be able to update the BIOS via USB later, but it’s a major PITA in comparison.

How to create an a Project Trident USB installer disk in Windows

  1. Download the installation ISO.
  2. Change the downloaded ISO’s extension from .iso to .img.
  3. Write the .img file to the USB disk using Win32 Disk Imager.

Shell selection

Just stick with the default shell, as most documentation is written assuming you’re using it. zsh is pretty good.

SWAP partition creation

When given the option during installation, enable it at the default size.

Documentation

The canonical documentation for any BSD flavor is the main type of BSD it’s based on. So, for example, since Project Trident ultimately descends from FreeBSD, FreeBSD’s documentation is canonical for it.

How to set your timezone correctly

  1. Enter the PC’s BIOS and set the correct time there manually.
  2. Boot into Trident.
  3. Open QTerminal, then execute the following commands:
    1. sudo tzsetup
    2. sudo service ntpdate restart

The command for the Lumina text editor

… is lte. If you need to start it as root, use sudo lte.

The command for the Lumina file manager

… is lumina-fm. If you need to start it as root, use sudo lumina-fm. You can also start it as root from within the file mangaer GUI itself.

How to set up Resilio Sync in Project Trident

  1. Open AppCafe. You may have to open it twice and/or click on the TrueOS logo in the middle for the dropdown at the top center to change from local to trident.
  2. In the Browse tab, search for “Resilio.”
  3. Click the download icon beside the Resilio Sync search result. This will add the installation to the Pending tab, which you can then switch to follow the progress.
  4. Start Resilio Sync by entering rslsync in QTerminal.
  5. Access Resilio sync by going to localhost:8888 in your browser.

There are a few quirks about running Resilio Sync on BSD. The first is that the documentation in the package and in the .conf files is rather misleading. Although most of it talks about Resilio running under the rslsync user, it’s installed to run under the the account that installed it (read: yours.) I still haven’t figured out exactly how to get it to run as a service, but when I do I’ll probably write a separate post about it.

How to list all the hardware the OS can see right now

sudo pciconf -lv

If you want to search the output of the above for a particular item, e.g. “bcm”, you can do so via:

sudo pciconf -lv | grep bcm

How to load something into the kernel

Using bwn as an example:

sudo kldload bwn

How to search output strings from a given command

Just add | grep searchterm to the end of the command. You can also sort the search results by adding | sort to the preceding. For example, to search the output of dmesg for bwn and sort the results:

sudo dmesg | grep bwn | sort

You can also use | tail -n to get the last n lines of a command’s string output.

How to check whether BSD detects a hardware component at all

sudo dmesg

The above is basically a printout of everything that scrolls down the display at boot. It’s pretty long, which is where the grep and sort commands come in: they help you filter it for what you want to find.

To fix flickering desktop graphics elements

Delete ~/.config/lumina-desktop/compton.conf.

How to set up SSH

  1. Open the terminal
  2. Type sudo service sshd start
  3. Hit Enter
  4. Type sudo rc-update add sshd
  5. Hit Enter
  6. Click the Start button
  7. Enter “SysAdm”
  8. Click on SysAdmin Client
  9. In the window that follows, click on Firewall
  10. Under the Open a Port heading, in the Open by Service label, click the Select a Service… dropdown
  11. Select ssh. 2 entries for port 22, 22/udp and 22/tcp, should appear above the Open a Port heading
  12. Click Restart

SSH should now be set up. Try logging in from another machine.

Deletion is a permanent operation

Unlike nearly every other OS type out there, BSD (and non-macOS Unix at large, apparently) assumes deleting something means you don’t want it anymore ever again.

The ways to get around this are to:

  1. Use snapshots.OR
  2. Make absolutely sure you want to get rid of something before you do.

How to set up ZFS snapshots

Instructions here.

Where to find Project Trident and/or TrueOS support

Project Trident Telegram

TrueOS Telegram

r/BSD

r/TrueOS

How to get the Windows 10 Samsung Notes app to sync with Samsung Cloud

In a stroke of absolute brilliance, Samsung ships a working app whose primary feature is disabled by default

You got Samsung Android device, took a few notes in Samsung Notes, then installed and signed in to the Samsung Notes Windows 10 app. Now none of your notes are showing up in the Windows 10 app. WTH is going on?

Answer: Samsung Notes’ default settings pretty much guarantee sync failure for desktop use cases. Here’s now to fix it:

  1. Ensure you’re signed in to Samsung Cloud in both the Android and Windows 10 app. The remaining steps take place entirely in the latter.
  2. Enter the app’s settings.
  3. Click on Samsung Cloud.
  4. Toggle “Sync via Wi-Fi only” (the fact that a setting is literally in quotes in the app may be a red flag here) off.
  5. Toggle Sync with Samsung Cloud off and then on.
  6. Click Sync now.

The app should now sync and pull all your notes from Samsung Cloud.

Users whose Windows devices are frequently between mobile and Wi-Fi data connections might want to leave the setting in #4 above enabled to save data, but pretty much everyone else should disable it.

Thanks u/Act1v1si0n for this solution.

ToJane TG600/TG801 Clip Lamp Manual

A rare good product that lacks a proper support page.

ToJane sells the above wonderful products, but apparently doesn’t have the manual or operating instructions available for download anywhere. So here it is, scanned in: ToJane TG801 Manual. You can find the TG801 on Amazon and at the official ToJane Store. Perhaps more alarming is the lack of a ToJane support page anywhere. Basically, if this thing breaks on you, you’re toast.

How to recover from “E: Error parsing XML file” in TWRP

I recently ran into the above error after attempting to encrypt my Verizon Samsung SM-G900V (Galaxy S5, klte) running LOS 14.1 (that was a mistake.) Basically it means TWRP can’t successfully decrypt the filesystem.

When this happens, your best bet is to simply factory reset the device and restore a backup. To do this, simply tap Cancel at the decryption password prompt in TWRP, then factory reset via the Wipe menu as usual.

Unfortunately, this will totally negate whatever encryption you had – aside from adopted storage – but it should get return your device to a usable state.

Windows 10 UWP apps installed but missing from Start menu &/or taskbar? Do this

Do you accept PowerShell as your lord and savior?

I recently installed a new Windows 10 Insider Slow Ring build, only to find all my pinned taskbar UWP shortcuts missing. The apps didn’t show up the Start menu either via searching or manual scrolling.

The fix is here and involves a bit of PowerShell wrangling for batch operation, but all you have to do is literally copy and paste commands. I highly recommend you close all UWP apps before doing it, but don’t worry about “resource currently in use” error messages after that as the commands will work just fine.

How to find the right coax cable digital splitter

Yet another topic there’s much less documentation on than there should be

If you have cable internet or are using the coax cable inside your house for MoCA networking, you might eventually want to split a cable outlet between 2 end point devices, e.g. a set top box and a modem, or a network CableCARD tuner and a MoCA adapter.

You’ll need a digital splitter for that, and the most important spec for the job is the frequency range the splitter is rated for. It must be from 5 to approximately 1000 MHz. I say approximately because some splitters that work are rated for 5-1002 MHz.

Splitters that have worked for me – most recently with an Actiontec ECB6200 – include the Extreme Broadband Engineering BDS102H, CommScope SV2G, and Regal ZDSB3DGH10. If you can’t find any of those or a splitter that meets the 5-1000 MHz spec, then get one from a cable company truck. I did this myself years ago by just hanging out in the cable company office lot until a truck came by. I told them what I needed a digital splitter for, and they tossed me a couple.

How to update Samsung Galaxy S5 stock partitions without breaking custom ROM or recovery

Don’t just flash modem firmwares and think you’re done.

The following is directed at Samsung Galaxy S5s running custom ROMs and custom recovery environments only. The Galaxy S5’s internal storage has multiple partitions, each with its own separate image. For the sake of this discussion, we’ll divide the partitions into 2 groups: customized and stock.

Customized partitions are the ones you’ve put a custom image onto. For most devices running custom ROMs, that’s the /recovery – this is where TWRP, CWM, etc. live – and /system – where the actual (custom) Android phone OS lives – partitions.

Stock partitions are the partitions with unmodified OEM images. For most devices running custom ROMs, that’s every partition except /recovery and /system. Because some of these partitions contain firmware for the phone’s hardware components and said firmware was developed for a particular version of Android, it’s important to keep them updated. It isn’t too hard to see how, for example, pairing firmware designed for Android 4.4.2 with a custom Android 7.1.1 ROM could cause problems.

This guide will show you how to update as many of the stock partitions as possible without touching the customized partitions:

  1. Download and install 7-Zip.
  2. Download the latest stock firmware (where “firmware” in this sense means an archive containing images for all partitions) from SamMobile.You’ll need to search by your phone’s model number at that page.
  3. Decompress the archive from the above step. If you find it contains a .tar.md5 file; decompress that too.
  4. In the folder containing the extracted files, select the following:
    • NON-HLOS.bin – This is the 4G LTE modem firmware.
    • modem.bin – This is the 2G & 3G modem firmware.
    • rpm.bin – This is the resource and power manager.
    • sbl1.mbn – This is the secondary bootloader.
    • tz.mbn – This is the trust zone.
    • sdi.mbn – This contains transmission band info (?)
    • aboot.mbn – This is the phone bootloader. SELECT THIS ONLY IF YOUR PHONE SHIPPED WITH AN UNLOCKED BOOTLOADER (i.e. DO NOT SELECT IT IF YOU’RE USING A VERIZON S5 AS YOU WILL RE-LOCK THE BOOTLOADER.)
  5. Follow Steps 6 to 11 here.

And that’s it. All your partitions will be safely updated without touching your custom ROM or custom recovery.

Thanks haggertk for the method, E:V:A for partition details, and Campbell Vertesi for the NON-HLOS.bin and modem.bin descriptions.

Where to find the latest version of Odin

Is it Odin or Odin3? 🤔

If you’re reading this, you probably already know what Odin (or Odin3? Because that’s what the window title bar says) is and what it does. For the unitiated: Odin is a Samsung-internal Windows graphical utility that allows you to update Samsung Android phone storage partitions using image files from your PC. Samsung Kies does almost the same thing, but it downloads official files from Samsung only, while Odin allows the use of any image files compatible with the phone. It’s basically ADB for Samsung, but with a GUI.

Because it’s an internal tool, there’s no Samsung-official download site for it. However, you should always be able to find the latest version at XDA here. Odin is a portable .exe, so you can run it from anywhere.

How to download pics and video from Instagram using a browser with no add-ons or extra apps

Yet another Firefox feature you won’t find in Chrome.

Every guide I’ve seen on how to do this talks about inspecting elements or installing add-ons or apps. None of that is necessary. Here’s how you do it:

  1. Open the image or video’s specific Instagram page (e.g. https://www.instagram.com/p/BOpZDePDQ2b/) in Firefox.
  2. Right-click on the background.
  3. Click Page Info.
  4. In the window that pops up, click the Media tab.
  5. Sort the results by Type.
  6. The pic you want will be one of the Image entries in type, while the video you want will be the Video entry. An example is shown below:
    clipboard01
  7. Select which one you want.
  8. Click Save As…

And that’ll do it. You’ll get the original .jpg upload or an .mp4 video. This method of downloading videos also works for Clippit.tv, with the exception that you might have to play the video first to allow Firefox to sniff it before clicking Page Info.