Monday, December 27, 2010

Monday, December 13, 2010

Network speed tests, config notes for Ubuntu

For connectivity to outside hosts, use the following
http://www.speakeasy.net/speedtest/
http://www.speedtest.net/index.php?nojs=1

Internal host to host speed measures
iptop is an application that will monitor conversations and show performance.
hping3 is an application to generate traffic
mii-tool is an information tool to check Media Independent Interfaces.

Configuration 
=> Host IP address 192.168.1.100
=> Netmask: 255.255.255.0
=> Network ID: 192.168.1.0
=> Broadcast IP: 192.168.1.255
=> Gateway/Router IP: 192.168.1.254
=> DNS Server: 192.168.1.254
Open network configuration file
$ sudo vi /etc/network/interfacesOR$ sudo nano /etc/network/interfaces
Find and remove dhcp entry:
iface eth0 inet dhcp
Append new network settings:
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254

Save and close the file. Restart the network:
$ sudo /etc/init.d/networking restart

Friday, December 10, 2010

Stupid Mac tricks

Shared disk target mode      hold down T and the mass media on your mac will be available as shared media on the firewire 1384 bus.  http://en.wikipedia.org/wiki/Target_Disk_Mode

Z80 code for SCSI to IDE port

I hopefully will soon get a Z80 board with the hardware to run a 53C80 on one side and and IDE port on the other.

Since I don't particularly want to do the work in assembler, I found a tool, sdcc which looks very promising.  It has the capability to target the z80, perform I/O, etc.

The manual is here:  http://sdcc.sourceforge.net/doc/sdccman.html/  . There will be 32k of memory on the z80 to do the deed, so now to try to see how that will work out.

Thursday, December 9, 2010

Kernel debug notes

control printk with /proc/sys/kernel/printk

/proc/sys/kernel/printk
The four values in this file are
console_loglevel,
default_message_loglevel,
minimum_console_level and
default_console_loglevel.

These values influence printk() behavior when
printing or logging error messages. See syslog(2) for more info
on the different loglevels. Messages with a higher priority
than console_loglevel will be printed to the console. Messages
without an explicit priority will be printed with priority
default_message_level.

minimum_console_loglevel is the minimum
(highest) value to which console_loglevel can be set.
default_console_loglevel is the default value for con-
sole_loglevel.

example:
echo "4 4 1 4" > /proc/sys/kernel/printk"

gdb mini howto
http://linux.bytesex.org/gdb.html

Apt-file

how to find out to  which package a file belongs.  A database is downloaded with the contents of all packages.  Apt-file searches it for you to show which package a file belongs to.

http://www.debian.org/doc/manuals/apt-howto/ch-search.en.html#s-apt-file

this document is marked obsolete, but contains a good description of apt-file for now.  It is copied below in the case the the debian site removes it at some time.

5.4 How to discover to which package a file belongs

If you want to install a package, and you can't find out what it is called by searching with apt-cache, but know the filename of the program itself, or some other filename that belongs to the package, then you can use apt-file to find the package name. This is done like this:
$ apt-file search filename
It works just like dpkg -S, but will also show you uninstalled packages that contain the file. It could also be used to find what packages contain necessary include files that are missing when compiling programs, although auto-apt is a much better method of solving such issues, see How to install packages "on demand", Section 5.3.
You can also list the contents of a package, by running:
$ apt-file list packagename
apt-file keeps a database of which files all packages contain, just like auto-apt does and it needs to be up-to-date. This is done by running:
# apt-file update

Configuration of startup services on Debian (and Ubuntu)

sysvconfig is a tool which allows setting of what services start up on debian.  It works in conjunction with the /sbin/service command to start and stop them at runtime as well.

http://www.itoperationz.com/2010/04/how-to-configure-startup-services-in-debian-lenny/

There are various methods for managing access to system services:
1) /etc/init.d/service
2) rcconf
3) update-rc.d etc
 
svsvconfig – Services Startup Configuration Tool
Debian and Ubuntu Linux also offers service command. It can be used to execute System V style init script stored at /etc/init.d/service-name { start|stop|restart|action }.

sysvconfig package
First, install sysvconfig package:
$ sudo apt-get install sysvconfig 

Package sysvinit-utils has replaced it Ubuntu 10.10

To start / restart / stop service, use the following syntax:
$ sudo service {service-name} restart <-- Restart service
$ sudo service {service-name} stop <-- Stop service
$ sudo service {service-name} start <-- Start service


For example to stop apache service, enter:
$ sudo service apache stop

sysvconfig command

This is a text-based application that allows you to configure which services are started at boot time for each run level. It is simple interface for configuring run levels. sysvconfig is just like ntsysv under Redhat Linux. It has dialog based interactive, menus to help automate setting up Sys V style init script links:
  • Enable or disable services.
  • Edit individual links.
  • Restore from backup file if you make a mistake.
  • Menu or command line interface.
  • View all services, each with its status and a brief description.

Record Bash session to a file

from
http://www.devdaily.com/blog/post/linux-unix/use-unix-linux-script-command-record-your-command-line-i-o

Record a bash session with script.  Another way to record a session is to redirect stderr into stdout, and the tee the output to both the original stdout and a file.  This program is much simpler, and may pick up a few messages that seem to try to go around the stderr redirect in some programs you may run.


The script command is usually a no-brainer to use. When you're ready to start recording the input/output of your login session, just type:

script

at the command line. You'll get a message back from the operating system that looks like this:

Script started, file is typescript

Saturday, December 4, 2010

Vlan, Iscsi, vmware notes

VLAN
VLan is a tag added to traffic, and appears as an additional device in ifconfig.  for instance if your adapter is eth0, eth0.5 is the vlan 5 for that device.

Hand for use thru managed switches, etc.

I'll have to study uses of this with the IPCop and suti configured switches, may be able to use the cisco 2950's to partiton some of the traffic in the suti facility.

Here is a howto site link for VLAN on linux.

http://www.cyberciti.biz/tips/howto-configure-linux-virtual-local-area-network-vlan.html
http://www.youtube.com/watch?v=5NrydmHMtQY&feature=related

iSCSI

Some Utoob videos of iSCSI that are somewhat useful.

http://www.youtube.com/watch?v=QCDiz9C8Vvw&feature=related
very good  walkthru creating iSCSI target and configuring vmware ESXi to access it.
http://www.youtube.com/watch?v=Dc20IT1msAk

Vmware ESXi

more Utoob videos

http://www.youtube.com/watch?v=x1X29hOviBs

For the youtube videos, turn off the sound in most of them.

Diskless (or iSCSI boot disk) Windows XP

http://www.youtube.com/watch?v=hBc9WePkliE&feature=related

I hit a snag trying to import a disk to the ESXi system.  You must not use sparse disks, or ide disks.  They must be LSI logic scsi disks fully allocated.  create and DD any data drives to be moved to such drives.  If you didn't set the system up and these are boot drives, you may have problems getting the system up, and will need a utility boot to get going.  That is a separate subject.

To import the data drive, copy the data vmdk files for each disk to a datastore which you have created (separate subject).  The next thing you will need to do, is "import" or register the disk.

Vmware server, player, etc. (not vmware server 2) all pretty much treat any set of files which have the right metadata in them as a virtual machine.  You only have to play with them with the editor when moving them around and make sure the file types, etc. are correct to move data.

On ESXI and vmware server 2.0, there is more control, because those systems are made to play inside a larger multi platform multihost environment with either Vsphere, or vmware vcenter managing multiple platform with different capabilities and also different storage capabilities.

So the machines you have and the data files you have have to be properly formatted and registered to be usable, not just moved onto the ESXi platform as data.

To properly move the disk, there is a utility which will import the disk.  I created a virtual machine for my imap mail server some time ago anticipating this move and created it with a SCSI drive.  I didn't know about the "no sparse" limitation, so had to create a copy onto a fully allocated nonsparse or nosparse disk on the vmware server it was on.

I moved all the bits of this disk, since it was allocated as 2gb chunks to also allow moving to windows to the ESXi server.

Then use the command in the ESXi command line, either on the console, or enable ssh logins, and on an ssh login shell:

/vmfs/volumes/41cdeaf3-10db5074-3834-00127994be1e/imap # vmkfstools -i imap-full.vmdk imap-full-new.vmdk
Destination disk format: VMFS zeroedthick
Cloning disk 'imap-full.vmdk'...


to create "import" the disk.  This disk can then be added to the virtual machine.

When you need to import the virtual machine, that is accomplished by going to your vmware client, and selecting the line with the server on it, select Configuration tab, and Storage.  You can right click the storage your vm resides on and you will see the vmx file.  if you right click it, "add to inventory" is one of the options.

When you want to manually import data, you can use the vmware client to import it.  You can also manually move file by such as sftp into the ssh client.

The data is stored off directories from root /vmfs

The subdirectories there are volume and device.  Under volume, you should find datastore1 datastore2, or whatever you have created.

I am not sure how the file system works, but you can guage what you are importing and not exceed the size and probably do okay.  The file system df command does not work, and is of no use, as it does not see these file systems.

The networking probably will be messed up as well.  Add a VMware ESX NIC port and  delete the old one.  The one that existed was created w/o any external connection to the internal net.  When one is created it apparently connects properly.

ESXi performance
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1011771
ensuring a system has resources
  1. Start esxtop.
  2. Type e and the GID of the virtual machine in question. Press Enter.
  3. Look at the %RDY time for the vmm worlds.

Thursday, December 2, 2010

Ubuntu install notes

When installing from scratch this is what is installed on the Ubuntu 10.10 system (and 10.4 where appropriate).

for ffmpeg encoding:

sudo apt-get install ubuntu-restricted-extras

