Dec 15 2011

How to Prevent Windows from Force Updating [1215]

So as usual this posting relates closely to another post I made, but this is slightly more important as this relates to the message we all get after installing updates where windows basically forcefully makes us restart our computer. Usually this annoying little message will appear when we are in the middle of ten million things that are going on around about us and have an urgent requirement to actually get a specific task done. We have all been there…..

 

Now this message is all ok most of the time, apart from when windows decides enough is enough and gives us 5 minutes before it automatically shuts itself down. Now there are ways to stop it and remove this type of behaviour, however the prompt will still appear. But the good part is that the functionality to completely shut down the machine automatically will be removed.

 

As far as I am aware this trick will work in all versions of windows.

 

The modification itself is pretty straightforward, we are relying again on basic user ability to be able to use regedit.

 

First step is to launch regedit and you will want to navigate to the following key entry:

 

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU

 

Then inside this location you will need to create a new 32-bit DWORD and name it NoAutoRebootWithLoggedOnUsers and give it a value of 1. This will prevent any type of automatic reboot scripts running while any users are logged in.

Obviously removing this custom variable will put things back to the way they were before, but going on the fact you want to remove the functionality I doubt that will happen any time soon.

 

All that is left to do is reboot your machine, and that’s it – all the changes will have taken place during the reboot and your computer should now no longer automatically reboot, especially when you don’t want it to – happy days!!

 


Nov 5 2011

Scrolling Speed in Ubuntu Linux [1105]

Firstly this is going to be a real short thing – it is firework night after all and I have places to be but none the less I need to keep up with this.

 

I’m not exactly sure why this has suddenly affected me, maybe the recent change in my peripherals that I use on a daily basis however some people may have noticed that the scroll wheel within ubuntu doesn’t really scroll anywhere fast.


Now I thought ok this will be a really simple fix, going into the system settings then mouse/pointer options and changing the number of lines the scroll wheel scrolls. However unlike shiny Windows, ubuntu doesn’t have this option and therefore you are left with a rather annoying slow scroll speed. Coming from a background of knowledge in regards to ripping things apart and putting them together I tried to think of ways to be able to change the sensitivity of this input. My first thought was trying to work out how I would be able to capture cat /dev/input/event4 and then manipulate that action to change the speed of the scroll action. Discovering that this was pretty much a long drawn out task I discovered that by possibly editing your xorg.conf I possibly could assign an option and then set that variable.


So that’s what I did, I edited my xorg.conf file to include Option "VertScrollDelta" "10" in it underneath the section defined for mouse options. So willingly I saved my xorg file, restarted x and hoped it had work. Didn’t exactly go as planned, well I say this but there was really no difference. Nothing had changed at all, it was better it wasn’t worse. So I gave up for the moment. Looking across forums regarding this item it seems it has actually been an outstanding bug in GNOME for about nine years, one they are yet to fix.


As it is very frustrating to pretty much have to attack your mouse to get to the bottom of a page, I think I will keep this in my “fix, to-do” list so maybe one day I can sit down and actually get the time to look at the problem straight on and try and see if I can find a work around. Maybe one day.


Jun 7 2011

Your Own Private Dropbox

Ever wanted to have a dropbox? Ever wanted to have a place where you could store, access and search through your local files held on one computer all over the world and don´t have to worry about data recovery again?

The definition of the dropbox service is that you have access to a web-based file hosting service that is operated by Dropbox, Inc. that uses cloud computing to enable users to store and share files and folders with others across the internet using file synchronization.

So firstly let’s go into a bit of background on the service. It was originally founded in 2007 by Drew Houston and Arash Ferdowsi, there are two service based plans. There is a free and a paid service, each with varying options or conditions. Based on the free service you are allowed to privately host anything up to 2GB in files which can be accessed on a number of differing platforms; everything from Windows, Mac OS X, linux and also a range of mobile devices including Android, Windows, IOS and Blackberry. Now because this is fully hosted on the cloud you can also access any of your files using the internet browser when there is no local client for you to use.

What I am going to detail below is an accurate and thorough guide to running your own private dropbox service without any of the limitations you could encounter while access it through a paid service. You could say that this is true cloud computing and the only limit, is the size of hard drive you store the files on to.But you can also search online for a carbonite offer code

