Sunday 26 October 2014

Solar Fire 8 on Linux Mint 13

Linux and Astrology

One of the major barriers that astrologers face in adopting the Linux operating system is the limited choice of astrological software available on the platform. If you wish to explore the options, you may like to visit https://help.ubuntu.com/community/Astrology. Unfortunately most of the commercially available packages, such as Solar Fire and Janus, are written using Microsoft programming packages like Visual Basic and are not designed to run on alternative systems. Solar Fire claims that the program can be run on a Mac system using virtualisation software. But the options seem to be limited for using SF, or alternative commercial astrology programs such as Janus, on Linux.

Happily, however, this is not the case. I have been experimenting with Solar Fire, Janus, Solar Maps, Nova Chart Wheels and Delphic Oracle on Linux. I have them all running on Linux using the Wine facility. In virtually all cases, I have got the Windows-based software to run extremely well on Linux using Wine. In the case of Solar Fire, following a breakthrough with a font problem, I have been able to get the program running perfectly on Linux. In this case, the functionality and performance of the program is identical to running Solar Fire on Windows. This is a significant development as it now means that Solar Fire users can move to Linux without any concern about losing access to their astrological software and data.

In this blog I will describe my experiences running Solar Fire on Linux, including all the tips that you will need to get a perfect installation of the software. I have been experimenting with Solar Fire on Linux using Wine for some years now so I have built up a good working knowledge of how to achieve a trouble-free, stable installation. The steps I will describe below should not be beyond a capable desktop user. However, I would recommend that you familiarise yourself thoroughly with the process described before attempting any of the steps. If you are confident with the workings of the Solar Fire program, with Linux and Wine, and with basic computing tasks such as managing fonts, you shouldn't have any difficulties with the process.

Disclaimer

Before you try any of the following steps, please ensure that you are satisfied that you have a robust backup of any files that are personally valuable or critical to the functioning of your computer. If you have any critical program installations that you don't want to lose, you may want to make an image of your hard drive. None of the steps below should lead to catastrophic data loss. However, it is essential that you have taken steps to protect your files before proceeding. If you have existing SF user data files, please ensure you have at least one copy, and preferably two copies, of these files on a physical medium such as a CD-ROM or backed up on a flash drive or external hard drive.

First, a little about Linux and Wine.

Linux is a desktop OS that has been developed by enthusiasts and volunteers, with some commercial input, since the early 1990s. It is now a very mature, stable, secure and attractive OS that is a rival for Mac and Windows. The original impetus for Linux came from Linus Torvalds. He pioneered the development of the original kernel and is still actively involved in the development of the OS. The desktop that is the front end of Linux is developed by various teams of individuals around the world. There are variety of desktops, which gives the end user a range of choices about how to interact with their PC - some of the desktops include Cinnamon, KDE, Unity, LXDE and xfce. Linux is one of the central parts of the free software movement.




Wine is a program that can be downloaded through your Linux software repository. This piece of software is designed to allow Windows based programs to be installed and run on a Linux system without using virtualisation software or a virtual machine. This means that you do not need to install a copy of Windows on your linux system to run Windows software. You can find out details about Wine at www.winehq.com. This is how the Wine team describe the program: "Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, Mac OSX, & BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop." (from www.winehq.com/about)

Wine is a very neat solution to the problem of running Windows-based software such as Solar Fire or Janus on a Linux system. I believe it is preferable to installing a virtual copy of Windows because it maintains the integrity of the Linux OS. After all, I can't see the logic in running Linux on a desktop machine if, at the first problem, one installs a virtual copy of Windows to run software. The downside of Wine under Linux is that not all Windows software will run perfectly on Linux. However, as far as I can see, Solar Fire installs and runs perfectly within Wine. In fact, most of the astrological software I have tried runs very well, or perfectly, using the Wine/Linux system.

Solar Fire 8 on Linux

The following instructions relate to the installation of SF on Linux Mint 13 with Mate desktop. The system specifications are listed below:

Kernel Linux 3.5.0-23-generic
Linux Mint 13 32-bit
Mate Desktop
Wine 1.4.1
Pentium 4 Machine
2.5 GB RAM

Solar Fire runs very smoothly on this set-up. In principle there is no reason why these instructions should not apply to other Debian derivatives of Linux such as Ubuntu. In fact I have plenty of evidence that it runs as well on these OSs - Ubuntu 12.04 LTS, Lubuntu 12.04 LTS and Linux Mint 14.

Installation Instructions

If you have not already installed Wine, download and install the program through your software manager. This will ensure your software comes from your software repository which gives added security and peace of mind. At the moment, most distributions such as Linux Mint are offering Wine 1.4.1 from their repositories. All my comments relate to an installation based on Wine 1.4.1. This version of Wine provides the most complete solution to the installation of SF on Linux. Later versions of Wine introduced a bug that impacts on the Animate Chart function which causes the program to crash.

If Wine is already installed and you have Windows programs already running in Linux, make a copy of .wine folder as a fall-back if installation of the SF program does not work. This will be renamed .wine (copy) by default. You can find .wine by opening your file manager and displaying your Home folder. You will need to be able to see hidden files, so go to View->Show Hidden Files or hit Ctrl-H once you have your Home folder window open. You will find .wine towards the bottom of the list of files in your Home folder. If this is your first Windows-based installation in Wine you can ignore this instruction.

To install SF

The first thing to do is to install a vital file called mfc40.dll. This is done through Winetricks. SF won't run on Linux without installing this dll. If you can't boot SF, it is probably because this file is not present. You can install this dll file by opening Winetricks from your main program menu. Look for Wine->Winetricks. Go to Select the default Wine prefix->OK->Install a Windows DLL or component->OK. Scroll down the list, click the check-box next to mfc40, click OK. Winetricks will then ensure mfc40.dll is available to SF8.

Next load your SF installation CD and double click or right-click->Open the desktop icon when it appears. This will open the folder containing the files on the CD. Find the install.exe icon and right click. When the menu appears, choose Open->Wine Windows Program Loader. This will open the main SF installation screen. Choose SF from the list of options and click the Install button. To install the program from a downloaded file, just right click on the .exe file you have received and choose Open->Wine Windows Program Loader. In both cases the installation routine will begin. When prompted, enter your registration details - username, password etc. This should perform a basic installation of your chosen version of SF.

You may be asked if you want to run the program at the end of the installation routine. I would not recommend this as there are some further steps to take to get the program running. Firstly you will need to copy your existing SF user files to the Solar Fire User Files folder that has now been set up in your Home folder. If you are an existing SF user, you should have a copy of this folder on your old computer, or, better still, backed up somewhere on a CD-ROM or flash drive.

Open your existing user files folder, copy all of the folders, and paste them into the SFUF folder in your Linux Home folder. If this is the first time you have installed a copy of SF, you will need to copy the User Files from your .wine folder. To do this, display the hidden folder .wine and open it. Find the drive_c folder and open. Open the Program Files folder and go to SolarFire8 - double-click to open. Open the User Files folder and copy all the folders. Return to the Home folder, find the Solar Files User Files and double-click to open. Paste all the folders and files into this new location. You may be prompted to over-write files. Go ahead and do this as long as your are absolutely sure there is nothing that you may want to save from the SFUF.

Font solutions

One of the difficulties with running SF on Linux has been a long-standing problem with one of the fonts. You can see the history of attempts to deal with this difficulty on the Solar Fire page at http://appdb.winehq.org/objectManager.php?sClass=application&iId=2392. Unfortunately these solutions have only been partial. The complete solution is to use a program called Font Forge (downloadable from your repository) to change the Windows font, Etsans3.fon in the case of SF8, to a font compatible with Linux. This is easily done by opening the .fon font in Font Forge and using the Generate Font command to convert the font to a Win Fon type.

To open the .fon font go to File->Open and from the file browser follow these steps: .wine->drive_c->windows->Fonts. Choose Etsans3.fon. When the .fon font is open in Font Forge go to File->Generate Fonts... and choose this option from the right-hand box below the font name - "Win Fon". Click Save back to the Fonts folder.