From Synaptic:
1.  for gnome:
nautilus-open-terminal (0.18-1)
2.  bochs emulator
bochs (2.4.2-1ubuntu1)
bochs-doc (2.4.2-1ubuntu1)
bochs-sdl (2.4.2-1ubuntu1)
bochs-svga (2.4.2-1ubuntu1)
bochs-term (2.4.2-1ubuntu1)
bochs-wx (2.4.2-1ubuntu1)
bochs-x (2.4.2-1ubuntu1)
bochsbios (2.4.2-1ubuntu1)
bximage (2.4.2-1ubuntu1)
libsvga1 (1:1.4.3-29)
libwxbase2.8-0 (2.8.10.1-0ubuntu1.2)
libwxgtk2.8-0 (2.8.10.1-0ubuntu1.2)
vgabios (0.6c-2ubuntu1)
3.  swat, samba
keyutils (1.2-12)
libdcerpc-dev (4.0.0~alpha8+git20090912-1)
libdcerpc0 (4.0.0~alpha8+git20090912-1)
libldb-dev (1:0.9.10~git20091212+really0.9.6~git20090912-0ubuntu1)
libldb0 (1:0.9.10~git20091212+really0.9.6~git20090912-0ubuntu1)
libmapi0 (1:0.8.2+svn1524-1)
libmapiproxy0 (1:0.8.2+svn1524-1)
libmapistore0 (1:0.8.2+svn1524-1)
libndr-dev (4.0.0~alpha8+git20090912-1)
libndr0 (4.0.0~alpha8+git20090912-1)
libparse-pidl-perl (4.0.0~alpha8+git20090912-1)
libparse-yapp-perl (1.05-11)
libsamba-util-dev (4.0.0~alpha8+git20090912-1)
libtalloc-dev (2.0.1-1)
libtdb-dev (1.2.0-1)
libtevent0 (0.9.8-1)
openbsd-inetd (0.20080125-4ubuntu2)
openchangeproxy (1:0.8.2+svn1524-1)
openchangeserver (1:0.8.2+svn1524-1)
openchangeserver-dev (1:0.8.2+svn1524-1)
python-ldb (1:0.9.10~git20091212+really0.9.6~git20090912-0ubuntu1)
python-samba (4.0.0~alpha8+git20090912-1)
python-tdb (1.2.0-1)
samba (2:3.4.7~dfsg-1ubuntu3.2)
samba-doc (2:3.4.7~dfsg-1ubuntu3.2)
samba-doc-pdf (2:3.4.7~dfsg-1ubuntu3.2)
samba-ldb-tools (4.0.0~alpha8+git20090912-1)
samba4 (4.0.0~alpha8+git20090912-1)
samba4-common-bin (4.0.0~alpha8+git20090912-1)
samba4-dev (4.0.0~alpha8+git20090912-1)
smbfs (2:3.4.7~dfsg-1ubuntu3.2)
swat (2:3.4.7~dfsg-1ubuntu3.2)
tdb-dev (1.2.0-1)
4.  build utilities
build-essential (11.4build1)
doxygen (1.6.3-1)
doxygen-doc (1.6.3-1)
dpkg-dev (1.15.5.6ubuntu4.3)
fakeroot (1.14.4-1ubuntu1)
g++ (4:4.4.3-1ubuntu1)
g++-4.4 (4.4.3-4ubuntu5)
lacheck (1.26-11.1build1)
libstdc++6-4.4-dev (4.4.3-4ubuntu5)
lmodern (2.004.1-3)
luatex (0.50.0-1)
openssh-server (1:5.3p1-3ubuntu4)
patch (2.6-2ubuntu1)
ssh (1:5.3p1-3ubuntu4)
tex-common (2.06)
texlive-base (2009-7)
texlive-binaries (2009-5ubuntu0.2)
texlive-common (2009-7)
texlive-doc-base (2009-2)
texlive-extra-utils (2009-7ubuntu3)
texlive-luatex (2009-7)
xz-utils (4.999.9beta+20091116-1)
5.   filezilla client
filezilla (3.3.1-1ubuntu2)
filezilla-common (3.3.1-1ubuntu2)
6.  nfs
libgssglue1 (0.1-4)
libnfsidmap2 (0.23-2)
librpcsecgss3 (0.19-2)
nfs-common (1:1.2.0-4ubuntu4)
nfs-kernel-server (1:1.2.0-4ubuntu4)
portmap (6.0.0-1ubuntu2)
7.  nfswatch
8. network monitoring
ethstatus (0.4.3)
iptraf (3.0.0-7)
9.  sysguard
exiv2 (0.19-1)
gdebi-kde (0.6.0ubuntu2)
icoutils (0.29.1-0ubuntu1~lucid)
install-package (0.5.2)
kdebase-runtime (4:4.4.2-0ubuntu4.1)
kdebase-runtime-data (4:4.4.2-0ubuntu4.1)
kdelibs-bin (4:4.4.2-0ubuntu4)
kdelibs5 (4:4.4.2-0ubuntu4)
kdelibs5-data (4:4.4.2-0ubuntu4)
kdepimlibs-data (4:4.4.2-0ubuntu2.1)
kdepimlibs5 (4:4.4.2-0ubuntu2.1)
kdesudo (3.4.2.3-0ubuntu1)
kpackagekit (0.5.4-0ubuntu4.3)
ksysguard (4:4.4.2-0ubuntu14)
ksysguardd (4:4.4.2-0ubuntu14)
ksystemlog (4:4.4.2-0ubuntu1)
kubuntu-debug-installer (10.04ubuntu4)
libakonadiprivate1 (1.3.1-0ubuntu3)
libattica0 (0.1.3-0ubuntu1)
libaudio2 (1.9.2-3)
libboost-program-options1.40.0 (1.40.0-4ubuntu4)
libclucene0ldbl (0.9.21b-2)
libdbusmenu-qt2 (0.3.2-0ubuntu1)
libexiv2-6 (0.19-1)
libiodbc2 (3.52.6-4)
libksgrd4 (4:4.4.2-0ubuntu14)
libksignalplotter4 (4:4.4.2-0ubuntu14)
libmng1 (1.0.9-1ubuntu1)
libmodplug0c2 (1:0.8.7-1build1)
libmpcdec3 (1:1.2.2-2.1ubuntu1)
libmysqlclient16 (5.1.41-3ubuntu12.7)
libpackagekit-glib2-12 (0.5.7-0ubuntu2.1)
libpackagekit-qt-12 (0.5.7-0ubuntu2.1)
libphonon4 (4:4.6.2-0ubuntu5.1)
libplasma3 (4:4.4.2-0ubuntu4)
libpolkit-qt-1-0 (0.95.1-1fakesync1)
libprocesscore4 (4:4.4.2-0ubuntu14)
libprocessui4 (4:4.4.2-0ubuntu14)
libqca2 (2.0.2-1ubuntu2)
libqt4-assistant (4:4.6.2-0ubuntu5.1)
libqt4-dbus (4:4.6.2-0ubuntu5.1)
libqt4-designer (4:4.6.2-0ubuntu5.1)
libqt4-help (4:4.6.2-0ubuntu5.1)
libqt4-network (4:4.6.2-0ubuntu5.1)
libqt4-opengl (4:4.6.2-0ubuntu5.1)
libqt4-qt3support (4:4.6.2-0ubuntu5.1)
libqt4-script (4:4.6.2-0ubuntu5.1)
libqt4-scripttools (4:4.6.2-0ubuntu5.1)
libqt4-sql (4:4.6.2-0ubuntu5.1)
libqt4-sql-mysql (4:4.6.2-0ubuntu5.1)
libqt4-svg (4:4.6.2-0ubuntu5.1)
libqt4-test (4:4.6.2-0ubuntu5.1)
libqt4-webkit (4:4.6.2-0ubuntu5.1)
libqt4-xml (4:4.6.2-0ubuntu5.1)
libqt4-xmlpatterns (4:4.6.2-0ubuntu5.1)
libqtcore4 (4:4.6.2-0ubuntu5.1)
libqtgui4 (4:4.6.2-0ubuntu5.1)
libsoprano4 (2.4.2+dfsg.1-0ubuntu1.1)
libssh-4 (0.4.2-1ubuntu1)
libstreamanalyzer0 (0.7.2-0ubuntu1)
libstreams0 (0.7.2-0ubuntu1)
libxcb-shape0 (1.5-2)
libxcb-shm0 (1.5-2)
libxcb-xv0 (1.5-2)
libxine1 (1.1.17-1ubuntu3)
libxine1-bin (1.1.17-1ubuntu3)
libxine1-console (1.1.17-1ubuntu3)
libxine1-misc-plugins (1.1.17-1ubuntu3)
libxine1-x (1.1.17-1ubuntu3)
mysql-common (5.1.41-3ubuntu12.7)
oxygen-icon-theme (4:4.4.2-0ubuntu2)
packagekit (0.5.7-0ubuntu2.1)
packagekit-backend-apt (0.5.7-0ubuntu2.1)
phonon (4:4.6.2-0ubuntu5.1)
phonon-backend-xine (4:4.4.0-0ubuntu2)
plasma-scriptengine-javascript (4:4.4.2-0ubuntu4.1)
polkit-kde-1 (0.95.1-2ubuntu1)
python-kde4 (4:4.4.2-0ubuntu2)
python-packagekit (0.5.7-0ubuntu2.1)
python-qt4 (4.7.2-0ubuntu1)
python-sip (4.10.1-0ubuntu1)
shared-desktop-ontologies (0.3-1)
software-properties-kde (0.75.10.1)
soprano-daemon (2.4.2+dfsg.1-0ubuntu1.1)
ttf-dejavu (2.30-2)
ttf-dejavu-extra (2.30-2)
update-manager-kde (1:0.134.11)
virtuoso-nepomuk (6.1.0-0ubuntu3)
10.  hd temp monitor
hddtemp (0.3-beta15-45)
11.  module assistant
mdadm (2.6.7.1-1ubuntu15)
module-assistant (0.11.2ubuntu1)
postfix (2.7.0-1)
12.  subversion
libapr1 (1.3.8-1build1)
libaprutil1 (1.3.9+dfsg-3build1)
libsvn1 (1.6.6dfsg-2ubuntu1)
subversion (1.6.6dfsg-2ubuntu1)
13.  zoneminder (pulled in apache2)
apache2 (2.2.14-5ubuntu8.3)
apache2-mpm-prefork (2.2.14-5ubuntu8.3)
apache2-utils (2.2.14-5ubuntu8.3)
apache2.2-bin (2.2.14-5ubuntu8.3)
apache2.2-common (2.2.14-5ubuntu8.3)
ffmpeg (4:0.5.1-1ubuntu1)
libapache2-mod-php5 (5.3.2-1ubuntu4.5)
libaprutil1-dbd-sqlite3 (1.3.9+dfsg-3build1)
libaprutil1-ldap (1.3.9+dfsg-3build1)
libarchive-zip-perl (1.30-2)
libavcodec52 (4:0.5.1-1ubuntu1)
libavdevice52 (4:0.5.1-1ubuntu1)
libavfilter0 (4:0.5.1-1ubuntu1)
libavformat52 (4:0.5.1-1ubuntu1)
libavutil49 (4:0.5.1-1ubuntu1)
libconvert-binhex-perl (1.119+pristine-3)
libdate-manip-perl (6.05-1)
libdbd-mysql-perl (4.012-1ubuntu1)
libdbi-perl (1.609-1build1)
libdc1394-22 (2.1.2-2)
libdevice-serialport-perl (1.04-2)
libemail-date-format-perl (1.002-1)
libgsm1 (1.0.13-3)
libhtml-template-perl (2.9-1)
libio-stringy-perl (2.110-4)
libmime-lite-perl (3.027-1)
libmime-perl (5.427-2)
libmime-tools-perl (5.427-2)
libmime-types-perl (1.28-1)
libnet-daemon-perl (0.43-1)
libphp-serialization-perl (0.33-1)
libplrpc-perl (0.2020-2)
libpostproc51 (4:0.5.1-1ubuntu1)
libschroedinger-1.0-0 (1.0.9.is.1.0.8-0ubuntu1)
libswscale0 (4:0.5.1-1ubuntu1)
libyaml-syck-perl (1.07-1build1)
mysql-client-5.1 (5.1.41-3ubuntu12.7)
mysql-client-core-5.1 (5.1.41-3ubuntu12.7)
mysql-server (5.1.41-3ubuntu12.7)
mysql-server-5.1 (5.1.41-3ubuntu12.7)
mysql-server-core-5.1 (5.1.41-3ubuntu12.7)
php5 (5.3.2-1ubuntu4.5)
php5-common (5.3.2-1ubuntu4.5)
php5-mysql (5.3.2-1ubuntu4.5)
zoneminder (1.24.2-2build3)
15.  phpmyadmin
dbconfig-common (1.8.44ubuntu1)
javascript-common (7)
libjs-mootools (1.2.4.0~debian1-1)
libmcrypt4 (2.5.8-3.1)
libt1-5 (5.1.2-3build1)
php5-gd (5.3.2-1ubuntu4.5)
php5-mcrypt (5.3.2-0ubuntu1)
phpmyadmin (4:3.3.2-1)
wwwconfig-common (0.2.1)
16.  registry tools (edit windows registries remotely)
libreadline5 (5.2-7build1)
libregistry-dev (4.0.0~alpha8+git20090912-1)
libregistry0 (4.0.0~alpha8+git20090912-1)
registry-tools (4.0.0~alpha8+git20090912-1)
17. x3270
3270-common (3.3.7p7-1build2)
c3270 (3.3.7p7-1build2)
x3270 (3.3.7p7-1build2)
xfonts-x3270-misc (3.3.7p7-1build2)
18. thunderbird
thunderbird (3.0.10+build1+nobinonly-0ubuntu0.10.04.1)
thunderbird-dbg (3.0.10+build1+nobinonly-0ubuntu0.10.04.1)
thunderbird-dev (3.0.10+build1+nobinonly-0ubuntu0.10.04.1)
thunderbird-gnome-support (3.0.10+build1+nobinonly-0ubuntu0.10.04.1)
thunderbird-gnome-support-dbg (3.0.10+build1+nobinonly-0ubuntu0.10.04.1)
19.  build environment
autoconf (2.67-2ubuntu1)
autoconf2.59 (2.59-1)
automake (1:1.11.1-1)
automake1.9 (1.9.6+nogfdl-3ubuntu3)
autotools-dev (20100122.1)
bison (1:2.4.1.dfsg-3)
bzr (2.2.1-0ubuntu1)
bzrtools (2.2.0-2)
cvs (1:1.12.13-12ubuntu1)
diffstat (1.53-1)
gcc-4.4-doc (4.4.4-14ubuntu5)
gcc-4.4-source (4.4.4-14ubuntu5)
gcc-doc (4:4.4.4-1ubuntu2)
gettext (0.18.1.1-1ubuntu2)
libc6-dbg (2.12.1-0ubuntu9)
libdrm-dev (2.4.21-1ubuntu2.1)
libdw1 (0.147-2)
libgl1-mesa-dev (7.9~git20100924-0ubuntu2)
libglu1-mesa-dev (7.9~git20100924-0ubuntu2)
libkms1 (2.4.21-1ubuntu2.1)
libltdl-dev (2.2.6b-2ubuntu1)
libpthread-stubs0 (0.3-2)
libpthread-stubs0-dev (0.3-2)
libqt4-declarative (4:4.7.0-0ubuntu4)
libqt4-dev (4:4.7.0-0ubuntu4)
libqt4-opengl-dev (4:4.7.0-0ubuntu4)
libqt4-sql-sqlite (4:4.7.0-0ubuntu4)
libqtwebkit-dev (2.0.0-0ubuntu1)
libssl-dev (0.9.8o-1ubuntu4.2)
libtool (2.2.6b-2ubuntu1)
libunistring0 (0.9.3-1)
libx11-dev (2:1.3.3-3ubuntu1)
libxau-dev (1:1.0.6-1)
libxcb1-dev (1.6-1)
libxdmcp-dev (1:1.0.3-2)
linux-source (2.6.35.23.25)
linux-source-2.6.35 (2.6.35-23.40)
linux-tools-2.6.35-23 (2.6.35-23.40)
linux-tools-common (2.6.35-23.40)
m4 (1.4.14-3)
mesa-common-dev (7.9~git20100924-0ubuntu2)
patchutils (0.3.1-2build1)
php5-dev (5.3.3-1ubuntu9.1)
python-configobj (4.7.2+ds-1)
python-dbg (2.6.6-2ubuntu1)
python-dbus-dbg (0.83.0-1ubuntu3)
python-paramiko (1.7.6-2)
python2.6-dbg (2.6.6-5ubuntu1)
qt4-designer (4:4.7.0-0ubuntu4)
qt4-dev-tools (4:4.7.0-0ubuntu4)
qt4-doc (4:4.7.0-0ubuntu4)
qt4-qmake (4:4.7.0-0ubuntu4)
quilt (0.48-7)
samba-dbg (2:3.5.4~dfsg-1ubuntu8)
shtool (2.0.8-4)
valgrind (1:3.6.0~svn20100724-0ubuntu2)
x11proto-core-dev (7.0.17-1)
x11proto-input-dev (2.0-2)
x11proto-kb-dev (1.0.4-1)
xtrans-dev (1.2.5-1)
zlib1g-dev (1:1.2.3.4.dfsg-3ubuntu1)
20.  evtest
evtest (20051019-12)

