Category: Operating Systems

Linux Mint, Cinnamon and Banshee: Disable Song Change Notifications

I’m really impressed with Cinnamon in the more recent release of Linux Mint. However, I hate that simply pressing for the next song to play in my Banshee library causes a notification to pop up on my Notifications panel in Cinnamon. If you sit there and let the application play through a whole list of songs, you’ll easily look down and find dozens of notifications – which I consider totally pointless and without any benefit. If you disagree, feel free to keep getting your notifications.

Fortunately, you can simply disable a small extension in Banshee to cease getting the notifications.

  • Click Edit in the top menu and go to Preferences.
  • Click on the Extensions tab.
  • Scroll down until you see the Utilities category and search for Notification Area Icon. Note: all extensions and categories are alphabetically ordered, and it should be the second from last extension in the entire window if you have not installed any additional extensions in Banshee (feel free to scroll all the way down for quick find).
  • Uncheck the box next to this extension and you’ll get no more notifications in Cinnamon from Banshee.

It’s that simple. It would be more intuitive to have the option accessible from the notifications area in Cinnamon itself, but at least there is a way to disable it. Otherwise, I might have found myself switching to a new music application. I have not used Banshee in MATE, but I would assume disabling the notifications would be similar if it produces notifications in that desktop environment as well.

I do like the task bar icon and pop-up with information and control interface in Cinnamon for Banshee. It looks sleek and provides all the essential commands to the play er without having to open it in a full window. Even though I was used to Rhythmbox and did like its integration into Ubuntu’s task bar, I think I actually like the Cinnamon/Banshee integration slightly better. The down side for me, unless I’m missing the ability to change this, is that I can’t close Banshee to just the icon on the task bar but just minimize to get rid of it – moving to a different workspace being the only apparent option to free up the place on the task bar altogether. Unsure why they haven’t made the ability to close the window to the task bar only, or if its a limitation in Banshee or Cinnamon itself, but hopefully they’ll add this option at some point. Or hopefully I’ll learn how to use it if I’m missing it somewhere.

Properly Cleaning Up /boot Partition

This is a follow-up post to a post I made earlier today: Cleaning Up /boot Partition.

I won’t say that the steps in that post aren’t going to help clear up space, but it certainly didn’t do the trick for me. I still had a piled up /boot partition loaded with the kernel images. I can’t explain why, but completely removing them via Synaptic apparently didn’t completely remove them. So, it appears this method is more effective.

Search for installed packages named linux-image* to see the kernels on the machine:

dpkg -l linux-image*

Like before, you can find the current kernel using this command:

uname -r

I recommend keeping the current and its previous kernel, but that choice is yours. Either way, you do not want to remove the current kernel! Using the same example from the previous post, I’ll change the step to remove the same kernel images but using this method.

sudo apt-get remove linux-image-{34,35,36,37,39,40,43,44}-generic

Then, remove dependencies.

sudo apt-get autoremove

 

Cleaning Up /boot Partition

It’s very easy to lose track of how many times the Linux kernel is updated on your system, and, depending on the amount of space allotted to the /boot partition, you’re likely to come across an error stating that there isn’t enough space to provide updates at some point. You may be confused if you see this message, especially since it isn’t always clear where the lack of space is in the message – and you’ll easily tell yourself that there’s no way your root partition doesn’t have the 100MB of space to perform the update. Instead, it’s the boot partition that is lacking the available space.

Why? Because every time the Linux kernel is updated, the previous kernel is kept on the system as well. You might think it pointless, but it’s actually rather nice – especially if a kernel update creates an issue with something you have installed on the system. You can easily boot into a previous kernel in that situation. The problem is that there is no limit to how many kernels are stored, and so after about ten kernel updates, you’re likely going to be out of space – especially with the default 500MB partition allotment that Ubuntu and its derivatives tend to stick with.

The easiest way, in my opinion, to remove these unnecessary kernel images off of the boot partition to provide space for future updates is using Synaptic Package Manger. Some explanations state using the command line to remove the packages, but the UI of Synaptic works great for this.

