Running Multiple Instances of X on One Video/Monitor (VCs)

Hello,
I have tried to run multiple X servers with only one card and one monitor.
Is this possible, or is it normal that the second X server does not
run?
I used startx display :0 the first time, and :1 the second.
I have a 1024K video board (#9GXE64 PCI, S3 864), and normal config is 8
bpp, 1024*768 virtual desktop, running on a remix of RedHat 4.0, 4.1 and
4.2, with XFree86 as server.
Maybe I did not understand the man page (English is not my first languaje).
Any suggestion?

The normal way this is done is using the form:

startx -- :0 &
startx -- :1 &

... The -- is used by startx and xinit to separate an optional
set of client parameters from the set of display/server
options and parameters.

If you ran the command:

startx xterm -e myprog -- :1 &

... it would start X Windows with a copy of xterm which
would be running 'myprog' (whatever that might be). The
remainder of the line informs the X server to use display
number one (which would be VC -- virtual console -- number
eight on most Linux systems).

(On my systems it would start on VC#14 -- accessed with the
{Right Alt}+{F2} key combination. I routinely configure
mine with 24 VC's -- the first twelve of which have
"getty's" (login prompts) and the next eleven of which are
available for X (xdm's or otherwise), using 'open' commands,
or for dumping status output from a process (like 'make' or
'tail -f').

Read the man pages for startx and xinit one more time.
I'm pretty sure that the man pages have all been translated
into Spanish -- so you might want to hunt those down.

Thanks!!!

Read the man pages for startx and xinit one more time.

Sure, and with a dictonary. ;]

I'm pretty sure that the man pages have all been translated
into Spanish -- so you might want to hunt those down.

The Spanish Howto is small, too global, sure it does not cover that.
And I still have problems with my ntilde chars and acents, Spanish is not
supported a lot (Linux or another OS, always late and bad)... The system
explained in that howto does not work (but thats another question, whose
solution maybe... magic? real support?).
GSR

I'm afraid I'm completely ignorant of internationalization
issues with Linux. I do know that there is quite a bit of
work done on Linux boxes in Japan, Germany, Italy and,
naturally enough, Finland (where Linus comes from).

As bad as it seems -- Linux' support for other languages is
probably the best in the world. Unfortunately I don't have
the skill or resources to point you to the support and
resources you need.

Since your English is clearly adequate to discuss these issues
with me -- you might consider contributing some of your time
to a translation effort (get the LIGS, NAG, and SAG portions
of the Linux Documentation project translated, and "beef up"
(improve) the Spanish-HOWTO.

I highly recommend that you find or start a Linux user's group
in your area. This is the best way to help yourself and to
improve the situation for all of your compatriots.

--
Jim

VC Madness

Hi
I have an application that uses its own .cshrc and .bashrc to fire up
and this is done by using its own login account.
Now what I would really like is for this to say select VC8 to run on
and then have my normal X on VC7 as usual.
Can this be done? and if so how?
--Phil

open -c 8 -- su - $PSUEDOUSER

... where PSUEDOUSER is the psuedo users whose .*shrc
you want to run. Naturally you can convert the .*shrc
into a normal shell script and do whatever you like with
it. You have to run this as root -- (so 'su' doesn't prompt
for a password) though there are ways to get around that
'runas' is available at the sunsite.unc.edu archive site and
its mirrors). If launch this from another UID you'll need to
ensure that this users (the launching user, not necessarily the
psuedo-user) has write access to /dev/tty8 (group +w should be
sufficient).

If you want to have the console visually switch to this
application's VC you can just add the -s switch like so:

open -c 8 -s -- ....

... where the "--" marks the end of 'open's' arguments
so that the command that follows it can unambigously get
its own arguments.

Without the -c switch the 'open' command will select the
next available VC. Any subsequent 'startx' commands or
other 'open' commands would then pick later ones (unless
the others were freed back up).

You can have two or more copies of X running on different
VC's as well. For example the command:

startx -- :1

... will create a second X session on the localhost:1
display (the first one is addressed as localhost:0 or
simply :0). These X sessions can be run under different
UID's and have completely different client configurations
(colors, window managers, etc). There is also an 'Xnest'
command that works similarly -- allowing one X session to
run "within" (as through a window on) one of your existing
X sessions.

You can also set the terminal settings and colors using
normal redirection of the form:

This last command would set and store a new set of default
screen colors for the VC. The setterm command can also be
used to control the Linux VC screen blanker's timeout
(a value of 0 means "never blank").

Naturally you may want to read the man pages for all of these.

If you want to ensure that a given process will *always*
be running (and will automatically be respawned when it
dies) you can add it to your /etc/inittab -- so that the
init process will watch over it. This is how new 'getty'
processes are spawned on your first six (or so) VC's when
you boot and are respawned when you logout. Likewise if
you use 'xdm' to keep a graphical (X based) login prompt
on one or more of your VC's.

As you can see, its possible to do quite a bit with Linux
VC's. I run 12 VC's with getty (as login consoles), have
one 'xdm', one devoted to syslog, and ten more available for
other purposes (such as 'startx' and 'open' commands and to
to use for 'tail -f' commands when need to monitor the
end of a status or log file -- from a 'make' or whatever.

The second set of 12 VC's is accessed with the *right*
{Alt} key. (In case you'd never noticed, the default
keyboard settings of Linux only allow you to use the
*left* {Alt} key for switching VC's). I set syslog to
use VC number 24 with an entry in the /etc/syslog.conf
file that reads:

*.* /dev/tty24

This puts a copy of *every* syslog message on to that
VC -- which is what I switch to for a quick glance and
try to switch to when I leave any of my systems unattended.
(That way when one does lock -- as rare as that is -- I have
some idea of what the last throes of the system were).

I set that to bright red on black with the following command
in my rc.local file:

setterm -foreground red -bold on -store > /dev/tty24

(I also do the same to /dev/tty12 which I customarily use
only for root login's).

Hope all of that helps.

--
Jim

Linux and OSPF

Dear Sr.
Recenty I had my first contact with the Linux G. and is a big source of
information, can you inform me if there are a program that can talk ospf
because our ISP, is changing from RIP to OSPF and we have a linux box
in one of our links, for our cisco no problem but for our Linux box??

The software you want is called 'gated' (for "gateway daemon").
This is a Unix multi-protocol router package for Linux which
includes support for OSPF and other routing protocols (BGP4,
IGRP, etc).

I've heard that compiling 'gated' for Linux is not
quite trivial so here is some other links that might help:
Here's a link to a source RPM in the Red Hat contrib
directory:
gated-R3_6Alpha_2-1.src.rpm

If they appear commented out -- remove the leading hash
sign(s) (or paste these samples in) and restart your
inetd with a command like:

kill -HUP `cat /var/run/inetd.pid`

2. When I log on to my ISP, I download my mail and it gets dumped to the
sendmail, this creates a situation where the mail is bounced back and
forth until it passes the hop limit and is dumped as an error message in
the postmaster box, and a nasty letter is send to the originator from
MAILER-DEMON... I think this maybe because I'm running a local area
network between my two machines, the IP address of the local net is
162.blah.blah... But I also have the IP address the ISP gave me in the
host file.
If the ISP's IP address is the problem can I remove it from the host
file, and just get a duynamic IP when I connect?
Thanks in advance!

This is a bigger problem. First the 162.*.*.* is probably
not what you want to use for you disconnected LAN. There is
an RFC 1918 (originally RFC 1597) which describes and reserves
a set of addresses for "non-Internet" use. These are guaranteed
not to collide with any valid (routable) hosts on the 'net.
Here's the list of those addresses:

... use those however you like. Be sure to keep them behind your
own routers (make any hosts with those go through an IP masquerading
or NAT -- network address translation -- router, or through a
SOCKS or other proxy server).

The next problem is configuring sendmail for use on a
disconnected system. You probably need to define your
hostname (or an alias to your hostname) to match what your
ISP has named you. Each ISP seems to use a different way to
manage these "disconnected sendmail subdomains" -- with no
standardization in site (which is why I use UUCP).
I gather that some people use a scheme where they only run
sendmail when they are connected. The rest of the time
their MUA (mail user agents like elm, pine, mh-e, exmh, etc)
just drop outgoing mail into the mqueue directory where
'sendmail' will get to it later.
One problem I have with these configurations is that
sendmail wants to look up these remote hosts. This
seems to cause various problems for users of "disconnected"
or "periodically connected" (dial-up) systems.
So far the only solutions I've found are:
recompile sendmail without DNS support (there used to
be a sendmail.cf switch that disabled DNS and reverse DNS
activity in sendmail -- but that doesn't seem to work any more)
use UUCP. UUCP was designed for disconnected (dial-up)
and polling systems. It's what I use. The disadvantage
to UUCP is that it's a bit hard to set up the first time
-- and you have to find a provider that's willing to
be your MX/SMTP to UUCP gateway. There are still some
people out there where will do this for free or at only
a nominal fee. But they are increasingly hard to find.
I use a2i Communications in San Jose. You could use
a non-local provider if you want to use UUCP over TCP
as the transport mechanism (UUCP is pretty flexible
about the underlying transports -- you could probably
use tin cans and string as far as its concerned).

There are several HOWTO's that try to cover this topic.
Try browsing through some of these:

Thanks so much for the detailed suggestions. We have installed a newer version of pop3 on our server for now and we will look into the feasibility of implementing some of your suggestions for a final cure.
Thanks again, James, we really appreciate it.
-Sam Hillman, Service Manager, Easyway Communications.

Cryptographic System

Sorry for bothering you but I would apreciate a lot an answer
even a short one like 'no' :)
I am (desperately) searching a crypographic system for my Linux box.
I am already using TCFS but I'm not very happy with it for several
reasons: it is slow, I experienced some data loss, must use the
login password, cannot share encypted files with other users,
NFS - increses security riscs.
And the people in Italy seemed to have stoped work on this project
(latest version is dated february).

February doesn't seem that old.

Are you sure you're using the latest TCFS (v 2.0.1)?
You can find that at: http://pegaso.globenet.it
(which is a web form leading to an HTTPS page -- so use
and SSL capable browser to get there).

If you find it slow than any other decent encryption
is also likely to be too slow for you.

You could look at http://www.replay.com (in the Netherlands).
This has the best collection of cryptography software I've
seen anywhere.

The two fs level alternatives to TCFS are CFS (Matt Blaze's
work, on which TCFS was based) and userfs (which support a
few different user-level filesystem types including an
experimental cryptographic one.

I am wondering if you know anything about an encryption at the
file system level. Something like SecureDrive (from DOS :) which
did IDEA encryption on the fly at sector level for a partition and
was very fast.

Are you sure SecureDrive is using IDEA? I rather doubt
that.

As an (almost) single user on my linux machine something like this
would be more apropriate.
Of course if I would not find one I'll finish by writing it by myself.
My only concern is that I've been a Linux user only for half a year
and I did not get the chance to study the kernel to well (this will
be a good opportunity :)

Why not pick up on the TCFS or CFS work? Why not
build on the userfs work (plugging in whatever encryption
you like)?

Why write it "by yourself" when you can collaborate with
other members of the Linux community as they have done
to bring you Linux itself, and as the FSF and others have
done to bring you the GNU packages which turn Linux into a
full OS?

What you asking for doesn't need any support at the kernel
level. userfs and CFS already have shown that. The Linux
kernel already support a robust and open filesystems interface
(which support more different filesystem types than any other
-- with read-only support for HPFS, NTFS, BSD and Sun UFS/FFS,
and support for HFS (Mac), ext2fs, xiafs, Minix, and many others.

If you're a competant programmer (which I am not, BTW) you
should be able to trivially take the sources for any of the
existing filesystem modules and hack together your own
with the encryption support of your choice. How secure the
result will be will be a matter of your skills -- and should
be greatly improved by peer review (by publishing your work
for all to see).

Naturally if you are in a free country you can share your
work on cryptography with the world. However the USA doesn't
appear to currently be free in this particular respect --
please find a congress critter to vote out of office if this
oppresses you.

An Interesting De-Referencing Problem

Here's the brain teaser I read about and promptly forgot the solution
(because I thought it would never happen to me). How does one delete
a FILE named ".."
I have the following at the root directory.

/. a dir (which is normal)

/.. a dir (which is normal)

/.. a file (which is not normal)

How this happened I don't know. How to remove this not-bothering-me file
has me stumped. Got an answer?

I suspect that this file is actually named something
like: "/.. " (note the trailing space!).

In any event you can remove this with a command like

find / -type f -maxdepth 1 -name '..*' -print0 | xargs -0 rm
-i

Note: you must use the GNU versions of find, xargs, and rm
to ensure that these features (-print0, -0, and -i) are
available. (They may be available in other implmentations --
but you must check first).

The find parameters here specify files (not directories,
symlinks, device nodes, sockets, or FIFO's) and force it
to only search the named directory (or directories if you
list more than just /). The -print0 force it to be written
as a null-terminated strings (thus the receive process on
the other end of the pipe must be able to properly interpret
null-terminated arguments -- which is what the -0 to xargs
accomplishes).

As far as I know there is no way to legally get a NUL character
into a Unix filename. (Using a hex editor might get one in there
-- but fsck would probably complain on its next pass).

The -i on rm is just a little extra protection to prevent
any other unexpected side effects. It forces rm to interactively
inquire about each argument before removing it.

Reminder!

I am a subscriber to caldera-users, but as a rank newbie, 99% of what
gets posted is irrelevant to my situation and over my head. In fact,
I'm looking for some real basic, preliminary information:

Perhaps you should consider some avenue of paid support.
there are a number of consultants and even a 900 support
line.

Also, if you have access to IRC there are a few #Linux
"channels." (If you've never heard of IRC -- or Internet
Relay Chat -- then think of it as an online CB system --
similar to the "chatboards" and "chat lines" on various
BBS' and online services (like CompuServe and AOL)). Granted
IRC is a bear to figure out -- and 99.9% of what's written there
is even less relevant or comprehensible than the traffic on
this list. However the feedback is immediate and there are
some people who will take time out from their usual chat
aggenda to help.

There's also that pesky "Answer Guy" from Linux Gazette ;)
(but he's too ornery and doesn't help with X Windows stuff
at all).

1. A way to create a primary Linux partition on a drive that is entirely
occupied by a dos active and a dos extended partition. The extended
partition has 400MB available that does not have any data on it, but LISA
2.3 does not wish to give it a primary partition.

You have three choices here. You can repartition the drive
using traditional methods (backup your data, reformat, re-install
DOS and all applications, restore data). You can repartition
using FIPS (a non-destructives partitioning program for DOS --
written by Linux or FreeBSD users from what I gather). If you
use FIPS the process goes something like: do a backup, verify
your backup, unfragment you DOS partitions, run CHKDSK and/or
Norton Disk Doctor and/or SCANDISK, then run FIPS.

Another approach -- and the only one I know of that doesn't
involve repartitioning -- is to use MiniLinux or DOSLinux or
XDenu. These distributions (of which DOSLinux is the most
recent and must up-to-date) are designed to run on a UMSDOS
partition (an MSDOS partition mounted under Linux with
support for some Unix semantics). You would be running COL
-- but you would be running Linux.

2. a workaround to a problem with RAWRITE3: I can't see my COL Base cdrom
on a Nakamichi MDR7 jukebox that is controlled by a BusLogic 946C, because
Autoprobe can't find anything and I can't get RAWRITE3 to write MODULES.IMG
to a floppy on A:.

Have you tried supplying the "max_scsi_luns=7" parameter
to the kernel during the bootup sequence (at the LILO prompt).

Normal SCSI controllers support up to 7 devices. It is
possible for these controllers to refer to "Logical Units"
on any/all of these devices. These "logical unit numbers"
or LUN's aren't very common -- but are used by CD changers
(which is why most of them are limited to 6 or 7 CD's) and
some tape changes (though those usually use a different
mechanism to control tape changes and ejections) and some
RAID subsystems and CD-ROM "towers."

I have a NEC 7 platter CD changer which requires this parameter.
This suggestion assumes that the problem is isolated to the
CD drive -- and that your kernel (LISA's) is seeing the BusLogic
card. If the problem is that you can't even see the SCSI controller
-- then you probably want to look for an alternative boot/root
diskette set and boot from that.

One of the nice things about user's groups is that you can
often have the phone numbers of some local Linux users that
will cut you a custom kernel on request and let you pick up
the floppy. I'd highly recommend finding (or starting)
a local LUG. I've occasionally had people come over to my
place where we could plug them onto my ethernet and suck
all the free software they want across from one of my systems.

(Which reminds me -- I've been meaning to get PLIP working
for a couple of years now -- I should really get around to
that).

For these reasons, I ask: Is there any way to ask caldera-user users for
some help on these two questions, sent to my own email address, and not have
to read 20 or 30 messages that I can't profit from, at least until I get COL
up and running. I had hoped from the name that Post-Only might be such an
address, but I see that it is something very different.

Caldera has some support options. I think some of them are
extra cost items. Have you called them about your Caldera
specific questions?

At first blush it doesn't look like Caldera's COL is the
best Linux distribution for your needs. If you're intent
on using COL -- and particularly if you have a business
need for Linux -- I'd recommend going out and buying an
additional drive. For a couple hundred bucks (US) you can
get a 2Gig external SCSI drive (www.corpsys.com if you don't
have a suitable vendor handy).

Even if you're just experimenting with Linux and don't want
to "commit" to it -- an extra external SCSI drive with
a couple of Gig of space is a handy investment for just about
ANY operating system. It's pretty convenient to connect
the extra drive, and just make a copy of everything from your
main system.

If your time is worth more than $20/hr you can easily make
the case for buying a $200 to $300 hard drive. Doing full
system and data backups, and verifying them prior to
repartitioning can be pretty time consuming. Even if you
already have a scheduled backup habit (let's face it --
most don't) and even if you have a regular recovery test
plan (which almost nobody bothers with -- often to their
detriment!) -- doing a major system change (like repartitioning)
almost requires an extra "full" backup and test cycle.

(I have customers who've run the cost vs. time numbers
for their situations and justified buying a full system and
hired me to do the configuration on the same basis. The
"extra" system becomes part of the recovery plan for major
system disasters).

--
Jim

pcmcia ide Drives

I am trying to install a pcmcia drive through a kit I purchased.. I got
the drive all ready I formatted it with a desktop machine and bot my win
95 and linux partitions are defiend... But now when I go and boot linux
I send the commad ide2=0x170 and it loads it identifies the right drive
but I get all sort of errors... Can you help?
C. Alan Sklar

I don't have enough information to help with this one.
Is this a laptop or a desktop with a PCMCIA adapter
installed? In either event what is the make/model
of the system?

Do you have PCMCIA support installed and built into the
kernel? What modules do you have loaded? What does your
/etc/pcmcia/config.opts file look like? What type of
hard drive is this (make and model)?

--
Jim

KDE BETA 1

This should be the most handy tip known to man!
If a certain application (I don't care what it is) complains about
missing a library and you know that
the library it's wanting is in a certain directory THEN:

Add *that* directory to the /etc/ld.so.conf file.

Rerun /sbin/ldconfig

That's it. What is does is it tells Linux to search the directories
specified in /etc/ld.so.conf
for library files. Forget about the stupid LD_LIBRARY_PATH variable.
Everyone: Please read the
ld.so man page for further knowledge.
Eric Wood

I recently trashed my /etc/ld.so.cache file and
had forgotten how to fix it (since the last time
I'd had a damaged ld.so.cache was on an old Sun
a couple of years ago -- and I've never had one on
a Linux box before.

Post that to your tech support archives:

System hangs on boot -- even with -b and
single switches -- or it gives messages
like "unable to open ls.so.cache" in a
seemingly endless stream:

Permission is granted to any individual or institution to use, copy, or
redistribute this executable so long as it is not modified and that it is
not sold for profit."

I think there's a source package for "Info-zip" also floating
around. I don't know if this is Info-zip or an independent
version -- looking in /usr/doc/unzip*/COPYING I find Mr. Rommel
listed -- and that document is definitely about Info-zip.

For the future you might try the 'locate' command -- which is
fairly common among Linux distributions. The command:

locate zip

... will quickly find every file with "zip" in the name or path
that was on your system during the last "updatedb" run
(which is typically a cron job that's run nightly).

loadlin

Answer guy,
To run LOADLIN I need to have a copy of the LINUX kernel on one of my
dos partitions, and an initial swap space. No where can I find an
actual explaination on how to do this correctly.

You don't need an initial swap space to run LOADLIN or
to load the kernel. If you have 8Mb or more of RAM you
don't "need" to have a swap space at all -- but you'll
probably want one.
You can swap to a file or a partition -- or even several
of each. Assuming that you don't have Linux installed
yet you can view man pages for most Linux/GNU commands,
functions, packages, and configuration files at:
http://www.ssc.com/linux/man.html

... in particular you want to read the mkswap(1) and the
swapon(8). The man pages there are accessed via a
CGI script so you have to post data to a form to access
the individual pages. Thus I can't give URL's directly
to the pages in question. That's an unfortunate design
decision by the web master at SSC -- it would be more
convenient to access (and cause less server load and
latency) if they used a cron job to periodically update
a tree of static HTML pages and saved the CGI just for
searching them.

Every time I try to copy the kernel to a dos diskette, Linux overwrites
the formatting. DOS then cannot recognize the file from the LOADLIN
command.

It sounds like you're using 'dd' or RAWRITE.EXE to prepare
these diskettes. That's fine for transferring boot/root images
-- but has nothing to do with LOADLIN. To use LOADLIN.EXE
you copy the kernel image to a plain old DOS file.

I haven't even gotten far enough to think about creating an initial swap
space...
Any advice on the subject?
Scott

I'd consider getting a copy of DOSLinux from
ftp://ftp.waaug.erols.com/pub/people/kent-robotti/doslinux.html
(Yes there are still some people out there serving HTML
pages via FTP -- nothing in the HTML spec *requires* that
HTTP be used as the transport mechanism).

Kent Robotti has been working on this distribution for
awhile. It takes about 32Mb of space on a DOS partition
-- and comes as a set of six 1.44Mb files (so if fits on a
half dozen diskettes). You then add a kernel for SCSI or
IDE use.

Basically DOSLinux works like this. You get all the
RAR files (RAR is a Russian Archiving Program like
PKZIP, SEA ARC, ARJ, LHARC, ZOO, or whatever). The first
image is a self-extracting file (an archive which is linked
with a DOS binary of the decompression program -- a common
DOS technique among archiving programs). You put these
all in a given directory and run the self-extractor
(DOSLNX49.EXE as I write this -- it was at "48" a couple
weeks ago) from C:\. It thenn extracts all of these images
to C:\LINUX directory.

This provides a complete (though minimal) Linux distribution.
It also shows how to configure a system to use LOADLIN with
a UMSDOS root partition.

I realize that you may be intending on use something like
Red Hat, Slackware, or Debian on a third hard drive, or a
removable drive or some other device that LILO just can't
see (because you BIOS can't "see" it). You can do that --
and I've done in many times (I first used LOADLIN in about
1994 for exactly that purpose -- with the magneto optical
drive I still use). However, if the README's and examples
that come out of the LOADLIN package aren't helping you
use if for that purpose -- than installing DOSLinux may
help get you rolling and serve as a vang DOSLinux may
help get you rolling and serve as a valuable example.
--
Jim

WipeOut

Hi,
in Linux Gazette Issue 22 there was a question about the WipeOut IDE.
Your answer was that you never heard about WipeOut :-( Please check
ShortBytes of Issue #19 - there is an announcement of WipeOut.
WipeOut has nothing to do with xwpe. It _is_ an IDE for C++ and Java.
There is just a new release ->
http://www.softwarebuero.de/index-eng.html.
Regards,
Falko

This definitely counts as my biggest flub in the
10 months that I've been writing this column. I've
gotten about 10 messages correcting me on this point.