- 68 -

Useful Personal Tools in Linux

by Kamran Husain

IN THIS CHAPTER


This chapter will introduce you to the most useful tools under Linux and X Windows. These tools will help you to manage your time and money effectively while using Linux. The programs discussed in this chapter are freely available on the Internet, just as Linux is. Of course, when it comes to managing money, it's important to remember that none of these programs gives you any warranty of any sort. You must assume all risk when you use the software.

Linux provides great tools for doing UNIX clone programming. I have been very impressed by Linux, and I use it a lot. When Linux first came out, however, it lacked a lot of the personal software I relied on heavily to carry out my daily tasks. For example, it had no checkbook management software and nothing to track my time with. Now all that has changed. I don't boot into DOS to track the daily events and hours spent on projects when I need to; I use titrax instead. The CBB program is not yet mature enough to beat Quicken (from Intuit), but it's powerful enough to read Quicken files if I need to look up something without booting into DOS.

This chapter will introduce you to the available programs. These are the programs presented in this chapter:

Let's get started.

The Time Tracker

The Time Tracker is a great utility for tracking your time, especially if you are working on more than one project at a time. The program is available from the FTP site at ftp.x.org in the /contrib/office subdirectory. The program comes with all the source code and can be installed and built quite painlessly on Linux. The latest version of the file was named titrax-1.98.tar.gz at the time of writing.

Unzip and untar the file in a readable directory with this command:

$ gzip -dc titrax-1.98.tar.gz | tar -xvf -

Then edit the Imakefile to set it for use with Linux. Take these steps:

1. Change the value of the NONXBINDIR variable to the location where Perl is stored on your machine. This variable's value should be set to /usr/bin or /usr/local/bin, depending on where Perl is executed.

2.
Uncomment the line with the following preprocessor directive:
-DDO_NOT_TELL_ABOUT_ME

If you do not uncomment this line, the titrax executable attempts to ping the author's machine. This tells him you are using the software! It's up to you to comment or uncomment this line. With my connection to the Internet, I chose to uncomment this line and not add to the already-burdened traffic on our local network.

After the program is up and running, you can run make install to install it permanently on your machine. If you like, you can run it in the directory you just made, to get a feel for the program. The initial window that is displayed when the program is started can be resized. A resized version is shown in Figure 68.1. Three projects are listed here that I happen to be working on: Sockets, ActiveX, and Linux 3. When I start working on a particular project, I simply click on the line and select the name of the project. The timer then updates the value of time for that project.

FIGURE 68.1. Using the titrax program.

Adding a project is easy. Click the Add button to bring up a new dialog box, as shown in Figure 68.2. Try clicking the Edit button to edit the time and headings for a project, as shown in Figure 68.3.

FIGURE 68.2. Adding a project.

FIGURE 68.3. Editing a project.

The titrax program is a simple but very handy tool for managing your time. It works only in interactive mode and does not generate reports. So even though it does not have the fancy features of a full-blown time manager, it can still serve adequately for personal use.

Yellow Sticky Notes

The term "Post-it" is a trademark of 3M Corporation, and the authors of the XPostit program and 3M Corporation do not necessarily have any relationship with each other. The XPostit program allows you to clutter your desktop with facsimiles of those lovable yellow sticky notes as reminders. The xpostit+ binary program is the executable application for this package. The package was written by David Curry.

You can get the source for xpostit+, XPostitPlug-2.3.tar.gz, from ftp.x.org in the contrib/office subdirectory. After you unzip and untar the distribution file, you will have a new directory called XPostitPlus-2.3. Go to this directory and run the following commands:

$ xmkmf

$ make

After the make file completes, you will have a binary file called xpostit+ in your directory. Run this file in the background as

$ xpostit+ &

You then see a screen like the one shown in Figure 68.4. Press the right button on the plaid background, and you are presented with a list of options. Select to create the 1.5x2 note. You are presented with a window with a yellow background. Type in the yellow area, and you have a yellow sticky note on your window manager, as shown in Figure 68.5.

FIGURE 68.4. The main window for xpostit+.

FIGURE 68.5. A simple yellow sticky note.

Several sizes of notes are available for use with the program. The biggest size, the 4x6 note, is a bit cumbersome to use as a sticky note.

Notes can be anchored, that is, placed at a known location on the screen. By selecting the Cascading option, you can cause notes scattered on your desktop to be cascaded around an anchored note.

You can set alarms for the sticky notes as well. Alarms are set for date and time of day. The menu option Set Alarm... presents the alarm setup dialog box, shown in Figure 68.6. Set the month, day of the month, and time for the alarm, and then click the Accept key. When an alarm is set, a small iconic clock is displayed in the menu of the item. You can either wait for the alarm or unset it with the Unset Alarm... command from the menu of a note. See Figure 68.7 for a note with an alarm.

