Cygwin - a Unix Environment and Shell on Windows

Cygwin logo

If your daily routine means that you spend much of your time behind a Windows system, yet you love the power and flexibility of a Unix-based environment, it might be frustrating not to have access to the tools and environment that you want.

Alternatively, you might want to compile some Linux/Unix software, so that it can run natively under Windows.

Cygwin is a Linux-style environment for Windows, that gives you a set of libraries, a full Linux-style command line and a package manager so you can install many of the Unix programs you might be familiar with.

I thought I would take a look at Cygwin's latest release and show you how to install it and get up and running.

First of all, head on over to the site and download setup.exe. This is the main installer/package manager for Cygwin and by default you use it to do an internet-based install, i.e. the setup program itself will download the packages.

Downloaded setup.exe file

Cygwin Installer

Once the installer is up and running, click Next to bypass the initial welcome screen. You will be given several options on how you want to obtain packages. In most cases, Install from Internet is fine here.

Next, choose the directory to install Cygwin to on your Windows machine. This directory will become your root (/) from within the Cygwin shell.

Choose Cygwin directory

On the next screen, choose the temporary folder where packages will be downloaded before they are installed into Cygwin. If you want, you can use a Windows temporary folder, but if you want to keep the source packages files around so you don't have to redownload later, make it somewhere permanent.

Again, click the old Next button and choose whether you need to use a proxy. In most home computer situations, leave the defaults intact and move on.

The Installer will at this point go off and retrieve a list of the different download sites, or mirrors, available to you. Choose one geographically close to you in preference, but any of them should be fine.

Cygwin Select Packages

Here, you need to choose the packages that you want to install. You can just leave this all as it is and move on, but if you want to install additional packages into Cygwin, follow these steps.

The categories can be either left at the Default setting, or you can choose to Install or Uninstall whole categories by clicking on the 'recycling' icon next to them (and the word 'Default').

For individual packages, expand a category and find the package you want. To install or uninstall it, add a check under the 'Binary' and/or 'Source' columns to grab what you want.

Once you're done choosing packages, click Next yet again to move on. You can always come back to this stage later by re-running the installer to add or remove packages.

Cygwin Download and Installation

Download and installation now takes place. Depending on the speed of your machine and how much you've asked to download, this could take a while.

Once the installation is finished, pick your Desktop and Start menu shortcut options and Finish.

Finally - that's the installation done! You can access Cygwin through the shortcuts you just made, or by browsing to the directory you installed it in and launching cygwin.bat.

You will be presented with a bash shell, just as on Linux, and all of the Cygwin packages you installed should now be available for use.

Cygwin shell

You can also access Windows programs and files through /cygdrive/[Windows drive letter].

And there you have it - a Linux compatible environment for your Windows machine. Cygwin isn't really for the faint hearted, or those without Linux/Unix CLI experience, but it is a very powerful platform to bringing many features of the Unix platform to a Windows machine in a native way.

You can even run X on it.

Buddi - Simple Personal Budgeting

Buddi logo

Many financial applications, such as KMyMoney, can be very useful, however there is often quite a learning curve associated with them.

Buddi is an open source personal budgeting application for Windows, Linux and Mac OS X that is designed to keep things very simple, yet still be usable for the average home user to keep track of their finances.

Installation

Buddi is written in Java, and thus needs you to have a working installation of Java on your system to run. Whether you have Java and how to get it differs depending on your operating system. Mac users should be fine, Windows users can grab an installer, and this guide should help Linux users.

Once you've got Java, you can get the appropriate download for your system from the Downloads page. Here on Kubuntu Linux, I get the .deb and double-click it to install (which actually does Java as well for me if I don't have it, but your results might differ).

Installing Buddi under Kubuntu Hardy

Interface Impressions

On the Linux platform (and possibly elsewhere too), Buddi unfortunately sports a rather generic, and ugly, Java interface. This makes integration with the rest of your desktop poor. This is a symptom of the way it is developed and its cross platform Java nature, however, and something that can be difficult to avoid.

