Archive for May, 2014

PPTP Connecting from Ubuntu 14.04

Saturday, May 17th, 2014

So I was having troubles opening a VPN connection from Ubuntu 14.04. I could VPN just fine on my iPad and Android devices, but I was having no luck on Ubuntu. Looking at my /var/log/syslog, and after much Googling, it seems my problem was ‘secrets’/keyring related.

Setting up a PPTP VPN connection is easy.


What I was lacking was one very specific checkbox with many implications, none of which were spelled out. The important one is that “Available to All Users” skips the secrets check, and instead prompts you for a password. That’s better than no VPN at all. 🙂


My advanced settings look something like this, thanks to other tutorials I stumbled across:


Notably, no PAP, as that’s very insecure. The rest of the options, I haven’t tried otherwise. What’s important to me is I can now connect to my VPN.

Setting up a remote PPTP server

Saturday, May 17th, 2014

So I’ve been working on netcode recently. LAN/Local testing is only so effective, when the real internet is so laggy. Ideally, if I could be in 2 places at once, I could test the game under a more natural lagged internet.

So that’s what I’ve done. I’ve split in two and sent my other half down south… okay no. I recently set up an inexpensive unmanaged BuyVM VPS server (256 MB RAM, Dual Core) in Las Vegas running a trimmed down version of Ubuntu 14.04 Server. From where I’m at (2 hours south of Toronto), the ping between myself and the Las Vegas server is around 100ms.

Like always, here are my notes.

Setting up BuyVM Server as a PPTP VPN

Setting up, I started by “Reinstalling” a fresh Minimized Ubuntu 14.04 64bit Server. At the time, Ubuntu 14.04 wasn’t yet available as a pre-install. It was something I had to do after creating my account.

From that fresh install, I need to first do an APT update:

Next, install IPTABLES.

Follow these instructions:

At the very end though, we’re setting the IPTables in “/etc/rc.local”. Do this instead:

The change is the first line. We’re not binding to an interface, but setting a source.

Done. Can now VPN using the PPTP protocol, and route all your internet traffic through it.

Reference: (combined the Ubuntu notes and this)

* * *

To connect: Use the server IP address, login and password set in the secrets file.

Croutons and Chromebooks

Thursday, May 15th, 2014

More wacky hardware, I picked up a Samsung Chromebook for cheap.


I’ve specifically been waiting for a deal on the Samsung Chromebook, as it’s quite unique: It has a Samsung Exynos SOC, which contains ARM CPU and GPU (MALI-T604). Next to NVidia’s efforts, these are some of the most powerful ARM CPUs out there. The GPU is a tiny bit dated though (same one as the original Google Nexus 10), but does support OpenGL ES 3.0 (with an appropriate driver at least).

Why else do I want a Chromebook? To test Ubuntu for ARM. I regularly test on 64bit Intel CPUs, but would like the option to do some more heavy-duty tests on ARM. I do have an Android build, but I want more. So I bought this very specific Chromebook for this.

Installing Linux (Ubuntu)

How to Enable Developer Mode and install Crouton

Follow those instructions above to enable Developer Mode (ESC+REFRESH+POWER, then CTRL+D). Developer Mode wipes the system, and adds a warning message upon boot (WARNING! DEVELOPER MODE).

If it’s a brand-new Chromebook, you may need to force an auto-update. Click on your portrait picture in the lower right corner, then go Settings->Help and wait a moment for auto-update to begin.

Grab Crouton (Link).

Press CTRL+ALT+T to open Crosh.

From Crosh type shell. This will bring up a proper terminal. You can now run Crouton.

Where ‘trusty’ is the Ubuntu version (14.04) and gnome is the Window Manager to install. The default Ubuntu version is ‘precise’ (12.04), but that’s old. Other WM’s can be installed by using commas (i.e. xfce,kde,gnome,unity). NOTE: I was only able to get xfce working with Ubuntu 14.04.

Using “list” instead of a -r or -t argument will list all choices. Running crouton without arguments will list all options.

In case you ever need to uninstall, go to the /usr/local/chroots folder and doing:


Using Linux on the Chromebook

Crouton is magical. You actually run both ChromeOS and Ubuntu simultaneously. Dual booting is an option (see the Developer Mode article above for ChrUbuntu details), but this is slicker.

To start your alternative Linux, bring up Crosh (CTRL+ALT+T) and type shell. From the shell sudo run your WM start command like so:

Then the cool part: Press CTRL+ALT+SHIFT+FORWARD (and BACK) to toggle between ChromeOS and the currently running Linux Window Manager.

OpenGL Benchmarking

First, to log details of the OpenGL driver, install mesa-utils.

Then run glxinfo. You’ll probably want to grep some of that output. Source.

To benchmark install glmark2 (or glmark2-es2, or both).

Then simply run glmark2. An overlay will popup, and it’ll start testing. Source.


Initial results show that the ARM Mali driver does not ship with Ubuntu, thus it has to fall back on to software rendering. That said, it actually does a really good job on the software rendering, but we’re not taking advantage of the system yet.

ARM has provided a reference on how to create a bootable SD card with the correct drivers:

I’ve spent enough time on the Chromebook today, so I may try this another time.

Making The GIMP a comfortable Image Editor

Sunday, May 11th, 2014

I’m a long time Paint Shop Pro user. I’ve used it since Paint Shop Pro 3, but I stopped upgrading after Paint Shop Pro 10. Corel acquired it between versions 9 and 10, and after 10 it was never the same. Paint Shop Pro used to be an exciting image editor that uniquely combined Raster and Vector image editor together. The killer feature would have been support for importing and exporting vector artwork as vector files (you could import vector as raster, but not vector), but alas, after the Corel acquisition, vector got ignored (Can’t compete with Corel Draw after all, that piece of sh**). Paint Shop Pro used to be a serious piece of software with the potential to compete with Photoshop (and Illustrator), but Corel changed its course towards a shovelware Photoshop LE competitor.

Two great art editors I’ve also used are Autodesk Sketchbook Pro and Paint Tool Sai. Both are wonderful streamlined interfaces for creating art, but are incomplete image editing packages (no font support). Paint Tool Sai is also frighteningly similar to Paint Shop Pro (sans Vector), but a much better painting workflow. Alas, Sketchbook is Windows/Mac only, and Sai Windows only.

A few years ago I started spending some time with Photoshop and Illustrator CS5. Illustrator I love, but Photoshop has always felt clumsy and awkward. So if it’s going be clumsy and awkward, I may as well be using The GIMP. 😉

It seems The GIMP has made some serious progress over the years. I still have things I hate, but it’s getting there. Here are some notes to make it good.

Switch to Single-Window Mode… NOW!

Ignore everything and immediately click this checkbox.


90% of what you hate about The GIMP is now fixed.

Set Mouse Wheel Zoom

Go to Edit -> Preferences -> Input Devices -> Input Controllers (listed).

Under Active Controllers, click on Main Mouse Wheel and then the Gear.


Click Scroll Up (should be blank) -> Edit, then pick View -> Zoom In.
Click Scroll Down (should be blank) -> Edit, then pick View -> Zoom Out.

Default Grids


The Pixel Brush

Use the Pencil, Pixel Brush, and a Size of 1.


Now on to some things I really don’t like.

What’s wrong with The GIMP (as of 2.8.10)

The Right Click button of the mouse is amazingly useless. It brings up the Taskbar Menu, but as a Right Click dropdown menu. AFAIC, this is an artifact of Single-Window Mode NOT being the default.


Right Click should really do:

  • Paint with the 2nd Color (if in a paint mode)
  • Deselect a current Selection (if in a selection mode)

This isn’t hard. It’s pretty obvious too. You can google many threads of people asking this basic question (how do I right click paint). This really needs to be fixed.

In the same vein, Wacom pens often have a ‘right click’ finger button. This finger button should be a toggle for the 1st and 2nd color. While holding the button, you paint with Color 2, and while released you paint with Color 1. This feels very natural. More editors need to support it.

In general, The GIMP needs to support actually doing stuff with Color 2, beyond just using it as color storage.

* * *

Also there’s an annoying jitter in the Triangle Color Mixer.


I’m fairly certain somebody is screwing up their Integer to Float conversions when drawing/picking.

* * *

ENTER needs to act like an accelerator key when in Dialogs.


You’ll note that “Scale” is lit up. As long as I’m in a text field, it stays that way. I should be able to push ENTER right now to accept the settings; Otherwise, why the heck have you wasted my time highlighting Scale?

* * *

Editing Brush Size feels clumsy.


