HowTo:Fedora

From XastirWiki

Jump to: navigation, search

Contents

[edit] Xastir by RPM

Xastir is now included in the Fedora Distribution

Due to the efforts of the guys over at the Fedora Amateur Radio Special Interest Group, Xastir is included as an RPM in the Fedora repositories. You can install Xastir (though not the latest CVS release) simply by using the command:

sudo yum install xastir

See the Sudo notes for help in setting up sudo. Also, see links and notes below for information on sudo - if you're not familiar with it.

This will install all the requisite libraries and the Xastir binaries. You'll still need to download maps as described in REAME.MAPS if you want to use more than the default maps and online maps.

Of course, after setting up your maps, you'll still need to configure Xastir for your use - see the built in 'help' system for details.

If you want the latest, install the CVS version (recommended).

[edit] How to install Xastir from CVS to Fedora. (F7, F8 and F9)

  1. I strongly suggest reading the entire INSTALL file first.
  2. This is not meant to be a replacement for INSTALL - but simply a distro-centric abridgement.
    A sort of 'check-list' if you will.

    This link will take you to a current copy of Xastir's INSTALL file.

  3. This how-to assumes your system has a working connection to the Internet.
  4. First, you'll need a console (terminal). You can open a console via: Application -> Accessories -> Terminal
  5. Many commands used to install software require root privileges.
  6. Two ways to gain root privileges (other than logging in as root) are:

    • the su command
    • the sudo command

    su will elevate you to 'root' until you type 'exit' to drop privileges and return to a normal user.

    sudo followed by a command will grant privileges for just that command, automatically dropping you back to normal privileges when that command is completed. Sudo is generally considered safer than su, but it does need to be setup before you can use it. See the Sudo notes for instructions on setting up sudo. Using sudo follows the same tradition of not logging in as root except when necessary. The Fedora Unity project also has a sudo howto.

    'su' is immediately available without any setup, but does - conceivably - carry some risks. Any command you give after using 'su' will be performed with root privileges - until you type exit to return to normal privileges. It's possible you may forget you have root privileges and inadvertently damage your system, it's installed programs or even expose your system to exploit. If you follow this how-to and don't issue any extra commands, you should be fine.

  7. If by chance, you didn't install Fedora with the required development tools, you'll have to add them in now.
    To see if you have them or not. Simply run:
  8. sudo yum grouplist
    

    That will return something like:

    [user@localhost ~]$ sudo yum grouplist
    Loaded plugins: refresh-packagekit
    Setting up Group Process
    primary.sqlite.bz2                                       | 157 kB     00:01     
    fedora                                                   | 2.4 kB     00:00    
    updates                                                  | 2.3 kB     00:00    
     Installed Groups:
     ::snipped::
     Available Groups:
     ::snipped::
    Done
    

    I've removed the actual group listings from that output and replaced them with ::sinpped::. It will be different for every install.
    You'll see what groups you have installed. Look through the first part, "Installed Groups". You want to find these 4 groups:

    • Development Libraries
    • Development Tools
    • Gnome Software Development
    • X Software Development

    If they're not there, install them with:

    sudo yum groupinstall "Group-1 Name" "Group-2 Name" <enter>
    

    So, if my system had everything but the "Gnome Software Development", I'd install that with:

    yum install "Gnome Software Development" <enter>
    

    You can always double check again with 'sudo yum grouplist' to make sure you have it all.

  9. For help installing Fedora see The Fedora install guide. There are several 'personal setup' guides that will help you to customize and configure your Fedora install. One of the more popular out there is mjmwired.net's Personal installation guides,

Now, to work...

[edit] RPM stuff

I'll go through some detail with this first one. I'll simplify the rest and assume you can follow the pattern.

