Category Archives: Tricks

Making Mint 18 Work For My Situation: Downgrading The Kernel

I truly love Mint 18 Beta, but as I mentioned in my last post, I’ve been having random freezes, 2 or 3 a day when doing general computer work, and 100% of the time if I try to Normalize audio in Audacity. These freezing problems were also occurring in Mint 17.3 after I let a kernel update proceed.

After much experimenting while running Mint 17.3, I found  the 3.16 kernel to be totally stable on my current platform.. Wanting to run Mint 18 Beta for its obvious software upgrades, I decided to attempt to downgrade the kernel.

Because the Update Manager does not offer a way to downgrade kernels using the GUI, I did it manually.

First was to find the kernel I wished to install. The kernel I wanted is in the Ubuntu Trusty kernel repository.

It is extremely important that you download the kernel image for your hardware architecture!

The kernel designed for my machine is the: linux-image-3.16.7-992-generic_3.16.7-992.201604152257_amd64.deb package

Once downloaded, you can simply double click on the package to open the package installer automatically, and once the installer reports that all dependencies are met, go ahead and install it.

Next, reboot your machine, and using the grub menu, select the kernel you wish to boot into. If you don’t see a grub menu at system startup, you can follow these instructions:

To show the grub menu at boot, you need to edit the GRUB config file, as I was booting quietly, not displaying the boot menu. To do that, simply drop to a terminal and edit it with your favorite text editor. I use medit

$ sudo medit /etc/default/grub

will open your text editor in super user mode.

Edit grub

Edit grub

Editing Grub

Editing Grub

You’ll see in the above example, I’ve commented out, using the # symbol, to have the boot process ignore the two commands at lines 7 and 8. Doing this, will now let me see the grub boot menu at startup. Save and close the file, and then, it’s very important that you tell grub that you’ve changed it. Do this by issuing the command:

$ sudo update-grub

Now it’s time to reboot. When you do, at the grub boot window, arrow down to Select previous Linux version, and select that.

 

Since downgrading my kernel, I have had zero, none, nada freezes on this machine. All the applications that are designed for Mint 18 work without issue, and I am one happy goat farmer!

Showing Mint 18 with older kernel

Showing Mint 18 with older kernel

When you’re done, go ahead and uninstall the kernels that were causing you problems.

As new versions of kernel version 4.2+ are released, I will of course give them a try as time allows.

Tweaking ownCloud – Improving External Website Access

In the older versions of ownCloud we’ve always run, our extra web pages were always just dumped into the ownCloud directory on our server. With ownCloud 9 however, a security feature will fuss at you if there is anything in that directory that ownCloud isn’t expecting! Not a huge problem, but worth fixing.

My normal server configuration had the main www directory as the ownCloud main directory. First thing to do, was go into my Apache Server configuration file and point the server root, to the right place.

Changing www root

Changing www root

You can see the highlighted portion of the Apache server configuration file: /etc/apache2/sites-available/000-default.conf above, where I have changed the server root from /var/www/owncloud to just /var/www

Next you make the same change to your default-ssl.conf file so your self signed ssl certificate is covering all of your web root, not just the ownCloud directory.

Next thing to do, was reconfigure the ownCloud clients running on our desktop computers and phones.

On the desktops, first, close any running instances of the program. Do this from the software, or kill the process from your task manager.

Then, just navigate to your  /home/username/.local/share/data/owncloud/owncloud.cfg file and change to the new ownCloud location as shown below:

ownCloud configuration file

ownCloud configuration file

After you update the file, all you need to do is restart ownCloud. It will ask you once again for your user password, and you’re done!

On the phones, just navigate to the ownCloud application, delete the current server, and add in the new one. Everything will sync back up happy as can be!

Once all of that was done, I could then add my new web pages, into separate folders like you would on any web server. In our case, the new folder, called manuals, is a large collection of all of the .pdf manuals for everything we own that requires one. From our tractor, to my metal bender and everything in between!

New web pages

New web pages

In the above screen shot, you will notice an index.html file. This is just a quick java redirect directly to the ownCloud directory, in case anyone just enters the IP address to the server, but forgets the fully qualified path to ownCloud.

