Tuesday, February 23, 2016

Compiz. Give your linux box a fruity experience.

So what's the point?

  1. Add cool visual effects to your operating system. If your thinking, what's the point, it's just pretty eye candy and nothing of benefit... lets not forget that often without compiz effects there is still an effect going on with the default Window manager. It's all about publishing an operating system that users can use out of the box with a minimum spec computer. Adding eye candy at the expense of making an operating system un-usable because of an under-powered computer?... well, what's the point in that?
Enabling
These days, Linux Mint Mate comes with compiz installed right out of the box. No need to muck around installing.
To enable on Linux Mint Mate...

  1. Go to your [Control Center]
  2. look for [Desktop Settings]
  3. Choose [Windows] at the left menu
  4. At the right look for [Window Manager]. Under that heading change the drop-down-menu to show [Compiz]
Add more workspaces (sides to the cube)
Look for the [General] option in the side-menu.
Now choose [General Options]
Now choose the [Desktop Size] tab and set as desired.
If you have the cube effect enabled, this will effect the number of sides to the so-called-cube

Give the workspace a custom name
Look for [Window Management] in side-menu.
Choose [Workspace Naming]
Edit as desired

Prevent dragging Windows from one work-space to another when cube rotation is enabled.
Go to your Compiz Config Manager and search for "Rotate Cube" settings. Turn off "Edge Flip Move"


To be continued...

Ripping your own DVD's

So what's the point?


  1. Rip a physical DVD to create a single playable file. 
  2. File can then be placed onto a device that does not actually have a DVD drive.  iphone, adnroid, tablet, Smart TV etc etc
  3. Install the single file onto a DLNA server so that it can be streamed all around your home to multiple devices. Smart TV's, smart phones etc etc..
  4. Install the single file onto a DLNA server to avoid replicating the file onto several devices in your home and therefore avoid hogging up valuable disk space on multiple devices.
  5. Essentially backup your physical DVD
  6. Regain shelf space of physical DVD's and chuck them in a box and push them away in the garage or under the bed etc... :)


I have settled on Handbrake from https://handbrake.fr/ It is available for most operating systems. After trying a few around, I found this to be simple to configure!

If you're ripping the file for the purpose of playing on a Samsung Smart TV like I am...  you see the field where it's showing seconds??? Make sure you select "seconds" in the drop-down. If you don't you may find that the fast-forward and rewind features on your TV will not work! 

For the record, I'm going with *.mkv files..

Hickup.. Just discovered the windows version is not scanning one of my DVD's and so I can rip it with the Windows version.

Lucky I also run Linux which works a charm!



Later I will log how I improved audio quality as I'm noticing 5.1 Surround does not seem evident.
Still pretty sweet!

To be continued...

Windows 10 running in Virtualbox (graphics driver issues)

The following will probably apply to most other versions of MS Windows

So what's the point?


  1. Stop graphics driver failing on Windows 10 in a vitualbox machine
  2. Can enable both 2D and 3D acceleration in the virtualbox setup
  3. Stop the annoyance of the frame that Windows is in from shrinking due to driver fault.
  4. Make Windows 10 in virtualbox bearable and usable.


Graphics driver:
As I write this, the graphics driver being used in Windows 10 is showing as a  guest additions graphics driver for  windows 8. I expect this will be updated in time. Don't worry about this too much.

2D & 3D Acceleration:
In my experience, if I did not do the following, my driver would randomly fault due to errors being reported. In Device Manager I'd get the dreaded exclamation mark beside the driver being used AND the size of the frame that Windows 10 is shown in would shrink. Before a fault would occur I was not even able to enable 3D acceleration (in virtualbox)  without making Windows 10 unusable.

