Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.astro.louisville.edu/software/xmtel/archive/xmtel-3.1/INSTALL
Дата изменения: Sun Oct 15 01:22:40 2006
Дата индексирования: Mon Oct 1 20:58:17 2012
Кодировка:

Поисковые слова: http news.cosmoport.com 2005 04 22 1.htm

Summary
-------

1. Does your system have Motif? If not, install Lesstif or OpenMotif,
preferrably from source to be sure to get the development libraries.

2. Download and untar XmTel.

3. Compile XmTel and copy the binary to /usr/local/bin .

4. Check the serial port device permissions and if necessary fix udev .

5. Download and install XEphem if you do not have it already.

6. Check that the XEphem app-defaults file points to the place where the
essential fifo and catalog files are located.

7. Create the fifos in the xephem/fifos/ directory referred to by the
app-defaults file.

8. Turn on your telescope.


Details
-------


1. Motif

Since XmTel uses Motif, the libraries and include files needed to compile
new software must be available. Many Linux distributions (Slackware, Redhat,
and others) come with Lesstif, which is fine for this purpose. Unfortunately,
Suse Linux does not, so if you are using Suse the standard
Suse Motif package includes only runtime libraries, and this is for you:

This version of XmTel has been tested with OpenMotif, which is free
for non-commercial use. See

http://www.motifzone.com/

for the source or binary files. Alternatively, Lesstif

http://www.lesstif.org/

is GNU Public Licensed and should work with XmTel. There are small
differences in the functionality of these libraries. If you have LessTif
installed, then try it. It should work for XmTel, but it might not work
perfectly with more sophisticated software that uses the latest Motif features
(XEphem, NEdit, or Grace, for example). Motif is nearly universal for
user interface development in Unix-based systems. It does not require
installing either the KDE or Gnome destktop systems. It is also required for
compiling XEphem and XmCCD. A recent version of OpenMotif is available from the
XmCCD source site.


2. XmTel

As root user (preferred)

cd /usr/local/src
tar -xvzf xmtel-#.#.tar


Set your current working directory to xmtel-#.#'s source directory

cd xmtel-#.#/xmtel
./setup_nexstar or ./setup_lx200

depending on your choice. This will create the appropriate links to the
protocols and the makefile.

Once you have these links, create xmtel with

make

It should compile without "Error", although depending on the version of the
program and your Linux system it may compile with "Warnings". If it fails to
compile, then most likely the makefile is not right for your distribution. The
makefiles which are included here are for Suse Linux version 10.0 or 10.1 with
Motif installed from OpenMotif source. They are fairly self-explanatory, and
you may only need to slightly change the location of the system libraries or
headers given in the Makefile for the telescope control you want to build.

Copy xmtel to a directory in your search path such as /usr/local/bin

cp xmtel /usr/local/bin

If you use system directories this step must be done as root or superuser.
However, there is no particular reason to do that if you prefer to keep xmtel
in your own home directory.


4. Serial port

By default the telescope is assumed to be connected to /dev/ttyS0,
that the one and only hardware serial port on most new PC's. If your telescope
is connected to another port, change the default assignment in xmtel.c
before compiling. Look for the line that reads

ConnectTel("/dev/ttyS0")

and modify it as needed, or swap around serial ports to put the telescope
on the first one.

The user must have rw access to this device, so check its settings with
the command

ls -l /dev/ttyS0

which would look something like this in Suse Linux

crw-rw-rw- 1 root uucp 4, 64 Feb 16 16:38 /dev/ttyS0

If the line does not show "rw" on all three, then as root or superuser
issue the command

chmod a+rw /dev/ttyS0

to fix it for now. Recent Suse distributions use the udev system for
building the device files, and ttyS0 will by default not have rw access.
The permissions you fix this way will revert back on reboot. To fix
this permanently you need to edit a file in the udev configuration system.

The entries in /dev directory will be established every time the system
boots based on the files in

/etc/udev/rules.d

In Suse 10.1 you should edit 50-udev-default.rules to change the
entry for the serial devices. As root user add MODE="666" --

Default --

KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp"

Change to --

KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="666"

With this change, when the computer is rebooted, the serial port will have rw
permission for any user.

Turn on the telescope power and start the program with the command

xmtel

If the permission setting on the serial port is not correct, the program will
not open a connection with the telecope and a "Telescope not connected"
message will appear in the message window.



5. XEphem

Suse Linux comes with the free version of XEphem installed. Because this
version does not have the catalogs that are really helpful for
telescope operation, I recommend that you remove this installed package,
obtain the current version from Elwood Downey, and install it from
source:

http://www.clearskyinstitute.com/xephem

Untar the source in /usr/local/src, cd to the top level and follow the
directions given there to install system-wide.

This will put all of the XEphem support files in /usr/local/xephem. In that
directory, cd to fifos, and "make" the fifos needed for telescope control.

The binary should be copied to /usr/local/bin.



6. An app-defaults file


You must place a one-line XEphem app-defaults file in the app-defaults
directory. For Suse Linux this is

/usr/X11R6/lib/X11/app-defaults/XEphem

but this location depends somewhat on the distribution. Try "locate
app-defaults" to see where it is on your system if you do not already know.

The essential line tells the binary where the other files are:

XEphem.ShareDir: /usr/local/xephem

Without this XEphem will execute but will not find the fifos, and will
not know that XmTel is running. It may also not find all the catalogs or the
site list.

XmTel is compiled to look for the fifos in /usr/local/xephem/fifos. At the
present time, this is not settable by an XmTel app-defaults file, so you have
to make the XEphem system conform to XmTel's expectations.



7. Create fifos

As root user, assuming the fifos are in /usr/local/xephem,

cd /usr/local/xephem/fifos
make

(If the fifos were already there, it might be best to remove them first with
"rm *fifos", then "make".)


8. Use your telescope

It's a simple procedure to get going now:

a. Turn on the telescope. Go through the initialization procedure you
usually would do with the handcontrol. When it is in the state that
you would be ready to observe without a computer, set the hand control
aside and use the computer instead.

b. On the command line in a directory containing a queue file (should you
want to use one) issue the command

xmtel

and wait a few seconds. The GUI should appear, and the message
"Telescope Connected" should be at the bottom of the virtual hand control
The coordinates that are displayed should agree with the ones on the
real handcontrol.

c. Start XEphem if you want to use the full user interface

xephem

If you are accustomed to XEphem you probably already have set it for your
preferences but if not, experiment with it. Set the site for your
observatory's longitude and latitude, set the field star defaults to point
to the latest GSC on your own computer (if you installed the full XEphem
from their website), and open the Sky View window.

Please note that XmTel comunicates directly with the telescope and
does not use the XEphem's INDI package. With the fifos properly installed
XEphem and XmTel will communicate and transfer information.

In XEphem's Sky View, right click on the target and select
``Telescope GoTo'' send coordinates to XmTel. In reverse,
select click on "Telescope" or "Target" on the XmTel menu to
see their locations on the sky.


For more information on the user interface, see the "DOCUMENTATION"
file in the xmtel distribution.




John Kielkopf
October 14, 2006