21.  Wine
cabextract (1.3-1)
gnome-exe-thumbnailer (0.7-0ubuntu1)
kdegraphics-libs-data (4:4.5.1-0ubuntu3)
khelpcenter4 (4:4.5.1-0ubuntu3.1)
libglew1.5 (1.5.2-0ubuntu1)
libkcddb4 (4:4.5.1-0ubuntu1)
libksane0 (4:4.5.1-0ubuntu3)
libmpg123-0 (1.12.1-3ubuntu1)
libopenal1 (1:1.12.854-2)
libpoppler-qt4-3 (0.14.3-0ubuntu1.1)
libqimageblitz4 (1:0.0.6-0ubuntu2)
libyaz4 (4.0.10-1)
mesa-utils (8.0.1-0ubuntu1)
playonlinux (3.7.6-1)
python-wxgtk2.8 (2.8.11.0-0ubuntu4)
python-wxversion (2.8.11.0-0ubuntu4)
q4wine (0.118-4)
sqlite3 (3.7.2-1)
tellico (2.2-5)
tellico-data (2.2-5)
tellico-scripts (2.2-5)
ttf-mscorefonts-installer (3.2)
ttf-symbol-replacement (1.2.1-0ubuntu1)
winbind (2:3.5.4~dfsg-1ubuntu8)
wine1.2 (1.2.1-0ubuntu1)
wine1.2-dbg (1.2.1-0ubuntu1)
wine1.2-dev (1.2.1-0ubuntu1)
wine1.2-gecko (1.0.0-0ubuntu4)
22.  flash
adobe-flashplugin (10.1.102.65-2maverick1)
23.  installed from third party hulu video player.
adobe flash was required to make that go.

Sunday, November 28, 2010

Demon in bash

http://blog.n01se.net/?p=145

Has a handy  howto to demonize a bash script. 

Copied here for reference.  Not my work, work of agriffis

daemonizing bash

April 20th, 2010 by agriffis
Before we jump into this, let's be clear about intent: There are better languages for writing daemons than bash. Honestly, any other language is probably a better choice. Writing a daemon implies that you're writing a sufficiently complex program that bash is already the wrong language, with or without daemonization!
But if you find yourself in the unfortunate position of needing to daemonize an existing bash program, and you'd rather put off rewriting it in a more suitable language, keep reading! I found myself in that position recently and kept some notes.
Daemonizing a process consists of two primary tasks: forking to the background to return control to the shell, and preventing undesirable interaction between the process and the host. Rich Stevens enumerated the steps in his classic Advanced Programming in the UNIX Environment. Here's my summary of his formula with implementation notes for bash.
  1. Call fork (to guarantee the child is not a process group leader, necessary for setsid) and have the parent exit (to allow control to return to the shell). Forking in bash is a simple matter of putting a command in the background using "&". To put a sequence of commands in the background, use a subshell: "( commands ) &". Note that bash doesn't provide any method for the child process to continue the same execution path as the parent, so the entirety of the child must be contained in the subshell. The easiest way to do this is implement the child as a bash function: "childfunc &".
  2. Call setsid to create a new session so the child has no controlling terminal. This simultaneously prevents the child from gaining access to the controlling terminal (using /dev/tty) and protects the child from signals originating from the controlling terminal (HUP and INT, for example). Bash provides no method to call the setsid syscall for the current process. We have two less-than-ideal alternatives:
    1. The util-linux-ng package provides an external setsid command but this daemonizes an external command rather than the currently running script. It also makes collecting the PID of the child tricky because the setsid command will fork internally. Having said all that, if your application allows you to use the setsid command, it's a good choice because bash can't otherwise fully protect against the child process opening /dev/tty. It's still a good idea to redirect std* to prevent stray output to the terminal.
    2. Lacking the setsid syscall, there are steps we can take to partially protect the child process from the effects of the controlling terminal:
      1. Redirect std* to files or /dev/null
      2. Guard against HUP and INT by signal handler in child
      3. Guard against HUP by disown -h in parent
      Unfortunately without setsid there is no way to guard completely against a subchild opening /dev/tty until the terminal emulator exits, then /dev/tty will become unavailable.
  3. Change working directory to / to prevent the daemon from holding a mounted filesystem open. Bash is good at this. :-)
  4. Set umask to 0 to clear file mode creation mask. I have to admit that I can't understand the point of this, in bash or any other language. It seems to me that the child will either set its umask explicitly before creating files, or it will set individual file permissions explicitly, or it will fall back on the caller's umask. In the last case, I want my inherited umask, not the wide-open zero. If anybody wants to explain a good reason for step 4, I'm all ears... Until then, it's commented out in my implementation below.
  5. Close unneeded file descriptors. This step is fun in bash using eval and brace expansion...
