Balsamiq on Debian 8 (Jessie)

I’m getting to the point where I have to start doing some wireframe work, so I can sketch out the UX for PART and some other side projects. One great wireframe tool is Balsamiq. Balsamiq offers installers for 64-bit Mac, and Windows, but nothing for Linux. This is a bit of a problem.

  • Because I am endeavouring to be more mobile, I have to use a laptop; i.e. I can’t be stuck in front of my office computer, which conveniently for Balsamiq is a 64-bit Mac running El Capitan (10.11).
  • I have two laptops at my disposal: one 32-bit Mac, and one 64-bit Thinkpad X200.  Both machines are dual-boot with Debian 8 (Jessie).
  • Clearly, I can’t use the 32-bit Mac, and if I use 64-bit Windows, I lose my development environment.
  • Luckily, Balsamiq runs under Wine.

Now, wtf is Wine?

Wine is a Linux tool that lets you run Windows apps.  Easy enough.  I booted up Debian on the X200 and proceeded to install, only to be faced with:


it looks like multiarch needs to be enabled. as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32"
wine: Bad EXE format for Z:\home\tendim\LAKESUPERIOR\Balsamiq_Mockups_3\Balsamiq Mockups 3.exe.

What the hell does all of that mean?

Did some searching… I have 64-bit Debian installed, but it looks like Balsamiq requires a 32-bit windows installation. However, you can’t blindly perform a:


apt-get install wine32

Because then you get this message:


tendim@Carrot:~$ sudo apt-get install wine32
[sudo] password for tendim:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package wine32 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
wine

E: Package 'wine32' has no installation candidate

Damn it..

Unbeknown to me, there is a wine32 package, but you need to enable multi-architecture; this was the first half of the first error message, “execute “dpkg –add-architecture i386 && apt-get update &&”, which I conveniently ignored.

Anyhoo. Performing:


execute "dpkg --add-architecture i386
apt-get update
apt-get install wine32

Got me what I needed for Wine. Then, I followed the instructions here, and voila!, I now have a working Wine installation.

One final nuance is fonts.. In Balsamiq some text areas weren’t working (i.e. showing garbage symbols instead of actual text). This boiled down to missing fonts. The details are here, but in a nutshell the following got the requisite (minimum) fonts in place:


sudo apt-get install winetricks
winetricks corefonts

Time to get some wireframes going.

Advertisements
Balsamiq on Debian 8 (Jessie)

Installing .deb files on Linux

The Apple Macintosh has been heralded as one of the most user friendly computing platforms ever, with its full vertical integration of hardware, software, and peripheral devices. The Apple Macintosh, and Mac OS, are typically the epitome of user friendliness and accessibility. But, Apple being a business, effectively locks out older hardware from modern software bliss. Ironically, I had to install the most open source operating system in the world, one targeted at tech-heads and developers, to get my 2006 MBP running again at decent speed with more modern applications.

That said, one of my go-to apps is Remember the Milk, which I use to manage my day to day activities. Luckily, RTM has a Linux version. I run Debian, and RTM offers an Ubuntu version. This makes sense since Ubuntu is arguably one of the friendlier and more accessible Linux distributions. But, Ubuntu is built on Debian, so when RTM releases their app as a .deb package, this means I can download it. Woot!

Conventionally, I use apt-get.. I’m still wading in the shallow end of the Debian pool, but you can install a .deb file manually (i.e. without apt-get); this is mainly because apt-get is a front end to the Debian package manager, dpkg.

That said, thank you Ask Ubuntu @ Stack Exchange:


install:
sudo dpkg -i DEB_PACKAGE

uninstall:
sudo dpkg -r PACKAGE_NAME

Now, RTM is happily running on a 11 year old laptop that the manufacturer has all but abandoned, thanks to some great open source software.

Installing .deb files on Linux

Mercury; offline reading.

With all of my at-home time, I’ve been reading a lot of stuff online.  One major challenge is picking up where I left off, or taking stuff offline to read elsewhere (e.g. on the streetcar to work).   Many browers have a Reader Mode which strips down a page to the bare essentials for easy consumption…  Currently to make this offlineish the workflow is:

  1. Switch to reader mode
  2. Print to PDF
  3. Export PDF to my BB Priv (Android) or iPad Mini (iOS)
  4. Read offline

Okay, that is very cumbersome.. Four steps, including an export and an import. And iOS is so crappy that the import is a daunting task.

I found out that Safari’s reader mode is based off of something called Readability.  I’ve never heard of Readability, but they are gone, replaced with Mercury.  This bears some more looking into.  Maybe an app that can slurp content via Mercury, and pump it to a datastore for consumption by other devices?  True, you’d need some cloud type stuff to sync stuff, but since I do this from home anyways, a one time wifi sync would be preferred to the hacking steps above to export to PDF, etc.