The first thing I’d advise to do is look at the images stored on the boot partition. You can do that by entering this into your console:

ls /boot/

You’ll see a lot of different files listed, but the most important part of each filename is the version number. Despite the variances in the list of files (abi, config, System, etc.), they should all share the same version numbers in that part of their filenames. The thing I recommend doing is removing all but the last two, which should be the current kernel and the previous one before it. You can check which kernel the system is running with this command:

uname -r

In my situation, I had the following kernels residing on my system:

3.13.0-34-generic
3.13.0-35-generic
3.13.0-36-generic
3.13.0-37-generic
3.13.0-39-generic
3.13.0-40-generic
3.13.0-43-generic
3.13.0-44-generic
3.13.0-45-generic
3.13.0-46-generic

So, I’m removing kernels 3.13.0-34 through 3.13.0-44. After opening Synaptic Package Manager, first click on Installed in the left-hand column to filter out all uninstalled packages. Then, search for the first part of the version numbers for the kernels. eg.: 3.13.

Select each package title linux-headers-x.xx that fits within the kernel versions we’re removing, and after you’ve highlighted all of them click the green box next to it and select Mark for Complete Removal. You’ll notice that all of the linux-image-x.xx packages have also turned red and are selected for removal. Simply hit Apply at the top and confirm with the popup for the packages to be removed and Synaptic will do the rest. It should take only a few seconds, but less than a minute in any case.

While you’re in Synaptic, you can also remove any residual configurations by selecting Not installed (residual config) in the left-pane and removing any packages listed there as well. This will clear up any configurations left by packages that have been removed from the system – freeing up wasted space.

ReadyShare USB Storage via NETGEAR Router in Ubuntu

Okay. Maybe I’m missing something here, but I was confused about how to access an external USB drive that I decided to connect to my NETGEAR router and use as for shared network storage in my house. All searched online led to explanations of using fstab to mount the drive and map it to a location such as /media/network, which I instantly thought seemed like too much work for the simple ability of accessing a USB drive connected through the router. After all, finding such a drive is as easy as viewing Network locations in Windows, and I refused to believe that it could be any harder in Linux.

Apparently, I was right. I would have manually entered the location that I expected the drive to be in the file manager, but I don’t have an address bar that I can manually enter locations into (or I haven’t configured Nautilus to show on if it’s capable of doing so). But, as soon as I opened Nautilus and looked in the left-pane displaying locations such as Locations, Devices, Bookmarks and Network, I saw a hint as to what I was looking for: Browse Network.

As soon as I select Browse Network, I see exactly what I’m looking for. Two options, among several others, listed as READYSHARE and readyshare(for Time Machine). Both lead to the same place, a location listing USB_Storage, which was exactly what I needed. Clicking on USB_Storage reveals the contents of my USB drive that I have connected to the router’s USB port. Just to be sure I could, I created a new text file on the drive and saved a small string of text into it to make sure I would be able to alter the drive in some way from my Ubuntu PC. Everything worked as expected.

So, I really don’t know the benefit of following other explanations of accessing and manipulating storage devices in Ubuntu that are connected to NETGEAR’s ReadyShare port, but this way worked fine for me.

Install Oracle Java 8 in Ubuntu with Updates via PPA

Thanks to WebUpd8, you can install the most up-to-date JDK and JRE directly from Oracle, as opposed to using OpenJDK which is the default in the Ubuntu repositories. As far as I know, this should work for any *buntu OSes, including Linux Mint and elementaryOS. They should also get updates automatically via the Update Manager while they are within the support window for the OS version you’re using.

I know this isn’t exactly news, and WebUpd8 posted this information over two years ago now, but I was shocked to find out about it myself just recently, and figured I’d just go ahead and post it on my blog for anyone else who happens across it without knowing as well.