Now before I begin to go into details, I will warn you, this guide will be quite technical. For post people you will not feel the need to ever use this guide or use any of the features out of it. For everyone else technically based or that has an interest in doing something really cool and exciting, join me as we go through how to make something wonderful for yourself and you family to enjoy!

Requirements:

  • Preferably your own dedicated server with ssh access, or access to one at least
  • A Windows, Linux or Mac OSX client (whatever machine you want to test on)
  • Unison server and client software
  • Glade/Gtk+
  • freesshd

Another introduction to make. Unision is the handler that we will be using to deal with the task that we have in hand. It is a file synchronization toolkit that can be installed on multiple different file systems to sync files and directories across multiple platforms. In a sense it forms the same attributes as rsync in the way that it can manipulate, update and sync files where there are specific differences within a file structure. However it can also deal with something rsync cannot deal with, the deletion of files and directories. I have seem this happen myself many a time where rsync can’t deal with delete commands and therefore you need to run “rm -f foo.bar” to remove the file before being able to proceed.

We will rely on Unison to handle and manage the connections and security including the authentication during transfer.

Step One:

Install the Unison server on the host, in my case Ubuntu 11.04

 

sudo apt-get install unison

 

Simple as that….

If you wish you can unpack and build from source, but seeing as it is a properly developed package I see no reason to muck around with configurations when it is already all set up for you.

Step Two:

Identify the client machine that you are going to be using, in my case a brand new HP Laptop running Windows 7.

Install GTK for Windows– after a lot of hunting around I was able to find a suitable installer as part of a project called “Glade” follow this link Installer .

Step Three:

Install an ssh server on your windows machine to connect to the host – freeSSHd is what I used here, allowing you to technically run an ssh command from your cmd.exe shell allowing you to connect directly to your linux box.

Once unpacked move to the Windows directory and run the GUI that goes with it. You will be required to set up a user for this system to actually work and so that it can use the shell.

Ensure that it is installed as a service, verify that the ports are open on your firewall application and that you restart your machine for them all to take effect.

Step Four:

Configure your environmental variables – Unison expects to find “Home”, but as you are running in windows you will need to configure this as “$C” for your C: drive.

Step Five:

Download and install PuTTY and Plink.exe, put these into your Windows directory and download the Unison-ssh wrapper and verify it is in you Windows directory as well – The ssh wrapper will be what determines how to direct the ssh calls that will be made by unison on the command line.

Step Six:

Download and unpack the Unison binaries for windows. At this point your best move is to rename them to “unison-gui” and “unison”. Ensure that these are in your path and that the text version is called “unison” as that is what the server will be looking for.

N.B. Ensure that you install the same binary version as what you are running on the host server, otherwise there will be a mas-match and although there is documentation to say you can use the version no flag it doesn’t work. I went round in circles chasing my tail trying to find the problem when it was the version number.

Step Sever:

Test out your ssh connection – You should be able to open up a command prompt and enter

“ssh -l username -pw password server “unison-version” “

This should return the current version of unison hosted on your server.

Step Eight:

Test your unison connection – you can do this by adding in the “-testserver” parameter:

 

“ssh -testserver -sshargs “-l username -pw password” c: ssh://server//”

It should give you the response something like: “Connected [//server1/c:/ → //server2/c:/]

Step Nine:

At this point in the process I would encourage you to run “plink.exe” in your command prompt window as it saves any uncontrollable problems when unison does its initial sync.

Step Ten:

Run PuTTY and set up the host configuration with your username and save the configuration so that Unison will automatically connect. I would also encourage you to set up private key authentication, which would eliminate the need for you to enter a password every time you wanted to perform a sync. There are plenty of guides on the internet, so I won’t go into details it is pretty simple to do, you just need to find an easy explanation.

Step Eleven:

Run the Unison-GUI to configure your “share” directory and the user that will be syncing with the server. The menu here is pretty self explanatory. When you are setting up the host details ensure that you set it to use ssh as the method and detail the user name and also instead of using the full server address you can use what you have got it saved in PuTTY as.

Step Twelve:

Perform your first sync and thats it. Done! You are now the proud owner of a fully functional drop box servive that you control what you can do with. The world is in your hands, open you mind up free your soul and go do something you have never done before!! Live!

For mobile device synchronization I would suggesting finding a client that can run rsync, and for accessing files through the browser you will need to install a file explorer front end onto your server and ensure that port 80 is open to your server from the firewall/router.