Sunday, September 23, 2012

Working Remotely on Linux

The beauty of remote access is that nobody knows or cares what operating system you use, as long as you have client software that can access your firm's server. Most of my work is done remotely, so that means I get to use Linux all day long! There are several clients available for Linux; this post discusses the ones I have found to work best.

Remote Desktop Clients

For the richest remote access experience, it's hard to beat Microsoft's Remote Desktop Services (fka Terminal Services), which has been available on Windows Server for as long as I can remember (at least back to Windows 2000 Server). I recently set this up for our law firm on Windows Server 2008 R2. All of our software, from office applications to law-specific programs, have been installed on our Windows Server, and multiple users can log in to the server remotely with full access to everything they would have on their in-office desktop.

To access Windows servers running RDS from Linux machines, the rdesktop command line program is unparalleled. There are many GUI-based RDS clients, but most of them are simply front ends for rdesktop, and none that I have tried have the power and flexibility of using rdesktop from the command line. If you have command-line phobia, it's not nearly as hard as it seems, and this post explains how to use it. But if, after reading this post, you insist on using a GUI-based client, try Gnome-RDP. It doesn't have even 15% of the options available on the command line, but it has the most of any other Linux RDS client I've tried.

The beauty of using rdesktop is that once you decide on your optimal settings, you only need to enter the command once, and then you never need to see the command line again. It does require some extra time up front to figure out what settings you like, but that initial work will ensure that you have the best possible experience. The list of options for rdesktop is extensive, but most of them are not needed. Here is the basic command format, followed by a description of the most common options:

Basic Command Format:

rdesktop -u [network user name] -p [network password] -d [network domain name] [options] [server IP address]:[server RDS port number]

Command Options:

-a [8, 15, 16 or 24 sets the color depth; use 8 for 8-bit color for fastest speed; 24 for richest color]

-x [experience; m disables all desktop effects for faster speeds; l enables all effects]

-f [use fullscreen mode]

-g [desired height x width of RDS screen, e.g., 1910x1100]

-z [enable compression, but only works with 8bpp color depth]

-P [enable bitmap caching to speed access]

-r disk:remote=[path to a local folder to use for sharing files with RDS]

-r sound:local [directs sound to my local PC] [server IP address]:[server RDS port number]

Sample Command:

So here is the full command I use to access our firm's server:

rdesktop -u [my network user name] -d [our firm's domain name] -p [my network password] -a 8 -x m -g 1910x1100 -z -P -r disk:remote=[path to a local folder on my computer to use for sharing files with RDS] -r sound:local  [server IP address]:[server RDS port number]

Once you've figured out your best settings, simply add the command to your menu or panel or whatever. In Ubuntu 10.04, go to the System menu, Main Menu, and then add your RDS command wherever you want. To add it to your panel, just right-click on the Panel, choose "Add to Panel," and then enter the command.

VNC Client

With RDS, your access is invisible to someone who is working on the physical server; they cannot see what you are doing. If you want someone to be able to observe what you are doing (such as for tech support), VNC is helpful. Special software on the Windows host machine is required. I use RealVNC, but there are many other options. On the Linux client side, many, if not most, of the RDS clients also support VNC. I prefer to use the GUI-based Remote Desktop Viewer tool, aka vinagre. It is simple, but adequate.





Sunday, January 22, 2012

Is Linux Ready for the Law Office?

As much as I love Linux, the answer is still no! I've been running GNU/Linux in my law office for over two years, and I absolutely love it. But in my side job as an IT administrator, I wouldn't recommend it to a law firm. As an operating system, GNU/Linux can hold its own. The problem primarily lies with the dearth of applications written for Linux. There are five areas of weakness:

Billing

I searched high and low, but was never able to find a satisfactory time-tracking and billing solution under Linux. I finally ended up installing Windows XP in a VirtualBox so I could run PCLaw. It works great, but it's far from ideal to install two operating systems just to run a billing program.

Practice Management

Again, a thorough search failed to reveal any law office practice management software that runs under GNU/Linux. Many people use Clio or other cloud-based systems, which are completely platform-independent, but if you want software that runs locally on your machine, you're out of luck unless you want to run Windows in a VirtualBox.

Word Processing

Neither Microsoft Word nor WordPerfect run natively under GNU/Linux. Fortunately, both programs run under wine, which is essentially a Windows emulator that allows many Windows programs to run seamlessly in Linux. Under wine Windows and Linux programs can share the same clipboard, printers, and files. The problem is that while wine has come a long way and is a very usable product, it is far from perfect. For example, I occasionally have problems printing from both Word and WordPerfect. While this is not a major issue for me, as I can always find a workaround, it would be a headache attempting to support an entire law firm running Word and/or WordPerfect on Linux.

OpenOffice (or its new cousin LibreOffice) is a great, fully-functional office suite that could serve as a free replacement for Microsoft Office or WordPerfect Office, except for one problem: compatibility with Microsoft Word. OpenOffice does a poor job of reading and writing complex Word files, especially pleadings, documents with fancy letterheads, and documents with headers and/or footers. OpenOffice is great for internal documents, but it is simply not practical when we as lawyers are constantly exchanging Word documents with our clients.

OCR/PDF

There are still no solid OCR products for GNU/Linux, but OmniPage does run almost perfectly under wine. The problem lies more with PDF editing, which is essential for document review and redaction. While Acrobat pretends to be multi-platform, Adobe has only ever made its Acrobat Reader available under Linux (not the Standard or Professional versions of Acrobat). I use Acrobat 5.0, which runs almost perfectly under wine, but is now very out of date.

Usability

GNU/Linux has come a long, long way in terms of ease of use, thanks in large part to Ubuntu and its community. But it still has a ways to go before I would be comfortable recommending it on a law office desktop. Just to give a few examples, my Java support broke a few months ago when Canonical (the company that distributes Ubuntu) decided to "upgrade" my Sun Java by replacing it with non-working software due to a licensing issue. That just is not acceptable for a business OS. Similarly, Flash stopped working in my Chrome browser a few months ago because Google (the maker of Chrome) failed to update the plugin for some reason. Those sorts of things don't happen very often under Linux, but it's often enough to indicate that it's not yet a rock-solid business environment. I was able to fix both problems after doing some Googling, but I probably wasted about two hours of time.

Conclusion

It is certainly possible to run a law office on Linux, as I've been doing for over 2 years, but it is not yet optimal to do so. The lack of applications that lawyers need requires resorting to wine and/or VirtualBox, and there are problems and inconveniences associated with both.


Sunday, January 15, 2012

Overclocking in Linux

All of the tools needed for overclocking are freely available for Linux. This post describes how I overclocked my Athlon II X4 635 (2.9Ghz) to 3.5Ghz (250 FSB, 14x) in Ubuntu 10.04-64 (LTS). If you want to skip ahead to an overclock recipe for the Athlon II X4 635 and performance outcomes, scroll down to the bottom.

Prerequisites

In my opinion, the Athlon II X4 series is the best bargain out there in the AMD family. The CPU's are highly overclockable, and frankly, neither the Phenom II nor the Bulldozer series offer a significant increase in performance. Also, the Phenom II requires substantially higher wattage than the Athlon II. The bad news is that the Athlon II's run very hot with the stock cooler. My system would get into the 60's (Celsius) even without any overclocking. So a better heatsink/fan combo is a must. I picked up the CoolerMaster Hyper 212+ for $25 at Fry's. The system runs about 40 degrees cooler (Celsius), and the fan is silent.

Linux Tools for Overclocking

Temperature Monitoring - sensors is a tool that can be run from the command line and will output your current CPU temperature (and whatever other temperature sensors it detects). It is installed by default in Ubuntu. For more details on how to use it, click here. Even handier is the Gnome applet that constantly displays your system temperature on your panel. Simply enter "sudo apt-get install sensors-applet" in Terminal to install the program, and then right-click on your panel to add it to your panel.

Torture Testing - prime95 is probably the standard for stress-testing your overclocked system. I found that with certain overclock settings, my system would run for days without a hitch, but running prime95 for a few minutes would cause it to crash, thus exposing the system's instability at that speed. prime95 will cause all of your cores to run at 100%, non-stop. If your system can survive prime95 all night long, you've probably found some stable settings.

Benchmarking - System Profiler and Benchmark is available in the Ubuntu Software Center. It provides information about your system and also offers about 8 different benchmarks so you can compare how your overclock settings are affecting your system performance. (One thing I learned is that the "CPU CryptoHash" test is useless; the results vary widely, even with the identical setup.) phoronix is also available in the Ubuntu Software Center. It's much more sophisticated, but also much more difficult to learn and use. For a real world test, I also created a large, 30-minute sound file in Audacity that I export as an MP3. Audacity has a time counter that shows how long the export takes. Audacity is also available in the Ubuntu Software Center. I'm not a gamer, but there are many games available that have benchmarking capabilities as well. I've tried running some of the Windows PCMark benchmark utilities under wine or in a VirtualBox, but they never work.

Boot Disk - Ubuntu Live CD 10.04-64 (LTS) I'm probably overly cautious, but I don't think it's a good idea to boot from your hard drive when testing an overclock setup. My hard drive has all of my work and personal information on it, and I don't want to risk corruption due to an unstable overclock. So I disable my hard drive and boot from a Linux CD for testing purposes. I load the utilities I will need on a thumb drive to save time downloading them from the Internet.

The Process

Had I known just how time-consuming it is to overclock a modern computer system at the beginning, I probably wouldn't have bothered to try. Back in the old days, overclocking was a simple matter of playing with bus speeds and CPU multipliers. Nowadays, just about everything is configurable, which means it takes forever to find the optimal combination of settings, or "recipe." Here is the the hardware I had to play with, and what I did to find my optimal settings.

System Specs

CPU: Athlon II X4 635 (2.9Ghz, locked multiplier)

Mainboard: Biostar TA880GB+
RAM: 16gb DDR3-1600 RAM, Patriot PGV316G1600ELQK
CPU Fan: CoolerMaster Hyper 212+
Default (stock) Settings: 200Mhz FSB, 14.5 CPU muliplier, RAM running at 1066, 2.0Ghz HyperTransport link, CPU VCore 1.4V

Overclocking

Before starting, I disabled Cool'NQuiet in BIOS, which will mess with your CPU speeds and interfere with testing. You can always turn it back on later for power savings if desired.

There are two basic approaches that I tried. First, I just tried increasing the FSB (Front Side Bus) speed. I could only get to 220 Mhz without crashing, so I realized I needed a different approach. My mainboard allows the HyperTransport link speed and RAM speed to be set independent of the bus speed, which makes things a little easier. So I tried decreasing the CPU multiplier, HyperLink transport speed, and RAM speed, while increasing the bus speed. I found I could get to a 250FSB speed without any problems. I then gradually increased the RAM speed, HyperLink transport speed, and CPU multiplier until I found problems. I found that my limiting factors were my RAM speed (stable at 1066) and CPU multiplier (stable at 14x). Unfortunately, my mainboard does not allow increasing the HyperLink transport speed beyond 2.0 Ghz, so it is stuck there. (It can only be decreased below that speed.) I did have to give the CPU some extra juice; I increased it up to 1.524 Vcore. I found that the RAM speed could be increased if the timings were loosened, but the performance didn't really improve.

Results

So here are my final overclock settings:
250 FSB, 14x CPU multiplier (3.5Ghz), 2.0 Ghz HyperTransport link, DDR3-1066 (7-7-7-20 timings), VCore 1.524

The system ran stable overnight, with a max temperature (running the prime95 torture test all night long) of 53 degrees Celsius. In my daily use, the system usually runs in the low 20's.

As far as benchmark comparisons, a detailed comparison can be viewed on Phoronix here. The results include a number of different systems, but you will note that it includes two entries for my Athlon II X4 635, one at the stock speed, and the other overclocked.

As far as basic comparisons with the System Profiler and Benchmark, as well as my custom MP3 test with Audacity, here are the results. All measurements are in seconds--the lower, the better.

Default (Stock) Settings:
Blowfish: 3.35
Fibonachi: 2.61
N-Queens: 10.04
Export large MP3 : 78

Final Overclock Settings:
Blowfish: 2.77
Fibonachi: 1.7
N-Queens: 7.86
Export large MP3: 62

So I achieved roughly a 20-25% increase in performance, depending on the benchmark.

Monday, January 9, 2012

General Tips for Running a Law Office on Linux


After over two years of running Linux, I'm never going back to Windows. The flexibility, reliability, speed, and instant availability of free software has become addicting.

I first tried Linux out of frustration with the copy-protection practices of Microsoft and other Windows-based programs. Every time I upgraded my computer, I had to re-validate my copy of Windows, which sometimes required a phone call to Microsoft and other vendors. There are few things more frustrating than begging a vendor for permission to use a product that I already paid for! Now when I upgrade my computer, Linux magically recognizes my new hardware, and I'm up and running again.

That being said, running Linux for my law office is not without challenges, because law-specific applications for Linux are almost nonexistent. Here are the solutions that I have found.

Word Processing Solutions

OpenOffice

OpenOffice (or its new cousin LibreOffice) is a great, free, open source office application that has matured over the past few years. I use it as much as I can. However, it still lacks 100% compatibility with Word and WordPerfect files. (In fact, while it can import WP files, it cannot save in WP format.) Because I am constantly exchanging editable documents with Word and WordPerfect users, I am forced to continue using both of those products. I have encountered no compatibility issues with OpenOffice's spreadsheet program. It appears to be perfectly compatible with Excel files.

WordPerfect

There was a version of WordPerfect for Linux at one time (v8), and it is still available for free download on the Internet. Unfortunately, the libraries that it relies upon are very outdated, and despite hours of tweaking, I have never been able to get it to work. Fortunately, WordPerfect 10 for Windows runs almost flawlessly under wine. (Wine allows Windows programs to run seamlessly under Linux.) The bad news is that the WP 10 installer doesn't work under wine. Therefore, the only way to install WP is to install it on a Windows box, using a program like regshot to capture all the registry changes, which can then be imported into the wine registry. Once installed, however, it runs almost perfectly. I've been using it daily for the past two years and the only glitches I have found are:
  1. WP always forgets its window location after exit. Each time you load WP, the program is not visible until you load it again. (Yes, you have to load it twice.) Then the title bar appears at the bottom of the screen. You simply maximize the window or drag it to the desired size, and you're off and running.
  2. Occasionally, the publish to PDF feature doesn't work, sending the document to the default printer instead. My solution has been to set the PDF printer as my default printer in Linux.
  3. Occasionally opening the Find dialog freezes WP. I just load the Find dialog right after I load WP, place it somewhere out of the way on the screen, and then click in the Find box when I need it. As long as keep the Find dialog open, it has no problem.
  4. The enhanced file open/save dialogs do not work and must be disabled.
  5. The compare function does not work. I use OpenOffice to compare WordPerfect files.
WP 10 is very outdated now, but it retains document compatibility with the latest versions of WordPerfect, and it has all the features I need. Although I have not tested them, versions 11 and 12 are supposed to work well under wine as well.

Word

I use Word 2007, and it installs and runs perfectly under wine.

Indexing Word and WordPerfect Files

The free Tracker search tool will index Word and WordPerfect files, with the aid of plugins that are freely available. This allows instant searching of the content of word processing files.

Email/Calendar

Ubuntu 10.04 is still my favored Linux distribution, and the built-in Evolution works well for email and calendaring. It must have some form of indexing built in, because its email search function is instantaneous.

PDF Editing/Scanning/OCR

Acrobat

It is disappointing that while Adobe Acrobat feigns to be a multi-platform program, only the reader is available for Linux (not the Standard or Professional versions). However, I have an old version of Acrobat for Windows (5.0) that installs and runs perfectly under wine. Interestingly, the older standard versions of Acrobat include a very sophisticated and fast indexing feature that is now found only in the much more expensive professional version, so it may not be such a bad thing after all. More recent versions of Acrobat are supposed to work under wine also, but I have not tried them.

There are other PDF editors available for Linux, but their functionality is limited.

Scanning

Scanning in Linux is probably more of a hardware support issue. I have a Brother multifunction, and the free "Simple Scan" program works fairly well with it.

OCR

There are some free OCR programs for Linux, but they seem to be very rudimentary, and I have not tried them. I run OmniPage 15 for Windows under wine, and it works without a hitch.

Timekeeping/Billing/Trust Accounting

To date, I have not found a viable solution for timekeeping, billing, and trust accounting under Linux. I had previously used Time Matters and PCLaw, but neither runs under wine. One option is to use a cloud-based service such as Clio, but I still prefer to run all my software locally. I run Windows XP inside a VirtualBox so I can continue to use PCLaw. Klok is an alternative I used for a while to do time-keeping. Klok is a free Adobe Air time-tracking application that will export to an Excel file. (Adobe Air is a platform that allows programs to run independent of the platform. It is based upon Flash, so it is very inefficient. You need a fast computer, but it works.) The problem with Klok is that it does not have a link to PCLaw, so you must copy and paste your time entries from Klok into PCLaw.

Web Browsing/Remote Access/Java Support

The Internet experience under Linux is very mature. Firefox is a popular and fully functional browser. I prefer Chrome, as it is addictingly fast. For remote access, there are a variety of VNC-compatible programs. Java support is also excellent. Flash support is (finally!) on par with Windows and Mac. I am using the 64-bit version of Flash and have had no problems with it. Skype also works well under Linux.

Backup

Despite the name, Simple Backup is actually a sophisticated free backup program. I backup to Ubuntu One, which is a free cloud-based data storage system that runs under Linux, iOS, Android, and Windows, so you can synchronize files across systems. (There is a charge if your online storage needs exceed 5gb.)

VirtualBox

A possible solution to virtually all of the application unavailability problems is to run Windows in VirtualBox. VirtualBox is a free program that emulates a separate computer within an operating system. You decide how much of your computer's resources to allocate to it (memory, processor cores, video screen size, USB devices, etc.). Multiple operating systems can then be loaded within VirtualBox, such as Windows, OS/2, or other versions of Linux or Unix. When I was initially setting up my law office, I steered clear of VirtualBox because I felt it would be difficult to set up and cumbersome to use. I wanted to use native Linux apps or wine-friendly apps as much as possible. I eventually gave VirtualBox a try, and it is actually not too bad. I loaded Windows XP on it, and almost any Windows program will run under it. Nonetheless, it is a bit of a resource hog, and it is more convenient to use wine, which runs Windows programs seamlessly, as if they were Linux programs.