With those notes in-hand, here's my implementation. There are two
functions here, "daemonize" for an external command using setsid,
"daemonize-job" for a function in the running script.

# redirect tty fds to /dev/null
redirect-std() {
    [[ -t 0 ]] && exec </dev/null
    [[ -t 1 ]] && exec >/dev/null
    [[ -t 2 ]] && exec 2>/dev/null
}
# close all non-std* fds
close-fds() {
    eval exec {3..255}\>\&-
}
# full daemonization of external command with setsid
daemonize() {
    (                   # 1. fork
        redirect-std    # 2.1. redirect stdin/stdout/stderr before setsid
        cd /            # 3. ensure cwd isn't a mounted fs
        # umask 0       # 4. umask (leave this to caller)
        close-fds       # 5. close unneeded fds
        exec setsid "$@"
    ) &
}
# daemonize without setsid, keeps the child in the jobs table
daemonize-job() {
    (                   # 1. fork
        redirect-std    # 2.2.1. redirect stdin/stdout/stderr
        trap '' 1 2     # 2.2.2. guard against HUP and INT (in child)
        cd /            # 3. ensure cwd isn't a mounted fs
        # umask 0       # 4. umask (leave this to caller)
        close-fds       # 5. close unneeded fds
        if [[ $(type -t "$1") != file ]]; then
            "$@"
        else
            exec "$@"
        fi
    ) &
    disown -h $!       # 2.2.3. guard against HUP (in parent)
}

Photo tool

A nice tool is Picapy, which is a simple graphical interface to add and remove photos to Picassa Web photos.

http://www.webupd8.org/2010/11/easily-upload-images-to-picasweb-using.html

by Lorenzo Carbonell

Once installed, you can add it to the gnome menu at /usr/share/picapy/picapy.py.  It does not get installed when you install it.

 

video players for Ubuntu 10.10

Hulu

download a deb file here. It will require a key to install.

http://www.hulu.com/labs/hulu-desktop-linux
dpkg --install huludesktop_i386.deb

Once it is installed, you will need to update flash. The easiest way to do that is to run huludesktop and let it do it. Prior to that, the key for the adobe flash player will need to be retrieved. The following will do that, and allow the install to run thru.

This is the version needed, Adobe Flash Player 10.0.32.

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DB141E2302FDF932

Run hulu

Video editor
from VLC bunch.  currently in alpha release
VLMC

sudo add-apt-repository ppa:webupd8team/vlmc
sudo apt-get update
sudo apt-get install vlmc frei0r-plugins
 

Logical Volume Groups

To create a backup of the main data on my raid system for removal offsite, I'm using 2 2tb drives.  I attach them to a utility system and create a Logical Volume group which fills both.  the current set I'm using was created by installing a system and allowing it to create the LVM spanning both drives.  As such one of the drives has a few gb of space at the front with a root boot partition, which is a primary partition not in the LVM.  On the original system once booted, the LVM had the root, home and another boot partiton inside the LVM.

In order to mount this one needs to install some tools on the system.  I found a page advising to install two gui's which are quite useful.

One is a KDE utility KVPM.  It or the other utility drags in the lvm tools.  Another one is system-config-lvm.

http://ossnotebook.blogspot.com/2009/02/lvm-tools-in-ubuntu-jaunty.html

The command line tools allow installation of the lvm.  The lvm scans all disks for logical volume groups.  These are marked with unique ID's from when they are created.  All are shown via the commands in the lvm command.

vgdisplay shows information on the volume group:
  --- Volume group ---
  VG Name               vg_apex2
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               3.64 TiB
  PE Size               32.00 MiB
  Total PE              119216
  Alloc PE / Size       119216 / 3.64 TiB
  Free  PE / Size       0 / 0
  VG UUID               ISZMQ4-BNdD-J9Cf-f72S-GgiI-TslM-w8sSqm


pvs shows the physical information
lvm> pvs
  PV         VG       Fmt  Attr PSize PFree
  /dev/sdb2  vg_apex2 lvm2 a-   1.82t    0
  /dev/sdc1  vg_apex2 lvm2 a-   1.82t    0


pvdisplay shows more information on the volumes

lvm> pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb2
  VG Name               vg_apex2
  PV Size               1.82 TiB / not usable 28.00 MiB
  Allocatable           yes (but full)
  PE Size               32.00 MiB
  Total PE              59600
  Free PE               0
  Allocated PE          59600
  PV UUID               cdqH1r-Z873-mmC4-XZpY-Vsrc-YXd1-PwF8VS

  --- Physical volume ---
  PV Name               /dev/sdc1
  VG Name               vg_apex2
  PV Size               1.82 TiB / not usable 16.00 MiB
  Allocatable           yes (but full)
  PE Size               32.00 MiB
  Total PE              59616
  Free PE               0
  Allocated PE          59616
  PV UUID               hJyfL3-RbkR-SxbM-ffHk-q70G-1iu9-6r58yx


The next thing that has to be performed is to make the volume group visible to the system.  The vgchange -ay makes the volume group active.  Once it is active /dev/vg* will be visible and the members of each vg directory are the file systems.  After the vgchange is performed, all the need be done is to mount the volume group, such as;

mount /dev/vg_apex2/lv_home /apex2

Wednesday, November 24, 2010

Signing a Java app

I have been trying to run a java app which will open a port on a machine other than the one which it is downloaded from.  someone suggested a signed app would work, where an unsigned one does not.

Here is how to sign the app.  first you have to have the java sdk on your system.

use keytool to create an alias with a password.  Answer questions asked to create a key.  A file .keystore will be created with the certificate you create.

keytool -genkeypair -alias jws

Use jarsigner to sign the jar.  Use the alias you created above to sign the jar.

jarsigner VncViewer.jar jws (for example).

You will be for the password used in the keytools command.

Your jar will now cause a prompt when you load it on the browser with a query about if you trust the author.

This didn't fix the problem with the network, but it was useful enough to note.

http://download.oracle.com/javase/tutorial/deployment/jar/signing.html
http://download.oracle.com/javase/6/docs/technotes/guides/security/SecurityToolsSummary.html

Oracle trashed all the links into the Sun java pages when they moved them to their domain, so this information is probably linked to a million times, but the links now go to the generic oracle forum pages.  Still hunting for how to authorize a connection to another IP.

Sunday, November 21, 2010

replication a local repository for Ubuntu

I decided to figure out how to replicate a local install repository for Ubuntu. Since 10.4.1 is working well, I started with it but probably will do 10.10 as well when I figure this out.

Here is a link to how to create a repository locally. It has a good walk through and allows making a setup for hosting individual packages. The other bit is to download all the packages, about 30gb for the entire repository. That is running since this morning at 730 (about 17 hours so far) and reads that the process is 58% complete as of midnight the same day. Total downloaded so far is 18gb.

Here is the howto for the repositories:
http://nerdica.com/?p=43

Here is how to download the repositories. It includes a discussion of how to break it up and store on DVD as well, but has the recipes for getting it in the first place
http://www.howtoforge.com/dvd_images_of_ubuntu_repositories

Here is a discussion on the ubuntu forums
http://ubuntuforums.org/showthread.php?t=352460

APTonCD
http://aptoncd.sourceforge.net/

update:
here is another method to create the repository mirror:
http://www.debian.org/mirror/ftpmirror
list or repositories:
http://www.debian.org/distrib/archive

Friday, November 19, 2010

Old references

References




link rpm  
urpmi
make

time

awk

solaris  

dhcp

ssh

video


html

wylbur

word


c references

misc reference pages

Don Nelson resume


computer
collections


X setup

radio
stations



development

install
tricks


html
ref popup



vet

installation

ftp netrc


signals










References

David Taylor
SW             

    
http://www.david-taylor.pwp.blueyonder.co.uk/

Computerworld Sharktank http://www.computerworld.com/departments/opinions/sharktank/

Inside
KSC                 
        
http://www.insideksc.com/

Techdirt                  

              http://www.techdirt.com/

Slashdot                  

            http://slashdot.org/

The Register                

       http://www.theregister.co.uk/

The smoking
gun             
 
http://www.thesmokinggun.com/archive/archive.html

Google                            
    
http://www.google.com

yahoo
groups                  

  
http://groups.yahoo.com/

groklaw             
                
  http://www.groklaw.com/


bad                                
      
ananova
 

blogs, linux
help                 
http://linuxhelp.blogspot.com/

audio recorder            

         http://audacity.sourceforge.net/

pc beep codes,
etc             
http://www.pchell.com/hardware/beepcodes.shtml

this old
house                       toh



Weather

ucar weather
pages           

http://www.ucar.edu/tools/   
weather http://www.rap.ucar.edu/weather/ 
water http://www.spl.usace.army.mil/resreg/

faa
charts                     
        http://www.airnav.com


rolla
radio                       

    
link

acme map of
rolla             
map



Linux

code search
engine     
       
http://www.koders.com/

linux usb device ref site        http://www.qbik.ch/usb/devices/


SiliconPenguin               
     
http://www.siliconpenguin.com

Linux
Devices             
         
http://linuxdevices.com/


fedora core
forum           
 
  
http://www.fedoraforum.org/

linux links           
                

  http://www.linuxlinks.com/

fedora core
forum          
  
  
http://www.fedoraforum.org/


Kernel.org                   
         
http://www.kernel.org/


Linux
Journal                  
  
  
http://www.linuxjournal.com/

Linux
Magazine          
     
   

http://www.linux-mag.com

uCdot.org                      
       
http://ucdot.org/

single cd linux
router            http://www.wifi.com.ar/


distro list
site                    
   
http://www.linuxvm.org/Info/distros.html

linux cross
reference           
http://lxr.linux.no/

redhat updates
(LSU)          http://redhat.lsu.edu/

elinux                                
    

http://eLinux.org/

linux
questions                    
http://www.linuxquestions.org/

linux reference
list               
http://world.std.com/~franl/linux.html

general
references              
http://world.std.com/~franl/tech.html






Linux
Video




Knoppmyth  
              
  
www.mysettopbox.tv/knoppmyth.html

Fedora
Myth                  
Myth(ology)


Handbrake (dvd reformat)  http://handbrake.m0k.org/