You can find the relevant font in your .wine folder. Again you will have to follow the instructions above to make the .wine folder visible. Open the folder and find drive_c. Open this folder and go to the windows folder. Open the windows folder and find the Fonts folder. In this folder you will find three fonts relevant to the SF8 installation: EtAst1.ttf, Etsym3.tff and Etsans3.fon. The .ttf fonts work fine with Wine and Linux. However, you have to convert the Windows format .fon font as per the instructions above.

To get a perfect installation of SF within Wine, you will need to install a fourth font. I am not sure why this makes a difference. However, without installing the fourth font – ETSYM2.TTF – you will experience residual display problems. The program will be perfectly usable however. The 'fourth font solution' is the final piece of the fonts problem in Linux. Within Windows, SF8 runs on three fonts: EtAst1.ttf, Etsym3.tff and Etsans3.fon. However, for some bizarre reason you need to install ETSYM2.TTF from SF7 to get the font display working perfectly in Linux. This font should be placed in the .wine->drive_c->windows->Fonts folder with the other three fonts. You will need to have a previous version of SF7 to achieve this. There is no complication introducing this .ttf font into Wine, unlike with the tweak required for the Windows-based .fon font Etsans3.

Running SF

You should now be able to run SF8 in Linux using Wine. Double click the desktop icon and the program should run. In all respects you should now be able to use SF8 just as if you were working in Windows.

Upgrading SF

You may wish to upgrade your version 8 of SF to the most current version. This is 8.1.5 and the .exe file is downloadable from the Astrolabe website. This should be a straightforward installation. However, I have discovered that it is important to back up your user files before doing so. This is because the installation routine attempts to overwrite the contents of the Solar Fire User Files folder and does not like doing so, at least in Linux/Wine.

If you don't empty this folder, the upgrade process will be stalled and lead to an unstable installation. It is essential, once you have made some copies of your user files for security, to empty the contents of the SFUF folder in Linux Home folder. However, leave the empty SFUF folder in situ. Following these steps ensures that the upgrade is not interrupted leading to a partial, and unstable, installation of the software. Once you are ready to upgrade, right-click on your .exe upgrade file and choose Open->Wine Windows Program Loader. The installation process will start. You may be prompted to confirm that you have a legitimate copy of SF8 installed on your machine. If you have a personally licensed copy, click OK.

Once the installation has been completed, copy your user files back to the SFUF in your Home folder. Check that you have the correct Etsans3.fon font still installed in the fonts folder. This completes the process and you should have a perfectly installed upgrade of SF8 to the latest version 8.1.5.

If you use a lot of asteroids as part of your astrology, you may wish to copy the updated EtAst1.ttf font file from the program folder SolarFire8 to your fonts folder in Wine. This is a straightforward Copy->Paste from the program folder to the fonts folder. You can rename the original EtAst1.tff (orig_EtAst1.ttf) before doing this. This is a precaution that ensures the original asteroid font file is still available to you and is not overwritten.

Conclusions

The comments above relate specifically to Debian-based Linux desktop systems such as Ubuntu, Lubuntu, and Mint. You will have to experiment if you wish to try SF on other systems such as Arch, SUSE or Redhat based operating systems. The most complete solution seems to be with systems based around Ubuntu 12.04 LTS which is supported until April 2017. The Wine version to use is 1.4 or 1.4.1. I will highlight the regression identified above which crashes the Animate Chart function in more recent Wine versions to the developers through the bug report system. If you can live without the Animate function, you can happily proceed to use Ubuntu derivatives such as the more up-to-date 14.04 LTS, Mint 17 and the latest Lubuntu OS (based on Ubuntu 14.04) with the latest Wine release.

1 comment:

Paul Wade said...

This article is/was mentioned on Astrologywizard.com as part of the Site of the Week feature November 21-27, 2014 and will remain in the software section of this site's link archive thereafter...

http://astrologywizard.com/links.htm

Thanks for taking the trouble to post!