The solution that worked for me:

  • Ensure you have guest additions installed.
  • I suggest that you first disable the 2D & 3D options in the Virtualbox set up. Then launch the virtual machine of Windows 10 and un-install the graphics driver. Then shut-down Windows.
  • Then in your Virtualbox settings, re-enable 2D & 3D Then restart windows 10. Hopefully Windows 10 will now install the correct drivers AND the 2D & 3D settings will be retained. More importantly your guest OS will actually be usable. The driver indicated after driver installation will resemble the same old Windows 8. Don't worry... seems to fix it for me!
I have since discovered that I'm actually getting better performance with 3D disabled so I have disabled that. Driver stability is still fine which is the important thing!



to be continued...

Wednesday, February 17, 2016

Installing Serviio DLNA Media streaming onto a Linux box.

Check what you are installing at the Serviio site. Typically you will be installing an evaluated pro version that will automatically fall back to the free version after a certain period. I have found that in my case the free version is quite satisfactory for my needs.

So what's the point??? 


  • Helps greatly to avoid wasting valuable storage space being replicated on many devices and all over the place in your home. 
  • Media files such as video, music, pictures etc will all be available to be played directly from the server from multiple devices and initiated independent of other individuals accessing the content.
  • Move all your physical media such as DVD's CD's etc to a single drive and regain shelf space.
  • Still play your content without physically wearing out your physical devices. A simple scratch can easily render a DVD useless!
  • Backup physical media types. DVD's CD's etc
  • etc..

One of the reasons I choose Serviio is that it's able to transcode video formats on the fly to devices that can't ordinarily play them by default but in particular for me video files of type *.MTS.

I'm running Linux Mint Mate. Will probably work on many other distributions.

First thing I notice on the Serviio website is that it states that linux users will need to install Java 8. It's probably safe to say to just go get the latest Java version. By the time you read this the java version may well have progressed!

Since I have coded in Java several times before and needed Java, I'm going to go with a method I've used many times before regarding installing Java.

Often Linux comes bundled with OpenJdk. We're going to remove this and install the official release from Oracle.

Install Java first
NOTE: These steps are pasted from my own personal logs for Java 7update7. Change accordingly to satisfy Serviio installation. I'm going with the latest Java version. At time of writing I'm downloading jdk-8u73-linux-x64.tar.gz. You probably want the 32bit version if your OS is a 32bit installation.

For Serviio, the following probably sets you up for more than you actually need. If your using Java for other purposes especially building your own software for Android, Desktop etc etc then I'd just go with everything... At least you wont have a half-baked installation!

Get a terminal

Check your java version with
java -version

If your java version is OpenJDK then you need to remove it.
Remove OpenJDK with the following...
sudo apt-get purge openjdk-\*


Now if you check the version you're probably going to get an error. All good since it indicates that OpenJDK is now removed.

Download the latest jdk. In this example I downloaded jdk 7 update 17. Just save it any where at this point.
Now we create a folder to hold our new jdk with
sudo mkdir -p /usr/local/java

Extract your jdk by going to the downloaded file where you saved it, double clicking it and then extracting it with the GUI tool.
A folder with the extracted jdk will be created.
Move this folder to the folder you made earlier. Example, move it to /usr/local/java

You'll probably need admin privileges to move to this location.
Using the command line tool, cd to the folder /usr/local/java and do a listing with
ls -a
You should see the jdk folder listed.

Now edit your system path file with (you might get errors related to recently used data, just ignore that part). Use the GUI tools instead if you like as you might find that gedit is not installed.
sudo gedit /etc/profile
REMEMBER! CHANGE WHAT YOU NEED IN THE FOLLOWING STEPS TO ACCOMMODATE THE JAVA VERSION YOU DOWNLOADED!

Put the following at the end of this file and save it then close it. 
JAVA_HOME=/usr/local/java/jdk1.7.0_17
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH

Inform your Ubuntu Linux system where your Oracle Java JDK/JRE is located. This will tell the system that the new Oracle Java version is available for use.
This command notifies the system that Oracle Java JRE is available for use
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_17/bin/java" 1

