How to end an RDP session and return to the console (for Steam in one way or another!)

This quick script ends your current RDP session and returns your PC to the console.

I’ve needed this a couple of times now, and they were both Steam-related! (plus not wanting to walk to the remote PC all the time! πŸ™‚

Enter this in a bath file “logoff.bat” or similar –

set MY_SESSION_ID=unknown
for /f “tokens=3-4” %%a in (‘query session %username%’) do @if “%%b”==”Active” set MY_SESSION_ID=%%a
C:\Windows\System32\tscon.exe %MY_SESSION_ID% /dest:console /v

Run that batch file as an admistrator, whilst in an RDP session, and it will end your current RDP session returning your PC to the console!

I had to walk to that PC a lot of times!!

Sources –

https://steamcommunity.com/groups/homestream/discussions/0/540732889170346271/
https://superuser.com/questions/303927/how-can-i-retrieve-the-session-id-from-command-line

Cheap hardware RAID for ESXi 6

I recently put together a budget ESXi 6 server for home and I wanted a cheap hardware RAID card for it.

I purchased myself this card – a SilverStone SST-ECS03. It cost about Β£40, which is a lot cheaper than any of the cards on the ESXi 6 HCL!

I installed the card and disks, then formatted a new RAID1 array with no issues. But of course… ESXi 6 didn’t recognise the card. It transpires this is because VMware removed support for any devices not on the HCL. However… this support can be added back in!

1/ Enable SSH

2/ SSH into the box and type the following –

esxcli software acceptance set –level=CommunitySupported
esxcli network firewall ruleset set -e true -r httpClient
esxcli software vib install -d http://vibsdepot.v-front.de -n sata-xahci

3/ Reboot the ESXi host

4/ Marvell at the hardware RAID card now being available! πŸ™‚

Sources –

https://www.scan.co.uk/products/silverstone-pci-express-card-2x-sata-6-gbps-ports-supports-raid-0-raid-1-span-and-non-raid-function
http://www.thomasmaurer.ch/2015/04/enable-ssh-on-vmware-esxi-6-0
https://communities.vmware.com/thread/505243

Fedora: DVD ripping

AcidRip looked like a good solution so I installed this.

However…. it didn’t work. After a bit of digging it seemed I was missing libdvdcss, so I located and installed this, and now it appears to be ripping quite happily!

 

Clone a Windows boot disk to a smaller disk using Linux

I while ago I foolishly borrowed a 4Tb SSHD from an ongoing project and now I need the disk back whilst preserving the data that’s on it. All I have is a 2Tb disk, which is enough for me to fit all the data on, but the disk duplicator can’t deal with it as the source drive is bigger than the target drive.

1/ In Windows – I used disk management to shrink the partition on the 4Tb disk down to the smallest possible size – approx 1.5Tb.

2/ In Linux I examined /proc/partitions and worked out my source disk is /dev/sdd and my target disk is /dev/sde.

3/ I used DD to copy the entire disk –

dd if=/dev/sdd of=/dev/sde bs=128K conv=noerror,sync

This eventually errored saying the disk was full. Another glance at /proc/partitions suggested the operation had failed, as I could only see /dev/sde (and not also /dev/sde1, /dev/sde2, etc). This was the case even after a reboot.

4/ However, I fired the disk up in Windows where it was immediately recognised as the originally 4Tb drive that’s now a 1.5Tb partition, along with an additional 0.5Tb of free space.

5/ I used computer management to resize the partition to maximum size (2Tb) and now I’m running chkdsk /f (or… from the properties of the target hard drive… tools / error-checking / check now)… because you should always do this after manipulating partitions before you re-use the source disk! πŸ™‚

Hive – more pairing information

After more time on the phone to Hive this evening here’s the definitive guide on re-pairing the boiler module (as is it’s technical name!) should it go offline.

1/ Hold the “Central Heating” button until the boiler module flashes pink.

2/ Hold the “Central Heating” button until the boilder module flashes yellow.

3/ Hold the “Back” and “Module” buttons down until a countdown starts. Continue holding until the countdown completes. This will factory reset the thermostat/boiler module.

The boiler module should then pair. This will reset your schedules and you will need to set them up again.

Energenie Mi|Home pairing issues

After 6 devices, two months worth of emails and returns, then two days of phone calls with members of the Energenie team I (note I !!) have worked out that there is a potential issue when pairing new devices.

When you go to pair a new device you have the option to select various different devices types (Monitor, Adapter Plus, Adapter, etc). These are all different colours. If you select one of the cyan (/ blue) devices it is possible to pair with “nothing”, ie you think you have paired the device because it appears in your console but really this is a phantom device as you have not really paired with anything. Hence if you try and switch this device off or on – via the web console or your mobile phone – nothing will happen!

Therefore when you pair your device you must follow the instructions exactly –

1/ Click “Pair New Device” within the web console
2/ Select the correct device (Monitor, Adapter Plus, Adapter, etc)
3/ Click “Pair Device”4/ At this point – and not before – hold the physical power button on the device you wish to pair until the power light starts to flash
5/ Click “Start Pairing”
6/ Wait for the “Pairing In Progress” prompt and click “Finish Pairing”
7/ Ensure the power light on your device stops flashing

Following this exact sequence of events you should then be able to control your device via the web console or your mobile phone.

It seems this issue is only possible with the cyan (/ blue) devices. If you select any other colour device it will not pair with “nothing”.

I would hazard a guess that this is because the cyan (/ blue) devices don’t “feed back”, ie neither the web console nor the mobile phone app know whether the devices are switched on or off, but that’s just a guess.

Hope this helps somebody out there! πŸ™‚

Flash Gordon: Trip to Mars – DVD correct running order

This DVD is a trip down memory lane for me, taking back to my childhood. I vividly recall “people” (I thought they were Mud Men but it seems they were actually Rock Men) emerging from and disappearing into the walls, and I am very much looking forward to reliving these memories!

However… before I purchased this DVD I had read that the episodes appear in the wrong order, so I wanted to work out the correct order first.

Here is the order in which they actually appear on the DVD!

  1. 01 New Worlds to Conquer
  2. 02 The Living Dead
  3. 03 Queen of Magic
  4. 04 Ancient Enemies
  5. 05 The Boomerang
  6. 06 Tree-Men of Mars
  7. 10 Incense of Forgetfulness
  8. 11 Human Bait
  9. 12 Ming the Merciless
  10. 07 The Prisoner of Mongo
  11. 08 The Black Sapphire of Kalu
  12. 09 Symbol of Death
  13. 13 The Miracle of Magic
  14. 14 A Beast at Bay
  15. 15 An Eye for an Eye

As you can hopefully tell from the above section 3 (should be episodes 7-10 but are actually episodes 10-12) and section 4 (should be episodes 10-12 but are actually episodes 7-9) are the wrong way round.

Additionally the episodes are presented in the wrong order on the back of the DVD!

Hope this helps a Flash Gordon fan somewhere! πŸ™‚

Playing Ultimate Doom via Steam

I had the problem described and seemingly resolved hereΒ in that when trying to play Doom on Windows 7 via Steam the colours were all bright pinks, blues, greens – all forms of strange colours.

The fix in the post above nearly worked but I had to modify the “machine” entry slightly, as follows –

Go Here.
C:\Program Files (x86)\Steam\SteamApps\common\Ultimate Doom\base

Open this file in notpad.
ultimatem.conf

Change these lines to read.

fulldouble=false
fullresolution=desktop
output=openglnb
machine=Svga
aspect=true

and that sorted it! πŸ™‚