FIGURE 68.6. Setting an alarm for a note.

FIGURE 68.7. A simple yellow sticky note with an alarm.

The text for all notes can be saved with the Save All Notes item from the menu in the main item window. The information in each window is saved in a file in the .postitnotes subdirectory in your home directory. Each note's data is stored in a file, with the name of the title bar displayed on-screen. My notes are placed in files called note1, note2, note3, and so on.

The contents of a note can be exported to other text files or even e-mailed to someone else. Choose the Export item from the File menu, and select the file from the list that is presented. To e-mail the contents of a note, choose e-mail and type the address of the recipient.

The program is a simple one but with very powerful features. XPostit's simplicity is what makes it so easy to use. Also, as with most Linux code, I can take the note files on a floppy disk and use them on a Sun workstation with the same application. I find the notes application a very useful tool indeed.

CBB

The CBB program is a handy utility for managing your daily checkbook. It's available from the site ftp.me.umn.edu in the pub/finance directory. The version number at the time of writing was 0.67, and the archive file was called cbb-0.67.tar.gz. The program is surprisingly powerful and quite handy to use on Linux systems.

You can create accounts with CBB, manage several categories in these accounts, do some tax-return calculations, and even import and export data using Intuit's QIF format to programs such as Intuit's Quicken. Of course, CBB is not anything like Quicken, and we cannot expect a freeware program to compete with a giant like Intuit's primary product. (Yes, Linux has surprised a few giants already!) Using CBB keeps me from booting into Messy Windoze just to enter a few transactions into Quicken, so CBB has been well worth the install.

After you have CBB untarred and installed on your system, type make install and answer the questions. On a Linux system, you should not have any problems. To run the application, type cbb at the command-line prompt.

The first course of action is to create a new account. Choose the option from the menu, and you are presented with the dialog box shown in Figure 68.8. Enter all the information in the dialog box carefully, because it's not apparent where you can go to edit the account information after you have entered it once.

FIGURE 68.8. Creating a new account.

The transactions are entered in the lower part of the screen, where all the boxes are shown on the bottom of the window. You have to be careful to size the window appropriately, or the boxes will not be visible. The main window does not resize itself to fit the buttons on the lower portion of the window.

Any transactions for that account are shown in the main window. After you have a new account, you can enter all your transactions for that account into it by using the entry boxes at the bottom of the screen. As you enter transactions, you are presented with the screen shown in Figure 68.9. Categories can be marked as tax-related for reports to be generated at tax time. See Figures 68.10 and 68.11 for the dialog boxes you see as you add categories.

FIGURE 68.9. The main screen for CBB.

FIGURE 68.10. Inquiry about categories.

FIGURE 68.11. Creating categories.

Amounts in a transaction can be split across several categories. The Alt-S key combination on a transaction presents a menu, as shown in Figure 68.12. Categories must be typed by name, and there is no option to search for a category name. If a typed name does not exist, you are presented with the dialog shown in Figure 68.11.

FIGURE 68.12. Splitting amounts across categories.

At the end of the month, you would probably want to reconcile your bank statement with what's in your database. You can elect to reconcile the bank statement with the dialog box shown in Figure 68.13. Double-click on each transaction to toggle its cleared status. The amounts of debits and credits are shown at the top of the dialog box.

In the example shown in this chapter, we created our own transactions. Another option is to open the demo account as provided in the demo subdirectory for the distribution. After you are comfortable with the package, you can use it with Quicken's QIF files. You can also use the report- and chart-generation features. At the moment, I have limited the use of this program to only entering transactions as they occur. For extensive reports and charts, I still use Quicken because it is more powerful; however, the time between reboots has been reduced quite a bit since I installed CBB.

FIGURE 68.13. Reconciling the bank statement.

After you have amassed your fortune and tracked it in CBB, you would probably want to invest it somewhere. This is where Xinvest comes in, providing features where CBB falls short.

Xinvest for an Investments List Manager

The Xinvest tool is written to manage stock portfolios on your Linux machine. The latest version at the time of writing, version 2.1, is available as a zipped tar file. You can get Xinvest from the ftp.x.org site in the contrib/applications directory. This directory contains two archives: xinvest-2.1.tar.gz with the source files and xinvest-2.1.bin.tar.gz with precompiled binaries. Use the binary version, because the source tree did not compile cleanly even under Slackware Linux 2.0. The binary files compiled cleanly.

By using Xinvest, you can keep your records in separate account files. The program lets you calculate total and annualized returns, including the effects of dividends, buys, and sell orders. The program also lets you compare the collective value of several accounts in a portfolio.

