Compiling / playing nethack 3.6.0 on Ubuntu or Debian

After a 10+ year hiatus, the NetHack DevTeam is happy to announce the release of NetHack 3.6, a combination of the old and the new.

- nethack 3.6.0 release notes

It took me a while to figure out how to actually get nethack v3.6.0 running on Ubuntu, so I’ve shared what I learned for others.

The following instructions may also work on Debian, however I haven’t tested it.

Thanks to Jochen, we can also get this compiling on Debian Jessie.

Get setup

  • Install the dependencies
    • sudo apt-get install flex bison build-essential libncurses5-dev checkinstall
  • Get the source
  • Extract the source
    • tar xpvzf nethack-360-src.tgz

Prepare the source

  • Edit include/unixconf.h
    • Change /* #define LINUX */ to #define LINUX
  • Edit sys/unix/hints/linux to be as here.
    • For Debian Jessie, change the HACKDIR=... line to be HACKDIR=$(PREFIX)/lib/games/$(GAME)dir
  • cd sys/unix
  • sh ./setup.sh hints/linux (sets up the Makefiles correctly)
  • cd ../../ (back to where we were)

Build & install

  • make all
  • sudo checkinstall (will create a package and install it for you)
    • Hit y to create default docs
    • Enter nethack 3.6.0 then hit <Enter> twice when prompted
    • At the options screen, change option 12 to say nethack-common. This avoids accidentally installing any old version from your package manager.
    • If you see an error “Some of the files created by the installation are inside the home directory“;
    1. Hit n (it’s just a temporary file), then
    2. Hit y to continue (we do not want those files in our package).

Uninstallation

To uninstall, use your favourite package manager, or sudo dpkg -r nethack.

Play!

Now you can run the game via nethack.

Need some help getting starting with nethack? Read the v3.6.0 guidebook.

Tagged , , , ,

Watching Movies on Google Nexus 7

The Google Nexus 7 has an amazing screen, and is portable enough with a good enough battery to be used as an in-flight entertainment system.

To watch videos on your Google Nexus 7, you’ll want to follow these steps…

Video Players

First, you need a decent video player. These two seem to be the best:

I’d recommend trying both, since some videos might work in one but not the other.

Copying videos to your Nexus

  1. Plug your Nexus into your computer
  2. It should show up in My Computer (as “Nexus” or “Android” or something similar)
  3. Open up that folder
  4. You should see a bunch of folders there already (things like “android”, “Alarms”, “DCIM”, etc)
  5. Create a new folder “Movies” (if it doesn’t exist):
    1. Click File > New Folder
    2. Name it “Movies”
  6. Find the movies you want to copy via My Computer
  7. Select them all, then copy:
    1. Click + Drag / Ctrl+Click files
    2. Edit > Copy
  8. Go back to the “Movies” folder on your Nexus
  9. Edit > Paste
  10. When complete, “Eject” your Nexus

Watching the movies on DicePlayer

  1. Open DicePlayer
  2. Open the left-hand menu by touching the icon in the top-left
  3. Select “+ Add Folder”
  4. Find the “Movies” folder:
    1. “storage” > “sdcard0” > “Movies”
    2. Hit “Ok”
  5. Select “/storage/sdcard0/Movies” from the list under “Local” (should be the last one)
  6. Close that side menu by touching the greyed out area
  7. Your movies should be visible
  8. Tap to play!

Watching the movies on MX Player

  1. Open MX Player
  2. You should see the “Movies” folder with a tag “NEW” next to it
  3. Open this folder
  4. Tap to play!
  5. If you don’t see the “Movies” folder, Tap the refresh button at the top (the circular arrows)

Helpful Tips

I’d highly recommend testing every video you copy in one of the players – you only need to make sure it plays both video and audio, then move on to the next for each one. There’s nothing worse than getting on a plane, then realizing the video you were looking forward to wont work.

On that note, if you are flying, I recommend actually watching some videos on the Nexus a few times before the flight date. This is just so you get used to using it, in case there are any quirks you need the internet to help fix!

Enjoy!

Root Samsung Galaxy S4 GT-I9505G 4.2.2 on Mac OSX

Rooting the SGS4 GT-I9505G on OSX shouldn’t be this hard, should it? But, it is.

  1. Setup VirtualBox (don’t forget the Extension Pack) with an XP Virtual Machine.
  2. Boot into this VM image by opening Virtual Box, and selecting the “IE8 – WinXP” image and pressing “Start”.
  3. Once booted, select Devices > Install Guest Additions from the (OSX) menu. Reboot the VM.
  4. Within the VM, download and install the Samsung Drivers. Follow “Installation 1”. Shut down the VM.
  5. Now, plug your SGS4 GT-I9505G into your Mac. Within VirtualBox, select the “IE8 – WinXP” image, and press “Settings”.
  6. Select Ports > USB, then click the “+” symbol on the right. Select the “Samsung” option.
  7. This should add an item into the main window. Double click this new “Samsung” item. Clear out all fields except “Name”, and select “No” for “Remote”. Click “OK”.
  8. Now, ensure “Enable USB 2.0 (EHCI) Controller” is ticked.
  9. Click “Ok” to close this window.
  10. Unplug your phone, then start the VM again.
  11. Within the VM, download the CF-Root for this device: CF-Auto-Root-jflte-jfltexx-gti9505.zip.
  12. Unzip it into a folder. You should now have 3 files: “Odin3-v1.85.exe”, “Odin3.txt”, and “CF-Auto-Root-jflte-jfltexx-gti9505.tar.md5”.
  13. Double click “Odin3-v1.85.exe” to launch the flashing utility.
  14. Plug your SGS4 GT-I9505G into your Mac. The Windows VM should ‘detect new hardware’, and eventually an orange box should show on the left hand side of the Odin window.
  15. If you do not see this orange box, from the (OSX) menu, select Devices > USB Devices > Samsung to enable sharing of the USB device with the VM.
  16. Now, within the VM, click “PDA”. Select the “CF-Auto-Root-jflte-jfltexx-gti9505.tar.md5” you unzipped earlier.
  17. Click “Start”.
  18. Let Odin do its thing, and eventually the orange box will turn green saying “PASS!”. You should also see your phone reboot, and a pirate looking android symbol show briefly while rooting takes place.
    If Odin appears to hang (often at “SetupConnection”), follow these steps:

    1. Unplug your phone
    2. Power off your phone
    3. Boot your phone into “Download Mode” by holding: Home, Volume Down, and Power
    4. Wait until the “warning” screen appears, then release the buttons
    5. Use Volume Up to acknowledge the danger
    6. Ensure Odin is still running
    7. Plug your phone back into the computer
    8. Let Windows install any drivers it may want to
    9. Once Odin shows the yellow/orange box again, hit “Start” and things should progress properly
  19. Once fully rebooted, unplug your phone, and check that the “SuperSU” app has been installed to your applications.

Success! Enjoy!

Interesting things in Silicon Valley on my First Day

Bikes. Everywhere! Thought Sydney had a lot of cyclists? That’s nothing on the huge number of people riding around the Bay Area!

Tech logos. Everywhere! In just one day, I saw people carrying/wearing logos for: Oracle, BitTorrent, Ebay, Dropbox, and (of course) Groupon! That was without me even trying to spot them.
Continue reading

Starting out in California for Dummies (aka: Australians)

[markdown]
So, you’ve moved from Australia to California? *Great for you!* Got no idea what you’re doing? *Me either!* But, here’s some tips I’ve picked up along the way…

Continue reading