Setting up my Raspberry Pi as a home server

Today it’s almost precisely two years since I bought myself a Raspberry Pi thinking I was going to change the world and make something really cool. Nothing really came of it. Apparently I didn’t have the imagination to build anything out of the ordinary, so I ended up making it into an EmulationStation using RetroPie. It worked fine with my Logitech controller and I did have fun playing one old NES game, for around 3 minutes. After that, my poor Raspberry Pi ended up in the box, you know the one with all the old wires and now useless gadgets.

There the hardware dwelled until today, but it was still in the back of my mind. I was sure I could use the hardware for something interesting that actually added value for me. Then it struck me that I really wanted a NAS, but after scouring the market for a really long time I had to conclude that I can’t afford buying one of the quality I’d like. A very quick Google search lead me to an instructable called the Ultimate Pi Home Server and I found it very interesting that the Pi might be able to fill my needs until I can go on to something more professional like a QNAP or Synology NAS.

Reading the comments on the instructable however showed that there were issues since it seems to be outdated a bit. This meant that I had to go back and do some Google-Fu and in the end it led me to this guide by Mel Grubb that seemed to fit my needs a lot more. Reading through the different steps I could even see that he kept updating it. I had to dig out the Raspberry Pi from the depot and get back to it!

Currently I’m just sitting around listening to some music and waiting patiently while OpenVPN works on security stuff in the setup. At least it looks nice:
openvpn_raspberry_pi_builddh

I really hope that this will be a great temporary solution and will most definitely update with a status as soon as I’ve gotten everything up and running.

Rooting a Samsung Galaxy S3

My trusty old work phone, the rather useless HTC Desire S, was no longer long for this world. It had developed a rather common problem with smartphones when they reach a certain age, the battery only held charge for around 2 hours. I wont deny that I was not the first owner of it here at work, so the former owner might have mishandled it.

Any way, this meant that I got myself a new phone, the Samsung Galaxy S3. The phone itself is pretty nice, indeed compared to the old HTC phone. The size means that reading work mail on it actually is possible without squinting. It does have problems however and people who actually own a Samsung smartphone can probably sign to the abundant quantities of bloatware they fill their phones with.

It was so bad, that I felt the need to disable most of them, as it was cluttering my menu, loads of useless game apps and for some reason a plethora of Korean only apps that I couldn’t use, update or even disable. This meant, that to get peace of mind, I had to root the phone. Remembering back in the days how annoyingly difficult it was back in the days, I was very pleasantly surprised that it was easy and painless with this phone. Simply following the guide on Androidxda and I was up and running in less than 5 minutes.

So what did I do after rooting? Not too much really. I disabled loads of Samsung bloatware (since deleting it wouldn’t be the best idea as I don’t actually own the phone) and only kept their S Planner, which I really like as it gives a more Outlook like overview of the calendar as I’m used to.

All in all, I’m pleased it was so painless and happy that I now can hold the home button to get open apps instead of some stupid Samsung talk agent.

Running VMWare Tools on boot in Arch Linux

Lately I’ve been playing around with Arch Linux in VMWare Player and after having a lot of issues with the VMWare Tools, with getting them to work and then having to manually start them at each reboot, I came up with this solution to have them run at boot:

Create a systemd service which handles the autostart of VMWare tools with nano, using the following code in terminal:

$ nano /etc/systemd/system/vmwaretools.service

Add the following text to the service when nano is started.

[Unit]
Description=VMWare Tools Service
After=network.target

[Service]
Type=simple
Group=wheels
ExecStart=/etc/init.d/rc6.d/KM99vmware-tools start

[Install]
WantedBy=multi-user.target

Press CTRL+X to exit nano and Y when asked to save the file.

Now we have created a script that can handle start the VMWare Tools service and be started by systemd. As of yet it’s not going to start at boot, but can be started manually by using systemctl.

To have it start at boot write the following in the terminal:

# systemctl enable vmwaretools.service

Now we have enabled the service on boot and next time you reboot your virtual machine, you will have the VMWare Tools running.

I’m in no way saying this is the best way to do it, but it’s the method that worked for me and I now have full use of the VMWare Tools. If anyone have a better solution to this, please feel free to add it in the comments.

Next up, a full guide to installing Arch Linux with a working Gnome Desktop Environment in VMWare Player.

Update:

So after looking around I actually found the wiki page that covered this a lot better than my hack solution and thus the script is changed to:

$ nano /etc/systemd/system/vmwaretools.service

Add the following text to the service when nano is started.

[Unit]
Description=VMWare Tools daemon

[Service]
ExecStart=/etc/init.d/vmware start
ExecStop=/etc/init.d/vmware stop
PIDFile=/var/lock/subsys/vmware
TimeoutSec=0
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

This works perfectly and is a lot nicer looking than mine. I can also recommend using this part on the Wiki to manage the modules after kernel changes.