Using the ownCloud external web page setting, we can now have quick and easy access to instruction manuals, from any computer or phone on the farm.

Manuals web page

Manuals web page

Now, no more errors in the ownCloud administrator console, and happy family who can find what they want, when they need it!

 

Breaking Things: A New Mint Install Problem

One of the trials of experimenting with Linux, is that every now and then, I really mess things up! This past weekend, I managed to  cause some bad sectors on my hard drive while playing with some software that ended up freezing up. The hard reset of the machine caused the damage.

Fine, I’ll reinstall Mint 17 which won’t take long, and I do a complete backup to my ownCloud server automatically so nothing lost but a little time.

Once everything was restored to my liking though, I found a weird problem. My system was slow and sluggish, often freezing up for long periods of time. Opening the System Monitor found the problem quickly though. The program mate-settings-daimon was eating 100% of the CPU cycles on all 4 CPUs in my machine!

Some digging around found that it was a known bug that was supposed to be fixed, but I was sure having problems!

Digging through the Linux forums found it to be a common problem, even with Mint 17.1. The most common cause turned out to be the keyboard NUM lock, causing the extra compute cycles. Supposedly, going into settings and turning off NUM lock was supposed to fix the problem. Nope, that didn’t help.

What finally ended up being the problem for me, and perhaps for you, was that when my system installed, it set an important permission incorrectly.

In the /run/user/1000/dconf/ directory the file called use  was showing it was owned by root  but since I’m user 1000, it should have been owned by me!  As I watched the file, you could see it refreshing itself, dozens of times a second, eating all your CPU time Checking the logs, proved the permissions to be the problem as over and over, a Permission Denied message would display for that file..

Opening a terminal window in superuser mode lets us change the permissions. Use sudo caja   then right click on the file user and select Properties. Make yourself the owner of the file with full permissions and then close caja and reboot your computer.

Screenshot-dconf

Screenshot-dconf

My CPU time from mate-settings-daemon went from 99% to 0% as it should have. Now it only shows usage when it’s supposed to!

 

Tweaking ownCloud’s Calendar

New goats are settling in, so let’s get back to some Linux fun!

We love ownCloud here on the farm, and have written several blog entries about it. One thing about this wonderful software that has always made me crazy, was that the calendar application used a colour to highlight the current day, that we just couldn’t see!

ownCloud Calendar

ownCloud Calendar

When my FLux software would cut in, the barely visible colour would not be visible.

Of course like any software, you can tweak it to your liking in just a few steps!

First open your file browser as an administrator and head to your /var/www/owncloud/apps/calendar/js directory and then open the Calendar.js file with your favorite text editor.

Caja as Superuser

Caja as Superuser

Then do a quick search for the current colour, in this case #FFC and change it to whatever you like! In the example below, I changed it to #f4e71d

Revised background colour

Revised background colour

Of course, it’s possible that if ownCloud does an update of that file, you will lose your fix, but it’s simple to change again!

I should note that really, the proper place to fix this problem is in the themes, changing the colour in the style sheet. I’d done that without success, which is why I went ahead and changed it in the javascript file instead…

 

Hints: Clean Up Old Config Files

Regardless of how you install and uninstall software on your Linux computer, there is a tendency for a software packages configuration files to still linger on your computer. It doesn’t hurt anything of course, but it does take up valuable hard drive space.

So how do I fix that? Easy! Periodically open your Package Manager, Select the Status button on the left hand side and select, Not Installed (residual config) as shown here:

Package Manager, showing residual configuration files

Package Manager, showing residual configuration files

Next, select all of the software in the right-hand pane using [CTL]+A

Select all files

Select all files

then Right clicking on your mouse and selecting Mark For Complete Removal

Mark for complete removal

Mark for complete removal

This will bring up the final dialog, so you can review what is going to be removed.

Files to be removed

Files to be removed

Once you’re sure, click the Apply button. It won’t take too long, no software is actually being deleted, just the configuration files left over from when you uninstalled the software originally.

Just make sure you no longer plan on reinstalling the software at a later time, otherwise you will need to reconfigure it again.

It’s a simple way to help keep your hard drive clean and tidy!