Category: linux

Switching DNS – Windows

I use the mighty Pi-Hole to streamline my browsing experience.  Sometimes, though, the ole Hole can get in my way, blocking something I need to see.  If it’s a one time deal, and not something I want to whitelist (which Pi-Hole has thankfully made easy to do via the web interface as of the latest edition), I wanted an easy way to temporarily switch DNS servers.

Enter QuickSetDNS, a groovy little exe that can do just that. Download QuickSetDNS and unpack it into the destination of your choosing.  There’s no installer – it’s a simple standalone exe.  Fire it up, right click in the whitespace and create a new DNS server entry. I’ve got one for my Hole, and one that points to Google’s public DNS servers.

After creating your entries, right click on one and choose Copy SetDNS Command Line. Then right click on your desktop and create a new shortcut.  Paste the SetDNS command line in for the location of the shortcut and click Next.  Name it something informative, and save it.  Do the same with your other DNS entries in QuickSetDNS.

There.  Now you have shortcuts you can double click to change your local DNS settings.

pi-hole – Whitelisting Domains

Pi-hole is awesome, but sometimes it works too well.  For instance, my wife wants to watch the recipe videos on the Food Network site, and because of embedded ad content they get pi-holed.  Here’s how to whitelist domains:

First, you know that your pi-hole has a web interface, yes?  Point a browser to http://[thepiholeIPaddress]/admin/index.php to get to it.  From there you can check out the query log, which you’re gonna need.  If you find the log all full up and cumbersome, you can empty it.  Hop on your pi and, in a Terminal session, run:

sudo truncate /var/log/pihole.log --size 0

This will zero out the query log file.  Now use your browser to hit the site containing the data you want whitelisted.  You’re going to want to make sure that traffic other than your own is at a minimum while you do this, or you’re going to be seeing a lot of information in the log that isn’t applicable to the browsing you are doing.  Anyway, these days sites pull from a variety of domains, so you can’t just assume whitelisting the domain of the url will be sufficient.  For example, to get videos to work on the Food Network site I had to whitelist assets.adobetm.com.

Once the page has finished loading check the query log.  In it you’ll see both allowed domains and those that have been pi-holed.  Make a list of the holed domains; you’re going to have to add them your whitelist individually and then test to find the one you’re after.  To add a domain to the whitelist, open the whitelist (again in Terminal) in nano:

sudo nano /etc/pihole/whitelist.txt

Use your arrow keys to navigate to the bottom of the whitelist and then add your domain.  At this time, wildcards are not supported in this list.  Once you’ve added the domain, save the whitelist via ctrl+o.  Then open a second Terminal session and reload your pi-hole’s settings by executing the following:

/usr/local/bin/gravity.sh

Once reloading has completed refresh the page containing the data you’re trying to whitelist.  If you’ve achieved success, close your Terminal sessions (you can exit out of nano with ctrl+x) and call it a day.  If not, remove from the whitelist the domain you just added and move on to the next holed domain in your list.  Rinse and repeat until you see what you’re looking for.

Some people seem to like using the Whitelist Assistant Chrome extension when doing this.  I find pi-hole’s query log to be absolutely sufficient.

 

 

Fonts For Wine in Ubuntu Mate

I’m using some older Windows programs – abandonware stuff by this point – on Ubuntu Mate via Wine.  I needed to install some custom fonts for these programs to use and had a bit of a time finding straightforward instructions on doing so.  Turns out it’s easy.  The fonts I needed are TrueType, so that’s all I’ve tested with.

Navigate to home/YOURUSERHOME/.wine/drive_c/windows/fonts

You will have to enable hidden files in order to see the .wine directory, and if you haven’t done so already you’ll need to open the fonts directory as administrator (from the windows directory right click the fonts directory and choose Open as Administrator).  Dump your font(s) into that directory.  Then open a prompt and enter:

sudo fc-cache -fv

This will rebuild the font information caches for fontconfig system.  Then you should be good to go.

some index files failed to download – Linux

“Some index files failed to download.”  That’s the error I got upon running apt-get update, after having Ubuntu Mate notify me that some of my updates are, er, out of date.  The indexes that failed to download were related to Flux, which I really liked having on my Windows machines.  Turns out that, as of this writing, the repository of Vivid Vervet (Ubuntu 15) for Flux ain’t there.  Take a look for yourself and see.  I suppose I could install an older version, but since I wasn’t interested in getting into any compatibility issues I decided to bail on Flux for now.

But I couldn’t uninstall Flux.  It isn’t installed.  I need to get rid of the repository information.  You’d think that would be as simple as remove-apt-repository blah blah, since adding it is a simple add-apt-repository, but nope.  There’s no remove-apt-repository.  Ultimately I opened the path /etc/apt/sources.list.d as admin, and removed the associated list and save files.  Reran apt-get update and voila – both the errors and the nag referring to out of date updates disappeared.

TrueCrypt – No longer safe?

Bad news.  A serious flaw in TrueCrypt has been found that potentially allows full system compromise.  The worse news?  There’s no truly trustworthy TC successor for Windows out there in the wilds so far.  Microsoft and Symantec both offer encryption solutions, but surely they’re rife with back doors.  VeraCrypt is a fork of TC, but so far there’s nothing to generate any confidence that it too isn’t compromised.

The good news, I suppose, is that so far it appears that TrueCrypt on Linux doesn’t have this newly found flaw.  Also, it seems this flaw requires the machine to be on and in Windows.  In other words, if your fully disk encrypted machine is powered down, or your drives are removed or are external and the machine isn’t with them, your data remains safe.  Cold comfort, really.

Ubuntu Linux The cache has no package named “wine1.7-i386”

That’s the error that seemingly randomly popped up on my screen.

The cache has no package named “wine1.7-i386”

I’m using Wine because there are some Windows specific things I need to be able to run.   It seems that the updater may just not like Wine too much, because when I manually ran updates with a simple sudo apt-get update it upgraded without a problem and the error disappeared.

Virtualbox and Ubuntu (MATE)

I might be bailing from Windows, but I still need it for work.  Luckily I’ve been using Virtualbox for my work machine (for a variety of reasons I won’t get into here).  However, I installed Vbox 5.02 on my Ubuntu MATE laptop, imported my virtual machine, and upon first run was greeted with:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

‘/etc/init.d/vboxdrv setup’

as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

I tried what the error said, but no dice.  It could not recompile the vboxdrv kernel module.  After a bit of searching around I found the following solution:

sudo apt-get install dkms build-essential linux-headers-generic; sudo /etc/init.d/vboxdrv setup

Removing AVG from Ubuntu

I’m using Ubuntu Mate 1.8.2 and for some unknown reason installed, or tried to install, the AVG deb package (avg2013flx).  Well, the install failed. I did some research to attempt to rectify this and instead came to the conclusion that I didn’t need AVG in the first place.  So I tried uninstalling it… and that failed:

Selection_001
Turns out part of the install failure involved the installers inability to fire up the AVG service, avgd.service, and that’s where the uninstaller was choking – trying to turn off that service that wasn’t on in the first place.  What a stupid ass uninstallation script.  Thankfully the fix was pretty easy:

  1. Open an elevated (sudo) text editor of your choosing and navigate to /var/lib/dpkg/info and open the file avg2013flx.prerm
  2.  Locate all instances of the following lines (my prerm had two sets) and comment them out by placing a pound sign (or a number sign or hashtag depending on your age, geographic location or level of nerdiness) at the beginning of each line.
    Selection_002
  3. Save the file, and then attempt to uninstall the app again:
    
    
    sudo apt-get remove --purge avg2013flx

If you were having the same problem I was, that should do the trick.