Here are the steps, all together, for adding the PPA and installing Java 8 (currently update 40). I also included an additional step to remove all remnants of the OpenJDK package. I’m uncertain if the presence of OpenJDK would cause any problems, but I figured its not needed and so worth it to clear up an easy ~50-100MB of space anyway.

sudo apt-get purge openjdk*
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

The PPA is hosted at this location on Launchpad. As you will see if you visit the page, WebUpd8 doesn’t actually maintain any Java binary packages for on the PPA. Instead, it simply hosts the installers that pull the packages from Oracle’s own servers. An alternative might be to manually download and install the software from Oracle, but you would have to manually update it every time Oracle pushes out a new version. With this PPA, you will get updates for it automatically through the Update Manager for as long as your OS is within its support window.

If you prefer to use version 7 instead, you can issue the following commands to install the JDK and JRE packages installer for version and alternate the versions used.

sudo apt-get install oracle-java7-installer
sudo update-java-alternatives -s java-7-oracle

Then just use the following command to return to version 8, if you decide to.

sudo update-java-alternatives -s java-8-oracle

Nexus 7 (2012): Revert to Previous Firmware using Ubuntu 14.04

First of all, this is for the 2012 version of the Nexus 7 Wi-Fi. Though the steps for doing this on other Nexus devices may be similar enough to make following this post safe, I would still try to find some verification of that before doing it. Second, this will wipe the tablet of all data, applications and settings. With the exception of items that can be recovered via Google’s account backup service, you will lose everything on the tablet. I recommend using the USB link to back up any data you wish to keep before continuing.

I decided to post this after doing some research and reverting my Nexus 7 tablet – which had recently been updated to Android 5.1 – back to Android 4.1.2. If you’re wondering why I’d want to revert back, it’s safe to say you haven’t ran Lollipop on the 2012 Nexus 7. In fact, I haven’t ran it either, because crawled it would be a more fitting description. I suppose it’s to be expected that an OS three years newer than the hardware it’s installed on might make that hardware run sluggish, but I think it should be unjustified for a company with Google’s technical foundation to even release such an update for the device if it is going to be incapable of running in a state that provides any kind of real experience. A lot of us are used to being a step or two behind when it comes to Android updates anyway, especially with the pace that most phone manufacturers push out their updates.

To get back on subject, the process of reverting the Nexus back to an older version was actually quite easy. Though all of the tutorials and examples online referred to doing it from Windows – with occasional references to Mac in the form of “oh, just change this command to be like this,” nothing referred to using Linux. In fact, I couldn’t even find a location to download fastboot for Linux. Luckily, I didn’t need to. Apparently, Ubuntu has both fastboot and adb compiled in the repositories – at least for Ubuntu 14.04 – and supposedly from version 12.10 on. I believe there’s a PPA you can add to grab it if you’re using 12.04 or earlier, but I can’t speak to that from experience.

As far as the process of reverting the tablet to a former version goes, you can start with grabbing the image of whichever version you’re looking to revert to from Google’s page for factory Nexus images. Based on what I’ve seen since reverting back, OTA updates seem to be in succession, so you’ll be updating to the next immediate version (eg: from 4.1.2 to 4.2.2), in case you are afraid that you will have to re-image the tablet to go from one older version to a newer version that isn’t 5.1 Lollipop. You also want to make sure you have fastboot installed on your computer from the Ubuntu Software Center.

Make sure the tablet has USB debugging enabled. In newer versions of Android, you have to reveal the location, which is hidden by default, in Settings by first going to Settings -> About tablet and tapping several times on the Build number field. You’ll see a small message pop up saying that you’re on your way to becoming a developer. After a few more presses, there will be a new settings location under the System category titled Developer options, which holds the setting for enabling USB debugging. Make sure it’s enabled.

Next, power the tablet off, and then restart it by holding down all three physical buttons simultaneously (Power + Volume Up + Volume Down) until you see the Google splash screen and the Android bootloader screen. Lastly, make sure the tablet is plugged into the computer’s USB port using the charge cable. At this point, you’re done with the tablet itself and can set it aside (somewhere it won’t get knocked around!).

