If you are a business person interested in getting linux on your desktop, and getting work done, read this article on how a 'suit' has switched from Windows to Linux, what tools he uses to do word processing, HTML editing, presentations, accounting and Quicken replacements, etc.
Usually there are some common things people want from their workstation. Once you've installed RedHat 5.2, here's some magic stuff some people will want to know how to do to make practical use of RedHat 5.2 as their primary workstation.
This page is in progress. Watch this space for changes. I'll try to add new things as I encounter them.
If you have some magic RedHat tweaks that make you feel all warm and fuzzy? Let me know, and if it's neat, I'll add it to the list here..
http://www.strusel007.de/linux/fbi.html
'fbi', or 'framebuffer imageviewer' lets you view jpg, PhotoCD, etc. in the console mode.
For other formats like gif, fbi tries to use external converters (netpbm, ImageMagick).
ImageMagick is great to have around anyway for commandline manipulation of images.
'fbi' assumes your console mode is in a decent enough graphics mode like 24bits per pixel.
I was impressed; you can show a whole list of images, and either hit a key to move
to the next image, or automatically after several seconds. A simple tool completely
command line driven.
This is *cool* man; no Xwindows to view images!
To get 24bit mode, I added a 'vga=' command to the top of my /etc/lilo.conf file,
and re-executed lilo to set things up so it boots in truecolor text mode.
You can probably use fbset(1) to tweak the bit depth of your console on the fly,
but if your graphics card can support it, my feeling is leave it in that mode;
my screen still scrolls as fast as it ever did, my screen history works fine, etc.
I prefer the console to always be in truecolor, for fbi, and other programs.
The nice thing about a wacom tablet is you can draw pictures with
pen pressure controling the width of the lines.
This drawing was made with a simple little tool called gsumi,
a line drawing program that understands tablets w/pen pressure:
I was able to get both the mouse and the wacom to control the X windows
cursor interchangably via the following steps:
Added the following to /etc/X11/AnotherLevel/fvwm2rc.keys.m4:
In it's simplest form (below), Xdiff lets you compare two ascii files
line by line, allowing you to choose which lines you want from each,
to build and save a third merged file.
Actually, I'm told you can compare several (up to five) files at a time.
You can download xdiff from
http://reality.sgiweb.org/rudy/xdiff/.
(old link was here)
Here's an example screen shot to pique your interest..
this is version 3.3 which was available at the time this document was
written (06/28/99):
It can be found as precompiled RPM's elsewhere, but this is the guy
who wrote it. Here's docs showing the data format
of the camera.
That's it.
After it's done, there's a whole bunch of jpeg's sitting in the current
directory, all automatically named after the exposure number of each picture.
You can see some example images taken from this camera in my LA River photo gallery webpages.
Here are the incantations for the above..
If package not yet installed, query the rpm package file
If package already installed, or rpm not available
Login as root, and put the following at the bottom of your /etc/rc.d/rc.local:
That would fix things so the next time you reboot, backspace really is backspace.
If you don't want to reboot, run those commands now in your shell; should affect
all the linux text consoles.
This might be a good time to make sure your stty(1) settings are correct.. put the
following in your ~/.login so when you login, backspace works as you'd expect,
and ^C kills programs instead of Delete:
First make sure Xwindows itself is generating keysyms correctly. It probably is,
but check first:
TODO: Show how to configure this so that it is run automatically when xwindows starts
To make Konsole generate Backspace when you hit Backspace:
..and change it to read as you would expect:
To make it a permanent system wide change:
Sendmail Config
Configure the unix workstations to punt all mail to the mail server,
and disable their sendmail daemons.
(work in progress)
In my case, I'm using a Sony Vaio PCG-F450 portable, with built in CD-Rom/DVD drive
for reading music CDs, and an external "HP-9200 CD Writer Plus" SCSI drive
for writing cds.
To copy a music CD to the hard disk as WAV files..
Read the man page for a description of the error indications.
To write several WAV files using the CD writer, thus creating my own
music CD..
In this case, there is no NT domain controller, and no
desire for passwords or security. The NTs are logged in
as administrator.
Note that no configuration on the NTs was necessary; the new
linux share simply pops up in the 'Network Neighborhood' when
you hit 'Refresh'. You can create and edit files right away.
The following instructions show how to configure rsh/rcp
so that it's a bit more usable on a private trusted network.
NOTE: Do not enable rsh/rlogin on machines that can be accessed
from untrustable remote networks, eg. unfirewalled machines
on the internet, or machines that are on untrustworthy networks.
You could try turning off Alt-Left in the window manager, but the easiest
thing to do is to use Ctrl-Alt-Left, which gimp will treat just like Alt-Left,
allowing you to move selections around w/out the window manager getting in the way.
To get Thunderbird to use Firefox:
2) Logged in as yourself (not root), edit your user.js file in your
thunderbird profile dir (create the user.js file if it doesn't exist) eg:
..replacing the 'xxxxxx' with whatever cryptic text
is on your system.
3) Add these lines to the file (changing the paths to your firefox binary as needed):
4) When you re-open thunderbird, clicking links should now work.
2) Logged in as yourself (not root), edit the mimeTypes.rdf file
in your thunderbird preferences directory, change all instances
of /usr/bin/kedit to gvim:
2) Make a copy of your existing file before you make any changes:
..that will save a copy of the file you're editing with a .bak extension.
3) Do a global replace, eg:
4) When you re-open thunderbird, it should now use gvim instead.
Moving a directory from linux to osx, you can use even old
linux systems to talk to OSX boxes with rsync over ssh.
Here, using archive mode (-a) with verbose messages (-v)
using compression (-z) with progress meter (--progress)
over ssh (-e ssh):
Console Image Viewer (Look at images without Xwindows!)
If you're like me, and like to boot linux in text mode, and then
only use Xwindows if you have to run netscape or image viewers,
you now have one less reason to run Xwindows:
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=linux
# console mode uses 1024x768 screen, truecolor 24bits per pixel
vga=0x318
image=/boot/vmlinuz-2.2.12-20
label=linux
initrd=/boot/initrd-2.2.12-20.img
read-only
root=/dev/hda7
image=/boot/vmlinuz-snd
label=sound
read-only
root=/dev/hda7
Make sure you know what you're doing if you tweak around with your /etc/lilo.conf.
At least make a backup of your kernel to a floppy, incase you need to tweak this back,
eg: dd if=/boot/vmlinuz of=/dev/fd0
Setting Up A Wacom Tablet
Setting up a Wacom tablet for X windows was easier than I thought.
These are instructions for RedHat 5.2, and probably works with 6.x
as well.
If you plug the wacom into /dev/ttyS0, then make a link in /dev:
ln -s /dev/ttyS0 /dev/wacom
The magic lines to add to the bottom of /etc/X11/XF86Config:
Section "Files"
# WACOM
ModulePath "/usr/X11R6/lib/modules"
EndSection
Section "Module"
Load "xf86Wacom.so"
EndSection
Section "Xinput"
SubSection "WacomStylus"
Port "/dev/wacom"
DeviceName "Wacom"
Mode Absolute
Suppress 15
EndSubSection
SubSection "WacomStylus"
Port "/dev/wacom"
DeviceName "WacomCore"
Mode Absolute
AlwaysCore
Suppress 15
EndSubSection
SubSection "WacomCursor"
Port "/dev/wacom"
DeviceName "CURSOR"
Mode Absolute
Suppress 15
EndSubSection
SubSection "WacomCursor"
Port "/dev/wacom"
DeviceName "CursorCore"
Mode Absolute
AlwaysCore
Suppress 15
EndSubSection
SubSection "WacomEraser"
Port "/dev/wacom"
Mode Absolute
Suppress 15
EndSubSection
SubSection "WacomEraser"
Port "/dev/wacom"
DeviceName "EraserCore"
Mode Absolute
AlwaysCore
Suppress 15
EndSubSection
EndSection
Setting Window Manager Background Image
One way is to load your image in xv(1), resave it as an xbm
image, then you can execute from the command line:
xsetroot -bitmap foo.xbm
Or, you can use xv(1) to make any image you display in xv(1)
to become the window manager's background image:
1) Use 'xv' to load your image
2) Once it loads, right click on the image. A dialog pops up.
3) Left click on the 'Root' button, and choose 'tile', or
'integer mirror', etc.
Cool Screensavers
Man, linux comes with the best screen savers, I'm tellin ya.
rpm -ivh /mnt/cdrom/RedHat/RPMS/xscreensav*
programs: decayscreen -root -mode random \n\
kumppa -root -random \n\
ifs -root -delay 0 \n\
julia -root -delay 0 \n\
galaxy -root -delay 0 \n\
starfish -root -delay 0 \n\
slidescreen -root -delay 1 -delay2 1 -increment 2
Hopefully you have a decent graphics card to be able to see
these savers at their best.
xscreensaver &
xscreensaver-command -activate
A simple clock
I like a simple clock on my screen. I use the following alias in my .cshrc
to invoke it:
alias gregclock "xclock -digital -font '-*-helvetica-bold-r-normal--34-*-*-*-p-182-iso8859-1' -bg black -fg white -bd red -geometry -0-0 & "
This works on SGI and Linux equally well. The clock looks like this:
SGI Function Keys
I use SGIs a lot, and like to push/pop windows with the SGI style
function keys, eg. ALT-F1 to pop a window, ALT-F3 to push, etc. I commented
out the delete/destroy keys, cause I think they're scary.
# Keyboard accelerators
# These are "borrowed" from the .4Dwmrc file on an SGI I use,
# except for AltF2 and AltF6 which I added for completeness.
# I think the other are standard Motif. --tabaer@magnus
Key F1 WFST M Raise
#Key F2 WFST M Delete
Key F3 WFST M Lower
#Key F4 WFST M Destroy
Key F5 WFST M Raise
Key F6 A M WindowList
Key F7 WFST M Move
Key F8 WFST M Resize
Key F9 WFST M Iconify
Key F10 WFST M Maximize
Xdiff utility for Linux
I write a lot of text files, and because I often need to maintain
several versions, one of my favorite tools on SGIs is xdiff(1)
to visually compare two text files, to show the differences between
them.
(Under Windows, there's a similar tool known as windiff.)
Olympus D450Z Digital Camera
I like to take pictures, and love this little Olympus digital camera.
It's supported under linux by a simple serial port oriented program
called 'camediaplay' which works great; just plug the camera into
a serial port and type 'camediaplay -g -a ttyS0' (for example) to
download all the pictures. Here's where I downloaded the program:
ftp://ftp.itojun.org/pub/digi-cam/D-300L/unix/camediaplay-980118.tar.gz
To download all the images from the camera, assuming it's plugged into
serial port #1 (ttyS0):
camediaplay -g -a ttyS0
RPM Incantations
Things I find important to be able to do with RPM packages are:
How to extract a single file from an RPM
# rpm -qlp kdetoys.rpm
/usr/bin/kworldclock # <-- the one I want
/usr/share/applications/kde-kworldclock.desktop
/usr/share/apps/kworldclock
/usr/share/apps/kworldclock/maps
/usr/share/apps/kworldclock/maps/depths
[..etc..]
# rpm2cpio kdetoys.rpm | cpio -idm /usr/bin/kworldclock
6144 blocks # <-- it worked
#
RPM Desciption of Package
# pwd
/mnt/cdrom/RedHat/RPMS
# rpm -qpi crontabs-1.7-7.noarch.rpm
Name : crontabs Relocations: (not relocateable)
Version : 1.7 Vendor: Red Hat Software
Release : 7 Build Date: Fri 27 Aug 1999 07:04:42 AM PDT
Install date: (not installed) Build Host: porky.devel.redhat.com
Group : System Environment/Base Source RPM: crontabs-1.7-7.src.rpm
Size : 4930 License: public domain
Packager : Red Hat Software
RPM One Line Description of all .rpm Files
# pwd
/mnt/cdrom/RedHat/RPMS
# ls *.rpm | awk '{f=$1; "rpm -qpi "f"|grep ^Sum"|getline out;gsub("^[^:]*:","",out);printf("%25.25s:%s\n",$1,out);}'
AfterStep-1.7.142-1.i386.: An X window manager which emulates the look and feel of NEXTSTEP(R).
AfterStep-APPS-990812-1.i: Various applets for use with AfterStep and compatible window managers.
AnotherLevel-1.0-1.noarch: A customized configuration of the fvwm2 window manager.
ElectricFence-2.1-1.i386.: A debugger which detects memory allocation violations.
GXedit-1.23-3.i386.rpm: A multi-function text editor which uses GTK+.
ImageMagick-4.2.9-1.i386.: An X application for displaying and manipulating images.
.
.
#
RPM Viewing List of Files In Package
# pwd
/mnt/cdrom/RedHat/RPMS
# rpm -qpl crontabs-1.7-7.noarch.rpm
/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/crontab
/usr/bin/run-parts
#
# rpm -ql crontabs-1.7-7
/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/crontab
/usr/bin/run-parts
#
RPM Reverse Lookup: What Package Owns These Files?
# rpm -qf /bin/ping
netkit-base-0.10-29
#
RPM Installing a Package
# pwd
/mnt/cdrom/RedHat/RPMS
# rpm -ivh crontabs-1.7-7.noarch.rpm
[.. ascii progress bar ..]
#
RPM Extracting Specific Files Or Directories
# pwd
/
# rpm2cpio /mnt/cdrom/RedHat/RPMS/apache-1.3.12-25.i386.rpm | cpio -d --extract ./usr/lib/apache/'*'
#
Internet Gateway DNS Configuration
This is an excerpt from my administration logs, describing
how I setup DNS on my internet gateway machine to cache remote
loookups, while acting as a server for hostnames on my own network.
--- 06/24/00,11:54:20 - erco: nameserver config on rotwang (FINALLY!)
Create ficticious domain 'erco.x', and have nameserver handle it.
I have 4 machines on this network. The idea is to have DNS resolve
them all, including the aliases (ie. 'rot') as CNAMES. My old hosts
file:
192.168.10.1 nt
192.168.10.2 howland.erco.x howland how
192.168.10.3 rotwang.erco.x rotwang rot
192.168.10.4 vaio.erco.x vaio va
Note that 192.168.10.* is my network. So we'll want to also create
a reverse lookup that's authoritative for that subnet. Here's the
network map:
erco.x
DNS domain (192.168.10.*)
___________________________________________
| | | |
192.168.10.1 192.168.10.2 192.168.10.3 192.168.10.4
"nt" "howland" "rotwang" "vaio"
|
|
modem
|
|
ISP
The DNS server is running on "rotwang", and answers authoritatively
for the four machine names, and acts as a caching name server for
everything else (ie. all internet addresses).
All four machines use "rotwang" as their DNS server.
"erco.x" is a fictious domain, which is only seen locally by my
private network (all queries from my network for that domain are
intercepted by my name server)
So basically, the following is a caching nameserver config,
with a single domain, "erco.x", for which it answers authoritatively,
including reverse lookups.
The root.cache was created with:
dig @f.root-servers.net . ns > /var/named/root.cache
..and should be executed regularly via a monthly crontab.
You can use these as templates; just change the red and blue text
to suit the specifics of your network;
* red is your ISP related info
* blue is your local network info
*****************************************************************
*** /etc/named.conf
*****************************************************************
options {
directory "/var/named";
// query-source port 53;
};
// ACCESS CONTROL (SECURITY)
// Limit all queries to this IP address range
//
controls {
inet * port 52 allow {
192.168.10/24; // my internal net, ie. 192.168.10.*
};
unix "/var/run/ndc" perm 0600 owner 0 group 0;
};
// AUTHORITATIVE ZONES
//
zone "." {
type hint;
file "root.cache";
};
// DOMAIN FORWARD LOOKUPS
zone "erco.x"{
type master;
file "erco.x.forward";
notify yes;
};
// DOMAIN REVERSE LOOKUPS
zone "10.168.192.in-addr.arpa"{
type master;
file "erco.x.reverse";
};
// LOCALHOST REVERSE
//
zone "0.0.127.in-addr.arpa"{
type master;
file "localhost.reverse";
};
*****************************************************************
*** /var/named/root.cache
*****************************************************************
. 6D IN NS D.ROOT-SERVERS.NET.
. 6D IN NS A.ROOT-SERVERS.NET.
. 6D IN NS H.ROOT-SERVERS.NET.
. 6D IN NS C.ROOT-SERVERS.NET.
. 6D IN NS G.ROOT-SERVERS.NET.
. 6D IN NS F.ROOT-SERVERS.NET.
. 6D IN NS B.ROOT-SERVERS.NET.
. 6D IN NS J.ROOT-SERVERS.NET.
. 6D IN NS K.ROOT-SERVERS.NET.
. 6D IN NS L.ROOT-SERVERS.NET.
. 6D IN NS M.ROOT-SERVERS.NET.
. 6D IN NS I.ROOT-SERVERS.NET.
. 6D IN NS E.ROOT-SERVERS.NET.
;; ADDITIONAL SECTION:
D.ROOT-SERVERS.NET. 5w6d16h IN A 128.8.10.90
A.ROOT-SERVERS.NET. 5w6d16h IN A 198.41.0.4
H.ROOT-SERVERS.NET. 5w6d16h IN A 128.63.2.53
C.ROOT-SERVERS.NET. 5w6d16h IN A 192.33.4.12
G.ROOT-SERVERS.NET. 5w6d16h IN A 192.112.36.4
F.ROOT-SERVERS.NET. 5w6d16h IN A 192.5.5.241
B.ROOT-SERVERS.NET. 5w6d16h IN A 128.9.0.107
J.ROOT-SERVERS.NET. 5w6d16h IN A 198.41.0.10
K.ROOT-SERVERS.NET. 5w6d16h IN A 193.0.14.129
L.ROOT-SERVERS.NET. 5w6d16h IN A 198.32.64.12
M.ROOT-SERVERS.NET. 5w6d16h IN A 202.12.27.33
I.ROOT-SERVERS.NET. 5w6d16h IN A 192.36.148.17
E.ROOT-SERVERS.NET. 5w6d16h IN A 192.203.230.10
*****************************************************************
*** /var/named/localhost.reverse
*****************************************************************
$TTL 86400 ; default TTL
@ IN SOA rotwang.erco.x. erco.3dsite.com. ( ; erco.3dsite.com is my email address
2 ; Serial ; ie. erco@3dsite.com
8H ; Refresh
2H ; Retry
1W ; Expire
6H) ; Minimum TTL
NS rotwang.erco.x.
1 PTR localhost.
*****************************************************************
*** /var/named/erco.x.forward
*****************************************************************
$TTL 86400 ; default TTL
@ IN SOA rotwang.erco.x. erco.3dsite.com. (
3 ; Serial
8H ; Refresh
2H ; Retry
1W ; Expire
6H) ; Minimum TTL
NS rotwang.erco.x.
MX 10 mail.3dsite.com. ; my ISP's mail server
; A records for host -> address lookups.
; HINFO and CNAME records are, of course, optional.
;
localhost A 127.0.0.1
nt A 192.168.10.1
nt IN HINFO "intel" "winnt"
howland A 192.168.10.2
howland IN HINFO "sgi" "irix6.2"
how CNAME howland
rotwang A 192.168.10.3
rotwang IN HINFO "intel" "linux"
rot CNAME rotwang
vaio A 192.168.10.4
vaio IN HINFO "intel" "linux"
va CNAME vaio
*****************************************************************
*** /var/named/erco.x.reverse
*****************************************************************
$TTL 86400 ; default TTL
@ IN SOA rotwang.erco.x. erco.3dsite.com. (
3 ; Serial
8H ; Refresh
2H ; Retry
1W ; Expire
6H) ; Minimum TTL
NS rotwang.erco.x.
; INADDR.ARPA REVERSE LOOKUP PTR RECORDS
1 PTR nt.erco.x.
2 PTR howland.erco.x.
3 PTR rotwang.erco.x.
4 PTR vaio.erco.x.
*****************************************************************
*** /etc/resolv.conf
*****************************************************************
hostresorder local bind
search erco.x
domain erco.x
# ROTWANG NAMESERVER
nameserver 192.168.10.3
*****************************************************************
*** /etc/nsswitch.conf
*****************************************************************
:
:
hosts: files dns
:
:
*****************************************************************
*** /etc/host.conf
*****************************************************************
order hosts,bind
multi on
nospoof on
How To Add Hosts To DNS
In the below examples, this would be:
a) /var/named/erco.x.forward
b) /var/named/erco.x.reverse
a) Check the forward lookup with 'nslookup
b) Check the reverse lookup with 'nslookup
Linux: /var/log/messages
BSDI: /var/log/messages
OSX: /var/log/system.log
How To Configure Clients To Use Your DNS Server
Windows 98 Client DNS Config
----------------------------
1) Right click on "Network Neighborhood -> Properties"
2) Go into TCP/IP
3) Under 'DNS Server addresses':
a) Delete any entries already there
b) Hit ADD, and enter the IP of your DNS server:
4) Enable 'Append these DNS suffixes (in order)', then:
a) Delete existing entries if any
b) Hit ADD, and enter your domain name, eg:
erco.x
Windows 2000 Client DNS Config
------------------------------
1) Right click on "My Network Places" -> Properties
2) Right click on "Local Area Connection" -> Properties
3) Double click on "Internet Protocol (TCP/IP)"
4) Click on "ADVANCED"
5) Click on "DNS" tab
6) Under 'DNS Server addresses':
a) Delete any entries already there
b) Hit ADD, and enter the IP of your DNS server.
7) Enable 'Append these DNS suffixes (in order)', then:
a) Delete existing entries if any
b) Hit ADD, and enter your domain name, eg:
erco.x
8) Disable "Register this connection's addresses in DNS"
9) Click on the "WINS" tab
10) Disable "Enable LMHOSTS lookup"
11) Enable only "Enable NetBIOS over TCP"
12) Hit OK, and ignore any error about 'empty WINS' whatever.
13) That's it. Be sure to test it.
Mac OSX Client DNS Config
-------------------------
1) Go into "System Preferences | Network | Tcp/IP", and set:
DNS Servers: 192.168.0.14 <-- Your DNS Server's IP
Search Domains: erco.x <-- Your domain name
2) That's it. Be sure to test it.
Linux/Irix Client DNS Config
----------------------------
1) Edit the /etc/resolv.conf file to read, eg:
search erco.x <-- Your domain name
nameserver 192.168.0.14 <-- Your DNS server's IP address
2) Edit the /etc/nsswitch.conf file, and verify the 'hosts:' entry reads:
hosts: files dns
3) Make sure your /etc/hosts file only has an entry for 'localhost'
and the machine's own hostname. (Anything else is usually special purpose.)
4) That's it. Be sure to test it.
How To Test Your DNS
What follows are some tests of the above domain configuration.
Blue text in these examples are commands you enter:
Domain Listing
# nslookup
Default Server: rotwang.erco.x
Address: 192.168.10.3
> ls -d erco.x # or use eg. 'dig @rotwang ixfr=0 erco.x'
[rotwang.erco.x]
$ORIGIN erco.x.
@ 6H IN SOA rotwang erco.3dsite.com. (
3 ; serial
8H ; refresh
2H ; retry
1W ; expiry
6H ) ; minimum
1D IN NS rotwang
1D IN MX 10 mail.3dsite.com.
rotwang 1D IN HINFO "intel" "linux"
1D IN A 192.168.10.3
nt 1D IN HINFO "intel" "winnt"
1D IN A 192.168.10.1
va 1D IN CNAME vaio
howland 1D IN HINFO "sgi" "irix6.2"
1D IN A 192.168.10.2
rot 1D IN CNAME rotwang
how 1D IN CNAME howland
localhost 1D IN A 127.0.0.1
vaio 1D IN HINFO "intel" "linux"
1D IN A 192.168.10.4
@ 6H IN SOA rotwang erco.3dsite.com. (
3 ; serial
8H ; refresh
2H ; retry
1W ; expiry
6H ) ; minimum
>
Name Lookups
# nslookup
Default Server: rotwang.erco.x
Address: 192.168.10.3
> vaio.erco.x ; FQDN lookup
Server: rotwang.erco.x
Address: 192.168.10.3
Name: vaio.erco.x ; (See erco.x.forward A record "vaio A 192.168.10.4")
Address: 192.168.10.4
> vaio ; simple hostname lookup
Server: rotwang.erco.x
Address: 192.168.10.3
Name: vaio.erco.x ; (See erco.x.forward A record "vaio A 192.168.10.4")
Address: 192.168.10.4
> va ; hostname alias lookup
Server: rotwang.erco.x
Address: 192.168.10.3
Name: vaio.erco.x ; (See erco.x.forward CNAME record "va CNAME vaio")
Address: 192.168.10.4
Aliases: va.erco.x
> 192.168.10.4 ; reverse lookup (IP address)
Server: rotwang.erco.x
Address: 192.168.10.3
Name: vaio.erco.x ; (See erco.x.reverse PTR record "4 PTR vaio.erco.x.")
Address: 192.168.10.4
>
How to fix the Backspace/Delete Problem
It's all a clusterfuck of history as to why hitting backspace generates DEL.
Let's just ignore all that and fix the damn problem.
Fixing Linux Text Consoles
All versions of linux I've ever seen have the Backspace problem
in the text console.
# MAP BACKSPACE KEY PROPERLY FOR ALL CONSOLE TTYS
echo '[SYSHACK] Map normal backspace/delete keys..'
echo keycode 14 = BackSpace BackSpace | /usr/bin/loadkeys
echo keycode 111 = Delete | /usr/bin/loadkeys
stty erase "^H" intr "^C"
Fixing Xwindows
You more or less have to fix this on an application-by-application basis.
xmodmap -e "keycode 22 = BackSpace"
Fixing the KDE 'Konsole' Terminal Window
I don't know how to make this a system wide change yet. You HAVE to use
the menu to choose 'linux console', since it appears there's no way
to change the default keytab without recompiling konsole. :(
key Backspace : "\x7f"
key Backspace : "\x08"
% stty erase "^H"
% cat > /dev/null
asdfasdfasdfasdf<BACKSPACE><BACKSPACE>
Fixing Xterm
To make Xterm generate Backspace when you hit Backspace, you can probably
fix it easily by using Ctrl-Left to bring up the Main Options menu, and choose
"Backarrow Key (BS/DEL)". But then you'd have to do that every time you open
an xterm(1). If you know how to save this setting as a system-wide default
without recompiling xterm, let me know.
! The following has the effect of 'stty erase ^H' as default term setting
*ptyInitialErase: false
! Make BackSpace really backspace
*VT100*translations: #override <Key>BackSpace: string(0x08)
% stty erase "^H"
% cat > /dev/null
asdfasdfasdfasdf<BACKSPACE><BACKSPACE>
Configuring DNS/Sendmail
To configure a network:
internet
|
|
firewall <-- running 'portfwd' for port 25 -> mailserver
|
| <-- smtp in/out
|
mail server
/|\
/ | \ <-- pop/smtp
/ | \
unix/nt workstations
This is typical of a 'small company' configuration
on the internet, where a single mail server is used by all employees,
and mail comes in/goes out to the net.
How to copy/re-record music CDs
Note the tools recommended here all come with RedHat 6.1.
Copy Music CDs -> Wav Files
# cdparanoia -w -B "1-3" # Saves tracks 1-3 as "track01.wav", "track02.wav"..
#
Writing WAV Files to CD-ROM As A Music CD
# cdrecord -v speed=2 dev=0,4,0 -audio -nofix one.wav two.wav
# cdrecord -fix dev=0,4,0 -speed=4
#
Quickie Samba Configuration
Here's how I configured Samba on my notebook computer
so that it could be seen by NT machines on a small
firewalled subnet. OS is RedHat 6.1.
--- 12/13/00,04:03:08 - erco: Quickie samba config / Redhat 6.1
Samba installation; works with WinNT and Win98.
Redhat 6.2 note: /etc/smb.conf has moved to /etc/samba/smb.conf.
NOTE: In this case, *no* security is desired. All access is
limited by IP address only. This is a good way to get a unix
share quickly seen by NT machines on the local subnet.
o rpm -ivh /mnt/cdrom/RedHat/RPMS/samba-2.0.5a-12.i386.rpm
o Configure your /etc/smb.conf.
You may need to configure
'workgroup' to match your NT client's workgroup
(Right click on Network Neighborhood, then click on
Properties->Identification->Change->Workgroup)
You must either comment out or configure 'hosts allow'
correctly for your network.
Change the text in red
UPDATE: This tiny smb.conf file works for other OS's too.
This article was written in Dec 2000, but also works
for samba configs as recent as 2008.
--------------------------------------------------------
[global]
workgroup = WORKGROUP
server string = Samba Server
hosts allow = 192.168.0.0/255.255.255.0
log file = /var/log/samba/log.%m
log level = 3
max log size = 50
# very open security
security = share
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = no
# No permissions whatsoever
# All security is managed by ip (above)
# Make sure user 'nobody' has permission to these disks,
# otherwise samba will not have access.
#
[test]
comment = Test Disk
path = /var/tmp
read only = no
guest ok = yes
guest account = nobody
force create mode = 0777
force directory mode = 0777
--------------------------------------------------------
o mkdir -m 777 /usr/tmp/test
o chkconfig smb on ; /etc/init.d/smb start
To Configure swat (not that I needed it)
o Added 'swat 901/tcp' to /etc/services
o Uncommented the following at end of /etc/inetd.conf
swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat
o kill -HUP [inetd-pid]
o netscape to http://localhost:901/ to see the swat config screen
Configuring Rsh/Rlogin (Promiscuous Config)
rsh/rlogin makes remote admin easy on small/large networks
of unix machines. By default, linux rsh/rlogin is turned
off, and configured to be particularly security conscious..
so much so that it's almost unusable.
Subject: [SYSADMIN] Configuring rsh/rlogin for linux
From: Greg Ercolano
Date: Sun, 25 Oct 2003 12:00:22 -0700
RSH + RLOGIN CONFIGURATION FOR REDHAT LINUX
-------------------------------------------
A lot of folks ask me about how the !^@# to get rsh/rlogin
working under linux so that it doesn't ask for passwords,
and programs like 'rcp' can work without errors.
Yeah, since the unix world started becoming so security conscious,
programs like rsh/rlogin have become harder to configure.
Anyway, here's how, assuming you have a firewalled network,
and want a fairly 'open' configuration so that root and users
can hop between machines without seeing password prompts,
and commands like 'rcp' and 'rdist' can work properly.
Do the following /as root/:
1) Make sure the needed binaries are installed.
Normally this is done for you, but sometimes people miss this.
On a redhat 9.0 machine you should see:
# rpm -qa | egrep 'rsh|inetd'
rsh-0.17-14
xinetd-2.3.10-6
rsh-server-0.17-14
If they're not installed, get your redhat install CDs, and
use a command like 'rpm -ivh /mnt/cdrom/RedHat/RPMS/.rpm',
to install them.
For older linux machines (7.x and back), make sure 'inetd' instead
of xinetd is installed.
2) Make sure rsh and rlogin are enabled in /etc/inetd.conf (old 7.x machines)
or in /etc/xinetd.d (newer redhat versions 8.x and up):
o On (7.x and back) make sure rsh and rlogin are uncommented
from /etc/inetd.conf and the 'inetd' daemon is running. If not:
chkconfig inetd on ; /etc/init.d/inetd start
If you make any changes to inetd.conf, be sure to
'killall -1 inetd'.
o On newer machines (redhat 8.x and up) make sure the /etc/xinetd.d/rsh
and /etc/xinetd.d/rlogin files exist, and xinetd is running. If not:
chkconfig xinetd on ; /etc/init.d/xinetd start
Make sure /etc/xinetd.d/rlogin and /etc/xinetd.d/rsh have 'disable = no'.
These are text files; just edit them. If you make any changes to these
files, be sure to 'killall -1 xinetd' so the daemon sees the changes.
3) Open up /etc/hosts.allow, /etc/hosts.deny,
hosts.equiv and root's .rhosts file.
First backup the originals:
cp /etc/hosts.allow /etc/hosts.allow.orig
cp /etc/hosts.deny /etc/hosts.deny.orig
cp /etc/hosts.equiv /etc/hosts.equiv.orig
(there is no stock /root/.rhosts, so no backup needed)
Then make these changes:
umask 022
echo 'ALL: ALL' > /etc/hosts.allow
echo '' > /etc/hosts.deny
echo + > /etc/hosts.equiv
echo + > /root/.rhosts
4) Tweak /etc/pam.d/rsh to allow promiscuous '+' characters
in the hosts.equiv and .rhosts files, and disable checks
for the /etc/securetty file for rsh/rlogin:
3a) Comment out the 'pam_securetty.so' line, eg:
#auth required pam_securetty.so
3b) Append to the pam_rhosts line the arguments
'hosts_equiv_rootok' and 'promiscuous':
auth required pam_rhosts_auth.so hosts_equiv_rootok promiscuous
5) Make the same tweaks to the /etc/pam.d/rlogin file.
[..]
REFERENCES
----------
To read about what the changes to the pam files do,
run 'locate pam_rhosts pam_securetty' and view the
README files; eg:
-------------------------------------------------------
root@ontario# locate pam_securetty
/usr/share/doc/pam-0.75/txts/README.pam_rhosts
/lib/security/pam_rhosts_auth.so
/usr/share/doc/pam-0.75/txts/README.pam_securetty
/lib/security/pam_securetty.so
root@ontario# more /usr/share/doc/pam-0.75/txts/README.pam_securetty
pam_securetty:
Allows root logins only if the user is logging in on a
"secure" tty, as defined by the listing in /etc/securetty
Also checks to make sure that /etc/securetty is a plain
file and not world writable.
[..]
-------------------------------------------------------
To read about /etc/hosts.equiv, see 'man hosts.equiv'.
To read about /etc/xinetd.d, see 'man xinetd.conf' et al.
To read about /etc/hosts.allow and deny, see 'man tcpd'
and 'man hosts.allow' et al.
For 'locate' to work correctly, 'updatedb' must have been run
recently to update the locate dababase, which is usually done
automatically by cron via /etc/cron.daily/slocate.cron, which
you can run manually if needed.
Solving Alt-Left problem with KDE and Gimp
In gimp, when you make a selection (rectangular, circular, etc),
you sometimes need access to the Alt-Left combo to move the selection.
But the default window manager settings trump this; Alt-Left moves the
window!
Tweaks often needed to get thunderbird working right
Getting URLs To Open In Thunderbird
I don't know why, but out of the box, thunderbird doesn't open
URLs in people's emails using the local browser, in my case, firefox.
1) Quit out of thunderbird, make sure it's not running with 'ps aux'.
( umask 022; vi ~/.thunderbird/xxxxxxxx.default/user.js )
/* Open links in firefox.. */
user_pref("network.protocol-handler.app.http", "/usr/local/bin/firefox");
user_pref("network.protocol-handler.app.https", "/usr/local/bin/firefox");
user_pref("network.protocol-handler.app.ftp", "/usr/local/bin/firefox");
Getting Thunderbird to use gvim instead of kedit
1) Quit out of thunderbird, make sure it's not running with 'ps aux'.
( umask 022; vi ~/.thunderbird/*.default/mimeTypes.rdf )
:! cp % %.bak
:g%/usr/bin/kedit%s%%/usr/X11R6/bin/gvim%g
Using rsync
Some rsync commands I like to remember.
rsync -avz --progress -e ssh /localshare/localdir user@desthost:/remshare