This command notifies the system that Oracle Java JDK compiler is available for use
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.7.0_17/bin/javac" 1

This command notifies the system that Oracle Java Web start is available for use
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.7.0_17/bin/javaws" 1

Inform your Ubuntu Linux system that Oracle Java JDK/JRE must be the default Java.
This command will set the java runtime environment for the system
sudo update-alternatives --set java /usr/local/java/jdk1.7.0_17/bin/java

This command will set the javac compiler for the system
sudo update-alternatives --set javac /usr/local/java/jdk1.7.0_17/bin/javac

This command will set Java Web start for the system
sudo update-alternatives --set javaws /usr/local/java/jdk1.7.0_17/bin/javaws

Now reload your system wide path with
. /etc/profile

Now test your java version with
java -version

You should see something like this on the screen....
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b21)
Java HotSpot(TM) Server VM (build 23.1-b03, mixed mode)


For good measure, reboot system and check again with the following...
java -version


Next we install FFmpeg as indicated at Serviio's website

We're going to use the Software manager within linux. install libav-tools. Read the summary of this package and check it includes ffmpeg. In my case it does!

Follow this wiki. I discovered the above solution was not letting Serviio index video files.

http://wiki.serviio.org/doku.php?id=build_ffmpeg_linux
20th Feb 2016 I can confirm that following the wiki got my *.MTS video indexing!!!! Follow instructions carefully! If *.MTS video files are being indexed then I'm sure others that are more common will! 
I can't remember what it was but I remember there is something in that wiki that gave you two options to achieve essentially the same thing. The option I chose actually failed so I just carried on with the alternative and all was fine!

Next: Install Serviio
Head over to the Serviio website and download the linux application. File name should end in gz. Using the linux GUI tools, extract the files to a single folder. Then cut and paste the folder to somewhere like /home/yourUsername/apps/

For me it's home/myName/apps/serviio-1.6 Look for the readme file which should tell you how to run, stop and open in browser.

A couple of years back I use to see the Serviio icon but these days I'm not. My guess is they have done away with the desktop app and now you configure etc from the web portal.

Here's a screen shot of what my browser is looking like.




Have a play. You'll need to to tell Serviio where all your media content is so it can present them in your DLNA clients around your home.


Look on your devices and try to find your content. 

If you have lots of files it can take some time for the content to eventually show on other devices for the first time. Several hours can be typical depending!

At the time I compiled these notes I actually performed the install and all is running perfectly. 

What I have not mentioned is this is actually installed and running in a virtualbox virtual machine and I'm pleasantly pleased to see that playback of media on all devices around the home is performing perfectly!

Good luck and enjoy!





Tuesday, February 16, 2016

Owncloud, your own dropbox-like storage server installed in your home or business. Imagine something just like dropbox but without the monthly fees!

This runs on linux.
Before you run off in fear because your a Windows person. Check my other post on a Windows alternative. Remember, you can always install linux in a virtual machine and run it in a virtual environment in Windows! Take a look at virtualbox if you your interested to run owncloud in a virtual linux  environment ON Windows ! :)

BEFORE YOU COMMIT TO INSTALLING, PLEASE SEE MY IMPORTANT NOTES HIGHLIGHTED JUST LIKE THIS ONE!


So what's the point?


  1. Chuck all your data in one single location.
  2. Avoid data spread all over the place on multiple drives.
  3. Access data from any location
  4. Share data to others
  5. Share data to others but don't let them alter that data
  6. Let data shared to re-shared.
  7. Store your data in your own home or premises
  8. If you're paranoid about your data being lost to a third party organisation or falling into the wrong hands, store it yourself
  9. Sync your data to multiple devices
  10. Access your data from a web portal running on your own premises
  11. Avoid on-going fees to a third party cloud provider such as dropbox, google drive and others
  12. Storage limited only to the size of your drive.
  13. Mount separate and physical drives to the system and make them available to users
  14. etc etc