This wacky multi-control has multiple zones, a, big tall text cursor, multiple overlay cursors, and is way more confusing and awkward than it needs to be. Setting small sizes (1-20), no matter how many times I do it, never feels right. If brush sizes weren’t decimals by default, that would be a start. Nobody ever means to set a size of 943.72 when scrubbing (the point 72), so why are you giving me 11.34 instead of 11?

* * *

That’s all I can think of right now.

Linux Setup Notes, Part 3

Friday, May 2nd, 2014

Linux notes again!!?!

Yes, as it turns out I decided to replace my dead workstation PC (with beefy specs like Water Cooled Quad Core CPU, NVidia GPUs, RAID Array, etc) with a teeny tiny PC slightly larger than a stack of coasters: A Brix BXi3.


I tried using an older NVidia ION powered Nettop, but that machine really didn’t work well with Ubuntu 14.04 (The Window Manager at least). I’m told other WMs are fine, but I’d rather install a Server disto on a lacking machine like that.

I need a desktop machine, or at least, a 2nd machine I can test this game on easily. So now I have the Brix. The whole thing cost about $500 ($299 box, $90 for 8GB RAM, $90 for 120GB SSD, $20 for Mini-DisplayPort to DVI Video Cable), and it’s silent… OH MY!

Older posts can be found here:

Part 2, Part 1 (Older, more mistakes)

Installing an SSH Server

… is really easy. Too easy. Why did I expect this to be difficult?

And you’re done. You can ssh to the machine by the IP, and login using any created account (including the default one you create upon install).

Connecting to local machines by hostname (.local)

If you know the hostname of a local machine (what you named it upon OS install), you should be able to connect to it use the ‘.local‘ suffix.

So where it says this on a computer:

Instead of connecting/ssh’ing by IP address, you can use the hostname directly, using the ‘.local‘ suffix:

This fancy feature is thanks to an open source app called avahi, that comes pre-installed on Ubuntu. It’s a daemon that listens for it’s name in a broadcast, and responds if it is them.

If you are on a distro without avahi, you may have to do something like this:

Avahi is compatible with Apple’s Bonjour (different zeroconf protocol, but supported). For Windows PCs, you can install Bonjour for Windows.

References: This and This.

Changing Host Name

Ha! Now that we know what the hostname is used for, lets change them to something useful.

Edit these two files:

You must restart for the change to fully take effect. There are methods for changing hostname (i.e. sudo hostname), but they will not do important things like reassign the hostname used by Avahi.

References: This and This.

Edit text files from terminal w/o using VIM

VIM is a monster. Let us never use it again.

Nano and Pico (usually nano) are “more normal” terminal text editors on Linux. They’re still a little weird, but navigation is natural.

To save a file, press CTRL+O (^O) (or ^S on DVORAK). Saving gives you the option to change the filename if you like. Push enter if you have no changes, or when you are done.

To exit, press CTRL+X (^X) (or ^B on DVORAK).

Linux shares to Synology

I’ve had a Synology fileserver for a few years now. It’s custom Linux based Mini PC that holds hard drives. And now that I’ve learned about the above, here are a few notes for myself.

HostName.local works (should be case insensitive).

When using Ubuntu/Nautilus’s “Connect to Server” feature, you can use the prefix ssh:// to open a Linux’y to the box, instead of relying on Samba/CIFS. ssh://HostName.local

Also works in the web browser. http://hostname.local

Still haven’t figured out what’s wrong with my read performance though. Threads: one, two.

I think it has something to do with the whole 4k sectors “feature” of newer drives. Actually, I think I’m almost 100% sure that’s my problem. None of my drives are formatted for this.

Synology Tips

To SSD to the synology, do it as root (users will fail).

Password is the same as admin.

NOTE: If you login as admin, you wont be able to do root commands. Weirdly, there’s actually a VPN related exploit that makes the root password ‘synopass’ from this account.

Performance Monitoring Tools

Just a link to share.

Disabling the ALT key Search Feature

Go to System Settings -> Keyboard -> Shortcuts -> Launchers.

Find the setting “Key to show the HUD“, select it, push backspace.



OpenGL Benchmarking

First, to log details of the OpenGL driver, install mesa-utils.

Then run glxinfo. You’ll probably want to grep some of that output. Source.

To benchmark install glmark2 (or glmark2-es2, or both).

Then simply run glmark2. An overlay will popup, and it’ll start testing. Source.