note: The 'install' commands require root privileges. Enter the command 'su' and then give the root password and continue. Or after setting up sudo, add sudo to the beginning of each command line. This first line would become: sudo rpm -q ImageMagick <enter>

  1. ImageMagick
  2. Simply run:

    rpm -q ImageMagick <enter>
    

    You should get a response similar to:

    ImageMagick-1.1.10-3.fc9.i386 (numbers will likely be different)
    

    This tells you ImageMagick is installed and exactly what version it is. If you get this instead:

    Package ImageMagick is not installed 
    

    Then install it with:

    yum -y install ImageMagick <enter>
    

    Install ImageMagick-devel. Seems most devel packages aren't installed by default:

    yum -y install ImageMagick-devel <enter>
    
    • NOTE: You can combine these steps into one. If you didn't have ImageMagick, you surely

    don't have GraphicsMagcik-devel. Get both like this:

    yum -y install ImageMagick ImageMagick-devel
    
  3. Festival
  4. optional: festival provides speech synthesis allowing Xastir to 'talk' to you. Install Festival and Festival-devel, if not already present.

    rpm -q festival (to check for presence)
    yum -y install festival festival-devel <enter> (or just festival-devel if you have festival already)
    
  5. Libtiff
  6. Verify presence of libtiff

    rpm -q libtiff <enter>
    

    If not installed, install it

    yum -y install libtiff <enter>
    

    NOTE: no need for a devel package with Libtiff! It's a library, not an application.

  7. Lesstif
  8. note: In the past, Fedora included OpenMotif, but due to an incompatible license from OpenMotif, Fedora now includes lesstif instead.

    Verify presence of lesstif

    rpm -q lesstif <enter>
    

    If present, verify presence of lestif development package

    rpm -q lesstif-devel <enter>
    

    If either are not present, install whatever is missing

    yum -y install lesstif lesstif-devel <enter>
    
  9. PCRE (Perl Compatible Regular Expressions)
  10. The DBFAWK capability of xastir requires PCRE. We do not recommend building xastir without DBFAWK capability if you plan on using shapefiles. PCRE will probably not be installed already, so just install it:

    yum -y install pcre pcre-devel
    
  11. ld.so.conf
  12. ld.so.conf is a file found in the /etc directory. Use vi or gedit to check it and make any changes as needed. Verify that /usr/local/lib, /usr/lib, and /usr/X11R6/lib are all listed in the file /etc/ld.so.conf. Add each of the 3 as it's own line. Something like:

    /usr/local/lib
    /usr/lib
    /usr/X11R6/lib
    include ld.so.conf.d/*.conf   <-should already be there
    

    Execute:

    /sbin/ldconfig <enter> 
    

    to refresh library cache.

[edit] Tar balls

  1. Setup for working with sources
  2. Change to your to your working directory of choice (cd). Tradition would suggest /usr/local/src. I use my home directory /home/<username>. You may also make a /source or /src directory most anywhere in the filesystem and use that. Totally up to you where you do this. To continue here, just make it your current directory (I use cd ~ <enter>)
    note: the tilde character, "~", represents your home directory. For users, ~ would be /home/<username> or /root for the root user.

  3. Compile and install libraries
  4. note: Some of the following lines include the sudo command. If you're using su, just leave sudo off the lines below.
    note: It is now assumed you understand how to use the <enter> key to execute commands. <enter> is left off the following commands.
    note: The scripts directory in the Xastir source tree (~/xastir/scripts) contains shell scripts that can automate some of these and other functions. Once you have Xastir up and running I suggest exploring those scripts.

      The following lines will download the required 'tarball' into your current directory, extract them, build and install the libraries. You can "cut and paste" each line - one at a time - to your console and hit enter.
    1. Install libproj.
    2. wget ftp://ftp.remotesensing.org/proj/proj-4.6.0.tar.gz 
      tar xzvf proj-4*.gz 
      cd proj* 
      cd nad 
      wget ftp://ftp.remotesensing.org/pub/proj/proj-datumgrid-1.3.tar.gz 
      tar xzvf proj-dat*.gz 
      cd ../ 
      ./configure 
      make 
      sudo make install 
      sudo /sbin/ldconfig 
      

      note: the proj-datumgrid file must be extracted into the nad directory before libproj is compiled, as indicated in the steps above.

    3. Install libgeotiff
    4. wget ftp://ftp.remotesensing.org/pub/geotiff/libgeotiff/libgeotiff-1.2.4.tar.gz 
      tar xzvf libgeotiff*.gz 
      cd libgeotiff* 
      ./configure 
      make 
      sudo make install 
      sudo /sbin/ldconfig
      
    5. Install ESRI shapelib support
    6. wget http://dl.maptools.org/dl/shapelib/shapelib-1.2.10.tar.gz 
      tar xzvf shapelib*.gz 
      cd shapelib* 
      make lib 
      sudo make lib_install 
      sudo /sbin/ldconfig 
      

      note: Once all libraries are installed, you may safely delete the tarballs and their source directories.

[edit] Get and compile Xastir from CVS

note: again, if you're using su, just leave off each instance of sudo that follows.

  1. Checkout Xastir source from CVS
  2. cd ~ <enter> 
    

    Enter this full line and hit enter (you can cut 'n paste it from here)

    cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir login
    

    When asked for a password, just hit the 'enter' key - leave it blank. Then enter this full line and hit enter:

    cvs -z3 -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir co -P xastir
    

    This will create the ~/xastir directory and place the current source tree there. To update, in the future cd into this directory (cd ~/xastir) and then run 'cvs update'. note: On occasion, the developers add new directories to the Xastir source tree. To get these directories with your updates, use: cvs update -d

  3. Build Xastir
  4. Now:

    cd ~/xastir 
    ./bootstrap.sh 
    ./configure 
    make 
    sudo make install
    

    Yup - that's it. Xastir's support files are now installed to /usr/local/share/xastir. The Xastir executable is now in /usr/local/bin and the Xastir libraries are now in /usr/local/lib. First time you start Xastir, it'll make a ~/.xastir directory and create several files. ~/.xastir is where your log files, snapshots and configurations reside.


    note: when ./configure finishes, it'll give you a list of what is going to be built into Xastir. Following this guide, you'll have:

    xastir 1.9.5 has been configured to use the following
    options and external libraries:
    
    MINIMUM OPTIONS:
      ShapeLib (Vector maps) ................. : yes
    
    RECOMMENDED OPTIONS:
      GraphicsMagick/ImageMagick (Raster maps) : yes (ImageMagick)
      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
    
     
     xastir will be installed in /usr/local/bin.
     Type 'make' to build Xastir (Use 'gmake' instead on some systems).
    


    <note: dbfawk will not be enabled unless you installed pcre and pcre-dev. We do not recommend installing xastir without these libraries if you plan on using shapefiles>

    [edit] Gotchyas

    note: If you're using a serial TNC, you may well run into permission problems in accessing the serial port your TNC is connected to. The best way to fix this is to set the Set User ID bit on the xastir binary. Do that with this command:

    sudo chmod 4755 /usr/local/bin/xastir
    

    This allows Xastir to run with the privileges of the file owner, root - if you've followed this guide.

    If you need/want other libraries/capabilities - read the INSTALL file found in your xastir source directory. Everything is pretty much is spelled out.

[edit] Use it!!

Start Xastir by typing:

xastir <enter>

This will allow you to see any error messages or problems in the console.
Now, setup your station and enjoy!
File > Configure > Station

If you're using a serial TNC, your serial ports are:

/dev/ttyS0 (what windows would call 'COM1')
/dev/ttyS1 (what windows would call 'COM2')

You'll likely see an error in the console similar to:

"Character '\55' not supported in font"

No biggy and you can safely ignore it. However, if you'd like to correct this, see the appropriate section in the FAQ, find the FAQ in your xastir source directory. You're looking for:

4.13 Why do I see "Character '\55' not supported in font"?

You can read it online at: http://xastir.cvs.sourceforge.net/xastir/xastir/FAQ?revision=1.68&view=markup

Any further questions? Ask on the reflector. http://www.xastir.org/mailman/listinfo/xastir

73


Views
Personal tools
Navigation