You can set up accounts based on category and risk and view the distribution of wealth in each account to get a clear picture of how your funds are distributed.

The parameters for each transaction include price of share, amount of shares brought or sold, total value of the transaction at the price of share(s), any dividends, moving averages, cumulative averages, and both internal and total returns. You can even plot charts of transactions over time.

The initial screen looks like the one shown in Figure 68.14. The figure shows the directories for the sample data files and directories in the package. You can open the files in the demo directory by double-clicking on the sample icon.

Use the INTC stock symbol as the sample portfolio's stock section. The data is shown in the text display as it's shown in the data file. The sample data file looks like the one shown in Listing 68.1. This is the way you would have to store your own data files when you collect your own data. The data shown in Listing 68.1 is used to generate the plots and graphs shown in Figures 68.15, 68.16, and 68.17. In each of the graphs, you can pick and choose which type of chart and information you want.

FIGURE 68.14. The initial Xinvest program demo screen.


TIP: The Ctrl-G key toggles a grid on the display, and the Ctrl-P toggles the display of points used to create a graph.

Listing 68.1. The sample data file stock.dat in Xinvest.

*******************************************

Title IBM Stock

 Date        Transaction     Share   Shares

                             Price

1/10/94      Buy             59.25   100.00

2/10/94      Buy             52.875  100.00

3/10/94      Buy             57.125  100.00

4/08/94      Buy             52.625  100.00

5/10/94      Buy             58.00   100.00

6/09/94      Buy             62.00   100.00

7/08/94      Buy             56.625  100.00

8/10/94      Buy             64.25   100.00

9/09/94      Buy             67.875  100.00

10/10/94     Buy             71.50   100.00

11/08/94     Buy             73.00   100.00

12/09/94     Buy             71.375  100.00

# Kept the dividend

12/30/94     Div             73.50     2.639

12/30/94     Sell            73.50     2.639


FIGURE 68.15. The sample file with rates of return.

FIGURE 68.16. The sample file with plots of data.

FIGURE 68.17. The sample file with portfolio view.

On-line help is available with the Xinvest package, with the help button in the upper-right corner of the display. You might have to resize the window to fit on screens smaller than 1024x768. The help provided with the package also includes information about the format of the data files. Using these formats, it should be easy for you to create properly formatted data files from other sources. Scripts written in Perl or awk could transform comma-delimited data sources into input files for Xinvest. There is no automatic importing capability.

Additional Tools

Here are a few other tools you should also consider when using Linux. In terms of productivity and tracking time, these tools are indispensable. Unfortunately, these tools also require Motif (or Mootif from InfoMagic). You cannot run these utilities without X or Motif. If you do not have Motif installed on your system, see Chapter 23, "Using Motif," for availability. For those tools that require XView toolkit, you will have to install XView from the CD-ROM at the back of the book.

Despite the requirement to pay for Motif or XView, these tools are quite handy when it comes to managing time and money. All of these tools are available from ftp.x.org in the /contrib subdirectory. After you unzip and untar the archive file, run the following commands:

$ xmkmf

$ make

Each program makes itself in the directory you untarred it in. Read the specific installation instructions for each program to know where to place each executable for a package.

Xvdtbl

The Xvdtbl program is a to-do list manager for managing your tasks. You can track lists of items to do each day. Things that do not get done one day are carried over to the next to constantly remind you. Recurring events can also be tracked by month, week, or day. All items can be prioritized.

Items in the list can be annotated with a text editor. All items, including the annotations, can be printed on plain paper for logging. The file with all the source files is called xvtdbl-5.2.tar.gz and is in the office subdirectory.

XDiary

The XDiary program requires Motif 1.2 or later. The XDiary package is simply a diary for you to manage your time and tasks while working at your Linux workstation. The program lets you assign recurring dates and alarms for your scheduled events. You can also create reminder notices and distribute these to other folks on the network. Your diary files can be private or made available to the public for scheduling meetings and so forth. The file with all the source files is called xmdiary-3.0.1.tar.gz and is in the /office subdirectory.

Yrolo

Yrolo requires Motif 1.2 or later. The Yrolo package manages names and addresses of people. You can mail directly to people via the e-mail addresses stored for an individual. You can search for names in the names database. All names can be printed for creating paper-based phone books. The file with all the source files is called yrolo-1.1.tar and is in the /applications subdirectory.

Summary

Linux has grown up tremendously in the past few years. With its compatibility with Motif and XView applications, more and more shareware/freeware programs can be used on Linux. The personal time and finance management tools described in this chapter have introduced you to only a few such utilities on the Web. The way things are progressing with Linux, more tools will follow in the future.