Intro:
If you are a newbie at all this server configuration stuff, I highly recommend the install method of using a bitnami stack. The bitnami guys really make things simpler and even pro's are opting to take this route. You'll even be able to install on an enterprise cloud server such as Oracle, Microsoft, Google and the like. All the information is there. This post however is all about hosting owncloud yourself on your own premises.


First, I recommend manually setting your OS (Operating System) to use an IP address of your choosing. ie Do not configure your OS to acquire the IP address automatically  as it is quite likely that one day your OS will decide to use a different IP address and from that point on you won't be able to access the server. Re-boot your system and make sure your system is coming back online with the manually configured IP address. Check for Internet access while your at it.

At some point the installation wizard is going to ask where you want owncloud to be installed. You need to choose a folder. For me my OS is installed on a very small drive. NOT actually enough space to host owncloud together with all the files I intend to sync. I could install owncloud entirely on the USB drive and actually this is what I would prefer but in my experience, acceptable speed of syncing can be unpredictable so I'm going to install on the OS drive which is an SSD drive and add extra storage within ownclouds administration portal page. The extra storage will be a non-SSD external USB drive pluged into a USB 3.0 port. By doing this I get reasonable speed with default settings. I won't bugger around with cache memory and performance tweeks. 
If your taking the install route that I'm taking then DO make sure there is enough space to accommodate deleted files.. ie ownclouds trash bin (which can be emptied at will through the admin page).

