[ Prev ][ Table of Contents ][ Front Page ][ FAQ ][ Next ]

More 2¢ Tips!


Send Linux Tips and Tricks to [email protected]


2ct tip - making site icons for Konqueror

Wed, 25 Apr 2001 19:48:36 -0500
Jim Liedeka (jliedeka from facstaff.wisc.edu)

When you visit some sites with Konqueror, the icon in the upper left corner and the icon in the location window will sometimes become the logo for the site. You can add your own with the KDE icon editor.

Just create a 16x16 PNG file and save it in $HOME/.kde/share/icons/favicons

as <domain name>.png. For example, I created a "G" logo for visiting i the www.packers.com site. I saved my icon as "www.packers.com.png."

Jim


getting 2 dynamic ip addresses

Tue, 22 May 2001 19:08:05 +0200
Thomas Müller (twm from headwork-consulting.de)

Hi,

regarding your recent answer to [subj]:

[Mike] Your hub is connected directly to the DSL modem? In that case, you will have to contact your ISP to get a second dynamic address from them... if you can. A more common scenario is to have one computer (the server) connected to the modem and also to the hub. The second computer is connected only to the hub.

Not widely known is this alternative (assuming that pppoe is used):

This solution has two advantages:

  1. It still allows every box on the net to directly connect via DSL if necessary (for example if the router goes dead)
  2. It saves one network card ;-)

There are of course also drawbacks:

  1. If the ISP is not very very careful it could happen that somebody uses this connection to monitor internal network traffic.
  2. It could be confusing if both alternatives (via router / direct connection) are possible. One never knows which one should be used.

Let me also point you to http://www.fli4l.de, a linux router project called "Floppy ISDN for Linux" which also supports DSL. It is a great solution for most router needs and very easy to configure. You don't even need a Linux box to install/configure it since it comes with tools for Windows / DOS as well. All you do is use the Windows based configuration program or a text editor to adjust a configuration file, run a script / batch file to create a boot floppy and boot from it. I have discovered it a month ago and switched my old SuSE based router to this one immediately.

Unfortunately the documentation is so far mostly German, but they are working on an English translation.

regards
Thomas


Mouse port Problem ?

Fri, 18 May 2001 16:09:18 +0000
Andrew Higgs (The Answer Gang)

Hi,

I am having Ps/2 mouse . my startx is fine but i dont see any mouse movements . i tried attaching different mouse but the result is the same. can u help me how to make out whether its a problem of mouseport .

Regards
Anil

Hi,

Firstly you need to know on what port X is looking for a mouse and then make sure that this device actually exists and is supported by the kernel.

In /etc/XF86Config you should find a section called "Pointer" mine reads as follows.

Section "Pointer"

Protocol "PS/2"
Device   "/dev/mouse"

/dev/mouse is a symbolic link to /dev/psaux.

Hope this will help.

Kind regards
Andrew Higgs


Anyone burning a CD should know...

Fri, 18 May 2001 15:21:44 -0700 (PDT)
Raini Hixon (rainihixon from yahoo.com)

Hi,

I'd like to respond to a question in the April MailBag about burning .iso cd images from Windows.

When downloading an .iso image off the internet there are several steps involved. One should of course download the image and burn it to a CD. However there is a step in the middle that is even more important...getting an MD5 checksum against the resulting file.

Most sites that allow you to download an .iso file also have a matching MD5SUM file that goes with the .iso file. Go ahead and download that too. It is a very small file and is basically your insurance against making coasters (an invalid CDRom disc ).

The file really contains an MD5 digest of the .iso file. It is in ascii text and is viewable with notepad in Windows. What is an MD5 digest you ask...it is a 128-bit digital fingerprint of the file. If you want to know more you can read the spec for the algorithm at: http://theory.lcs.mit.edu/~rivest/rfc1321.txt

Because you require a way to get the MD5 digest of a file from a windows perspective, you'll need a WIN32 app that can run the digest. This utility can be picked up at: http://www.etree.org/cgi-bin/counter.cgi/software/md5sum.exe