Now navigate to the tgz file for the factory image you downloaded. First, extract the archive. Then, open a terminal and navigate to the directory where the tgz and extracted folder are located. In my case, it was my Downloads folder, which can be easily accessed by:

cd ~/Downloads

Next, check the hash value of the archive and make sure it matches the one listed on Google’s page for the factory image you downloaded. In my case, I used 4.1.2. If using a different Android version, or the 3G tablet (which is codenamed nakasig instead of nakasi), you will obviously have a different filename.

jerry@Ubuntu:~$ md5sum nakasi-jzo54k-factory-973f190e.tgz
d906b505ccae0d439839d3c5fafb137a  nakasi-jzo54k-factory-973f190e.tgz

If the hash value matches, we’re good. If not, you need to re-download the file and check again. Assuming the hash was good, navigate to the folder that was extracted.

cd nakasi-jzo54k

Now we need to verify that fastboot recognizes the tablet is connected to the computer. If you just type fastboot into the terminal, it will return some information for what commands and options can be pushed to it. The command we need is devices.

fastboot devices

If the terminal line breaks directly back to prompt without listing any devices, it means the computer is not able to communicate with the tablet. You may need to restart the tablet, or you may not have enabled USB debugging. Otherwise, you’ll see a serial number beside the word fastboot.

Assuming your device was recognized, it’s now time to unlock the bootloader (which will wipe the tablet – make sure you backed up any important data beforehand) and flash the image.

fastboot oem unlock

At this point, the tablet will display a screen warning about unlocking the bootloader (guess I was wrong about being done with the tablet). Make sure Yes is selected and hit the power button. Once it returns to the bootloader screen, proceed with flashing the image to the tablet.

At this point, a lot of tutorials state to enter each fastboot command manually. If you look at flash-all.sh in a text editor, you’ll see that the shell script enters the exact same commands, but saves you the work of doing it. I decided to use the shell script.

./flash-all.sh

At this point, you’ll see fastboot spitting some information and time lapses into the terminal. You want to leave it alone until it finishes. You’ll know when it’s done, because it will end with the following lines:

rebooting...

finished. total time: 105.989s

The value for total time will vary, but it typically shouldn’t take more than 2-3 minutes. Still, I would wait for 30 minutes if it seemed to take that long, because I would assume that trying to interrupt the process could cause problems for the tablet.

After the process has finished, the tablet will automatically restart and boot into the reverted Android version. It will prompt you with a screen similar to the one it did when you bought the tablet and turned it on for the first time. At this point, I would follow the prompts and any steps it has you do to initialize the tablet. But once you’re at the home screen, you will want to go to Settings -> Developer options, turn the slider from OFF to ON and then check to enable USB debugging. Now turn the tablet back off and reboot into the bootloader.

Once you’re into the bootloader and verified with fastboot that the tablet is recognized, re-apply the bootloader lock to re-secure the tablet and help protect your data.

fastboot oem lock

The main reason for doing this is to protect the data on your tablet, in case it is ever lost or stolen. If the bootloader is locked, fastboot and adb cannot be used to access or manipulate data on the tablet – and unlocking it again will wipe the data again. If it is left unlocked, this safeguard will not be in place.

Xfce: Gnome System Monitor

If you’re like me and you’ve mostly been experienced with using the Gnome System Monitor to look at the status of your machine and running applications, you’ll find it missing if you decide to change over to a different desktop environment such as Xfce.

I just recently installed the Xfce version of Linux Mint on one of my PCs, and the first thing I always do is set CTRL+Alt+Delete to open System Monitor. Searching for System Monitor in the menu gave no results, so I searched online for xfce system monitor. The only pertinent result that I found was of someone explaining to install Gnome System Monitor in Xubuntu using CLI. I’m assuming Xubuntu’s repositories have Gnome System Monitor in them to give you a result when searching in the Software Center, so you can install it just as easily through the software application with a UI rather than worrying with CLI, but I personally only installed it from the Software Manager in Linux Mint. I also wanted to know if there was any default application for monitoring running processes, and luckily the same post mentioned Xfce Task Manager.