http://linuxdevices.com/articles/AT8045009705.html

http://ffmpeg.sourceforge.net/ffmpeg-doc.html#SEC3

https://sourceforge.net/docman/display_doc.php?docid=3456&group_id=5776

$ ../xawtv/bin/streamer -b 64 -t 20:00 -s 352x240 -n pal -r 25 -j 80 -o

test2.avi -f mjpeg -F stereo

http://www.linuxjournal.com/article/5817


http://gstreamer.freedesktop.org/modules/gst-editor.html

http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuide

http://camsource.sourceforge.net/

http://www.avisynth.org/

http://heroinewarrior.com/firehose.php3

http://www.linuxjournal.com/article/7615

http://xinehq.de/

http://heroinewarrior.com/bcast2000/recording.html#VIDEO4LINUX

http://www.linuxis.us/linux/media/howto/linux-htpc/index.html





High
Availability + ISCSI

Heartbeat 1.2.2

CorRAID AoE

iSCSI
Init                              
       
http://iscsi-init.sourceforge.net/

iSCSI
Target                         
      

howto 
iSCSI Enterprise
Target


gnbd                                      
       
http://www.redhat.com/--gnbd 
Global Network Block Device

microsquish                                
server
2000
  discussion




==

unsorted list of links

http://eric_rollins.home.mindspring.com/genezzo/cluster.html
http://opengfs.sourceforge.net/
http://opendlm.sourceforge.net/
http://hilli.dk/howtos/ata-over-ethernet-aoe-in-gentoo-linux/
http://lpk.com.price.ru/~lelik/AoE/
http://freshmeat.net/projects/vblade/
http://www.linuxjournal.com/node/8149/print
http://www.coraid.com/documents/AoEDescription.pdf
http://acd.ucar.edu/~fredrick/linux/etherdrive/
http://evblade.kwaak.net/
                     



fun toy pages

tesla coils

bookmarks

ntsb aviation accidents


windows utility stuff, and usb
dongle stuff

usb and cd
stuff                 
http://www.911cd.net/forums//index.php?act=idx

bartpe                         
        

http://www.nu2.nu/pebuilder/


openvms                  
          
http://wiz.openvms.org/

open source mv(pick)        http://easyco.com/

file format info
page           http://www.fileformat.info/

opensolaris                  

     
source


legal terms (most
latin)       Latin




http://lxr.linux.no/                       
                   

      
Linux Cross Reference, Browse code online


http://www.osdir.com/Downloads.phtml                              
    linux disto index


http://www.idevelopment.info/data/Unix/Linux/UNIX_Linux_home.shtml  
- handy linux howtos,
printer, rpm...



http://www.fujitsu.co.jp/hypertext/ssworld/function/raid/raid_e.html

- simple RAID intro with nice diagrams


http://www.linuxdoc.org/FAQ/Linux-RAID-FAQ/                         
- Linux-RAID Frequently Asked Questions


http://unthought.net/Software-RAID.HOWTO/                           
- The Software RAID How-to


http://people.redhat.com/mingo/raid-patches/                 
       - software RAID patches


http://people.redhat.com/mingo/raidtools/

           
               -
RAID tools


http://www.kernel.org/pub/linux/kernel/people/hedrick/
              - ide
patches, including Promise



http://www.namesys.com/        
           
           
             -
ReiserFS
journaling FS


http://marc.theaimsgroup.com/?l=linux-raid

- Linux-RAID mailing-list archive


http://lists.omnipotent.net/reiserfs/ 
ReiserFS mailing-list archive


http://www.linuxdoc.org/HOWTO/Boot+Root+Raid+LILO.html
- Boot+Root+RAID+LILO How-to


http://www.raidweb.com/ide.html
           
           

             -
RAIDWeb By Electonix - IDE RAID Units


http://www.raidzone.com/                                            
-
RAIDZONE
- High performance disk

                                                                       
arrays using Ultra ATA disks




http://www.uwsg.iu.edu/hypermail/linux/kernel/                      
- Linux-Kernel mailing-list archive



http://www.best.com/~cae/irqtune/                                   
- IRQTUNE -- A Linux IRQ Priority Optimizer


http://linuxgazette.com/issue55/florido.html                        
- "Journal File Systems" article

                                                                           
from Linux Gazette issue 55


http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html
- ext3 (ext2 compatible) journaling FS


ftp://ftp.kernel.org/pub/linux/kernel/people/sct/ext3               

- ext3 source


http://oss.sgi.com/projects/xfs/                                    
- XFS journalling file system from SGI, beta


http://innominate.org/~phillips/                                    
- tux2 journalling file system


mailto:majordomo@vger.kernel.org                                    
- subscribe linux-raid


http://linas.org/linux/raid.html                                    
- RAID solutions for Linux



http://www.linuxdoc.org/HOWTO/mini/Ultra-DMA-5.html                 
- The Linux

                                                            
Ultra-DMA Mini-Howto: Off-board PCI UDMA interfaces


http://www.darmon.de/hardware/hardware.html                         
- how to turn a Promise

                                                            
Ultra66/100 into a FastTrak66/100 (German)


http://www.anandtech.com/showdoc.html?i=1197                        

- Ultra ATA/66 Hard Drive Roundup


 


http://www.servercase.com/                                          
- see
advanced
level server cases



http://www.jinco.com/                                               
- cases,
including
file
server
cases



http://www.enhance-tech.com/                                        

- see Products: Server Chassis


http://www.pricewatch.com/                                          
- see CPU: Cases



Misc Info

 Lynn
Wheeler                                               
http://www.garlic.com/~lynn/




URPMI
website


http://urpmi.org

Mandrake tips for
Free


http://www.mandrake.tips.4.free.fr/



downloads

http://majorgeeks.com/

http://www.soft32.com/



other links

google maps links   http://www.lifehack.org/articles/lifehack/essential-resources-for-google-maps.html






HP
1000 computer






RPM
tricks
 
http://www.idevelopment.info/data/Unix/Linux/LINUX_RPMCommands.shtml

This document contains an overview of the principal RPM commands
for installing, uninstalling, upgrading, querying, listing, and
checking RPM packages on your Red Hat Linux system.

rpm search site




# rpm -ivh foo-2.0-4.i386.rpm
# rpm -i ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm
# rpm -i http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm
Used to install a RPM package. Note that RPM
packages have file naming conventions like foo-2.0-4.i386.rpm,
which include the package name (foo), version (2.0), release (4), and
architecture (i386). Also notice that RPM understands FTP and HTTP
protocols for installing and querying remote RPM files.



# rpm -e foo
To uninstall a RPM package. Note that we used the
package name foo, not the name of the original package file foo-2.0-4.i386.rpm

above.


# rpm -Uvh foo-1.0-2.i386.rpm
# rpm -Uvh ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm
# rpm -Uvh http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm
To upgrade a RPM package. Using this command, RPM
automatically uninstall the old version of the foo package
and install the new package. It is safe to always use rpm -Uvh

to install and upgrade packages, since it works fine even when there
are no previous versions of the package installed! Also notice that RPM
understands FTP and HTTP protocols for upgrading from remote RPM files.


# rpm -qa
To query all installed packages. This command will
print the names of all installed packages installed on your Linux
system.



# rpm -q foo
To query a RPM package. This command will print
the package name, version, and release number of the package foo
only if it is installed. Use this command to verify that a package is
or is not installed on your Linux system.



# rpm -qi foo
To display package information. This command
display package information including the package name, version, and
description of the installed program. Use this command to get detailed
information about the installed package.


# rpm -ql foo

To list files in installed package. This command
will list all of files in an installed RPM package. It works only when
the package is already installed on your Linux system.


# rpm -qf /usr/bin/mysql
mysql-3.23.52-3
Which package owns a file? This command checks to
determine which installed package a particular file belongs to.



# rpm -qpl kernel-2.4.20-18.10.1.i686.rpm
# rpm -qpl ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm
# rpm -qpl http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm
List files in RPM file. This command allows you to
query a (possibly) uninstalled RPM file with the use of the the "-p"
option. You can use the "-p" option to operate on an RPM file without
actually installing anything. This command lists all files in an RPM
file you have in the current directory. Also note that RPM can query
remote files through the FTP and HTTP protocols.



# rpm --verify mysql
To verify an installed package. This command will
list all files that do NOT pass the verify tests (done on size, MD5
signature, etc). Where a file does NOT pass, the output is listed using
the following codes that signify what failed:
S File size
M Mode (includes permissions and file type)
5 MD5 sum
L Symlink 
D Device 
U User 
G Group 
T Mtime

Take for example the following:
# rpm --verify mysql
S.5....T c /etc/my.cnf
This example indicates that file /etc/my.cnf failed on:
File size 
MD5 Sum 
Modified Time 

However, the "c" tells us this is a configuration file so that explains
the changes. It should still be looked at to determine what the changes
were.


# rpm --checksig foo
To check a RPM signature package. This command
checks the PGP signature of specified package to ensure its integrity
and origin. Always use this command first before installing a new RPM
package on your system. Also, GnuPG or Pgp software must be already
installed on your system before you can use this command.









urpmi



urpmi for mandrake configuration.  following adds mounted cd's to
search list.  note that the path you select

is the one with all the .rpm's.  this isn't really specified
anywhere that well.  No clue whether hdlist is good to go,


or synthesis.hdlist is.  I selected synthesis and it seemed to
install mozilla.



the "relative" path that is asked for is the one to get to the hdlist
from wherever the rpms are.



The /etc/urpmi/urpmi.cfg file will contain a key number.  If
messing with this, it is not clear where this comes

from.  It may be from the md5 checksums on the rpms, or somewhere
else. If manually messing with the

config what is not known is where that comes from






urpmi.addmedia cd1  file://exportiso/mandrake-cd1/media/main with
../media_info/synthesis.hdlist1.cz

urpmi.addmedia cd2  file://exportiso/mandrake-cd2/media/main2 with
media_info/synthesis.hdlist.cz

urpmi.addmedia cd3  file://exportiso/mandrake-cd3/media/main3 with
media_info/synthesis.hdlist.cz



following are paths of mounted cd images on the system. 




directory contains images:

//eng-w2k/LinuxDownloads on /export/eng-w2k-linuxdownloads type smbfs
(0)



images are loop mounted this way:

/export/eng-w2k-linuxdownloads/Mandrake/Mandrakelinux-10.1-Community-Download-CD1.i586.iso
on /exportiso/mandrake-cd1 type iso9660 (rw,loop=/dev/loop0)

