973 lines
34 KiB
HTML
973 lines
34 KiB
HTML
<!--startcut ==========================================================-->
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
<html>
|
||
<head>
|
||
<title>More 2 Cent Tips & Tricks LG #29</title>
|
||
</head>
|
||
|
||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
|
||
ALINK="#FF0000">
|
||
<!--endcut ============================================================-->
|
||
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
||
</H4>
|
||
<P> <hr> <P>
|
||
|
||
<!-- QUICK TIPS SECTION ================================================== -->
|
||
<center>
|
||
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.gif">
|
||
More 2¢ Tips!</A></H1> <BR>
|
||
Send Linux Tips and Tricks to <A HREF="mailto:gazette@ssc.com">
|
||
gazette@ssc.com
|
||
</A></center>
|
||
|
||
<p><hr><p>
|
||
<a name="contents"></A>
|
||
<H3>Contents:</H3>
|
||
<ul>
|
||
<li><a HREF="./lg_tips29.html#rosomakho">Linux Kernel 2.1.102 Error Patch</a>
|
||
<li><a HREF="./lg_tips29.html#ehliar">Tip for using Windows 95 Button in X</a>
|
||
<li><a HREF="./lg_tips29.html#bronson">Re: Usershell on Console</a>
|
||
<li><a HREF="./lg_tips29.html#hall">IBM LAN Adaper for Ethernet</a>
|
||
<li><a HREF="./lg_tips29.html#ballueder">Easy Access to Removable Media</a>
|
||
<li><a HREF="./lg_tips29.html#smith1">Re: bpp 16 question</a>
|
||
<li><a HREF="./lg_tips29.html#smith2">Re: Finite Elements Programs</a>
|
||
<li><a HREF="./lg_tips29.html#smith3">Re: How to Enable Swapping</a>
|
||
<li><a HREF="./lg_tips29.html#smith4">Re: Slackware</a>
|
||
<li><a HREF="./lg_tips29.html#mcanulty">Re: about::mozilla</a>
|
||
<li><a HREF="./lg_tips29.html#niemann">Re: Rebooting without logging in as
|
||
Root</a>
|
||
<li><a HREF="./lg_tips29.html#omegaman">Re: Running an ATAPI ZIP Drive</a>
|
||
<li><a HREF="./lg_tips29.html#rodrigo">Re: Enabling Swap Space</a>
|
||
<li><a HREF="./lg_tips29.html#hammel">Re: Problems using Menus in X</a>
|
||
<li><a HREF="./lg_tips29.html#tennent">Music Typesetters</a>
|
||
<li><a HREF="./lg_tips29.html#dossey">BASH hostname Completion</a>
|
||
<li><a HREF="./lg_tips29.html#mcnamara">Re: xdm and depth</a>
|
||
<li><a HREF="./lg_tips29.html#digulla">Re: Shutdown and root</a>
|
||
<li><a HREF="./lg_tips29.html#davis">Printing with Linux</a>
|
||
<li><a HREF="./lg_tips29.html#gilb1">Re: Finite Elements Programs</a>
|
||
<li><a HREF="./lg_tips29.html#gilb2">Re: Hot to Enable Swapping</a>
|
||
<li><a HREF="./lg_tips29.html#jacobsen">Cuckoo Clock</a>
|
||
</ul>
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="rosomakho"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Linux kernel 2.1.102(3) error - patch!
|
||
</H3>
|
||
<P>
|
||
Date: Sat, 23 May 1998 16:20:07 +0000<BR>
|
||
From: Yaroslav Rosomakho, <A HREF="mailto:alons55@dialup.ptt.ru">
|
||
alons55@dialup.ptt.ru</A>
|
||
<P>
|
||
Hello. I have found that make menuconfig and lowlevel sound drivers
|
||
won't work in 2.1.102 & 2.1.103 (latest kernels). I have written a patch:<BR>
|
||
http://yaroslav.hypermart.net/linux
|
||
<P>
|
||
tell people about it!
|
||
<P>
|
||
Yaroslav Rosomakho.
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="ehliar"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Tip for using Windows 95 buttons in X
|
||
</H3>
|
||
<P>
|
||
Date: Wed, 29 Apr 1998 20:18:00 +0200 (MET DST)<BR>
|
||
From: Andreas Ehliar, <A HREF="mailto:tamyrlin@futurniture.se">
|
||
tamyrlin@futurniture.se</A>
|
||
<P>
|
||
I am sure that I am not the only one using a keyboard with Windows 95
|
||
buttons. Most people I know tend to ignore them, since they are not very
|
||
useful in Windows 95, and even less so in Linux. But they are supported in
|
||
the Linux kernel. That is, they do generate key codes which applications
|
||
could use, if they only know what to look for.
|
||
<P>
|
||
So, how do I get X to use the offending buttons?
|
||
In the following example, I will show how I configured X and fvwm2 to
|
||
allow me to move a window by pressing the left Windows 95 button, and the
|
||
left mouse button anywhere in the window. I can also resize the window by
|
||
pressing the left Windows 95 button and the right mousebutton anywhere in
|
||
the window. This greatly simplifies things for me, since I don't have to
|
||
locate the titlebar, or a border of the window to move it. So, how did I
|
||
accomplish this?
|
||
First, I created a file named .Xmodmap in my home directory with the
|
||
following two lines:
|
||
<PRE>
|
||
keycode 115 = Hyper_L
|
||
add mod4 = Hyper_L
|
||
</PRE>
|
||
This will map the left Windows 95 button to Hyper_L, and map Hyper_L to
|
||
mod4.
|
||
<P>
|
||
I added the following line to .xsession to actually load the modified
|
||
keymap:
|
||
<PRE>
|
||
xmodmap $HOME/.Xmodmap
|
||
</PRE>
|
||
Note that .xsession is usually executed if you use xdm to log on. If this
|
||
is not the case, you need to find the relevant file on your computer
|
||
system. Some likely candidates are .xinitrc, or .Xclients, however, YMMV.
|
||
<P>
|
||
To actually use mod4 I modified my .fvwm2rc by adding the following lines:
|
||
<PRE>
|
||
# I have bound my left win95 button to mod4, and by holding down it
|
||
# I can move and resize my window without bothering to find a border or
|
||
# titlebar
|
||
Mouse 1 W 4 Move
|
||
Mouse 3 W 4 Resize
|
||
</PRE>
|
||
What these lines does is to specify that if you press the left mouse
|
||
button (1) in a window (W) while pressing mod4 (4) you will move the
|
||
window. (Move)
|
||
If you want to know more about these lines, you should study the fvwm2 man
|
||
page.
|
||
<P>
|
||
So, read in your .Xmodmap, restart fvwm2, and enjoy the added
|
||
functionality. Now all that is left is to replace that Windows logo with a
|
||
penguin :)
|
||
<P>
|
||
Final notes:
|
||
<P>
|
||
* This is only an example, you will probably need to modify some paths to
|
||
suit your system.
|
||
<P>
|
||
* It is also possible that you already have a button bound to mod4. In
|
||
that case, you should probably think twice before binding another button
|
||
to it.
|
||
<P>
|
||
* If you don't use fvwm2 as your window manager,you should read the
|
||
documentation that comes with your window manager to figure out how to
|
||
do the above mentioned configuration.
|
||
<P>
|
||
* If you want to bind the other two window 95 buttons, the scan codes for
|
||
them are 116 respectively 117. This sort of information is by the way
|
||
available using the xev program.
|
||
<P>
|
||
Andreas Ehliar
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="bronson"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: Help Wanted (usershell on console without logging in)
|
||
</H3>
|
||
<P>
|
||
Date: Thu, 30 Apr 1998 09:38:03 -0700<BR>
|
||
From: Rick Bronson, <A HREF="mailto:rick@efn.org">rick@efn.org</A>
|
||
<P>
|
||
I've read, with interest, the good ideas people have submitted about
|
||
setting up Linux to be more stand alone. I've worked on this issue on
|
||
and off for some time now and would like to share my ideas.
|
||
<P>
|
||
I've often thought that there needs to be a Linux distribution that
|
||
has an automatic startup as the default. One of the reasons that
|
||
MSDOS (as bad as it was) was popular was because it wasn't burdened
|
||
with "security" items like logging in. Most of us that use Linux at
|
||
home don't need to waist time logging in every day. If we had a
|
||
distribution of Linux that booted up into X we would have a lot more
|
||
users.
|
||
<P>
|
||
My goals are as follows (all done automatically from power up):
|
||
<P>
|
||
1. From power up, automatically login.
|
||
<P>
|
||
2. Bring up X Windows.
|
||
<P>
|
||
3. If I haven't been connected to my ISP (via PPP) in the last 4 hours
|
||
then connect.
|
||
<P>
|
||
3.1 Start up Netscape, get mail from my ISP (via cron), and check it
|
||
every minute.
|
||
<P>
|
||
3.2 If I haven't read USENET news today then fire up newsreader and
|
||
automatically to thru and apply kill files to all articles and leave
|
||
newsreader just showing what's left.
|
||
<P>
|
||
3.3 (I admit, this one is weird) Telnet into my local library and
|
||
check to see if I have overdue books.
|
||
<P>
|
||
For the purposes of this 2 cent tip, I'm going to cover #1 &
|
||
#2. (NOTE: replace every occurrence of "username" with your real login
|
||
name).
|
||
<P>
|
||
1. Add this to the bottom of your /etc/inittab (for Debian), unless
|
||
you have an rc.local file
|
||
<PRE>
|
||
rc:12345:wait:/etc/init.d/rc.local
|
||
</PRE>
|
||
1a (if you don't have an rc.local file) Make an /etc/init.d/rc.local
|
||
file with this in it:
|
||
<PRE>
|
||
#!/bin/bash
|
||
echo "Auto login of user username"
|
||
cd /home/username
|
||
su - username
|
||
</PRE>
|
||
Set permissions of rc.local to:
|
||
<PRE>
|
||
-rwxr-xr-x 1 root root 96 Jun 29 1997 rc.local
|
||
</PRE>
|
||
By doing:
|
||
<PRE>
|
||
chmod 755 rc.local
|
||
</PRE>
|
||
1b (if you have an rc.local file)
|
||
Add this to the bottom of your rc.local
|
||
<PRE>
|
||
echo "Auto login of user username"
|
||
cd /home/username
|
||
su - username
|
||
</PRE>
|
||
2. Add the following to the bottom of your ~/.bash_profile:
|
||
<PRE>
|
||
if [ "`tty`" = "/dev/console" -o "`tty`" = "/dev/tty0" ]
|
||
then
|
||
startx
|
||
fi
|
||
</PRE>
|
||
That's it! This has been tested under Slackware (a long time ago)
|
||
and under Debian, recently. Please give me any feedback.
|
||
<P>
|
||
Thanks, Rick Bronson
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="hall"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
IBM Lan Adapter for Ethernet
|
||
</H3>
|
||
<P>
|
||
Date: Fri, 01 May 1998 00:23:21 +0000<BR>
|
||
From: Brian Hall, <A HREF="mailto:brihall@pcisys.net">
|
||
brihall@pcisys.net</A>
|
||
<P>
|
||
I believe this is the same card I have. I have two on my home LAN, one
|
||
in my Linux box and the other in a Win95 box. In Linux, use the ne2000
|
||
compatible network driver, found under "Other ISA" network cards in the
|
||
kernel configuration. To configure the card itself, you will need to run
|
||
a DOS program. The setup program is contained in an archive called
|
||
"ETILAN.EXE".
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="ballueder"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Easy Access to Removable Media
|
||
</H3>
|
||
<P>
|
||
Date: Fri, 1 May 1998 10:30:52 +0100 (BST)<BR>
|
||
From: Karsten Ballueder, <A HREF="mailto:karsten@phy.hw.ac.uk">
|
||
karsten@phy.hw.ac.uk</A>
|
||
<P>
|
||
Here's a little tip that makes life much easier. I always found it
|
||
annoying to manually mount and unmount floppies, CD-ROMs or my ZIP
|
||
drive, so eventually I decided to use the amd automounter for that.
|
||
<p>
|
||
The configuration is somehow tricky, but once it's set up, it works
|
||
like a charm.
|
||
<p>
|
||
For amd to work, you need to create a mountmap <tt>/etc/amd.direct</tt>=
|
||
. Mine
|
||
looks like this:
|
||
<PRE>
|
||
zip type:=3Dprogram;fs:=3D"/.amd/myhost/zip";mount:=3D"/bin/mount mount=
|
||
-tvfat -o user,rw,conv=3Dbinary,nosuid,uid=3D502,gid=3D100,umask=3D0000=
|
||
,quiet
|
||
/dev/sda4 ${fs} ";unmount:=3D"/bin/umount umount ${fs}"
|
||
<br>
|
||
cdrom type:=3Dprogram;fs:=3D"/.amd/myhost/cdrom";mount:=3D"/bin/mount m=
|
||
ount
|
||
-tiso9660 -o user,ro,conv=3Dbinary,nosuid,uid=3D502,gid=3D100,umask=3D0=
|
||
000
|
||
/dev/cdrom ${fs} ";unmount:=3D"/bin/umount umount ${fs}"
|
||
<br>
|
||
A type:=3Dprogram;fs:=3D"/.amd/myhost/A";mount:=3D"/bin/mount mount -tv=
|
||
fat -o user,rw,conv=3Dbinary,nosuid,uid=3D502,gid=3D100,umask=3D0000,qu=
|
||
iet /dev/fd0 ${fs} ";unmount:=3D"/bin/umount umount ${fs}"
|
||
</PRE>
|
||
Where you will need to replace "myhost" with your machine's
|
||
hostname. Like this it will automount the ZIPdrive, a CD-ROM and the
|
||
first floppy in a set of directories created under <tt>/.amd</tt> .
|
||
<p>
|
||
To start amd, you will usually use something like a script
|
||
<tt>/sbin/init.d/amd</tt>, which should contain a line like:<br>
|
||
<tt>
|
||
/usr/sbin/amd -l syslog -c 30 -w 30 -x all -a /.amd -- /tmpmnt /etc/amd=
|
||
.direct &=20
|
||
</tt>
|
||
<p>
|
||
This will start amd and give it a 30 second timeout for unmounting
|
||
directories. You also need to create a directory called
|
||
<tt>/tmpmnt</tt> where you can access the devices. For easy access, I
|
||
have create symbolic links <tt>/zip</tt>, <tt>/A</tt> and
|
||
<tt>/cdrom</tt> pointing to <tt>/tmpmnt/zip</tt>, <tt>/tmpmnt/A</tt>
|
||
and <tt>/tmpmnt/cdrom</tt>.
|
||
<p>
|
||
Now, when you try to access any of these directories, amd will
|
||
automatically mount the device with the options specified in
|
||
<tt>/etc/amd.direct</tt>. Once you no longer access it, it will get
|
||
unmounted after 30 seconds.
|
||
<p>
|
||
Oh, if it doesn't unmount your device, you can use the<tt>fuser
|
||
/dir</tt> command to check which of your processes uses it.
|
||
<P>
|
||
Karsten Ballueder
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="smith1"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: bpp 16 Question
|
||
</H3>
|
||
<P>
|
||
Date: Sun, 3 May 1998 14:07:55 +0200 (MET DST)<BR>
|
||
From: Roland Smith, <A HREF="mailto:rsmit06@ibm.net">
|
||
rsmit06@ibm.net</A>
|
||
<P>
|
||
To: Denny@ele.kth.se<BR>
|
||
You asked in the Linux Gazette #28:
|
||
<blockquote> <font color="navy">
|
||
Hi, I'm tired of starting my X-session with 'startx -- -bpp 16' to get
|
||
16 biplanes instead of the default 8.
|
||
How do I get xdm to run with 16 bpp? If I use it now,
|
||
it starts X with 8bpp on my Red Hat 5 installation.
|
||
</font></blockquote>
|
||
Assuming you're using the XFree86 server:
|
||
<P>
|
||
Edit your XF86Config file.
|
||
<ul>
|
||
<li>Look for the "Screen" section, then the subsections marked "Display"
|
||
(you can have more then one).
|
||
<li>Make sure the display subsection which has a depth of 16 is listed
|
||
first.
|
||
</ul>
|
||
Hope this helps.
|
||
<P>
|
||
Roland
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="smith2"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: finite elements programs for Linux
|
||
</H3>
|
||
<P>
|
||
Date: Sun, 3 May 1998 14:07:55 +0200 (MET DST)<BR>
|
||
From: Roland Smith, <A HREF="mailto:rsmit06@ibm.net">
|
||
rsmit06@ibm.net</A>
|
||
<P>
|
||
To: berntsen@bkm.dtu.dk<BR>
|
||
In response to your query in the Linux Gazette #28:
|
||
<blockquote> <font color="navy">
|
||
I started talking to the ones buying it and my arguments stopped,
|
||
when they said that one reason for using NT was that they should
|
||
be running finite elements programs on them and that the frontier
|
||
for those programs was now on the Windows platform.
|
||
I don't know anything about that, so I am looking for info; should I
|
||
accept their arguments or is it that he just does not know what
|
||
can be gotten for Linux? Commercial Finite
|
||
Element Method (FEM) programs are also in the searchlight!
|
||
</font></blockquote>
|
||
FEM has traditionally a UNIX domain. Most FE programs run on commercial
|
||
unices. I only know of one free program for Linux: felt.
|
||
You can find it at http://www-cse.ucsd.edu/users/atkinson/FElt/felt.html
|
||
<P>
|
||
Hope this helps.
|
||
<P>
|
||
Roland
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="smith3"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: How to enable swapping
|
||
</H3>
|
||
<P>
|
||
Date: Sun, 3 May 1998 13:51:21 +0200 (MET DST)<BR>
|
||
From: Roland Smith, <A HREF="mailto:rsmit06@ibm.net">
|
||
rsmit06@ibm.net</A>
|
||
<P>
|
||
To: kng@HK.Super.NET<BR>
|
||
In the Linux Gazette you wrote:
|
||
<blockquote> <font color="navy">
|
||
My machine, which is a Pentium Pro with 64MB memory, reports no swap space
|
||
being used. In procinfo, it always report 0K swap space.
|
||
I did a fdisk on /dev/hda and verified that a 64MB partition
|
||
of type Linux swap (83) is actually there.
|
||
So why is the swap never being used ?
|
||
</font></blockquote>
|
||
Swapping needs to be started. This can be done with the `swapon'
|
||
command.
|
||
<P>
|
||
Normally there should be something like `/sbin/swapon -a' in the system
|
||
initialization scripts. On my Slackware system it is in /etc/rc.d/rc.S.
|
||
<P>
|
||
For this to work, you need to define the swap partition in /etc/fstab.
|
||
Something like (on my box):
|
||
<PRE>
|
||
/dev/hda7 swap swap defaults 1 2
|
||
</PRE>
|
||
Hope this helps.
|
||
<P>
|
||
Regards, Roland
|
||
|
||
Re: cd rom
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="smith4"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: Slackware
|
||
</H3>
|
||
<P>
|
||
Date: Sun, 3 May 1998 14:30:59 +0200 (MET DST)<BR>
|
||
From: Roland Smith, <A HREF="mailto:rsmit06@ibm.net">
|
||
rsmit06@ibm.net</A> <BR>
|
||
To: letromb@tin.it
|
||
<P>
|
||
In the Linux Gazette #28 you asked:
|
||
<blockquote> <font color="navy">
|
||
Hello.I have the Linux Slackware 2.0.30 Walnut Creek.I
|
||
installed it on a Pentium 200 MMX with a 24x CD-ROM.
|
||
During the installation I had to write "ramdisk hdd=cdrom" for
|
||
reading the CD-ROM, but after the installation Linux doesn't
|
||
see the CD-ROM. I have an atapi CD-ROM, and when I tried
|
||
to compile my kernel another time, I saw that atapi is the
|
||
default !!! So I don't understand where is the problem . What
|
||
can I do ?
|
||
</font> </blockquote>
|
||
To use your CD-ROM, you must "mount" it, i.e. add it to your
|
||
file-system.
|
||
<P>
|
||
You will have to make sure that the iso9660 filesystem is supported in
|
||
the kernel.
|
||
<P>
|
||
Mounting is most conveniently done by first adding an entry into your
|
||
/etc/fstab file like this:
|
||
<PRE>
|
||
/dev/hdb /mnt/cdrom iso9660 ro,user,noauto,unhide 1 2
|
||
</PRE>
|
||
(Assuming your CD-ROM player is /dev/hdb)
|
||
Create the directory /mnt/cdrom before mounting the CD!
|
||
Put a CD-ROM in the drive and issue the command `mount /mnt/cdrom' to
|
||
mount the CD.
|
||
<P>
|
||
You will have to unmount the CD (`umount /mnt/cdrom') before you can
|
||
open the drive!
|
||
<P>
|
||
Hope this helps.
|
||
<P>
|
||
Roland
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="mcanulty"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
May 2Cent Tips--about:mozilla
|
||
</H3>
|
||
<P>
|
||
Date: Wed, 6 May 1998 10:28:44 -0700 (PDT)<BR>
|
||
From: David Mc Anulty, <A HREF="mailto:davemc@connectnet.com">
|
||
davemc@connectnet.com</A>
|
||
<P>
|
||
The tip of going to about:mozilla is incorrect. You do not have to click
|
||
on Netscape's logo to get the new animation. The act of visiting
|
||
about:mozilla does this.
|
||
<P>
|
||
It lasts until Netscape is restarted. So if you like him, set
|
||
about:mozilla as your home page.
|
||
<P>
|
||
Dave
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="niemann"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: Rebooting without logging in as root, 2c tips
|
||
</H3>
|
||
<P>
|
||
Date: Wed, 06 May 1998 09:25:13 +0200<BR>
|
||
From: Hartmut Niemann, <A
|
||
HREF="mailto:niemann@cip.e-technik.uni-erlangen.de">
|
||
niemann@cip.e-technik.uni-erlangen.de</A>
|
||
<blockquote> <font color="navy">
|
||
An alternative I used once on a system that did *not* have
|
||
<ctrl-alt-del> enabled was to provide a special login that
|
||
*just* did a shutdown. There is such a line in my /etc/passwd
|
||
now that I didn't put there, so I guess it's from Red Hat
|
||
two years ago.
|
||
</font></blockquote>
|
||
I had this shutdown login too. Normally it needs rood rights,
|
||
i.e. UID 0. But then I found out that
|
||
su shutdown
|
||
does not execute the login shell, i.e. the shutdown script.
|
||
So everybody can become 'shutdown', which is basically 'root'
|
||
with a different startup shell. Bad if this 'shell' doesn't get
|
||
executed ...
|
||
<P>
|
||
For some time I have had 'shutdown' just SUID root, and now I'm
|
||
back to Ctrl-Alt-Del performing a shutdown -h. (And then press
|
||
Ctrl-Alt-Del again for a reboot.)
|
||
<P>
|
||
Hartmut.
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="omegaman"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: Running an ATAPI ZIP drive
|
||
</H3>
|
||
<P>
|
||
Date: 05 May 1998 20:26:26 -0500<BR>
|
||
From: Omegaman, <A HREF="mailto:omegam@cmq.com">omegam@cmq.com</A>
|
||
<P>
|
||
Steve Beach gives some interesting remarks and good advice for setting
|
||
up an ATAPI ZIP drive. In it he says: First, the kernel:
|
||
<blockquote> <font="navy">
|
||
Do _not_ use the "IDE FLOPPY" option (officially the name is
|
||
CONFIG_BLK_DEV_IDEFLOPPY ). This will work perfectly for reading and
|
||
writing, but it will not work for ejecting.
|
||
</font></blockquote>
|
||
I recently bought a system with one of these units PRE-installed. I
|
||
purchased a copy of Debian 1.3.1 on CD and was surprised to find "IDE
|
||
Floppy" support compiled into the stock kernel. So, like Steve, I
|
||
added necessary entries to my /etc/fstab to mount my ZIPs and away I
|
||
went.
|
||
<P>
|
||
However, I do not have the problem he's had with ejecting my ZIP
|
||
disks. On the front of my drive is a status light that also functions
|
||
as the eject button. It works fine. I surmise that Steve's problem
|
||
is that he has no such button and requires a software-only eject
|
||
method.
|
||
<P>
|
||
One note of warning: I once ejected a standard floppy by pressing the
|
||
drive's eject button when it was mounted causing a system panic and
|
||
forced reboot. I don't know if the eject button on the ZIP is
|
||
disabled in the same way as the eject button on a CDROM when it is
|
||
mounted. I have no intention of finding out.
|
||
<P>
|
||
Omegaman
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="rodrigo"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: enabling swap space
|
||
</H3>
|
||
<P>
|
||
Date: Tue, 05 May 1998 04:44:22 -0300<BR>
|
||
From: Diego Rodrigo, <A HREF="mailto:d.rodrigo@iname.com">
|
||
d.rodrigo@iname.com</A>
|
||
<P>
|
||
On issue # 28, Kevin Ng wrote :
|
||
<blockquote> <font="navy">
|
||
My machine, which is a Pentium Pro with 64MB memory, reports no swap space being used.
|
||
n procinfo, it always report 0K swap space.
|
||
I did a fdisk on /dev/hda and verified that a 64MB partition of type Linux swap (83) is
|
||
actually there.
|
||
So why is the swap never being used ?
|
||
</font></blockquote>
|
||
Tagging a partition with type 83 (Linux swap) is not enough. You kave to
|
||
prepare it for swap with mkswap (see manual page) . Type:
|
||
<PRE>
|
||
mkswap /dev/hdxx
|
||
</PRE>
|
||
where hdxx is your swap partition.
|
||
After that, you have to append a line in /etc/fstab saying this:
|
||
<PRE>
|
||
/dev/hdxx none swap
|
||
</PRE>
|
||
where /dev/hdxx is your swap partition, none is the mount point, and
|
||
swap is the type of file system.
|
||
<P>
|
||
With these changes, the next time you reboot, your swap space will be
|
||
added to your system.
|
||
The command that actually adds your swap space to the system is swapon
|
||
(see man page, section 8), which is called from an init script at boot
|
||
time.
|
||
OK, I agree, Linux shouldn't be rebooted, (only when recompiling the
|
||
kernel), so you can just type:
|
||
<PRE>
|
||
swapon -a
|
||
</PRE>
|
||
and you'll have your swap space.
|
||
<P>
|
||
Diego Rodrigo - ARGENTINA
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="hammel"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: problems using menus in X
|
||
</H3>
|
||
<P>
|
||
Date: Thu, 7 May 1998 11:45:01 -0500 (CDT)
|
||
From: Michael Hammel, <A HREF="mailto:mjhammel@graphics-muse.org">
|
||
mjhammel@graphics-muse.org</A>
|
||
<P>
|
||
To: eijck@iri.tudelft.nl<BR>
|
||
<blockquote> <font="navy">
|
||
I'm having a problem with my menus in X. I can access all menus (by mouse),
|
||
but the items of those menus which are WITHIN a "X-box" are not selectable,
|
||
somehow.
|
||
The menus I'm talking about are menus like the 'vt fonts', 'main options'
|
||
and 'vt options' in the Xterm. Or the 'file' and 'page' menu of
|
||
Ghostscript.
|
||
If anyone has a suggestion on why I can select the menu but not menu item,
|
||
please send me a mail. I'm using Debian 1.3.
|
||
</font></blockquote>
|
||
Check your NumLock key. It should probably be turned off for applications
|
||
written in strict Xlib or Athena widgets, which appears to be the case with
|
||
the applications you mention. Its not a strict rule, but many people had
|
||
problems with my XPostitPlus program, caused by the use of the number keypad
|
||
with applications like XCalc.
|
||
<P>
|
||
Michael J. Hammel, The Graphics Muse
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="tennent"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Music Typesetters
|
||
</H3>
|
||
<P>
|
||
Date: Tue, 12 May 1998 12:13:50 -0400 (EDT)<BR>
|
||
From: Robert Tennent, <A HREF="mailto:rdt@qucis.queensu.ca">
|
||
rdt@qucis.queensu.ca</A>
|
||
<P>
|
||
Although I appreciated Bob van der Poel's review of MUP in LG28,
|
||
there are some good free music notation systems that weren't even
|
||
mentioned. First, a very good site to check out is the Lilypond
|
||
home page at
|
||
<P>
|
||
http://www.cs.ruu.nl/people/hanwen/lilypond/out-www/index.html
|
||
<P>
|
||
This describes Lilypond (which is still under development) but
|
||
also has links to many other music packages.
|
||
<P>
|
||
One of these, musixtex, is IMHO the best free system
|
||
available. It certainly isn't beta, but it is being extended
|
||
and improved constantly. The input language is plain TeX,
|
||
but there are some good pre-processors available (PMX, MPP, M-Tx, SceX,
|
||
ABC2MTeX). The output quality is professional. Several arrangements
|
||
I've set using musixtex have been published directly from my postscript
|
||
files. Check out
|
||
<P>
|
||
http://www.gmd.de/Misc/Music
|
||
<P>
|
||
for links, downloads, documentation, examples, etc.
|
||
<P>
|
||
Bob Tennent
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="dossey"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
BASH hostname completion: comment on tip in May '98 issue
|
||
</H3>
|
||
<P>
|
||
Date: Tue, 12 May 1998 08:58:18 -0500<BR>
|
||
From: Justin Dossey, <A HREF="mailto:dossey@ou.edu">
|
||
dossey@ou.edu</A>
|
||
<P>
|
||
The script John Taylor sent had a nice idea to it, but I must admit I didn't
|
||
read it; Bash completes host names by a builtin function.
|
||
<P>
|
||
Just as you would use <tab> to complete a filename, you can use ESC, @ to
|
||
complete a hostname (if it is in /etc/hosts) and CTRL-X, @ to list all possible
|
||
hostname completions based on /etc/hosts.
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="mcnamara"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: xdm and depth
|
||
</H3>
|
||
<P>
|
||
Date: Tue, 12 May 1998 11:32:26 +0100 (IST) <BR>
|
||
From: Caolan McNamara, <A HREF="mailto:Caolan.McNamara@ul.ie">
|
||
Caolan.McNamara@ul.ie</A>
|
||
<blockquote> <font="navy">
|
||
From: Denny <20>berg, Denny@ele.kth.se <BR>
|
||
Hi, I'm tired of starting my X-session with 'startx -- -bpp 16' to get 16
|
||
biplanes instead of the default 8. How do I get
|
||
xdm to run with 16 bpp? If I use it now, it starts X with 8bpp on my Red Hat 5
|
||
installation.
|
||
</font></blockquote>
|
||
under redhat in the file
|
||
/etc/X11/xdm/Xservers
|
||
<P>
|
||
there's a line
|
||
<PRE>
|
||
:0 local /usr/X11R6/bin/X
|
||
</PRE>
|
||
change this to
|
||
<PRE>
|
||
:0 local /usr/X11R6/bin/X -bpp 16D
|
||
</PRE>
|
||
and ta-da, thats it.
|
||
<P>
|
||
Caolan McNamara
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="digulla"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Re: Shutdown and Root
|
||
</H3>
|
||
<P>
|
||
Date: Mon, 11 May 1998 13:42:44 +0200<BR>
|
||
From: Aaron Digulla, <A HREF="mailto:digulla@wi-pc44.fh-konstanz.de">
|
||
digulla@wi-pc44.fh-konstanz.de</A>
|
||
<P>
|
||
Another note to the 2cents Tip "Re: Shutdown and Root":
|
||
<P>
|
||
I have a shutdown user, too, and this is what he looks like:
|
||
<P>
|
||
In /etc/passwd:
|
||
<PRE>
|
||
shutdown:x:6:0:shutdown:/home/shutdown:/bin/sh
|
||
</PRE>
|
||
You'll probably have to adjust the user-id (here: 6).
|
||
<P>
|
||
Then you create a home-dir which just contains this script as
|
||
.profile:
|
||
<PRE>
|
||
------------------------ .profile ---------------------------------------
|
||
#!/bin/sh
|
||
trap "" SIGKILL SIGINT SIGQUIT
|
||
|
||
PATH=/bin
|
||
|
||
# List all users which are still logged on
|
||
/usr/bin/finger
|
||
|
||
echo
|
||
echo "Really shut down (y/N) ?"
|
||
|
||
read answer
|
||
|
||
# Every answer except "y" is no
|
||
if [ "x$answer" != xy ]; then
|
||
answer=n
|
||
fi
|
||
|
||
if [ $answer = y ]; then
|
||
echo 'The system will now shut down. You can turn the power'
|
||
echo 'off when the message "System halted" appears'
|
||
/bin/sleep 5
|
||
./halt
|
||
else
|
||
echo 'Abgebrochen...'
|
||
/bin/sleep 1
|
||
fi
|
||
------------------------ .profile ---------------------------------------
|
||
</PRE>
|
||
Now just copy /sbin/halt to /home/shutdown/ and make it executable
|
||
for this user (chown shutdown halt and chmod 700 halt).
|
||
<P>
|
||
Aaron "Optimizer" Digulla
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="davis"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Printing with Linux
|
||
</H3>
|
||
<P>
|
||
Date: Sat, 09 May 1998 18:50:06 +1000<BR>
|
||
From: Mitch Davis, <A HREF="mailto:mjd@alphalink.com.au">
|
||
mjd@alphalink.com.au</A>
|
||
To: AFAIZ@cstp.umkc.edu
|
||
<blockquote> <font="navy">
|
||
I've just bought a HP DeskJet 722C printer, but I couldn't get it
|
||
to work. I asked around and everyone has answered that Linux
|
||
does not support it - is it a Windows-only printer?
|
||
If so, is it possible to write a driver for it? or does anyone know
|
||
of where I can get my hands on the driver (if it's already been
|
||
written, of course).
|
||
</font></blockquote>
|
||
In an effort to reduce the production cost of their low-end printers,
|
||
HP has removed as much of the electronics from the printer as possible,
|
||
and put the burden of turning commands into dots on the printer driver
|
||
in the computer. Somewhat euphuistically, this is called the Printing
|
||
Performance Architecture, a kind of less-is-more concept which I'm
|
||
sure is big in the HP marketing Dept.
|
||
<P>
|
||
All is not lost however. There's a guy who reverse-engineered the
|
||
protocol, and has written a driver. You can find his page here:
|
||
<P>
|
||
http://www.rpi.edu/~normat/technical/ppa/
|
||
<P>
|
||
(I have not tried it, nor have I corresponded with him).
|
||
<P>
|
||
I hope this helps you.
|
||
<P>
|
||
Mitch.<BR>
|
||
(I don't work for HP. Well Ok, I do, but further away from the
|
||
bit that makes printers than you'd ever believe. I speak as an
|
||
outsider)
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="gilb1"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
RE: finite elements programs for Linux
|
||
</H3>
|
||
<P>
|
||
Date: Fri, 22 May 1998 09:39:29 -0700<BR>
|
||
From: "James Gilb (p27451)", <A HREF="mailto:p27451@email.sps.mot.com">
|
||
p27451@email.sps.mot.com</A> <BR>
|
||
To: berntsen@bkm.dtu.dk
|
||
<blockquote> <font="navy">
|
||
At the department where I am sitting they are planning to buy a PC-bar, and they intend to put NT on the machines.
|
||
I would benefit from them putting Linux on them, since I could then use
|
||
them for simulations overnight. ...
|
||
I don't know anything about that, so I am looking for info; should I accept their arguments or is it
|
||
that he just does not know what can be gotten for Linux? Commercial Finite Element Method (FEM) programs are
|
||
also in the searchlight!
|
||
</font></blockquote>
|
||
There a some really neat FEM codes out there that are free or
|
||
semi-free. Check out the Scientific Applications for Linux (SAL) page,
|
||
sponsored by Kachina Tech at
|
||
http:// SAL.KachinaTech.COM/
|
||
<P>
|
||
Next, go to the INTERNET FINITE ELEMENT RESOURCES page at:
|
||
<P>
|
||
http://www.engr.usask.ca/~macphed/finite/fe_resources/
|
||
<P>
|
||
and check out the section on Public Domain FE Programs (I think FElt is
|
||
way cool). Also, there may be some commercial vendors that support
|
||
Linux as well, you should probably ask your vendors. I found Northwest
|
||
Numerics and Modeling on the above page which sells a product called
|
||
Zebulon on Linux. Also, some related software is also available on
|
||
Linux, e.g. PV-WAVE (graphics), MATLAB, Mathematica, Maple.
|
||
<P>
|
||
Finally, do a search of Linux and FEM software on your favorite search
|
||
engine. (linux + FEM + software gave me 1085 hits on www.hotbot.com).
|
||
<P>
|
||
As a postscript, the future of FEM doesn't depend on the OS it is used
|
||
on. The real work is done in numerical code that never touches the OS,
|
||
indeed an OS call in the middle of the deepest loops would cause a
|
||
severe slowdown of the program. Some of the interfaces that you use for
|
||
input, pre-processing and post-processing may be moving to NT, but there
|
||
are still substantial packages available on the big iron. In any event,
|
||
the current IA32 line from Intel is not a leader in double-precision
|
||
floating point work, the current crop of workstations will blow it away
|
||
in most floating point benchmarks. This is improving with the emphasis
|
||
on multi-media, but the new chips will be very expensive within the near
|
||
term (USD $2000-$4000 until at least 2000).
|
||
<P>
|
||
If you have any more questions, please email me.
|
||
<P>
|
||
James Gilb, p27451@email.mot.com
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="gilb2"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
RE: How to enable swapping
|
||
</H3>
|
||
<P>
|
||
Date: Thu, 21 May 1998 15:49:17 -0700<BR>
|
||
From: "James Gilb (p27451)", <A HREF="mailto:p27451@email.sps.mot.com">
|
||
p27451@email.sps.mot.com</A> <BR>
|
||
To: kng@HK.Super.NET, gazette@ssc.com
|
||
<blockquote> <font="navy">
|
||
My machine, which is a Pentium Pro with 64MB memory, reports no swap
|
||
space being
|
||
used. In procinfo, it always
|
||
report 0K swap space.
|
||
I did a fdisk on /dev/hda and verified that a 64MB partition of type
|
||
Linux swap (83)
|
||
is actually there.
|
||
So why is the swap never being used ?
|
||
</font></blockquote>
|
||
First, make sure the partition has been turned into a swap partition by
|
||
doing an mkswap on it. Then just do swapon /dev/hda? where ? is the
|
||
partition number of the swap partition. Now, if you put an entry for the
|
||
swap partition in /etc/fstab and run swapon -a in your boot scripts
|
||
(pretty early on), then swap will be automagically enabled whenever you
|
||
boot.
|
||
<P>
|
||
James Gilb
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="jacobsen"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Cuckoo Clock
|
||
</H3>
|
||
<P>
|
||
Date: Sun, 24 May 1998 23:48:02 +0200<BR>
|
||
From: Jjacobsen, <A HREF="mailto:jacobsen@biosys.net">
|
||
jacobsen@biosys.net</A>
|
||
<P>
|
||
My wife's grandpa has a pretty switzer-cuckoo-clock (kuckucksuhr..).
|
||
Well, I love to hear the little bird singing every hour.
|
||
That's why I wrote this little script...
|
||
<PRE>
|
||
#!/bin/sh
|
||
#cockoo.sh
|
||
time=`date +%I`
|
||
count=0
|
||
until [ "$count" -eq "$time" ]
|
||
do
|
||
play /usr/share/sounds/au/cuckoo.au
|
||
count=$[$count+1]
|
||
done
|
||
</PRE>
|
||
Then, I edited the crontab file using <tt>crontab -e</tt>:
|
||
<PRE>
|
||
00 * * * * /bin/cuckoo.sh
|
||
</PRE>
|
||
and well, it's really funny... Using my script and cron, your Linux box
|
||
will become a great switzer-kuckucks-uhr ;)
|
||
<P>
|
||
Joerg Jacobsen, Schweinfurt, Germany
|
||
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
<center>Published in <I>Linux Gazette</I> Issue 29, June 1998</center>
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
|
||
CONTENTS ]"></A> <A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
|
||
ALT="[ FRONT PAGE ]"></A> <A HREF="./lg_mail29.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
|
||
<A HREF="./lg_bytes29.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
||
|
||
<P> <hr> <P>
|
||
<h5>This page maintained by the Editor of <I>Linux Gazette</I>,
|
||
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR>
|
||
Copyright © 1998 Specialized Systems Consultants, Inc. </H5>
|
||
<P>
|
||
<!--startcut ==========================================================-->
|
||
</body>
|
||
</html>
|
||
<!--endcut ============================================================-->
|