A few things to consider...

    1. Data transfer speed. If your drive can handle USB 3 then obviously you'll want the drive to be plugged into a USB 3 port. Choose the fastest USB port your system has. By the time you get to read this, USB 4 or even 5 might be available.
    2. An SSD drive might be able to give you faster transfers.
    3. Speed?? perhaps your network will run slower than your drives can read & write anyway so drive speed might not be an issue.
    4. etc etc.. You get the picture!

  • Head over to https://bitnami.com/ and download the bitnami stack. Im going for the 64bit version. Can't actually remember if there is a 32bit version.
  • Once you have downloaded the install file you'll need to make sure it's able to be executed else when you double click it to install you'll probably get errors and nothing much will happen. Using your file manager just right click the downloaded file, choose properties & follow your nose to make it executable. This is key.!
  • Now double click to install
  • As mentioned already the install wizard is going to ask you where you want to install owncloud. Go back and read the section on that!
  • The install wizard is also going to ask you to populate some fields. Just follow your nose. Enter some login details etc. Keep it simple for now. You can always make amends later on. Once you see the kewlness of owncloud you'll probably want to change the login details anyway!
  • The install will ask you to fill in some smtp email sending details used for username recovery and notification purposes. I highly recommend creating a special email account for this purpose and NOT to use your personal address. That way if owncloud emails you then it won't appear to come from yourself. Choose a fictitious name that owncloud can use. Emails sent from owncloud can then present to users email coming from this account. Possible bug on this date... Once email sending had been set and working, changing to a different email account proved to be problematic. Another reason to put in the effort now and use an account NOT of your own. If you use your own personal account then decide to change back for reasons just mentioned, you might run into problems as I have!
  • Eventually the install wizard will also ask you for a hostname. I would suggest making this the IP address of the computer owncloud will run on so the server can be accessed from outside the local network. Last time I used the localhost address of 127.0.1.1 , owncloud only allowed me to access from the same machine. It's for security reasons! Choose the IP address you configured at step #1.This address will be added to a trusted domains list in a configuration file meaning it can be altered later on AND other domains can be added! Try get it right first time around so you won't be disappointed. Last I checked this configuration file was located in yourServerFolder/apps/owncloud/htcdocs/config/config.php
  • Once installation has completed, look in the installed folder that you chose and look for the file named something like  manager-linux-x64.run and double click to run. Once you see the bitnami stack window come up, choose the Manage Servers tab and start both the database and apache server. On the same computer launch your browser and go to http://localhost:8080 and follow your nose and try login to the web portal.
  • Have a play around. Figure out how to add and remove users and try dragging some files into the browser window to upload some files. Also download!
  • Now try from another computer, launch a browser and go to http://xxx.xxx.xxx.xxx:8080/owncloud where xxx etc is the IP address of the computer where owncloud is running. All good????
  • If your wanting to use a domain name resolution to an IP address such as http://yourDomain.com:8080/owncloud then your going to need to edit the config.php file already mentioned in this post. Look for the listed array of domains and then add your domain to the list. Remember to bump up the array number! :)


  • Referring to the image above, you might enter owncloud.yourOwnDomain.com:8080 for example. Save and restart server.
  • For remote access your going to need to open a pinhole in your router and configure port forwarding etc.
  • You might end up with the pain of needing a different URL depending if your on the same local network as owncloud or if your on an a different internet connection which is likely the case for domestic users. This won't be a big deal if your installation is offsite in a remote location and your internet connection is always different from that of owncloud. If you want to solve this issue and use the same URL regardless, have a google for a router that supports NAT-Loopback! :) Thats what I'm using.
  • Go visit https://owncloud.org/ to download a sync client onto your computer, phone, tablet or what-have-you. This is a client-app similar to what dropbox might provide. It keeps files synced between the device and owncloud. The android client is great. You can configure it to sync pictures back to your server the instant you take a photo!
  • For linux users running the client? A key piece of information I have discovered depending on client version and OS... If your client is syncing but you can't see the icon in the system tray try the following??? 

    1. Check your applet settings to ensure the icon will be seen when shown??? ie, it may be there  but your applet tray may be poorly adjusted to show it. Using Skype to display it's icon is a good place to start.
    2. Check the checkbox is checked in the client settings under [General] tab that it will launch at Startup.
    3. The client should be starting up automatically when you start your computer. If the icon is not there just check that syncing is indeed working! If it is??? Then you probably need to set a delay at before the client starts at boot time. It's easy. Again depending on version of your OS. For linux Mint Mate I click the menu. Look for the search bar and enter in Start. You'll be looking for the Startup Applications in the menu. Look for the owncloud client and If your lucky you will have an option there to insert a delay. If you do have this option??? Insert something like 20 seconds. Reboot the PC and hopefully you'll magically have the icon present!! (after 20 seconds of course) NOTE: I have also discovered that at any time you add an account to the sync client then that delay will annoyingly get reset back to zero then you loose the icon again. Hopefully these things will get resolved over time with OS updates, client updates etc etc. If you don't have the delay option then your going to need to create a delay using old-school techniques. I won't go into that here. Google it if you need to.

  • IMPORTANT NOTE: If you're getting a very low maximum upload limit of around 500M using the web portal, you can increase this limit. So why the hell is it limited anyway? Well it's actually imposed by the apache web server and not really owncloud! To increase... open the file installdir/apps/owncloud/conf/htaccess.conf and look for...
    • <IfModule mod_php5.c>
      php_value upload_max_filesize 513M
      php_value post_max_size 513M
      php_value memory_limit 512M
      ...
    • Experiment with what-ever settings you want. Bitnami's wiki is stating to try changing to 2000M for all 3 settings. Restart the server. Now login to owncloud as an admin and go to the admin page. Check if the max upload limit setting is reflecting your new settings. Now try uploading a large file!
        I entered 16000M and the portal admin page is now indicating almost 16Gig max upload. More than enough for me! At the time of writing I have only tested an upload of 1.7Gig working brilliantly! Will update this post when I get to test something much larger!
  • IMPORTANT NOTE: There appears to be a limit of 100 files that can be uploaded in one-go when using the web portal. ie... when you drag a folder containing more than 100 files, you don't get get them all! This is NOT a problem when using the sync client. The annoying thing is, you might not have sufficient drive space at your client computer. If anyone out there has a solution to this, please share with a comment, especially if you have installed via a bitnami stack. Use a WEBDAV client if you don't want to go through the web portal OR use the sync client! Owncloud has some info on WEBDAV
  • IMPORTANT NOTE: If you consider file sync integrity important like I do then I recommend you treat the web portal as a second choice to get files uploaded. There seems to be issues uploading really large files and large quantities of files via the web portal. Just Google the issue and you'll see what I mean.
  • Follow your nose from here-on and enjoy
  • If you're using any USB drives in your configuration and have issues with the hard-drive dis-mounting, it could be one of the following...
    • The USB port of your computer drive can't provide the power to the drive and so the drive powers down. Try a powered USB hub.
    • Some drives can power down when idle after a certain period which can in turn cause the computer to dis-mount the drive. All you have to do is create some periodic activity to keep it awake. If you're installing some other server to access this same drive, then often the processes from such apps activity is enough to keep it alive and mounted! Note: 9 times out of 10 this won't be a problem for you as it hasn't been for me but I have seen it!