/export/eng-w2k-linuxdownloads/Mandrake/Mandrakelinux-10.1-Community-Download-CD2.i586.iso
on /exportiso/mandrake-cd2 type iso9660 (rw,loop=/dev/loop1)

/export/eng-w2k-linuxdownloads/Mandrake/Mandrakelinux-10.1-Community-Download-CD3.i586.iso
on /exportiso/mandrake-cd3 type iso9660 (rw,loop=/dev/loop2)



http://vsbabu.org/mt/archives/2003/04/30/mandrake_91_adding_original_cds_to_software_sources.html




***********************

set up URPMI from remote site

example:

settings

1) Core distribution:







Other sources::









urpmi.addmedia plf-free
ftp://ftp.planetmirror.com/pub/plf/mandrake/free/10.1 with hdlist.cz


urpmi.addmedia plf-nonfree
ftp://ftp.planetmirror.com/pub/plf/mandrake/non-free/10.1 with
hdlist.cz


urpmi.addmedia main
ftp://ftp.caliu.info/pub/distribucions/mandrake/devel/10.1/i586/media/main
with media_info/hdlist.cz



urpmi.addmedia contrib
ftp://ftp.caliu.info/pub/distribucions/mandrake/devel/10.1/i586/media/contrib
with media_info/hdlist.cz


urpmi.addmedia jpackage
ftp://ftp.caliu.info/pub/distribucions/mandrake/devel/10.1/i586/media/jpackage
with media_info/hdlist.cz




compose new remote urpmi tool:

http://easyurpmi.zarb.org/



the above tool will create the urpmi statement for you for mandrake /
mandriva to make urpmi couple to a remote site.



the good news about urpmi is that it is easy to use when setup. 
the bad news is that it has about a 20mb download


database required to couple it into the system you are installing
on.  After you do the urpmi addmedia, it takes a

nontrivial amount of time to download the contrib file.








Summary

  • /etc/sysconfig/clock sets whether the hardware clock
    is stored as UTC or local time.
  • Symlink /etc/localtime to /usr/share/zoneinfo/...
    to set your timezone.
  • Run ``date MMDDhhmm'' to set the current system
    date/time.
  • Type ``/sbin/hwclock --systohc [--utc]'' to set the
    hardware clock.



awk



Awk Notes

Print all fields in reverse order

This will take a "I-am-yoda" string and print out

yoda
am
i

Very useful for the next Star Wars sequel


awk -F '-' '{ for (i = NF; i > 0; --i) print $i }'

Print the last field instead of the first field

If you just want the last word, do this

echo $LOCAL | awk -F '-' '{ i = NF; print $i }'

BASH variable inside AWK command

It's rather difficult to find this on the internet. Hope it's useful.

awk -F '-' '{ i = NF; print $'${BASHVARIABLE}'}'




Make

Lifted from smp-faq:

# make [modules|zImage|bzImages] MAKE="make -jX"

Where X=max number of processes. WARNING: This
won't work for "make dep".

Since running multiple compilers allows a machine
with sufficient memory to use use the otherwise wasted CPU time during
I/O caused delays make MAKE="make -j 2" -j 2 actually even helps on
uniprocessor boxes (from Ralf B.chle).


Solaris DHCP fix

Someone else posted this solution for unknown hostname with dhcp soloaris.

First
of all, For Solaris 8 we need to edit the file /etc/init.d/network and
change the line that reads. You can put a #sign before the line to
disable it or change the line completely.

"dhcp") hostname=`/sbin/dhcpinfo Hostname` ;;

to

# "dhcp") hostname=`/sbin/dhcpinfo Hostname` ;;

"dhcp") hostname=`shcat /etc/nodename` ;;

Then, edit the file /etc/init.d/inetsvc and change the line that reads

hostname=`/sbin/dhcpinfo Hostname`

to

# hostname=`/sbin/dhcpinfo Hostname`


hostname=`/usr/bin/cat /etc/nodename`

Save the files and reboot the system. The system's hostname will be
the entry in the file /etc/nodename.

another version

****************************** sunmanagers.org

Sorry for the delay writing this Summary:

This *is* in the list archives but I found I had to really dig and piece it
together. maybe its just me. :-)

Here is what worked for me in hopes that it benifits others -  your mileage
may vary.


Create or edit the files outlined and reboot:

/etc/nodename
yourhostname

/etc/hostname.elxl0
inet yourhostname

edit /etc/default/dhcpagent and set

REQUEST_HOSTNAME=yes

Create this script:

-cut-
/etc/init.d/set_hostname
#!/sbin/sh
HOSTNAME=`cat /etc/nodename`
echo "Setting hostname to $HOSTNAME... \c"
uname -S $HOSTNAME
echo "Done."
-cut-

Symlink /etc/init.d/set_hostname to /etc/rc2.d/S70set_hostname

Thanks to Hichael Morton, Alan Pae, Paul Boven, Sid Wilroy, Gerard Henry,
Dave Miner and Mitchell Bruntel and others who replied and provided
suggestions to me.




ssh setup

source http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/advanced/node74.html



sshd settings in /etc/ssh/sshd_config

PermitRootLogin yes

X11Forwarding yes



ssh settings in /etc/ssh/ssh_config

  ForwardX11 yes

  ForwardX11Trusted yes



ssh-keygen -t rsa

[root@purple]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/cantin/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/cantin/.ssh/id_rsa.
Your public key has been saved in /home/cantin/.ssh/id_rsa.pub.
The key fingerprint is:
ba:d0:f0:0d:de:ad:be:ef:ff:aa:dd:ee:99:88:77:dd root@purple

creates .ssh/id_rsa.pub

for convenience, rename this <hostname>_id_rsa.pub  in this
case purple_id_rsa.pub

copy this to system to log into.  add to authorized_keys2 with
text edit append.



[root@purple]# cat authorized_keys2

ssh-rsa <long string of crap>= root@somehost.com


ssh-rsa <long string of crap>= root@localhost

ssh-rsa <long string of crap>= root@jws80



this has to be performed for any login id on any system



For Keepalive, use



Host *


Protocol 2

ServerAliveInterval 60

in the file

~/.ssh/config



Xwindows

X11 Session Forwarding

One lesser known feature of X windows is its network transparency.
It was
designed to be able to transmit window and bitmap information over a
network
connection. So essentially you can login to a remote desktop machine
and run
some X windows program like Gnumeric, Gimp or even Firefox and the
program will
run on the remote computer, but will display its graphical output on
your local
computer.

To try this out, you will need an account on a remote computer that
has X
windows installed with some X windows applications. suso.org servers do
not
have any such programs so you will need to either login to one of your
other
workstations or another server that does have them. The key to making
it work
is using the -X option, which means "forward the X connection through
the SSH
connection". This is a form of tunneling.


ssh -X username@desktopmachine.domain.com

If this doesn't work, you may have to setup the SSH daemon on the
remote computer
to allow X11Forwarding, check that the following lines are set in
/etc/ssh/sshd_config on
that computer:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

For some newer programs and newer versions of X windows, you may
need to use
the -Y option instead for trusted X11 forwarding. Try using this option
if your
X11 windows program fails to start running with a message like this one
that was
for Gimp:

The program 'gimp-2.2' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
(Details: serial 154 error_code 3 request_code 38 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error()

function.)

reset server keys


 How to regenerate new ssh
server keys



This is an unusual topic since most distribution create these keys for
you during the installation of the OpenSSH server package. But it may
be useful to be able generate new server keys from time to time, this
happen to me when I duplicate Virtual Private Server which contains an
installed ssh package.



 SSH1 protocol



For SSH1 protocol, you need a rsa1 key generated has follow:



ssh-keygen -q -f /etc/ssh/ssh_host_key -N '' -t rsa1

SSH2 protocol




For SSH2 protocol, you need two keys, one rsa key and one dsa key
generated has follow:

ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa

ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa




video

phillips webcam stuff, etc      http://mandrake.vmlinuz.ca/bin/view/Main/GnomeMeeting

mandriva
wiki                      

http://mandrake.vmlinuz.ca/bin/view/Main/WebHome


html



The Firefox Web browser is quickly
becoming one of the most
prominent Web browsers available. The fact that it is cross-platform
makes it a
comfortable browser for users who have to use more than one OS. There
are,
however, a number of hidden "gems" that you can enable that make
Firefox even more powerful than it is "out of the box."

To increase the speed of opening Web
pages, there are two
options you can tweak. The first is to enable HTTP pipelining, which
allows
Firefox to request multiple files simultaneously rather than one at a
time. To
enable this, type about:config in the
address bar. Scroll down the list until you find network.http.pipelining
and set it to true. You can also enable network.http.proxy.pipelining

as well.

To speed up rendering speeds, you can tell
Firefox not to wait
the default quarter second before drawing Web content. The option to
look for
here is the nglayout.initialpaint.delay,
but it may not be displayed in the preference list by default. If not,
right-click
on the screen and select New | Integer. Type nglayout.initialpaint.delay
as the preference name and the number 0
as the value. By default, Firefox uses a value of 250 (milliseconds).

Finally, the last gem is not a preference
modification but an
invaluable extension that is extremely useful for anyone doing Web
development.
In Firefox, click Tools | Extensions and a new box will open. Click on
Get More
Extensions. In the new page that opens, click on Developer Tools under
the All
Extensions sidebar. Jump to the last page and install the Web Developer
extension. Once the extension is installed, restart Firefox and you'll
see a
new toolbar with a number of options that include the ability to
quickly
validate HTML and CSS, view image dimensions, outline tables and table
cells,
and a lot more.


word

tip
page






C
references



dinkum c library
online




Ansi C draft






collections

pdp11 collection





X windows, XDM, etc

If you already have XDM up and running, you can skip ahead to the
section on customizing XDM.

http://www.linuxjournal.com/article/3325

Setting Up XDM

Setting up XDM requires you to change the run level of your system.
The run level controls which mode the
system is running in when it is rebooted. It can run in single user
mode, multiuser mode without networking,
multiuser mode with networking and multiuser mode with XDM running. My
system is Red Hat 5.1 and it uses run
level 3 for normal multiuser operation and run level 5 for XDM
operation (multiuser, plus starting X at boot
time). Edit your /etc/inittab file as the root user to change the run
level of the system. First, make sure
the XDM run level exists in /etc/inittab. It should look something like
this and is usually located near the
end of the file:


# Run XDM in run level 5
x:5:respawn:/usr/bin/X11/xdm -nodaemon

This is the entry from Red Hat 5.1. Slackware, Debian, SuSE and
other Linux Distributions with X should be
similar. The run level number is 5 in this case, but may be different
in your distribution.