Save it to C:\WINDOWS. Just invoke it in a dos window with the following command line (replacing the .iso filename with the name of the .iso that you downloaded).

md5sum -b myimage.iso

It's gonna run for a while....ok probably 10 minutes or so...be patient. The utility will then spit out something like: 379d89e83825d11d985b1081ab0de6de *myimage.iso

Now look at the the the number stored in the MD5SUM file that you downloaded for the .iso file. If they match, you have my approval to go for the burn...if not...try again.

There are also some low cost methods of getting the CD for just about any linux distribution like http://www.cheapbytes.com or http://www.linuxmall.com these both will do all the dirty work, including checking for valid .iso and burning it properly, for around a 5-spot.

-Raini Hixon


Slackware Upgrade

16 May 2001 20:45:19 +0000
James Vanns (jim from prolinux.co.uk)

Re: the tips and tricks page of the April (issue 65) question, Slackware upgrade

Reply from Jim Vanns

Awkwardly enough I have also written a program called slakup!! It's on freshmeat so go to http://freshmeat.net/projects/slakup and take a look at it. I think it'll do roughly what you want - you can search for individual packages install them resume the download (if you're disconnected for some reason) and even download and install entire directories.... I hope this helps...

Regards

Jim


Dump considered harmful

Wed, 9 May 2001 09:43:50 -0700
Mike Orr (LG Editor)

"Trashing your filesystem with dump"
http://www.lwn.net/2001/0503/kernel.php3

Why 'dump' is not a safe backup tool for Linux. Short Linux Weekly News article with a quote from Linus.

-Mike


RE: Device Drivers for Linux Gazette

Thu, 3 May 2001 16:09:10
matthew (matthew from waddilove.co.uk)

Hi, Linux.com have put an article up about writing a Device Driver which sounds like it could be just the thing asked for.

heres the URL
http://www.linux.com/newsitem.phtml?sid=93&aid=12197

Yours
Matthew Waddilove


Linux Device Driver

Mon, 30 Apr 2001 08:44:09 +0100
Mike Ellis (The Answer Gang)

I'm a candidate for the doctor's degree on electronic. I'm working on a DSP and data adquisition card for ISA bus (as begin). I wrote a device driver for Linux (a file .o), and then make a special file in /dev directory with mknod; However, I don't know if I have to re-compile the kernel for associate my special file with my device drive ( any.o ). My questions are:

Which are the steps for make a device drive and install it? And then, Which are the steps for redistribute it? Where can I get more information? . Thanks a lot by anyway.

Hiya!

I've written a couple of Linux device drivers, and I found most of the information I needed in one of these two locations:

"Linux Device Drivers"
by Alessandro Rubini
published by O'Reilly,
ISBN 1-56592-292-1

"The Linux Kernel Module Programming Guide, version 1.1.0"
by Ori Pomerantz
published by the Linux Documentation Project at
http://www.ibiblio.org/pub/Linux/docs/linux-doc-project/module-programming-guide/lkmpg-1.1.0.pdf.tar.gz

The first is a paperback book giving all the gory details of how device drivers work under Linux, including how to write them as modules so that the kernel can dynamically load and unload them as needed (this saves recompiling the kernel all the time). The book is based around kernel version 2.0, but includes lots of pointers for 2.2. I guess a new version for the 2.4 kernels will come along soon.

The second, web reference is a more general guide to writing modules, and may be slightly less useful to you.

The third place I looked for help was in the kernel source tree: lots of skilled programmers have written lots of device drivers and made the source available to you. Pick one or two modules that drive similar hardware to your device and read the code thoroughly.

Hope it helps!

Mike.


PLWM

Wed, 9 May 2001 13:56:21 -0700
matthiasarndt (matthiasarndt from gmx.de)

There's also the Pointless Window Manager, written in Python:
http://sourceforge.net/projects/plwm

LinuxPlanet article about it:
http://www.linuxplanet.com/linuxplanet/opinions/3267/1

This should spark some interest in some quarters (Hi Dan):

From PLWM's info page:

plwm is not a normal window manager, in fact, it isn't a window manager at all. Instead it is a collection of Python classes which you can use to build your own window manager. You can include the features you like and easily write your own extensions to make your plwm behave exactly as you want it to. Eventually, you will have a perfect symbiosis of user and window manager, you and the computer will be a beautiful Mensch-Maschine!

One basic idea is that the mouse should be banished, and everything should be possible to do without moving your hands from the keyboard. This is the pointless bit of plwm.

The other basic idea is to make a window manager which is is pure Unix Philosophy: a lot of simple tools you combine to make a powerful application. The "tools" are Python classes which makes it easy to inherit, extend, mixin and override to get exactly the functionality you want.

This makes plwm extremely configurable by sacrificing ease of configuration: you actually have to write some Python code to get the window manager exactly as you want it. However, if you was moved by the first paragraph, then you're probably already a hacker and will relish writing your own window manager.

A typical plwm might look rudimentary, even hostile, to people used to the glitz and glamour of more conventional window managers. However, there are a lot of powerfull features, making it really user-friendly. Provided that the user is friendly to plwm, of course.

-- Mike


Terminaal access in Un*x

Sun, 22 Apr 2001 12:39:09 +0100
dps (dps from io.stargate.co.uk)

Commenting on http://linuxgazette.net/issue65/tag/23.html

Could I suggest you point this person at "The POSIX programmer's guide" (ORA, ISBN 0-937175-73-0, Donald Levine)? In particular chapter 8 describes the tc* functions, including stuff like break handling, parity generation, cooked mode, turn echo on or off, etc, etc. You can do a few more things with termios but not many and termios is a bit less portable. I think termios is quite well documented in the GNU C library manual.

I suspect the same reference will answer a lot of the other questions that this breed of program raises. Incidently just coyping the header file is unliekly to work, it just delies the problems until link time. Depending on the progrm curses/ncurses might or might not be the right thing, and it is not possibe to judge this sans the program in question.


Configuring alternate window managers.

Tue, 8 May 2001 13:57:28 -0400
Faber Fedor (The Answer Gang)

Hi,

Hello,

I have recently installed RHL6.2 on my machine. The default window manager for this is Gnome. Being more familiar with fvwm2 and olvwm, I would like to know if there is any way of making these window managers available at the login time.

If it is not possible to have these WM listed under "sessions", is there any way by which as soon as I log in, fvwm2/olvwm will start instead of Gnome?

If you go into /etc/X11/gdm, you'll see a Sessions/ directory. Inside of there, you'll see scripts that launch different WMs. Add scripts for the WMs you want to launch and they'll show up automagically when you reboot.


Regards,

Faber Fedor, RHCE, SCSA, MCSE, MCT, UVW, XYZ

Hello,

Thanks for the tip. That solved my 90% of the problem. But I figured out that there is something additional that needs to be done to get the window managers running. I had to edit /usr/X11R6/bin/RunWM and add entries for the new window managers. I don't know if this change is required only for my machine or is a generic one.

Thanks, Atul/10.May.2001


stubborn mount error

Wed, 02 May 2001 08:43:05
Derek Sooman (dsooman from hotmail.com)

Regarding http://linuxgazette.net/issue65/tag/27.html

Hello,

After reading the Answer Gang article in the above URL of your Linux Gazette, I realised that I had this similar problem. My problem may or may not be related.

I see that Gabriel Florit was using RH7 with some updates installed from up2date. I ran this recently on RH7 and had some problems mounting vfat partitions afterwards. I believe, based on the list of packages that were installed, that this was due to a new version of mount being installed. There were new kernel sources with these round of updates. Until I recompiled the kernel using this new source, mount would give the same error message as Gabriel is experiencing, every time. Then, after compiling the new kernel with the new source, the problem was gone.

Apolgies not being about to tell you exactly which kernel was replaced by which, I am on a work machine at the moment and have upgraded to the 2.4 kernel under RH7.1 now anyways, but I may be able to find out if I didn't delete the old sources.

Hope this helps,

D.


Shutdown, Reboot

Thu, 3 May 2001 00:05:39 -0700
Don Marti (The Answer Gang)

I would like to be able to allow other users to do a shutdown, or to create a special user who can be used to poweroff the system. I am not concerned about anyone turning the system off when I don't want it to happen, as there is not anything critical on the system (okay there is, but it is not a time critical type thing).

I can't just give my root password out so that someone can shut the system down......

To do a shutdown on ctrl-alt-delete, you can put this in /etc/inittab:

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -h now

(Most distributions make it a shutdown -r but you can make it a shutdown -h.)

Or, install sudo, make a group "shutdown" and put something like this in /etc/sudoers:

%shutdown ALL = NOPASSWD: /sbin/shutdown

Then other users will be able to shutdown with

sudo /sbin/shutdown -h now

The advantage of the second approach is that sudo will log who did it.

-- Don Marti


How to create entries under /dev directory ?

Sun, 13 May 2001 18:13:23 -0500
Bob Martin (bmartin from ayrix.net)

Hi All:

How to create entries under /dev direcory on linux ( SuSE 7.1 )? RedHat linux has a script /dev/MAKEDEV which can be used for this. I looked at /etc/init.d/* scripts on SuSE linux7.1 installation CD but couldn't find how it creates entries under /dev directory. I want to create entries for all the devices manually. If SuSE7.1 already have some script like MAKEDEV will be quite helpful.

Thanks
Sachin

You create device files with the mknod command. The major and minor numbers for devices can be found in the kernel source documenation directory in devices.txt

-- Bob Martin


relay webcam (axis) proxy

Sat, 05 May 2001 17:50:11 +0200
Don Marti (The Answer Gang)

Hi,

I got a problem! :) You might probably thought that already!

I got several network cameras in our office (axis 2100 with own flash linux and webserver which already builds a multipart/jpeg). Due to a lack of bandwidth I want to relay the streams the cams generate to our webserver which got a MUCH bigger bandwidth avaliable.

I want that every camera only pushes the stream once though our line and the server relays it to every client how wants to see the stream.

Client-------|
             |
             |
Client-------|
             |
             |------------ Server -------------- Cam
             |
Client-------|
             |
             |
Client-------|
             |
             |
...----------|

Do you know about a proxy project that does something like that? I am not a C guru but I am surviving. :) Maybe you got another solution for this problem (or maybe the community will :) )

Thanks in advance!

Heiko

Sounds like you want the Apache ProxyPass directive:
http://httpd.apache.org/docs/mod/mod_proxy.html#proxypass

Or run Squid as a web accelerator:
http://www.squid-cache.org/Doc/Users-Guide/detail/accel.html

-- Don Marti


RE: help. making my new linux box a server for winNT

Tue, 15 May 2001 10:37:34 +0200 (MET DST)
Karl-Heinz Herrmann (k.-h.herrmann from fz-juelich.de)

On 15-May-01 Juan Pablo L. wrote:

hello,

i have just found many anserws at linuxdoc and i really thing u do a

great job, i dont know if this is the way to ask but i have been looking all over the net a little explanation on how to make a my linux box a server for my other home computers running winNT. If you answer me i would like you to cever things such as how to configure the server it self and how to configure the clients (running winNT). I m planning to do it with a hub and some network cards. TIA! =)

Have a look at Samba: Thats a server running running on *NIX and allows to connect Windows clients to it for file and printersharing.

You could start at:
http://www.linuxgazette.com/cgi-bin/webglimpse/LG/search?query=samba&errors=0&age=&maxfiles=50&maxlines=30&maxchars=10000&cache=yes

or simply type samba in any search engine (like www.google.com). The Samba home page is: http://samba.org

You will wan't to run the snmb server for the actual exporting and nmbd who is handling the Windows query protocoll -- so the Linux box will answer if you doubleclick "network" in Windows and scan the environment.

K.-H.


tell me how to configure this new samba in easy steps .

Mon, 30 Apr 2001 13:01:33 -0700
Heather Stern (LG Technical Editor)

Dear friends :

recently i installed Samba server 2.2 on redhat linux 7.0.1 i face big problem connecting from windows to that linux box is there any way to tell me how to configure this new samba in easy steps .

thanks

-- Essam Mohsin

There are some GUI tools for it, but they still somewhat expect that you know what you want. Unless somebody has changed your setup, most distros' copy of samba contains a sample smb.conf (try looking in /etc or using locate to find it) with comments for all the options.

Other than that, the best step-by-step I know, though it's not "down to the bits" would be samba's own DIAGNOSIS.TXT file. I've configured a lot of samba boxes. So far I haven't seen a single problem that wasn't solved by going through this from beginning to end. It has 11 tests and it's over 300 lines long, in the version I've got.

The Samba site has many mirrors, but you can at least find their docs online at ftp://ftp.samba.org/pub/samba/docs -- there is a lot of good reading in there.

We also had an article in issue 48 (http://linuxgazette.net/issue48/blanchard.html) about setting up Samba, which you might find useful.


Deleted pager panel in Gnome

Sun, May 20, 2001 01:41:31AM -0400
Faber Fedor, Breen Mullins (The Answer Gang)

Don Pollitt wrote:

How do I restore my pager panel in GNome. I inadvertently deleted it?

IIRC, if you delete the directory ~/.gnome and restart GNOME, everything will re-appear (except, of course) for your personalized settings.

-- Faber Fedor

Ouch!

I think it's better to run

$ /usr/bin/panel&

to bring the panel back, and then select

Settings/Session/Save Current Session

from the Gnome menu.

-- Breen Mullins


Expect script fails to 'Expect'....

Fri, May 4, 2001 03:18:27PM +0100
Faber Fedor (The Answer Gang)

Chris Skardon wrote:
Hi,

Hello!

expect "Login:"
send "csk\r"
expect "word:"
send "<PASSWORD>\r"

The problem that I have is that it doesn't wait for 'Login:' to appear before it types the username to the screen, so the output would be something along the lines of:

Well, two things come to mind: every script I've ever seen (except for yours :-) looks for "ogin:" and not "Login:". You may want to do that as well, since every box you telnet to may not use a capital L for the word login (my other linux boxes don't).

spawn telnet hawk
Trying <IP ADDRESS>
Connected to hawk
Escape character is '^]'
csk
Login: <PASSWORD>
Password:

But, based on this output, what I said above won't help. So here, I would suggest putting another "expect" in before the "ogin:". Say, something like

expect "scape character" sleep 5 expect "word:"

or something along those lines.

HTH!

-- Regards, Faber Fedor


LPR alternatives

Wed, 9 May 2001 10:05:59 -0700
Mike Orr (LG Editor)

Here's a couple, CUPS and PDQ.

CUPS: the Common Unix Printing System
http://www.cups.org

PDQ: Print, Don't Queue
http://pdq.sourceforge.net

Links to these and more on the Linux Printing site.
http://www.linuxprinting.org

What do you think of them? Is it worth switching from LPRng? -Mike

If someone out there writes up a good comparison, we'd be pleased to publish it in LG -- Heather


partitioner (was: Fatal Error from cfdisk)

Tue, 8 May 2001 14:36:07 +0100 (BST)
Peter P (ptpi from yahoo.com)

Back to the problem, though....I don't know what the underlying problem was but I seem to have fixed it by forking out $50 for partition magic which sorted it out. It would have been nice to have found someone who could've sorted it without the cost but there you go, I was in a hurry and couldn't find what I needed in all the reference and help info out there. I did look though, believe me(Sometimes there's just too much). Anyway, thanks for your reply; I'll try to phrase my question better next time.

Cheers, Peter.

We're a bit late for him, but if resizing a vfat or ext2 partition is something you need to do, try parted. It isn't as pretty (looks a bit like fdisk, really) but, it's in the major distros now and a cheap download from freshmeat or the debian archives if you don't have it. In this case, something unknown was funny about the partitions, and the corrective ability in resizers was able to fix it. -- Heather


This page edited and maintained by the Editors of Linux Gazette Copyright © 2001
Published in issue 67 of Linux Gazette June 2001
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/