As the post suggested, Gnome System Monitor is a more appealing application than Xfce Task Manager, but I actually like the simplicity of Xfce Task Manager as well. I also like the fact that it shows you the load on the CPU and memory above the list of running processes, rather than requiring you to switch between tabs to view the two separately as in Gnome System Monitor. Either way, I still installed Gnome System Monitor, but I decided to map keyboard shortcuts to both.

You can map keyboard shortcuts in Xfce by opening All Settings from the corner shortcut icon of the main menu and scrolling down to Keyboard under the Hardware category. It’s pretty straightforward. You’ll a tab titled Application Shortcuts. Just click the Add button at the bottom of the pane listing current shorcuts.

I personally chose to make Xfce Task Manager the common CTRL+Alt+Delete shortcut, and then made Gnome System Monitor CTRL+Shift+Alt+Delete. The commands for running the two applications are xfce4-taskmanager and gnome-system-monitor. You’ll be prompted that CTRL+Alt+Delete is already set for the command to lock the screen. Just click the button that says to map it to whichever monitoring application you want it to run, if you don’t want to use a different shortcut altogether.

Another plus I’ll give to Xfce Task Manager is that it defaults to create a minimized icon on the panel next to the clock that you can click on to relaunch the application in a window or hover over to view current loads on the CPU and memory. This can be disabled in the Preference settings of the application, and if you run it using the keyboard shortcut again while it is already minimized in the panel, it will actually launch a second instance (including an additional minimized icon in the panel). Not a huge deal, but a slight annoyance.

Installing Linux via Bootable USB

Most of my Linux experience has been with Ubuntu. If not Ubuntu, then a relative flavor with Linux Mint and some slight tinkering with elementaryOS. The great thing about these three is that you can easily create a bootable media for either running a live desktop to test or to install thanks to the Startup Disk Creator application that ships with Ubuntu and Linux Mint both (and likely eOS also, but I didn’t check).

If you want to create a bootable media for another distribution, you’re out of luck with Startup Disk Creator. Even Debian distributions, which Ubuntu is derived from and actually show up in the pane listing ISO source images to use in Startup Disk Creator, won’t complete write to the USB drive without spitting out an error right before it would normally queue for password to write the boot record onto the media.

You’ll get a few different opinions on how to create a bootable media when searching online, some of which suggest installing and using additional packages such as UNetBootin or USB Creator. If you’re not comfortable with using terminal, or aren’t familiar enough with mounted drives and devices to make sure you don’t commit an act that will cause you to potentially lose vital data on your computer, then perhaps those are the better options.

For me, I hate installing any applications or packages that I don’t need. Since Ubuntu, and I wager most Linux distributions, ship with dd I prefer to use that. What’s better is its use is fairly straight-forward on top of it. You can get a few ideas of what dd can be used for by viewing its Wikipedia page. It appears to be a relatively easy option for backing up sensitive data, such as the MBR on a drive.

But anyway. If you’re looking to create a bootable media for a non-buntu distro, you can do so with dd with the following command:

sudo dd if=image.is of=/dev/sd?

If you read up on dd at the Wikipedia page, you’d have seen that there is also an argument you can pass: bs. By default, bs, which defines the block size for reading and writing in dd, is 512 bytes. Some suggestions that I’ve seen online recommend defining the block size to be larger. Larger block size would lean one to believe means less cycles when writing. So, you may want to bump that up to something larger, though staying within appropriate boundaries. Examples online of using dd to create writable USB drives often include a block size of 1MB. So, you could include that in the command:

sudo dd if=media.is of=/dev/sd? bs=1M

You must also make sure the media you’re writing to isn’t mounted before using dd to write to it:

sudo umount /dev/sd?

So, for example, if you’re USB drive was mounted as device sdc and your Linux distro image was named Linux-LiveUSB.iso (and we’re assuming you’ve navigated terminal to be in the same directory as the ISO image to avoid needing to include the path), you would issue the following to write it to the USB drive:

sudo umount /dev/sdc
sudo dd if=Linux-LiveUSB.iso of=/dev/sdc bs=1M

A brief summary of the commands are

  • if: Input File. This is the location and file that is being read from.
  • of: Output File. This is the location and/or file that is being written to.
  • bs: Block Size. This is the size, in bytes, that each data block is being read and written at. The default is 512, so leaving this undefined will have dd read and write data blocks at 512 bytes.

Lastly, I would say to only use this method if you need to create a bootable USB drive, and there are no other pre-installed software to get the job done. For example, why use this over Startup Disk Creator if you’re in a *buntu OS and need to create a bootable *buntu USB drive? There is no reason to. If you’re writing to a CD/DVD, then I would think the included disk burning software on your system would work just fine. If not, then dd should work fine for that as well. Just use the device name of the disk burner when designating the output file in the command. If the idea of manipulating data via terminal scares you, then I’d say better safe than sorry, and just look around for a fitting application with an easy UI.

BIND Authoritative-Only DNS Server on Ubuntu Server 14.04 or Debian 7

This post will explain how to get a DNS server setup going on Ubuntu Server 14.04 or Debian 7 using BIND. The arrangement assumes the following:

  • You’re using a master/slave configuration.
  • Your server host provides the rDNS for you. Most VPS hosting services handle the rDNS, so you’re not required to configure it on your own DNS server.
  • Your hostnames for the servers have been configured as fully qualified domain names.

For the example, the master server will be located at ns1.mydomain.com with an IP address of 10.0.0.1 and the slave server will be located at ns2.mydomain.com with an IP address of 10.0.0.2. Our test domain that is being handled by the DNS servers will be testdomain.com and will be configured to point to the same IP address as the master DNS, which is where we would assume the web server servicing the domain will be located.

For the commands shown in the explanations, it’s assumed that you’re logged in or acting as the root user. If not, you need to precede the commands with sudo, this includes when opening configuration files for editing. You’ll get a permissions error when you try to save the file if you don’t.

Installation

Start by installing BIND on both servers:

apt-get update
apt-get install bind9 bind9utils bind9-doc

If you’re notified that the file /etc/init.d/bind9 already exists on the server, and asked what you would like to do about it, respond with Y or I to install the version that is included with the package.

Configuration

Once the installation is complete, you already have a DNS server running on your Ubuntu installation. We only have to make some configuration changes to ensure master and slave servers are communicating with each other and that the master has been configured with the zone information for the domains being serviced by the DNS servers.

First, open /etc/bind/named.conf.options for editing. You should have something like the following:

options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

        // forwarders {
        //      0.0.0.0;
        // };

        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //========================================================================
        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

We need to add the following two lines anywhere within the brackets defining the options block:

recursion no;
allow-transfer { none; };

Example with added lines:

options {
        directory "/var/cache/bind";

        recursion no;
        allow-transfer { none; };

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

        // forwarders {
        //      0.0.0.0;
        // };

        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //========================================================================
        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

Save the changes and close the file.

Next, we need to configure the local file to point to the zone files for the domains that will be serviced by the DNS servers. Assuming that we’re servicing a domain called testdomain.com, open /etc/bind/named.conf.local and add the following – as designated for master and slave configurations:

Master

zone "testdomain.com" {
        type master; also-notify { 10.0.0.2; };
        file "/etc/bind/zones/db.testdomain.com";
};

Slave

zone "testdomain.com" {
        type slave; masters { 10.0.0.1; };
        file "/etc/bind/zones/db.testdomain.com";
};

Since the zone block within the local file is pointing to a sub-directory within BIND’s primary directory to house the zone files, we need to create the zones directory and change its owner to the bind user. This needs to be done for both the master and slave servers:

mkdir /etc/bind/zones
chown bind: /etc/bind/zones

Now, you can create the zone file for the domain. For the example, we called the file db.testdomain.com, and configured BIND to look for the file in the /etc/bind/zones directory.

An example of our zone file would look like:

$ORIGIN testdomain.com.
$TTL 1800
@       IN      SOA     ns1.mydomain.com.       admin.testdomain.com. (
                        2015010101              ; serial number
                        3600                    ; refresh
                        900                     ; retry
                        1209600                 ; expire
                        1800                    ; ttl
                        )
; Name servers
                    IN      NS      ns1.mydomain.com.	; master DNS
                    IN      NS      ns2.mydomain.com.	; slave DNS

; A records for name servers
ns1                 IN      A       10.0.0.1		; master DNS IP
ns2                 IN      A       10.0.0.2		; slave DNS IP

; Additional A records
@                   IN      A       10.0.0.1		; www IP

; CNAME records
www                 IN      CNAME   testdomain.com.	; www IP

The settings above are fairly straightforward for configuring a zone with NS records and records to point to a web server for serving pages. Just be aware that the value for serial needs to be changed every time the zone file is updated, otherwise the DNS server will not update other servers. For the appended www, you could include an A record that points to the web server’s IP address, just like the origin does, but I believe it is more appropriate to point it to the origin with a CNAME record, as I updated this example to do. Feel free to correct me if you know better.

Check Configurations

At this point, all configuration is done. You simply need to check the configuration and zone files for errors, and then restart the servers.

You can check the local configuration by issuing:

named-checkconf /etc/bind/named.conf.local

If it returns nothing (line-breaks directly back to the command prompt), then everything checked good.

You can then check the zone configuration with (on the master server):

named-checkzone testdomain.com /etc/bind/zones/db.testdomain.com

If all checked well, it should return something like:

zone testdomain.com/IN: loaded serial 2015010101
OK

Now, simply restart the two servers.

service bind9 restart

After waiting for the configurations to propogate (varies in time – could be over 24 hours), you can pull up a prompt on your local linux machine and issue the following to see if the DNS has updated the domain to point to your master DNS server’s IP address:

nslookup testdomain.com

A successful setup should return something similar to:

Non-authoritative answer:
Name:	testdomain.com
Address: 10.0.0.1

An unsuccessful setup would return something more like this:

** server can't find testdomain.com: SERVFAIL

If you get an error, it could be that you didn’t give the servers enough time to update the information for the domains. Either way, you can view the system log on the servers to see if there are any errors:

tail -f /var/log/syslog

Look for the following to indicate successful zone information loading and communication between master and slave servers:

named[4215]: zone testdomain.com/IN: loaded serial 2015010101
named[4215]: zone testdomain.com/IN: sending notifies (serial 2015010101)

Anything else, pertaining specifically to the domain you configured, might indicate there is a problem with either the zone file or that the master and slave are not communicating. Ensure your firewall is allowing traffic on port 53.

Linux Mint with MATE and Cinnamon

Linux Mint ships with several options for desktop environments, but the two most advertised are MATE and Cinnamon – with Cinnamon being its primary candidate.

When you install Mint, you typically have to decide which desktop you want, because each has its own installation package. What you may not know, however, is that you can actually install one version of Mint and still have both options for your desktop environment. The best part is that you don’t even have to get your hands dirty with the command line interface to do it.

Here are the steps:

  1. After you have installed Mint, login and open the Software Manager. It is usually to the left in the Menu for both MATE and Cinnamon.
  2. If you have MATE version installed, search for Cinnamon. If you have Cinnamon, search for MATE.
  3. If you’re looking to add the Cinnamon desktop onto a MATE installation, you need to look for cinnamon and mint-meta-cinnamon packages in the top results, and install those two. For installing MATE within a Cinnamon installation, it’s the opposite: mate and mint-meta-mate. These two packages will install the desktop environments and the key packages that they need. A lot of the other results you see in your search will actually be included with the installation of those two.
  4. After the installation has completed, log out of your session and click the icon at the top-right of the sign in box on the login screen and you can now select between the two different desktop environments for your session.