Buddi\'s basic interface

The main interface is divided into three simple tabs for accounts, budgets and reports. Unlike some competing programs, it's a nice simple setup that is easy to digest and understand.

The first two tabs also work as you expect and it's obvious how to use them. Aside from some commands being hidden away on the Edit menu, where it's not immediately obvious to look, these two modules work as advertised and it's really easy to get to grips with them.

On the subject of those Edit menu commands, it would be much better from an interface point of view to use a toolbar, with graphical buttons for the most frequently used commands, like Create Budget Category, for example.

Buddi Budget tab

The final tab, for reports, however, came across to me as working in a bit of a confusing way.

Buddi Reports

You select a report to view from a relevant drop-down box, but then there is an unnerving delay when it's not clear whether that action worked, or didn't. Turns out what is happening is that your web browser is being loaded, to display the report as an HTML file.

The reports are a good way of getting your data back out of the application and present the information in a clear way, but I think it wouldn't hurt here to make it more clear that your browser would be invoked, and that there might be some delay.

A further criticism, which might be more to do with my Java setup, is that my default browser wasn't loaded for some reason, instead it loaded in a different browser installed on the system.

Functionality

Buddi isn't trying to do everything. Far from that, Buddi tries to be simple and is even described as being aimed at those with little financial experience.

Functionality wise, though, it offers enough to do basic financial recording and reporting. Transactions can be performed on your accounts, allowing you to keep track of what's going in and coming out of your account.

Transactions in Buddi

These transactions can be linked to Budget categories and then allow you to track what you planned against what's actually being spent in each category.

Speaking of those Budget categories, it's trivial to add custom incoming and outgoing categories of different types to personalise your records and ease the process of tracking your personal data.

As I've already mentioned, the Reports are also good, giving you a nice overview of how well reality is matching with your budgeting, and allowing you to drill down into the categories and transactions to see where everything is going.

Buddi Report

One final thing to say is you have to remember to save your accounts to a file, and then manually use File > Open when you relaunch the program to load in your saved data. It would be nice here to have Buddi remember your last file, and automatically open it.

Overall

Buddi doesn't try to be too clever or complicated, and I personally think it succeeds in offering a simple solution for people who want to do basic personal budgeting.

While I do have some minor interface concerns, I can't emphasise enough how simple Buddi is to use. Even if there are quirks, it's likely that most people will quickly learn how to master the application given a bit of time.