Cheers

Saturday, February 13, 2016

Windows operating system alternative

So what's the point?

  1. Linux (most) distributions are free to acquire and use forever
  2. It's often accepted in the community that you won't need to run anti-virus software costing on-going fees due to the nature of Linux
  3. Plenty of open source and free software
  4. Avoid re-purchasing software for other OS's because of incompatibility reasons
  5. Gain a new skill
  6. Get old PC's running again on a light-weight linux OS
  7. It's open source. That means if you have the skill you'll be able to alter the OS to suit you.
  8. Comes standard with many distributions...  an office package that can rival other costly options...
  9. etc etc
Bailing on the Microsoft Windows operating system and making my daily driver a Linux box was one of the best moves I made!

Nothing against Windows as far as an operating system goes. It done me well for many many years after all! While I do have a couple of Windows devices (x3 in fact), my daily driver is in fact a Linux box.

The turning point came when one day after a Windows OS upgrade I realised I had to re-purchase a handful of apps that I had already purchased as prior versions simply were not compatible.

I put aside some time and installed one distribution after another. Ubuntu, Open Suze, Fedora etc and gave them a good whirl. Some for a week or so and others I dumped immediately and tried the next.

When I got to one of the Linux Mint distributions I was pleased to see that after a single download  and install, all the basics were running pretty much out of the box. Sound, video, mp3 playing etc etc.

From there I tried one Mint distribution after another and gave each a whirl then choosing the best for my circumstance to stick with.

At first, I settled for Linux mint Cinnamon

I'm now on Linux mint Mate

I moved to Mate when one day I did some work for a client and experimented installing a slightly lighter OS on his machine as his machine was a bit down on specs. 

Often after an install of an OS the first thing I'll do is check video playback on YouTube since it's an easy way to quickly check practical usability for video rendering and internet access all in one go.

I was pleasantly surprised to see that video playback was smooth-as-can-be on my 4K monitor. Yes the video was up-scaled but it didn't matter since running Cinnamon seemed clunky, jerky etc.

In short. I moved from Cinnamon to Mate simply because of video playback smoothness on my 4K Monitor.
On the surface they run very similarly so I was happy with that!

For those who don't know, most Linux distributions are Open Source, free to acquire, and free to use forever AND they often come bundled with open source software packages such as

  • libreoffice a pretty damn good office suite
  • Video/audio playback packages
  • Browser
  • Email clients
  • and others.
What was not already bundled and was something I needed, I was able to find easily in the Software Center and install.

And in fact those software packages that I had to re-purchase for the newer Windows OS??? I was able to find a linux alternative.

All free.

I don't mind paying for my software packages if it makes my job faster quicker etc etc but to repurchase over and over again just seemed lunacy at the time.

Give Linux a whirl and let me know your experiences...

Cheers

Kotlin (Programming language)

Todo