Mercury; offline reading.

Linux hacking

With our little one here, I’ve been looking for ways to become more mobile, especially with regards to development. At my disposal I have:

  • An 2006 15″ Macbook Pro (with a Core Duo processor, i.e. the 32-bit one) with a dead battery, so it is essentially a static machine
  • An aging ThinkPad X200, dual boot Win7 and Ubuntu.

Now, the MBP has a great 15″ screen with lots of resolution, but the X200 is truly mobile (e.g. it has a working batter), although the screen is on the small side.   So ultimately I will use both machines, but I have to baseline them with regards to development..

To date my development has been using Eclipse CDT on my Mac Mini.  The MBP only runs Snow Leopard (10.6.x) and the X200 runs Windows; both of these OSs are unusable for (modern) development.  Yes, the X200 also has Ubuntu, but that was just to fuck around, so the entire install is spotty at best.  Solution?  Fresh installs of Linux on both machines.

I managed to get Debian 8.0 (Jessie) installed on the MBP, and except for the buggy graphics driver, the machine is pretty nice to work on.  I worked on that for a week, and today I sat down to wipe Ubuntu from the X200.  It was a pretty simple install, with the following caveats:

  • Debian installer asks for non-free drivers for the wifi, so I had to install over Ethernet and install wifi after the fact. Instructions were found here
  • The X200’s TrackPoint didn’t work, out of the box, so I had to follow the instructions here to get the middle button to allow for scrolling: instructions.

Because the Internet never seems to keep pages forever, I’m jotting notes down here for future reference. For installing the wifi drivers on the ThinkPad X200, instructions for getting wifi to work were pretty simple after the install was complete.  Log in, switch to root (or sudo everything), and:

  • Add a “non-free” component to /etc/apt/sources.list, for example:

    # Debian 8 "Jessie"
    deb http://httpredir.debian.org/debian/ jessie main contrib non-free
    
  • Update the list of available packages and install the firmware-iwlwifi package:

    # apt-get update && apt-get install firmware-iwlwifi
    
  • As the iwlwifi module is automatically loaded for supported devices, reinsert this module to access installed firmware:

    # modprobe -r iwlwifi ; modprobe iwlwifi
    
  • Configure your wireless interface as appropriate.

For the latter (TrackPoint), you had to:

  • Install xinput via:
    apt-get install xinput
    
  • And then to enable vertical scrolling

    xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 1
    xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 2
    xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 200
    

As I type this Eclipse CDT is installing in the background, after which point I can start hacking again on PART.

 

Linux hacking

Yahoo Quotes in GnuCash 2.6.7

Running GnuCash 2.6.7 under OS X El Capitan, I was unable to use the Yahoo Finance Quotes. Clicking “Get Quotes” from the Price Editor resulted in a message about there being a system error, “There was a system error while retrieving the price quotes.”

Some quick searching brought me to this page. Following the instructions there fixed the problem under El Capitan. Note that the folder with the relevant binary files is /Applications/GnuCash 2.6.7/GnuCash.app/Contents/Resources/bin.

Yahoo Quotes in GnuCash 2.6.7

Transfering a project in Eclipse to bitbucket

The past year or so I have really gotten into coding again, to the point where I have been looking at code repositories.  After much research, I’ve settled on Bitbucket.  The first challenge was to get my existing code into the repository from Eclipse.  Thankfully the kind folks at stack overflow had a solution, which I’ve copied here for my own notes.

Original post: Link

 

  1. First, make sure you already installed EGit or other git control plugins on your Eclipse.
  2. Second, add Git Source Control to your existing Android Eclipse Project (local) and create a local Git Repository for the Project, by following the steps below: (or check this video)

    • right click your project -> Team -> share project
    • check the option of “Use or create repository in parent folder of project”
    • select your project
    • click the button of “create repository”
    • hit “finish”
    • right click your project -> Team -> Add to Index
    • right click your project -> Team -> commit
  3. Then push your Project (now is under local Git Source Control) to a Remote Repository such as GitHub.com or BitBucket.org, by following the steps below: (or check this video)

    • right click your project -> Team -> remote -> push
    • type in the URL of the remote repository you are using
    • type in username and password, then hit “next”
    • click the button of “Add All Branches Spec”
    • click “next”
    • click “finish”
Transfering a project in Eclipse to bitbucket

Adventures with Stuffit

As an exercise, I have been working on getting my classic PowerBook 3400c/200 online. I started with a fresh install of MacOS 8.1 (i.e. nuking the hard drive, and starting from a barebones machine). The intent is to turn this into a Classic Mac development, gaming, means to transfer files to my Mac Plus, and writing machine.

