How Install HP Support Package On Ubuntu 14.04

I need to install HP support package on Ubuntu Trust / 14.04.

Add the following line to:

sudo nano /etc/apt/sources.list.d/hp-proliant-support-pack.list

Add the following line:

deb http://downloads.linux.hpe.com/SDR/downloads/MCP/ubuntu trusty current/non-free

Update the apt-get cache:

sudo apt-get update

You can see the list of packaging in this repository by using this command:

grep ^Package: /var/lib/apt/lists/downloads.linux.hp.com*

Hope this helps someone.

How To Connect To A MacBook With A Broken Screen

My wife accidentally dropped her Macbook Pro off the sofa and broke the screen. Amazingly the computer was still running but she could no longer interact with it because the screen was completely blank. She was just finishing some work and didn’t have a backup. I think that the best thing to do in this scenario is remotely connect to the computer and rescue it. I don’t recommend restarting the computer because there is always a chance that it won’t come back up. You will need another working computers (preferably a Mac) to follow these instructions.

Here is how I did this:

1 – Open The Terminal On Broken Computer
Although, you can’t see the screen, you will need to open the terminal. You can open the terminal using the shortcut: command-space and typing terminal and pressing enter.

2 – Allow ssh connections
On the broken computer, you will need enable SSH. This requires some accurate typing because again you can’t see what you are typing. You need to enter this command (from within the terminal that you have just launched).

sudo systemsetup -setremotelogin on

3 – Find the computer’s IP Address
Using another computer, you will need to find the IP Address of your broken computer. The best way is to connect to your router and view the DHCP leases table. I can’t provide instructions for this stage because it varies so much between different routers. Here is how my Virgin router’s DHCP lease / reservation tables looked. I’ve covered over the mac addresses for privacy.

DHCP Lease Reservations

You can see the entry at the bottom shows a computer with an IP Address of 192.168.0.8. This was my wifes Macbook.

4 – SSH into the Macbook
From your working computer – you should then be able to SSH into the broken computer by opening the terminal.

ssh username@ipaddress

5 – Enable remote desktop
You should now be connected over SSH to the broken computer and should be able to enable remote desktop. This varies depending on the version of OSX that you are using. You can see full instructions on the Apple website. This is the command that I used:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -al

6 – Connect Via Remote Desktop
You should now be able to connect the broken computer via remote desktop. The best tool that I’ve found for this job is Easy Remote Desktop. You open it and enter the IP address of the broken computer:

easy-remote-desktop

And voila…. you are connected to the computer…

I hope that this helps someone.

How To Uninstall / Remove Synology Cloud Station On Ubuntu

There isn’t a clear way to uninstall the Synology Cloud Station client on Ubuntu from the GUI. The only ways seems to be from the command line and it took me a while to find it.

Cloud Station is installed in your home directory in a hidden folder called ./Cloudstation. There is an uninstall script buried in a few folders down.

Open a terminal and run:

./CloudStation/CloudStation-app/package/uninstall

Job done.

I hope this helps someone.

WordPress / MySQL keeps crashing on Ubuntu / Digital Ocean

I host a couple of WordPress sites on Ubuntu hosted on Digital Ocean droplets. I use their standard WordPress application (pre built WordPress on Ubuntu) with the smallest size Droplet possible. It has just 512MB Ram and 20GB SSD Disk and 1 logical core – i.e. it isn’t very quick.

Anyhow, I started to have a few problems with MySQL crash. I manifested itself by WordPress complaining that it could not connect to the database. I could fix the problem by restarting MySQL – ‘sudo service mysql restart’.

The longterm fix is to give MySQL more memory but I didn’t really want to do that. So, I opted to provide the server with more swap space. Given that Digital Ocean server are SSD’s this would be quite quick.

https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

Here is how you add swap to an Ubuntu server:

1 – Check you what swap you have.

sudo swapon -s

If you get blank response then you don’t have any swap. Digital Ocean doesn’t seem to provide swap by default.

2 – Check how much disk space you have.

df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            234M     0  234M   0% /dev
tmpfs            49M  528K   49M   2% /run
/dev/vda1        20G  2.3G   17G  12% /
tmpfs           245M     0  245M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           245M     0  245M   0% /sys/fs/cgroup
tmpfs            49M     0   49M   0% /run/user/1000

I had 17G and so could easily give the server 1g swap.

3 – Use fallocate to reserve space on the file system. Fallocate is used because it doesn’t bother to write anything to the file system. It just allocates the space on the disk.

sudo fallocate -l 4G /swapfile

4 – Set file permissions

sudo chmod 600 /swapfile

5 – Convert it to a swap file

sudo mkswap /swapfile

6 – Add the swap

sudo swapon /swapfile

7 – Check that the swap is there

sudo swapon -s

8 – Add it to the fstab
so that it is mounted when the server reboots

sudo nano /etc/fstab

and put this line at the bottom:

/swapfile   none    swap    sw    0   0

Finally, you can check it has all worked…

sudo swapon -s
Filename				Type		Size	Used	Priority
/swapfile                              	file    	1194300	103160	-1

What is a licensed pallet?

I’ve just been trying to buy a few hundred pallets and confusingly there seems to be licensed pallets and unlicensed pallets.

A licensed (or stamped) pallet is a pallet that has been made to a particular specification and is guaranteed to carry 1 ton. All licensed pallets are made in the same way, using the same thickness wood, the same number of planks, the same type of nails etc etc.

An unlicensed pallet will fit the size specifications but cannot be guaranteed to hold a ton. You can send an unlicensed pallet through a carrier (pallet network) no problem.