July 25, 2014 at 9:00 pm #17319CWareParticipant
Just wanted to do a quick write-up here of my experiences with NV1 on Linux. For readers pressed for time, the short version is NV1 on Linux is phenominal. No printing issues, and interestingly, NV1 is actually pretty damn compatible with the “Open Source” concept, in that the NPL or “Pop-Up” programming language can be easily combined with other Open Source outputs to make for a hell of a platform. Now the long version:
I made the switch from Windows to Linux about a year and a bit ago, and have been running a Linux system exclusively for business purposes for almost two years. My biggest issues with Windows platform? You’re locked into a proprietary system; setup time for recovering a Windows system easily runs at least an hour; All the constant “security updates” and having to reset the computer; having to buy licenses for multiple computers in the office. And I could go on. In contrast however, Linux is free, customizable to however you want it, and setup time is basically nil – the O/S I run can be set up in 5 minutes.
The Achilles heel of the system (for my industry specifically) has been accounting software. Essentially there are zero accounting programs out there for Linux users, save maybe GnuCash. In my case, NV1 is used as a propietary software at our firm, and is integral to the business. As such, it just needs to work, and until a few years ago, I had assumed NV1 would only work under DOS, which meant you needed Windows. But after an event of extreme frustration with Windows (or should I say multiple frustrations), I finally said screw it and decided I would make the switch to Linux, and see if I couldn’t somehow make NV work, as those frustrations couldn’t be any worse than what I was currently experiencing. Fortunately, the result has been spectacular.
The first thing you need to do to get NV running is get an Open Source program called “DosBox.” I believe DosBox has been mentioned on the forum here before, but basically it acts as a go-between between the NV progam and the Linux OS. DosBox has great documentation on how to get it set up, so basically once it’s up and running, NV will work just like normal for you.
Printing however took a bit of time to figure out, but as it turned out it’s actually quite simple. The issue here is typically one of “Well DosBox doesn’t support printing”, and in a way, that’s true. However, you don’t need DosBox itself to handle the printing; instead, you use the UNIX CUPS printing system, which winds up working even better. I would even say that printing in Linux is even easier than Windows printing at this point.
In the NV1 program, in “Print-Options”, there is an entry at the bottom of the second column called “File Name.” For most Windows users, this will be an LPT”x” reference. On my system specifically, this has been LPT2, so I will continue to use this for explanation purposes. So essentially what this means is that whenever NV wants to print a file, it creates an output called “LPT2”. On Windows machines, anything “LPT2” usually is hard-wired to a printer associated to the LPT2 port. In laymen’s terms (or at least how I interpreted it), NV kicks out a file named “LPT2” and Windows goes “Wow, we’ve got an LPT2 file here, gotta automatically send that out to a printer”, and your file gets printed.
In Linux however, the process is quite different. The technical stuff isn’t worth explaining; what matters to us is that when you print on NV in DosBox in a Linux OS, the same thing happens as before: an LPT2 file gets created. However, “LPT2” doesn’t mean anything to Linux, or the printer for that matter. As such, all that happens is an LPT2 file is created in you NV1 directory, and it just sits there. Essentially, what you’ve done is created a text file named “LPT2” that contains your formatted document to be printed.
All that is left is to somehow send the LPT2 file that is floating in the NV1 directory to the actual printer. Linux CUPS printing is about as plug-and-play as you can get, so adding a printer to your system is easy. Once the printer has been added, printing is as simple (albeit unwieldly) as right clicking on “LPT2” and selecting “open as text”, and then doing a simple “File/Print” from the text editor. In simpler terms, all you are doing is opening “LPT2” in Notepad, and using Notepad to do the final print.
However, this is a bit inconvenient. Most of us don’t want to have to manually open a text editor and print from there. We want a simple key-function to print. And again, Linux makes this easy. What I have on my NV1 setup is basically two keys for printing – F10 in NV “prints” a block of selected text. And in Windows, that was all I needed. However, on my Linux machine, I now have to have two keys for printing. I have F10, and Alt+F10 now. You can of course change these as you see fit, but I will keep them for explanation purposes.
F10 is simply a NV-specific key that calls a specific print setting, and creates an LPT2 file. As described above, this is all Windows needs to print. Linux however needs one more step, and that is where Alt+F10 comes in. Alt+F10 on my system is coded into the window manager to perform a specific function: print a specific file in a specific directory. Another way to think of this is the Alt+F4 function in Windows: everyone knows that Alt+F4 is a shortcut for shutting down Windows. So think of Alt+F10 as being exactly like that, only instead of shutting down Windows, a file is printed.
This is all more long-winded than likely necessary, but I wanted to get the point accross. So two things need to happen for you to be able to print. First, you need to create a “script”. Really easy stuff. Your script will look like this:
#!/bin/sh lp /path/to/NVDirectory/LPT2
All this script says is “Hey Linux, use the default printer to print the LPT2 file sitting in the NV1 directory.” Easy right? Now you’ll save this script as something like “NVprint.sh”
The second part involves tweaking your Linux OS’s window manager to reference that script. I can’t be specific here, as everyone’s setup will be different, but suffice it to say that with enough googling for “Assigning function keys gnome/xfce/rox/window manager of your choice” you’ll get it nailed. What you’re looking for is basically the following:
F10 = /path/to/NVprint.sh
As long as you can have a funtion key call the NVprint script, you’re golden. (Again, no different than Alt+F4 calling for “shutdown”.)
Once the above are set up, you now have simple 2-key printing – Really no different (and likely faster) than the typical windows “Ctrl+P/click “OK”. As described, I hit F10, then immediately Alt+F10, and the printer fires up.
I know this is likely more detail than most need, but I just wanted to detail it in case it helps either frustrated Windows people, or more importantly, Linux users who are tired of having only GnuCash, or ridiculously complicated ERP software, as the only accounting system choices. Now Linux users can enjoy a ridiculously powerful accounting program that fits really well with the Open Source mindset.
And I suppose I should expound on that a bit. The Linux platform’s strength has always been its customizability: you can customize everything based on how you want/need it to function. NV1 is similar in that respect, as its NPL/pop-up language allows for the import/export of whatever type of data you can imagine. For instance, I have a payroll program written in python that exports payroll numbers that are then easily imported into NewViews via a “block-import” command. Payroll takes 4 minutes. Now, I’m not espousing users go this route – NV payroll is much easier and is supported. But what it goes to show is that NV1 can continue to run/be functional/use-it-with-other-payroll-programs should QW Page ever decide to drop it’s payroll updates. Additionally, I can export NV values in CSV format, edit it in a Linux text editor/script, and suddenly have tax-software GIFI import figures. It is this import/export ability, and ability to customize the format of the import/exports, that allow NV to function brilliantly in a Linux environment.
Hell, I’ll throw another aspect in there just to further the point: I have a client who runs a whole WIP tracking system in NV using “units” as a base instead of cash values. Why can he do this? Because NV1 accounts don’t HAVE to total to a balance sheet/income statement account. You can total to whatever you want (in his case, a “nothing” account.) Again, this customizability makes NV1 a perfect fit for the Open Source environment.
Anyway, there’s my long-winded sermon for the day. Hopefully the NV and Linux communities find it somewhat useful.July 28, 2014 at 10:55 am #17326MSchapplerModerator
Thanks for the kind words!
NV1 is an amazing accounting software that is customizable and allows you to print on on any operating system your have NV1 installed on.
I have a Linux box running NV1 using DOSBOX using LPT0 as the file name and it prints perfectly.
Regards to All,
- This reply was modified 6 years ago by MSchappler.
- You must be logged in to reply to this topic.