With the system freshly formatted and installed, I found that I had to get some more software onto the box. Because the 3400 has built in Ethernet, I had connectivity right out of the box (i.e. no need to play with drivers, PCMCIA cards, or SCSI-to-Ethernet adapters). The MacOS 8.1 CD Installer installs a number of tools which were standard at the time:

  • Netscape 3.x
  • Internet Explorer
  • Claris Emailer
  • Stuffit Expander
  • ..and some others..

Missing?

  • A more modern FTP browser (The standards I am used to on Classic are Anarchie and Fetch)
  • Email app (looking to fill this gap)
  • Developer studio (Codewarrior)
  • A selection of games

I had purchased Codewarrior Professional 5 last year, so that was easy enough to install from the regular CDs. The problems started coming up when I tried to get Fetch, that I would have a more robust FTP app.

I had downloaded Fetch 4 from the archive Info-mac website on my Mavericks box, and then booted up Netscape 3 on the 3400 to move the file over. Easy enough. But, when I went to de-binhex and subsequently unstuff the archive, something strange happened.

It didn’t work.

Wait, what?

Stuffit Expander would de-binhex the file, and leave me with a .SIT file to work with. However, if I tried to subsequently unstuff the .SIT file, it would fail, giving me various file errors. It seems that I am not the only person with this problem, as discussed in this Fetch Softworks forum posting. The root cause is that Fetch 4 is stuffed with a newer version of Stuffit, which cannot be unstuffed with the version of Stuffit Expander from the MacOS 8.1 CD.

Now, the solution to this seems easy enough: download a newer version of Stuffit Expander. Info-mac has a copy of Stuffit Lite 6.5, which should do the trick. However, similar to fetch, Stuffit Lite 6.5 is stuffed with a newer version of Stuffit!!! So I am back to square one. You would think that companies would have enough foresight to use the lowest common denominator when stuffing their software, or at least, to use a Self Extracting Archive (.SEA file extension) which does not require an unstuffer to begin with. Alas, this was not the case.

But wait!! I can unstuff the files on my Mavericks box, and then transfer them over, right? Not quite. The built in software for handling archives on OS X Mavericks is the Archiver Utility. However, at some point Apple dropped support for .SIT files in Archiver. So if you use the Archiver Utility, on a .SIT.HQX (i.e. a Stuffit archive that has been binhexed), it will un-binhex, and leave you with a .CPTZ file, which it cannot process.

Okay, that won’t work. But wait (some more)! There is also a copy of Stuffit Lite 6.5 for OS X! Sweet, so I proceed to download it, de-HQX it, and then realize that…it is so old it is for OS X on PowerPC!! "Sadly" my Mac Mini is an Intel machine. To add even more salt to injury, according to the Smith Micro website, their current version of Stuffit Expander works with Stuffit X archives, but does not mention older "plain" Stuffit archives; I didn’t even bother downloading their trial – no need for more bloat on my Mavericks box.

At this point you have:

  • A copy of Fetch 4.0.3 in .SIT.HQX format.
    • Which you cannot unstuff on MacOS 8.1, because the Stuffit Expander included with MacOS 8.1 is too old
    • Which you cannot unstuff in Mavericks, because Archiver Utility does not support .SIT files
  • A copy of Stuffit Lite 6.5, which you cannot unstuff on MacOS 8.1.
    • Which you cannot unstuff on MacOS 8.1, because the Stuffit Expander included with MacOS 8.1 is too old
    • Which you cannot unstuff in Mavericks, because Archiver Utility does not support .SIT files
  • A copy of Stuffit Lite 6.5 for OS X which won’t run on Intel.
  • No means of unstuffing files on OS X.

So…how do I get around this? The answer, not easily. After some exploring, and some experimentation…

  1. Download The Unarchiver for Mavericks, which supports SIT files.
  2. Use The Unarchvier on Fetch 4.0.3 to extract the files.
  3. Use binhex from the terminal to binhex all files in the Fetch folder.
  4. Use Netscape FTP from the 3400 to transfer the Fetch 4.0.3 .HQX file from the Mavericks box to the 3400 box. This assumes you have set up the FTP service on my Mavericks machine.
  5. On the 3400, use Stuffit Expander to de-hqx Fetch 4.0.3. We now have a working copy of Fetch!
  6. Use Fetch 4.0.3 on the 3400 to transfer the remainder of the binhexed files from step 3 above.

Following all of the above, I recreated the Fetch 4.0.3.sit.hqx file using DropStuff on the 3400; because I’m using a much older version, there is a higher probability that anybody who needs this file will be able to unstuff it on older hardware. I’ll be putting it online shortly. I’ll also perform the exercise on Stuffit Lite 6.5.

Happy hacking!
-10d

Adventures with Stuffit