Saturday, July 21, 2012

Ubuntu Server Disable screen blanking

This is so simple however I always seem to forget how to do it.

I have an Ubuntu server and often want to run htop over a few days while testing something. The problem is though that the screen keeps going blank. This is fine but then I quickly want to see what the current performance is at a glance while walking past. I don't want to have to press a key to get the screen live again.

As root run the following

setterm -powersave off -blank 0

Here are a few more interesting things you can do with setterm.

Thursday, July 12, 2012

Custom menus in Windows Start Menu

I like to keep bunch of portable utility apps on my Windows machines that I use from time to time. Normally I store these apps in C:\Utils and then just access them via Explorer but recently I have been using one of my new favourite apps (MobaXterm), to access my Linux media centers, a lot and it's becoming a bit of pain to always go via Explorer.

So with that in mind I decided to see if I could create a custom menu in my Start menu and guess what, you can.

To do this all you need to do is:

Right click the Start button and select Properties.
Click the Customize... button

Select one of the following menus that you are not using.
Documents, Downloads, Music, Pictures, Recorded TV or Videos.
I went with Recorded TV.
You can either use Display as a link or Display as a menu.
A link will just be a shortcut to your folder but a menu will display a pop out list, I chose menu because it's one less click.

Click the Start button and you will see the new menu, right click it and select Properties.
Add the folder or folders, you which to appear in your new menu, with the Include a folder... button. While you're there remove any default folders you don't want to appear.

Lastly right click on the new menu again and select Rename to give it a nice name and with that you are done.

Wednesday, July 4, 2012

Fix VirtualBox Time Sync

Today I needed to do some testing on a VirtualBox VM to ensure that our software handles crossing over midnight correctly, this meant that I either needed to change the time on my VM or wait until midnight to do my testing (yeah that's not going to happen).

That's no problem you might say, ah but you'd be wrong for if you change the time and wait a few seconds then the time will reset itself. Once again I hear you say "no problem, disable 'synchronisation with the Internet time server" and once again you'd be wrong and the reason for this is that VirtualBox syncs the time between your Host and Guest machines.
To prevent this from happening you need to stop your VM and run the following command:

vboxmanage setextradata "VMs Name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" "1"

Just replace VMs Name with the registered name (how it appears in VirtualBox) of your VM and voilà problem solved.

Note: If that doesn't work you can also modify the vbox file of your VM manually. Open the file with your favourite text editor and add the following line

<ExtraDataItem name="VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" value="1"/>

under the <ExtraData> element.