You can test the XDM run level by typing init 5. If the
login box appears and everything looks
okay, you can change the default initlevel for bootup or experiment
with the XDM changes without rebooting
your system. If you don't want XDM to start at boot time, skip ahead to
the next section.

Make a backup copy of the /etc/inittab file before you change
anything. Rename it to something like
inittab.bak.1, then look for the initdefault line, which is usually
near the start of the /etc/inittab file.
Since you are not yet running XDM, yours probably looks something like
this:

id:3:initdefault:

To make your system start XDM at boot time, you change the 3 in this
line to equal the number in the XDM
run level line. In my case, I changed the 3 to a 5. Reboot your system,
and a gray screen with a box in the
middle asking for a user name and password will
appear. You can log in and make sure everything is running
okay, but that isn't necessary to complete this tutorial.


Customizing XDM

Now that XDM is up and running, we can start making changes. We will
be switching between a text-mode
login and the XDM screen. To get to the text mode console, press
<H>ctrl<H>-<H>alt<H>-F1; to get back to
the XDM screen, press
<H>ctrl<H>-<H>alt<H>-F7. With some
distributions, you may have to use

<H>ctrl<H>-<H>alt<H>-F6 for the XDM
screen.

Change to text mode and log in as root. Change directories to
/usr/lib/X11/xdm and look at the files
present in this directory. These files control the behavior of your
system when XDM is started and a user
logs in using XDM. The files we are concerned with are:



  • Xsetup (or Xsetup_0), which sets up the XDM screen


  • Xresources, which controls the behavior of the xlogin widget


Changing the Background Color

Let's start by changing the background color to something other than
gray. You can use any program which
can display an image or color on the background, which is sometimes
called the root window. One program
included with the X distribution is xsetroot.
Edit the Xsetup file and
comment out any programs that may already be setting the background
image, like xbanner, xv or xsetroot. Add
the following line:

/usr/X11R6/bin/xsetroot -solid steelblue

Color names like steelblue are defined in the /usr/lib/X11/rgb.txt
file. This maps color names to the
actual Red/Green/Blue color settings, making things more readable. If
you use a color name that has spaces in
it, you need to enclose them in quotes, e.g., ``navy blue''.

Save the Xsetup file and switch back to the XDM display by using
<H>ctrl<H>-<H>alt<H>-F7 (or F6,
depending on which virtual console the
X server is using for its display). Then restart XDM by pressing

<H>ctrl<H>-<H>alt<H>-<H>backspace<H>.
Note: do not use the
<H>del<H> key. It will reboot the whole system
instead of just restarting XDM.


You should now have a nice, solid steel-blue background. You can
experiment with different colors until
you find one that you like.

Changing the Background Pattern

A bitmap can be used to tile (copied over and over to cover the
whole display) a simple two-color image
onto the background instead of a solid color. There should be a
collection of bitmaps in
/usr/include/X11/bitmaps. You can also create your own using the bitmap
program included with X windows. Try
changing the xsetroot line to this:

/usr/X11R6/bin/xsetroot -bitmap\
/usr/include/X11/bitmaps/xsnow

Restart XDM as before, and you should now have a nice winter scene.
You can change the foreground and
background color with the bitmap by adding the -fg and -bg

options and specifying a color. Try
changing it to this:

/usr/X11R6/bin/xsetroot -bitmap\
/usr/include/X11/bitmaps/xsnow -fg blue -bg yellow

Not the most wonderful colors for snow, but you get the idea. The
colors recognized by the -fg and
-bg options are the same as the ones in the rgb.txt file
discussed above.



You can also tile color bitmaps stored in the xpm format. The xpmroot

program is used for this. Change the xsetroot line to something like
this:

/usr/X11R6/bin/xpmroot\
/usr/include/X11/pixmaps/file.xpm

Displaying a Background Image

Now that we can display colors and tiled bitmaps on the background,
it is time to display a picture on the
background. To do this, I use a shareware graphics program called xv. You
can get it from the xv home page at http://www.trilon.com/xv/, or it may be included
with your Linux distribution. Remember, this is
shareware, and you should support the author by sending him $25 if you
find his program useful.


I have chosen to use xv, but any program capable of displaying an
image on the background can be used. For
xv, you tell it to display the image centered on the background. You
also want it to exit immediately after
displaying the image; otherwise, XDM will hang until the xv program is
exited manually.

/usr/X11R6/bin/xv -root -rmode 5 -quit\
/root/.gromit01.jpg

I use this to put a picture in the center of the display. To view
your changes, save the Xsetup file and
press <H>ctrl<H>_<H>alt<H>-F7 to switch
back to the XDM screen. Press
<H>ctrl<H>-<H>alt<H>-<H>backspace<H>

to restart the X server. You
should now see your image in the center of the screen, covered by the
login box. xv supports several other
placement options using the -rmode command. You can see
a list of these options by typing xv -rmode -1.

Displaying Random Images


Listing 1

With the help of a simple Perl script, you can display a random
image on the background each time XDM is
run. Listing 1 is a simplified version of a script written by Scott
Scriven, toykeeper@cheerful.com.

Type in this program or download it from ftp://ftp.ssc.com/ftp/pub/lj/listings/issue68/3325.tgz.
and save it as /usr/local/bin/bkgd.
Make sure execute permissions are set by typing:

chmod ugo+x /usr/local/bin/bkgd

You may also have to change the path to xv and find
to match your local
setup. Including the absolute paths in the script ensures it will work
correctly, even when the $PATH

environment variable isn't set.

To load a random background, change the xv line in Xsetup to
usr/local/bin/bkgd instead. Create a
/usr/lib/X11/backgrounds directory and fill it with your favorite
images. A couple of good places to look for
background images are http://www.digitalblasphemy.com/ and http://ipix.yahoo.com/.

Listing 2 is a working Xsetup file with the intermediate steps
commented out with ``#'' characters.



listing 1:

#!/usr/bin/perl -w
# This picks a random background from
# /usr/local/lib/X11/backgrounds,
# and calls an image viewer to set it as the
# background.
# This script is released under the GPL version 2.
# Putting the picture into a sub-directory named
# max will make sure it is
# resized to take up the whole background.
# Feel free to change the directory the images are
# stored in...
$bkgddir = "/usr/lib/X11/backgrounds";
# And if you'd like to use a different viewer, set
# it here.
$xv = "/usr/bin/X11/xv -root -quit +noresetroot\
-rmode 5";
$max = " -maxpect";
srand;
$tmp = '/usr/bin/find $bkgddir/* ! -type d\
-print';
@pictures = split(/\n/,$tmp);
$picture = splice(@pictures, rand @pictures, 1);
if($picture =~ /max/) { $xv .= $max; }



Listing 2. Xsetup

#!/bin/sh
# $XConsortium: Xsetup_0,v 1.3 93/09/28 14:30:31
# gildea Exp $
# Display gromit's picture on a black background
# /usr/bin/X11/xv -root -rmode 5 -quit
# /root/.gromit01.jpg
# Display a random image
/usr/local/bin/bkgd 1> /tmp/bkgd.1.log 2> /tmp/bkgd.2.log &

# Set the background to a color
#/usr/X11R6/bin/xsetroot -solid steelblue
# Tile the snowflake bitmap on the background
#/usr/X11R6/bin/xsetroot -bitmap /usr/include/X11/bitmaps/xsnow -fg blue
-bg\
yellow
# Tile an .xpm file on the background
#/usr/X11R6/bin/xpmroot
#/usr/include/X11/pixmaps/xpovicon.xpm
# Display a clock with black background and white
# hands
/usr/bin/X11/xclock -hl white -hd white -bg black\
-fg white -geometry 100x100+0+0 &

Customizing the Login Box

Now we want to customize the xlogin box using the
/usr/lib/X11/xdm/Xresources file. This file is also used
for configuring other XDM widgets like the chooser, but we aren't going
to deal with these other options
here--see the XDM man page to learn about them.

We can move the xlogin box, resize it, change its color, its fonts
and what it says. I have moved mine
into the lower-right corner and made it as small as I can, so that it
doesn't cover up the background
image.

The XDM xlogin widget uses X resources to specify these settings.
They are all stored in the Xresources
file and are read by XDM each time it restarts. A list of the available
options, taken from the XDM man page,
is shown in ``Xresources Options''. I will go through each option and
explain its use.

I have ignored several more advanced xlogin resources, some of which
may appear in the Xresources file. It
is safe to leave them alone--the defaults set when you installed X
should work fine. The XDM man page
contains full descriptions of each option, if you want to experiment
with them.


Move and Resize the xlogin Box

The .width, .height, .x and .y
settings can be used to set the size and screen
position of the xlogin box, or you can use .geometry to specify
all of these at once. Let's move the
login box to the lower-right corner and make it 300 by 250 pixels. The
screen coordinates to be used start
with 0,0 in the upper-left corner, and the coordinates of the
lower-right corner will depend on your screen
resolution. But X has another way to specify coordinates: -0,-0

is the lower-right corner of the
display, no matter what the screen size. Add this line to the
Xresources file, near the other xlogin*
definitions:

xlogin*geometry: 300x250-0-0

Save the file and restart the x server as you did after changing the
background image. Your login box
should now fit snugly into the lower-right corner of the display,
revealing more of your background
image.

Now we can change the colors. There are five resources relating to
color in the above table. First, change
the default foreground and background colors for the box using the xlogin*foreground
and
.background settings. Let's make it black on blue:


xlogin*foreground: black
xlogin*background: steelblue

Save and restart the X server to make sure your changes have taken
effect. The greeting and login prompt
did not change color, because you haven't changed them yet. You must
specify each individual color you want
to change. The .greetColor setting is the greeting that is
displayed at the top of the box.
.promptColor is the login: and password: prompt color, as well
as the text you enter for your user
name. .failColor is used for when the user name or password
entered is invalid.

Try out these settings:

xlogin*foreground:  black
xlogin*background:  steelblue
xlogin*greetColor:  white
xlogin*promptColor: grey
xlogin*failColor:   red


Not a terribly inspiring color scheme, but better than black on
white. Play around with it until you find
the colors you like.

Changing the xlogin Fonts

The resources that control the four fonts we want to change are:


  • xlogin*font: used for displaying the typed-in user name



  • xlogin*greetFont: used to display the greeting


  • xlogin*promptFont: used to display the prompts username:
    and password:


  • xlogin*failFont: used for displaying that the login failed

