Posts tagged ‘How To’

Slackware Linux Installation Methods

As any reader of this blog will know, I am a big fan of installing from source. My OS of choice, Slackware, makes this very easy and doesn’t break anything if you do this. I am, though, well aware that this isn’t for everyone – in fact, I break my own rule if it’s convenient.

Slackware packages end in .tgz, which can be confusing since that is also the way that normal tar balls can end. The usual way to install these is to type (as root) installpkg <packagename>.tgz and let the dialogue run. This then expands the archived install files into the correct places on your system. Removing or upgrading packages is equally as easy, simply exchange the installpkg for removepkg or upgradepkg. This method is inbuilt to Slackware and is the most basic way of installing Slackware packages. You could also use pkgtool which gives an ncurses frontend to a number of Slackware commands.

If you like automated downloads, you could use Swaret, Slapt-Get or Slackpkg, each of which will download the install files to your system and install them for you. These three methods are very much automated, though, and this can mean that things will break and you won’t immediately know why. Use them at your own risk, though I have only ever broken my system through my own stupidity.

Building your own packages is pretty much the best way to go. There will be no dependency checking, which could be a downside, but on the other hand you know what is in the package because you put it there. There are 3 basic ways to do this which require more or less technical ability. Slackbuilds.org is a site which is a mix of a how to and downloads. Slackbuilds are created in clean environments and are available either as a plain package download or as a set of scripts for you to run to create your own. Rworkman and Alien Bob are both active there and have been known to be extremely helpful over on the official Slackware forum.

Checkinstall substitutes itself for the make install step in a normal source build. It creates a Slackware package as the final step which can then be installed using installpkg as normal. The downside of this method is that it creates an extra step in the install process. The last update on the homepage is from August 2007, this could mean that no changes have been required or that the project is discontinued – I don’t know and don’t wish to speculate further!

Finally, src2pkg is created and maintained by Gilbert Ashley, who posts on LQ as Gnashley. Gnashley posts updates to the program on LQ and is available to answer questions and give support on the tool (as well as anything else Slack and Linux related). This tool, to me, is the easiest to use. All you need to do, once you’ve installed it, is run src2pkg <packagename.tar.gz/bz> and let it do it’s thing. At the end of the run you are presented with a .tgz file in your /tmp directory. /usr/doc/src2pkg-x.x has more information on the tool and ways you can use it.

Now to answer the question that has probably been on your mind: why do this at all since Slackware is so good at using source installs? Good question. Well, for starters, Slackware tends to have relatively very few 3rd party applications prepackaged and sometimes it is far more convenient to not install from source. Additionally, you may have a core of apps that you want to install immediately after you install Slackware and this makes life easier for you. Alternatively, you may want to enable someone else to install an app and this will make it easier.

Please note, none of the above 3 methods have any dependency checking. You will still need to make sure you have all that you need before installing.  Aside from that, though, installation of 3rd party programs is that bit easier.

Installing KMyMoney

Windows users have long had the very well known apps MS Money and Quicken to enable them to manage their finances. Both have been around for a number of years and are mature products in software terms. Those of us running Linux, however, have our own options. If you really need either of the 2 Windows applications, Crossover Office by CodeWeavers can be of great help.

But we don’t want to do that now, do we? As Linux users, we much prefer to use native apps because of their stability, the fact that we can be sure that we can use all the features and because we like to support free and open source projects. There are several options available to us, GnuCash and KMyMoney are the more popular ones (MoneyDance is also available, but you have to buy it to use it beyond a free trial). Because I’m a KDE user, I will be going with KMyMoney and because I’m a Slacker I’ll be installing it from source.

As usual, I will be talking us through installing any dependencies and using copious screenshots where applicable. And, as usual, we will see that installing from source is not scary and is quite easy. This will all start after the jump.

Step 1, obviously, is to download KMyMoney itself. There is a download link on the site’s homepage which takes us to the download files. You can follow the link I have provided, but I would strongly recommend going via the site itself – at this time of writing, the current version is 0.8.8, but by the time you come to do this, it could well be at a different version or different location.

Step 2 is to check the mandatory requirements for installation. For versions above 0.7 you need KDE 3.2 or above. I have KDE 3.5.7 so I’m covered. Qt is also a requirement, it is required for KDE so KDE users are fully covered. If you do not run KDE on your system, you will need to install the kde-libs file and other base files. And of course, qt. If you already run other KDE programs you should be nicely covered.

Open a terminal and cd to the location you downloaded the installation files to. If you prefer to work in the GUI for these things, open your file browser and extract the files as you would normally. Since I am working in a terminal, I type tar jxvf kmymoney2-0.8.8.tar.bz2. There is good reason for this – the archive is in bzip2 format rather than the usual tar.gz format. The slower extraction route is to use bunzip2 to reduce the file to a tar file and then untar it, but the method I listed does it all in one. You should now have a folder called kmymoney2-x.x.x (where x.x.x is the version number). Now cd into the new folder.

As ever, the two most important files to read are the INSTALL and README files as they will tell us whether we need to pass any arguments to the install process or if we need any extra dependencies. The INSTALL file is the generic one, which suggests to me that we can just run the standard ./configure, make and make install process but I will be reading the README file to confirm this.

The README is very detailed and gives us a table to look at for when we are planning our installation. Unfortunately, the README file seems to have been frozen at or about Slackware 9.0 and so is incorrect. Prior to Slackware 12.0, the KDE files were stored in /opt/kde, but are now stored in /usr. No big deal, if you are using Slackware 9.0 – 11.0 use the instructions in the README file, if you are on 12.0 follow mine (for this step).

