Xastir on Fedora
- 1 Xastir on Fedora - a "HowTo"
- 1.1 Distribution packages
- 1.2 Compilling from Source
- 1.3 A note about root privileges
- 1.4 Is your system ready?
- 1.5 Options
- 1.6 The easy bits - RPMs
- 1.7 The not as easy bits - packages
- 1.8 ld.config
- 1.9 Build and install Xastir
- 1.10 Running Xastir
- 1.11 Comments
- 2 (TM)
Xastir on Fedora - a "HowTo"
My distro of choice is Fedora - so naturally that's what I'm familiar with and will write about for this "HowTo". However, this "HowTo" may well apply to other distributions.
Xastir is included in Fedora! If you want, you can use Fedora's package management tools to download and install a pre-compiled package. This will ensure what you have works. But it may not be the most current available or have the features/functions you want. For that, you'll have to get the Xastir source code and compile it yourself. The rest of this "HowTo" will give you step by step how to accomplish that.
The easiest way to get Xastir is to install it from the repositories. The Fedora Hams Interest Group has done a very good job getting making many ham applications available for Fedora - not just Xastir.
To install from the repositories - with root privileges - just run:
yum install xastir
All pre-requisites and dependencies will automagically be taken care of for you. This also ensures that your nightly yum updates will include Xastir as new versions become available.
For many new Linux users, this is the preferred installation method
Compilling from Source
NOTE: All of the commands and directions in this 'HowTo' assume you're using a terminal.
Yes, command line (CLI). Even though Xastir is a GUI application, to install from source, you *must* install from a command line. If you'll be using the Xastir RPM from the Fedora repositories, you can use your preferred graphical tools to install it. But, if you were doing that, you'd already have that done and not be reading this far down the page <g>.
A note about root privileges
Many of the commands used to compile, install or check for software packages require 'root' privileges. There are commonly 3 ways to gain such permissions.
- Log in as root
- Elevate yourself to root
- Use root privileges for a single command
- First is done by, obviously, logging in as and being root. This is the least desireable method. It's possible to - inadvertently - really screw up your system. If you were to say, run rpm -fr * you'd delete everything in the current directory and below - with no recourse or recovery. Do this in your root '/' or '/bin' directory and you've just destroyed your installed system. It also opens up an opportunity (even if slight) for evil-hacker-doods to use your root access for their own nefarious purposes.
- Second is by using the su command. First you log into your system as a user, then execute 'su' to elevate yourself to root. This is basically the same as logging in as root - but when you're done doing 'root things', you can type exit and return to a normal user. It's considered a 'bit' safer, but those with an opinion say it's not much better.
- Third is by using 'sudo' (see man sudo for details). This takes a bit of configuration. First you need to add your user to the 'wheel' group (edit /etc/groups) and edit the file /etc/sudoers. Once this is done, you can be logged in as a regular user and give 'sudo' as a prefix to any command. That command will be executed with root privileges and when it's done, you're immediately returned to 'normal' user status. Advantage of this is you don't have to 'exit' to get back to a normal user. But, you do have to add it to every command you want to run with root privileges.
For example, you can run:
sudo rm -fr /
And achieve the same level of system destruction as in the first method. DO NOT DO THIS!
Using sudo is the method suggested by most. In fact, on many modern distributions - it's the only way to do it as they essentially hide the root user.
Like so many things FOSS and Linux - what you use is up to you. It's your choice. One of the beauty's of FOSS is you HAVE a choice!
For this "HowTo", I'll assume you have sudo configured. Configuring sudo is a bit beyond what I've planned here.
If you don't have it ready, you can just use:
Followed by your root password and voila - you're running as root, with root's environment (that's what the - does). When you're done doing "root things", don't forget to type 'exit' and return to normal user status! For the combined CLI commands below - just break them up into individual commands.
And yes - doing normal user type things as root really is a bad idea.
Is your system ready?
This "HowTo" assumes your system has a working Internet connection.
You should first ensure your Fedora installation includes the basic tools required to compile applications from source. You can determine if your system has these tools by running:
This will list what's available and what's been installed on your system. You're looking for:
# Development Libraries # Development Tools # X Software Development
If you find you're missing any of these groups, just install them with
yum groupinstall "<group name>"
So, to install the X Software Development group, you'd run
yum groupinstall "X Software Development"
Yes - you need the quotes.
Getting the source and your working directory
The Xastir Group uses the Concurant Versioning System (CVS) on the Sourceforge servers to store and maintain the Xastir code tree. We'll use the cvs command to retrieve the most recent Xastir code from Sourceforge.
You can just 'copy and paste' the commands below into a terminal window.
First, decide where in your file system you want to store your Xastir code tree. Many users just use a sub-dir in their home directory. But there are other places different traditions suggest. Where you store your code tree is relatively un-important and is up to personal choice.
I use my home directory: /home/<user>
those "less than" and "greater than" symbols are often used to show a command variable.
In this case <user> is whatever user I'm currently logged in as.
Since I'm using my own, home directory, I'll give the command:
that "~" is called a "tilde" and is the symbol for "my home directory" This ensures I'm in my home directory and I'll then run:
cvs -d:pserver:email@example.com:/cvsroot/xastir login
When asked for a 'password', just hit the enter key. There is no password. Then run:
cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/xastir co -P xastir
This will create a /home/<user>/xastir directory and copy the current code tree there from the CVS host.
In the future, to update your Xastir code tree, just run:
cvs update -d
This will compare your current source tree with what's in the CVS host and update your tree to match. Of course, if your code tree is updated, you'll need to recompile and re-install Xastir to take advantage of those changes. Easy enough to do and if you look, there are cron scripts available that'll do it all for you while you sleep.
The INSTALL file included with the Xastir source includes this blurb:
Short summary of libraries Xastir can use: ------------------------------------------------------------------------- Motif or OpenMotif or LessTiff Required The GUI widget set pthreads Required Threading capability Shapelib Recommended ESRI Shapefile maps and WX alerts pcre Recommended used with Shapefile maps Xpm Optional XPM images + Snapshots + Printing ImageMagick Optional MANY graphics images libtiff/libgeotiff/libproj Optional geoTIFF maps (USGS topos) AX.25 Optional Kernel AX.25 networking support festival Optional Speaking alerts libcurl or wget Optional Internet images as maps GPSMan/gpsmanshp Optional Converts GPS data to Shapefiles GDAL/OGR Optional Many formats (coming soon) libdb (4.0 or newer) Optional Internet map caching (fast!)
Following my "HowTo" here will result in an Xastir installation that includes (output from ./configure):
MINIMUM OPTIONS: ShapeLib (Vector maps) ................. : yes RECOMMENDED OPTIONS: GraphicsMagick/ImageMagick (Raster maps) : yes (GraphicsMagick) pcre (Shapefile customization) ......... : yes dbfawk (Shapefile customization) ....... : yes rtree indexing (Shapefile speedups) .... : yes map caching (Raster map speedups) ...... : yes internet map retrieval ................. : yes (libcurl) FOR THE ADVENTUROUS: AX25 (Linux Kernel I/O Drivers) ........ : no libproj (USGS Topos & Aerial Photos) ... : yes GeoTiff (USGS Topos & Aerial Photos) ... : yes Festival (Text-to-speech) .............. : yes GDAL/OGR (Obtuse map formats) .......... : no GPSMan/gpsmanshp (GPS downloads) ....... : no
As you see, I'll be leaving out the AX25, GDAL and GPSMan functions. After reading through this 'HowTo', you should have no problem adding in any of those 3 if you choose. I've left these out as configuring those functions to be useful requires a bit more effort - outside Xastir.
The easy bits - RPMs
You can check to see if you've an RPM package installed by running:
rpm -q <package name>
so, to see if I have lestiff installed, I'd run:
rpm -q lesstif
I get this back:
That's all fine and dandy - good even. But, to make lesstif useful to Xastir I must also have the 'devel' package installed. Otherwise I can't compile the Xastir code 'against' that library.
rpm -q lesstif-devel
package lesstif-devel is not installed
No biggy - just have to install it. Yum makes it easy.
yum install lesstif-devel
If there are any other, supporting packages that are needed - yum gets them and installs them as well.
Yum really does do a nice job, usually.
Yum also allows for packages to be 'stacked'. So, if I find I don't have libtiff installed, I know I don't have libtiff-devel. I can install both at the same time.
yum install libtiff libtiff-devel
You can stack quite a few packages this way.
So, for Xastir - we need to see if we have:
note the number of 'f's! lesstif has one 'f' - libtiff has two 'f's.
If you don't want to check for each one - and you really don't need to - you can 'shotgun' the whole pile and ask yum to install them all. If a package is already installed, yum will simply 'skip' it.
yum install lesstif lesstif-devel libtiff libtiff-devel GraphicsMagick GraphicsMagick-devel\ db4 db4-devel curl curl-devel pcre pcre-devel festival festival-devel
note: the "\" character means "continue to the next line"
The not as easy bits - packages
NOTE: You must install libproj BEFORE compiling libgeotiff.
libgeotiff uses libproj to do the datum translations. If you install libgeotiff first, datum translations won't work.
Again, you can just copy the following commands, verbatum, into your terminal and execute them.
Start by changing to a working directory. I use /tmp, but use whatever you're comfortable with. Once you're done installing these libraries, you can safely delete their directories from your working directory.
Then decompress it
tar xzvf proj-4.6.1.tar.gz
Now, cd into the 'nad' directory
And from here, download the North American Datum code
Then unzip it
Now, move back up to the proj source root and compile it.
cd ../ ./configure make make install
Remember the 'root' discussion? If you're using 'sudo' - change that last command to sudo make install.
Here's another "Linux trick" - you can 'stack' commands by using ";" to separate them. You can accomplish all the above:
cd ../; ./configure; make; sudo make install
Yes - if you're going to stack commands at the CLI - do use sudo. You'll thank yourself someday.
Clean up on isle /tmp!
cd /tmp; rm -fr proj-4.6.1*
That will remove the origional tarball and the directory created when you 'blew' it up and compiled it. Now that the library is installed, you won't need these anymore.
After you've installed any new library from source - your system doesn't yet know it's there. You'll have to edit the file /etc/ld.so.conf and add the line: "/usr/local/lib" and as root, run /sbin/ldconfig. See section 3a of the INSTALL file.
You can run /sbin/ldconfig after each source compiled library is installed or after all of them are installed. Makes no real difference.
Back into your favorite working directory
Then get the libgeotiff 'tarballs'
"blow up" the tarball
tar xzvf libgeotiff-1.2.5.tar.gz
Change into it's directory, configure, compile and install
cd libgeotiff-1.2.5; ./configure; make; sudo make install
Don't forget ldconfig!
And clean up after
cd../; rm -fr libgeotiff-1.2.5*
shapelib is included with the Xastir source tree, so unless you also need it for other applications you're ready to compile Xastir!
If you do need shapelib for other applications - see section 4 of the INSTALL file.
Build and install Xastir
Change back into your Xastir source tree - if you did it the way I do, just run
Now, you'll have to first 'bootstrap' things, then configure, then make and install. So - again using 'sudo' and doing it all in one line
./bootstrap.sh; ./configure; make; sudo make install
NOTE: You only need to run ./bootstrap.sh the first time you build Xastir or if you change something on your system.
Roughly, ./bootstrap.sh builds the ./configure script. It should "just work" after you've got it done the first time.
To run Xastir make sure you're not operating with root privileges first, then just enter
and have fun!
This was put together rather quickly and may well contain errors. Use At Your Own Risk (UAYOR). I've completed each step on my own Fedora 10 laptop. But, it already had Xastir on it so I may have inadvertently left out a step - hope not! If you've any questions - please use either the discussion page for this entry, the APRS email reflector hosted by TAPR or contact me direct KA7O.
APRS is a registered trademark of APRS Software and Bob Bruninga, WB4APR.