Brew + encfs + osxfuse + Yosemite upgrade = problem

I finally pulled my finger out and updated to Yosemite yesterday. I probably don’t need any of the features, but I prefer the look. It also seems like a good idea to stay up to date for warranty purposes – I once got an out of warranty battery replacement 4 years after purchase because I was a good Apple kid and stayed up to date. Anyway, as with the update to Mavericks, I ran into a problem with EncFS not working.

Continue reading

Swearing at your File System

Recently I was working on a Solaris box remotely and lost my temper.  I can’t remember why, and it’s not relevant.  What is relevant is that in my rage, I swore at my file system.  I know it was childish, and I definitely know better, but in the heat of the moment, I made a mistake.  Unfortunately, I was in the process of naming a file in Vi, and I ended up with a file name full of punctuation marks.  Realising my mistake, I immediately tried to remove the offending file.  To my surprise, while I could see the file by issuing a simple ls, I couldn’t remove it. Bash issued a syntax error, interpreting the punctuation marks as special symbols. I now realise that I could have very easily escaped the offending characters, but I wasn’t that smart at the time, so what follows was my rather roundabout solution. While these steps may not be useful in this scenario, parts of the solution may prove useful for others.

Remembering back to my systems architecture classes at university, I started thinking of how I might get to my file via its inode rather than its file name.  A quick search of the man page for ls revealed that I could list all of the inodes in a directory. Success; I now had another method of accessing the file.  Checking the man page for mv and rm, I couldn’t see any way to rename or delete the file via its inode.  Having recently done some work with find I knew how versatile and useful a tool it is.  Checking its man page, I was pleased to find that I could search for files by their inode number.  Combining this with the exec flag, I was able to rename my file to something sensible.  The code snippet below gives an example of how this all fits together.

ajmccluskey@solaris $ ls
^()$@  Documents
ajmccluskey@solaris $ ls -i
264015 ^()$@    262180 Documents
ajmccluskey@solaris $ find . -inum 264015 -exec mv {} test \;
ajmccluskey@solaris $ ls
test  Documents

So there you have it. My lacking knowledge of Bash will never get in the way of me solving a problem; albeit in a very roundabout manner.

x11vnc and the Shift Key

For anyone out there who has read my previous posts on building your own OpenSolaris file server, I have another addition to make. In my second post regarding, among other things, setting up a VNC server, I included a script to start x11vnc. This setup has always worked fine for me with one exception: the shift key. Whenever I want to type a capital letter, or use the shift key for any reason, it doesn’t work. Tonight, after a cursory google search, I found someone with an answer. I rushed off and added the option to my script before running it to apply the changes. Lo and behold, the shift key was working. “Great, that was too easy” I thought to myself. However, I quickly discovered that the arrow keys were doing weird things. The most problematic of these things being the lack of repeating the previous command entered at the command line when pressing the up arrow. This was not a sacrifice I was willing to make. Luckily, the ever informative serverfault came to the party with an even better solution.

I’ll leave it as an exercise for the reader to apply these changes to the original script. If you have problems, don’t hesitate to contact me or comment. Finally, a comment on the page with the first solution mentioned that this issue has been fixed in a more recent version of x11vnc, however I am yet to check this out.

New Language Instead of Autocomplete in IDE

While messing around with a personal project in Eclipse, I attempted to use the Visual Studio keyboard shortcut for autocomplete (ctrl + space). Rather than completing the variable name I had started typing, it began trying to convert my keyboard input into Chinese characters. At first I thought this might have been some idiosyncrasy of Eclipse. After a little research I discovered that Eclipse does in fact use ctrl + space for autocomplete, but Windows (bless its soul for trying to help) was hijacking the shortcut and using it to change languages. For anyone in a similar situation, here’s how you fix it in Windows 7:

  1. Open Control Panel -> Region and Language
  2. Select the “Keyboards and Languages” tab
  3. Click the “Change keyboards…” button
  4. Select the “Advanced Key Settings”

You should now see a list of actions and keyboard shortcuts. For each action that has a conflicting keyboard action, select it and click the “Change Key Sequence…” button. Here you can either change the action to have no shortcut at all, or give it an alternate shortcut. Keep clicking OK until you’re out of the menus. Immediately the keyboard shortcut stopped switching my language, and after a restart of Eclipse, started autocompleting. Simple!


Google Chrome on Windows 7 RC1

This is just a quick post for anyone having difficulties getting Chrome to run on Windows 7 RC1. After installing Chrome, as soon as I tried to load a page it would either do nothing, or show me an “Aw Snap” page telling me something had gone wrong. As a result, the browser was completely useless. A quick search revealed that users can subscribe to one of three different Chrome channels. These channels are basically the three main builds of Chrome at a given time, which are: stable, beta, and dev. The quick solution to my problem was to switch over to the beta channel, which immediately fixed my problem. As proof, I’m currently writing this post using Chrome =D. Given that Windows 7 is still only at RC1, it’s not surprising that the stable build of Chrome doesn’t work with it (at least not for everyone).

As a side note, you should definitely check out Chrome Experiments to see some of the funky stuff people have done in browsers. The examples I’ve looked at also work in Firefox, so don’t worry if you don’t have Chrome installed.