Type in, as your normal user account NOT as root: ./configure --prefix=/usr (using the prefix tells the installer where KDE can be found. It may not be necessary as the installer will probably look there anyway, but do it). Let it run and then check the bottom of the output for any errors – as ever, this will also tell you if there were unfound dependencies.

At the end of all that, I received the following message:

Configure results:
------------------------------------------
Memory leak check support: no

KBanking support: no
You are missing the KBanking headers and libraries
The HBCI support won't be compiled.

OFX plugin: no
You are missing the libofx headers and libraries
The OFX plugin won't be compiled.

OFX direct connect: disabled

CPPUNIT support: no
You are missing the CPPUNIT headers and libraries
The unit test framework support won't be compiled.
This is not relevant for the usage of the application.
Unit tests are only required by the developers.
------------------------------------------

Good - your configure finished. Start make now

So I know it went well. The support sections that I am missing are unimportant to me as I neither need them or will want to use them – read the site to find out more.

Next step, still in my normal user account, is to run make. This will take a little longer, so feel free to make a drink, walk the dog, go relieve yourself or whatever. Once that is complete, switch to the root account and run make install:

either
su
<enter root password>
make install
exit
or
su -c "make install"
<enter root password> – it’s entirely up to you.

Once this is all done successfully, you will now have KMyMoney installed and available in your menu – for me it’s under Office. Open it and you will see this (click all thumbnails to see full size):

Start Screen

Enter your personal details to start the setup process
Personal Details

Select your base/home currency (this can be changed later if needs be)
Select Base Currency

What’s new in this release
What’s new in this release

Additionally, the KDE Handbook now has a section for KMyMoney which can talk you through the sections. If you use internet banking, download statements in .qif (Quicken) format and you can then import the files to your template and use them. You can also export KMyMoney files to Quicken format.

Enjoy but remember, this program can only show you your current financial status, keeping your head above water is entirely up to you!

Writing a Book? Use WordPress

Slightly misleading title maybe. If you have written a book (or books) and would like to put it online, you can use WordPress (either .com or .org) to organise the book to make it readable. These instructions will probably also work on other blogging platforms, but please check your software first and make necessary adjustments.

Thanks to the Wordpress FAQs for these instructions. The FAQs are necessarily short, so this expands on those instructions. With screenshots! As there is no real difference in the software itself between the self hosted WordPress blogs (.org version) or the WordPress hosted (.com version) blogs, I won’t be making changes to reflect this.

Enough with the chat, let’s get on with it!

Firstly, you need to create a new page to be the front cover of your book. Go to your WordPress Dashboard and select Manage and Pages.

Manage>>Pages

On that page, select Create a new page

Call this new page “Front” as it is the Front page of your new book. If you are artistic, I suppose you could call the page after your book’s name and create some cool artwork, but that sounds like more work than it’s worth.

If we now look at the header of my site, the Front page has been added:

Front Page(I added the red box for emphasis, it won’t show normally)

If we follow the FAQ, it then says to continue by creating another page called Index and a third called Chapters. My problem with this is that it assumes that you only host your book on the site and don’t have (as I would) other things that aren’t necessarily related. Luckily, there is a workaround for this.

When you create the Index page, go to the right hand side of the page creation page and click the plussign.png sign next to Page Parent . This expands the section and you can then choose to make the Index page a child page of the Front page. What does this do for you? Well, if you plan to host multiple books, you can use different titles for Front and keep all your books separate. It also stops your header from being cluttered and incomprehensible.

If we continue reading the FAQ, it says that we should make Front into the front page of the blog and the Chapters to be the posting pages. My method does away with this though. Obviously, if you create one blog per book and only have your book there, you can happily continue along the path shown by the FAQ.

If we follow my method, however, we have some more similar steps to follow. To recap, we created 3 pages and made 2 of them children of the main one. This means that right now we have 3 pages, all blank and ready to go.

Go to your “Front” page in the dashboard (Manage >> Pages and then click “Edit” in the list). Under the Page Content you will need to create a link to the Index Page. I use the Code editor because it’s less clicking around.

Create your Index Link

This will then give you a small “Front” page:

Front page with Index link

By clicking the Index link, you will see the Index. Obviously. Next steps are very similar, but again I am diverting from the FAQ:

Rename your Chapters page to Chapter 1 and rename the Post Slug to be “Chapter-1″ so that link in the index will work correctly. Create as many more child pages as you need, naming them after each chapter – so Chapter 2, Chapter 3 and so on. Then edit your Index page to link to each of the chapters in turn:

Chapter List

This makes your Index page look like this:

Index page with chapter listings

Once you have set up the bare bones of your book, you can then add the meat of it: this means, write the book and put each chapter into the relevant page. Since the Front page looks a little bare, I would also suggest putting a brief outline of the book itself onto the page, to let your readers know what’s in store for them. Additionally, I would also add a link at the end of each chapter to take the reader to the next chapter – if they have to keep clicking “back” they may just stop reading.

Setting up your site to host your work needn’t be difficult. It can be used for any book and, because WordPress also allows you to post pictures, you can illustrate it too. There are plugins out there which will do something similar, but you end up doing some parts by hand and then letting a plugin do the rest. This is fine as long as the plugin works and doesn’t conflict with another, different, plugin. This how to also disregards protecting your work, you could make each chapter an image of the page or use a plugin to provide a digital fingerprint, but really that is beyond the scope of this.