If you want a budgeting solution a bit lighter than the others (and don't mind braving a distinctly Java-y interface on Linux), Buddi is a win.

Getting Started with GNU Privacy Guard

Padlock

Keeping information safe and away from eyes that shouldn't see it can be pretty important. Here in the UK we've had several instances where the government has lost personal information. Since that information wasn't encrypted, it could be in anyone's hands by now.

One of the most popular ways to encrypt information is using the free GNU Privacy Guard software. In this short tutorial, I'll show you how to get up and running to use GPG to encrypt and decrypt some information. For now, I'm only going to cover encrypting information that only you want to get access to later, but I may follow up with how to transfer information securely to others in a future tutorial.

In this tutorial, I'll be trying to keep things as cross-platform as possible, so this guide should be easy to follow on Windows, Linux/Unix and Mac OS X. At FOSSwire we want to try and reach out and help users of non-Linux/BSD platforms to use free software too. Let us know how you think this tutorial works to achieve that and any thoughts on this issue in the comments of this post, or you can email me - peter@ this domain.

This will all be done on the command line, regardless of your operating system, but I'll show you more on how to get into that in a moment, once we are installed and ready.

Installation

First things first, install GNU Privacy Guard.

Linux/Unix

Most Linux users should already have this installed, if not then use Add/Remove Applications (or similar) and search for gpg or gnupg.

Each time you need to use GPG, open a Terminal program (it might also be called Konsole).

Mac OS X

Pre-built GPG packages are available from the Mac GNU Privacy Guard site. Download and install a package appropriate to your setup.

Each time you want to use GPG, you'll need to open Terminal, from /Applications/Utilities. Type the commands in this tutorial into Terminal to use the program.

Windows

A Windows version is available on the official download page. It is slightly difficult to spot, so here's a direct link to the current version at the time of writing.

Once you're installed, you'll need to open Command Prompt, from Accessories. Then type:

cd "C:\Program files\GNU\GnuPG"

That will allow you to follow the commands in this tutorial. Replace that path if you install GPG somewhere else, and remember that this will need to be typed in each time you load up Command Prompt afresh to use the program.

Setting up GPG

Once you have the software installed and your command line terminal open, let's get started.

The first thing you have to do in order to use the application is to create a set of keys. These keys are used to encrypt and decrypt information and they keep your data safe. Your keys are also protected by a passphrase that you must type in to use them (so that even if you lose your key and someone else gets a hold of it, it won't be any use without the passphrase as well).

gpg --gen-key

You'll see a load of weird messages, but you can just ignore most of them. The important question here is the kind of key you want. For now, we want to stick with choice 1.

Just type 1 and press Enter.

The next question you get asks you about key length. Just accept the default and press Enter here.

GPG\'s GenKey

Next up, expiry. GPG keys are designed so that it is possible after a period of time to force your key to expire, for security reasons. For this tutorial, I'm not planning to distribute this key, so I'm going to choose 0, for key does not expire.

The penultimate set of questions ask you for some information to identify this key - your name and an optional comment. Once you've entered and are happy with that info, type O and press Enter to move on.

GPG GenKey Information stage

Finally, type a passphrase. This should be something secure and that isn't used elsewhere. The entire security of your encrypted data basically depends upon this being unguessable.

Note the emphasis on passphrase, this needn't and shouldn't be just a single word that is in the dictionary.

When typing in your passphrase, you won't be shown the typing in the terminal. This can be confusing if you haven't experienced this behaviour before. Don't worry - it is typing in properly, it just isn't letting you see it.

Once you've set the passphrase, GNU Privacy Guard goes off and creates your key. This will take some time, depending on how fast your machine is.

GPG Generating a Key

Once it's finished, you'll be sent back to the prompt. Now you have a key, let's encrypt and decrypt something!

Encrypting a File

So, how do we go about encrypting a file, so we can securely store it and decrypt it ourselves later?

Assuming you've still got that terminal window open from before, here's the command you need:

gpg --encrypt --recipient 'Name' "file"

Name - needs to be set to the name you gave in your key. This will allow you to decrypt it again later.

file - the path to the file you want to encrypt.

Once you've hit Enter to run that, your file will be encrypted. In the same folder as the original, there will be an encrypted copy with a .gpg extension.

Decrypting a File

OK, so now you need to get that same file back and read it. You securely erased the original, so you need to decrypt that version to get access to the data again.

The command you need is:

gpg --output "outputfile" --decrypt "file.gpg"

outputfile - the path to the file you want to put the decrypted contents in.

file - the path to the original, encrypted file you want to decrypt.

When you decrypt a file, you'll be asked to enter that passphrase. Type it in, and outputfile should now be the original file, just as it was.

Wrap Up

We have literally just scratched the surface here. GNU Privacy Guard is an incredibly powerful solution for all sorts of encryption and data security problems and this is just a limited scenario and light introduction into it.

This tutorial showed you how to use the command line program, however many of you may be more familiar and happier using a graphical program. There is a list of graphical frontends which does show you a few of these programs which might make using GPG a lot easier.

However, having an understanding on how to use the command line interface never hurts, and allows you to transfer those skills over to any platform.

Remember! Let us know how you think this tutorial works in branching FOSSwire out to support users of FOSS on other, non-Linux platforms.

Also, feel free to share any thoughts on the issue of cross-platform support. You can leave a comment below.

[image source]

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. ...
  7. Go to

Sign In

    Enjoy FOSSwire's content? Have it delivered! Subscribe