Fonts under X are difficult to deal with. They have an abundance of
options and modifiers, most of which
are never used. The xfontsel program
can make font selection much easier.
Just browse through the fonts, selecting the font style, size and
attributes you want. Then click on the
select button and paste the font string into the Xresources file using
your middle mouse button, or both
mouse buttons at once if you have a two-button mouse. Add these lines
to your Xresources file:

xlogin*font:\
-*-courier-bold-r-*-*-18-*-*-*-*-*-*-*
xlogin*greetFont:\
-*-helvetica-bold-r-*-*-24-*-*-*-*-*-*-*
xlogin*promptFont:\
-*-lucidatypewriter-bold-r-*-*-18-*-*-*-*-*-*-*
xlogin*failFont:\
-*-times-bold-i-*-*-24-*-*-*-*-*-*-*


Experiment with the different fonts and sizes until you find something
you like.



Changing the xlogin Prompts

You can also specify the text that is displayed for each of the four
prompts associated with the xlogin
widget. .greeting can be set to CLIENTHOST and will
display the full host name of the system it
is running on. The .namePrompt value is displayed to ask for
the user name, .passwdPrompt asks
for the password, and .fail is displayed when an unsuccessful
login occurs. For example:


xlogin*greeting:         Welcome!
xlogin*namePrompt:       Name:\040
xlogin*passwdPrompt:     Password:
xlogin*fail:             !WRONG!

Add a Clock to Your XDM Screen

X distributions usually include the xclock program which can display
a nifty looking analog clock. Add it
to your XDM screen by inserting this line in your Xsetup file:

xclock -hl white
-hd white -bg black -fg white\ -geometry 100x100+0+0 &

This will display an analog clock of moderate size in the upper-left
corner of the screen. The clock may
stay running, even after a user has logged in.


Well, that's about it for the basic customization of XDM. There are
many things to play with, and
hopefully I have given you a good framework with which to begin
experimenting. No two users have the same
tastes, so it may take some time before you finally get the look and
feel you want.

Login manager:

/etc/sysconfig/displaymanager and change

DISPLAYMANAGER=”xdm” to

DISPLAYMANAGER=”kdm”

********************


VNC Server/Client Quickstart

VNC Server Quickstart Instructions

I performed this on Red Hat Advanced Server 2.1 and Fedora Core 1 and
2. It should work on Red Hat 7.3, 8,9 and Enterprise 3.



Note: I would only recommend using VNC between hosts behind a
firewalled environment. Passwords are transmitted in clear text.

If
you simply must use VNC to use a GUI remotely outside of a firewall I
would recommend connecting via SSHv2 to the VNC Server, then initiating
VNC inside the SSH Tunnel.



On VNC Server machine with vnc-server installed

1)Type vncserver -geometry 800x600 (or whatever resolution you prefer)


2) There will be a session number displayed .This will create a .vnc
directory in your home directory. (/home/yourself/.vnc)

3) Type cd /home/yourself/.vnc

4)Type ls -alc

-You should see a script called xstartup

5)Type vi xstartup or use whatever text editor you prefer

-This is where we will setup your vnc session to use your window
manager of choice

-Find
the section where it says twm & and replace it with your choice. I
know there are more, but these seem to be the most popular ones. Don't
include what I have in the parenthesis

-startkde & (used for the KDE window manager)


-exec gnome-session & (used for the Gnome window manager)

-startxfce4 & (used for the XFCE4 window manager, my favorite
choice)



6)Now type vncserver -kill:1 (1 is our session number)

-This stops the VNC Server so that the xstartup script we just edited
can be re-read when we restart the server

7)Type vncserver (to start the session back up)

8)Type ps ax | grep vnc (check if your session is up and running)




Let's connect to the VNC Server!



From a Linux Box with the vncviewer package installed

1)Type vncviewer hostname or IP address:1 (1 meaning whatever session
number you chose)

2)Enter your Linux local account password assigned on VNC Server machine



From a Windows Box with TightVnc or RealVnc client installed

1)Start your VNC client and type the VNC Server hostname or IP
address:1 (1 meaning whatever session number you chose)

or


From a Java Enabled Browser on any platform (not the best but it works)

1)Type http://IP address of VNC Server:580x (x will indicate session
number)

ex..http://192.168.1.6:5801 ( for session 1)

ex..http://192.168.1.6:5802 ( for session 2)

Note:

1)I keep getting new session numbers every time I type vncserver. I
just want session 1 running

-By
default each session is still active even after disconnecting from
remote vnc session. -You only type vncserver if you want to use
multiple sessions

-You can kill the extra sessions by typing
vncserver -kill:session number or ps ax | grep vnc to see which
sessions are running, then type kill -9 ID number of the session you
don't want

-If it all gets messed up you can start over with the
sessions by typing rm -rf .vnc in your home directory on the VNC Server
machine. Then go into your /tmp/.X11-unix directory and remove
X1,X2...etc for each session number (Don't try and remove the X0 file!)


repeat steps 1-8 on the VNC server machine setup







radio stations

demento

station


link

wktg Madisonville
Ky.

WKTG

klfx harker Hts tx

KLFX


wips crown pt, ny

WIPS



WKTG Madisonville Ky.



development

doxygen   homepage


headlines





Install tricks



from posting on linux forums:



Well, at least it looks that way. Here's a summary of how far I have
got:



- downloaded a copy of ms-dos 6.2 - loaded onto diskette

- added duse.exe to diskette (see www.bootdisk.com)


- added loadlin.exe to diskette (see ftp://elserv.ffm.fgan.de/pub/linux/l...6/update-1.6c/)

- modified autoexec.bat and config.sys to load duse (see www.bootdisk.com)
to allow dos access to usb cdrom drive

- booted from diskette

- successfully recognised usb cdrom as drive E:

- cd to E:\isolinux\alt0

- executed the following command - this is a single command so ignore
any line breaks if it wraps:




a:\loadlin vmlinuz initrd=all.gz root=/dev/ram3 ramdisk_size=36000
automatic=method:cdrom



This successfully started the boot process (without booting the
hardware, thanks to loadlin) and the installation is now well under way.



I sincerely hope not to be coming back to report that it broke half way
through!



 

vet  irvine animal
services
714-573-1890




Suse Yast
Gentoo stage3
Debian

Debootstrap


rpmstrap



fedora core

yum


FTP Netrc

Permissions and location of the .netrc

The .netrc should be in your home-directory and the permissions on
the file should be unreadable for everybody except the owner:



[~] chichi>ls -al .netrc
-rw-------  1 edwin  wheel  246 Aug 27 16:14 .netrc

You can set to these settings with chmod 600 .netrc.


Layout of the .netrc

Machine definitions

The first part of the .netrc is filled up with host-definitions:


machine ftp.freebsd.org
login anonymous
password test@someplace.com

machine myownmachine
login myusername
password mypassword

What it is saying now is nothing more than "If you connect to
ftp.freebsd.org, login as anonymous and use test@someplace.com
as password." and "If you connect to

myownmachine, login as myusername and use mypassword
as password.".

Macro definitions

This part of the .netrc consists of macros which can be used to
perform automated tasks:


macdef uploadtest
cd /pub/tests
bin
put filename.tar.gz
quit

macdef dailyupload
cd /pub/tests
bin
put daily-$1.tar.gz
quit


Keep in mind that there should be an empty line after the last
macdef statement. If you don't do this, ftp will complain about it.

The first one is saying "Go to the /pub/tests directory, switch to
binary mode, put a file there and quit it". The second one is saying
the same, except that the name of the file is based on a parameter
on the macro-call (see Usage of the .netrc for more about
this).

Usage of the .netrc


Macros can be called from both inside ftp:


[~] chichi>ftp myownmachine
ftp: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
220 myownmachine FTP server (Version 6.00LS) ready.
331 Password required for myusername.
230 User myusername logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> $ uploadtest
cd temp
250 CWD command successful.
put filename.tar.gz
local: filename.tar.gz remote: filename.tar.gz
150 Opening BINARY mode data connection for 'filename.tar.gz'
100% |**************************************************|  1103       00:00 ETA
226 Transfer complete.
1103 bytes sent in 0.01 seconds (215.00 KB/s)
quit
221 Goodbye.

...or from on the command-line:



[~] chichi>echo "\$ uploadtest" | ftp myownmachine
ftp: connect to address ::1: Connection refused
Trying 127.0.0.1...
100% |**************************************************|  1103       00:00 ETA

There is not much information here, because ftp doesn't expect a
terminal here. If you use ftp -v, there will be more output.

An example with arguments is

[~] chichi>echo "\$ dailyupload `date +'%Y%m%d'`"
$ dailyupload 20010827
[~] chichi>echo "\$ dailyupload `date +'%Y%m%d'`" | ftp myownmachine
ftp: connect to address ::1: Connection refused
Trying 127.0.0.1...
100% |**************************************************|  1103       00:00 ETA



Signals

Standard Signals


Linux supports the standard signals listed below. Several signal
numbers are architecture
dependent, as indicated in the "Value" column. (Where three values are
given, the first one is usually valid for alpha and sparc, the middle
one for i386, ppc
and sh, and the last one for mips. A - denotes that a signal is absent
on the corresponding architecture.)

First the signals described in the original POSIX.1-1990 standard.

Signal
Value
Action
Comment
SIGHUP







or death of controlling process
SIGINT

2
Term
Interrupt from keyboard
SIGQUIT

3
Core
Quit from keyboard
SIGILL

4
Core
Illegal Instruction
SIGABRT

6
Core
Abort signal from abort(3)
SIGFPE
8
Core
Floating point exception
SIGKILL
9
Term
Kill signal
SIGSEGV
11
Core
Invalid memory reference
SIGPIPE
13
Term
Broken pipe: write to pipe with no readers
SIGALRM
14
Term
Timer signal from alarm(2)

SIGTERM
15
Term
Termination signal
SIGUSR1
30,10,16
Term
User-defined signal 1
SIGUSR2
31,12,17
Term
User-defined signal 2
SIGCHLD
20,17,18
Ign
Child stopped or terminated
SIGCONT
19,18,25
Cont
Continue if stopped
SIGSTOP
17,19,23
Stop
Stop process
SIGTSTP
18,20,24
Stop
Stop typed at tty
SIGTTIN
21,21,26
Stop
tty input for background process
SIGTTOU
22,22,27
Stop
tty output for background process

The signals SIGKILL and SIGSTOP cannot be caught,
blocked, or ignored.


ex:

kill -SIGUSR2 `cat /var/run/xinetd.pid`

kill -SIGUSR2 `pidof someprocess`