v.0.24, 11/06/2001
This is under permanent construction; many things are just sketchy because I didn't have time to complete them, but feel free to contact me if you want details. As a rule, the version number and date on top of this document change whenever I add a new question, but not when I make minor corrections.
The goal of this document is to try to make things a little smoother and easier for the user running Unix or Linux.
Disclaimer: I do not claim that the advice I give here is good or useful. Any typos are the sole responsability of my cat, who keeps interfering with my typing by sitting on the keyboard and blocking my view of the screen (on purpose, of course).
User-typed input commands and computer output are represented in typewriter font, with output further indented to the right.
alias prepare 'psnup -2 \!* two_up.ps; \ psselect -r -o two_up.ps odd_reversed.ps; \ psselect -e two_up.ps even.ps' |
prepare bigfile.ps |
This assumes that you a have printer that stacks face up, like most HP Deskjets, for instance (if not, you'll figure out the right way to turn the pages after a little testing) It also assumes that your printer does not jam easily or feed two sheets at once (use quality paper or wait for the paper to flatten). If you are using a network printer, before printing the second time, open the tray so that printing is stopped and check the queue to make sure you are the first to print. If not, let the other users print first on empty sheets and add your paper later (you don't want your pages meessed up with other people's pages).
If your file is not Postscript, you can use a conversion tool first to convert it to Postscript and then do the above. Another package useful for this and other printed-related jobs is mpage (currently distributed with Red Hat Linux and available on other platforms too). It can do double-sided printed in the manner described above (see the man page of mpage) and also supports duplex printers directly.
mpage -2 -f -b A4 -H -m30l30r60t60b -Plp |
Method 1 (if you're lucky)
Alter the value of the so-called 'S6 register' of your modem
(yes, your modem has that) with the AT commands:
ATDT S6=20 (tone) or ATDP S6=20 (pulse).
That would make the modem wait for the dialing tone for 20 seconds.
Larger values are possible, but not very useful, at least for me.
Method 2 (the last resort)
Use the PHONE to get the dialing tone first, then start the modem dialing
and hang up the phone quickly as soon as the dialing tone gets echoed into the
modem speaker.
Anyway, if you connect to the internet via kppp in Linux, you can have every phone call to your provider recorded and converted to either currency (e.g. LEI) or units (e.g. IMPULSURI). It's easy to write a ruleset file for kppp that keeps track of different times of the day, different days, Saturdays, Sundays etc. Here's a version that does the job for you in Romania.
fuser /mnt/cdrom/i386/ /mnt/cdrom/i386/: 3170 3233 3467 |
ps -ef | grep 3170 ps -ef | grep 3233 |
kill -9 3170 3233 3467 |
If you have the lsof command (list open files) that could be useful
too, especially in the more tricky case when you have quited every CD directory
that has been accessed and still you cannot unmount the CD.
Suppose for instance that you changed directory
to the mount point of the CD-ROM (something like cd /mnt/cdrom)
and launched an application from there (like xmixer &).
Now because the initial working directory of xmixer was the CD
mount point, this last directory is perceived as being in use by the
umount command, and the message will be
umount: /mnt/cdrom: device is busy.
After you have cd-ed away from all CD-ROM directories,
instead of wondering why on earth
you cannot unmount the CD, just issue:
lsof | grep cdrom xmixer 2192 fdonea cwd DIR 22,64 6144 79872 /mnt/cdrom |
k kdiff left_file right_file kdiff %d/%f %D/%F |
r Recursively compare directories cd %d find . -type f -print0 | xargs --null ls -l | cut -c33-1000 | sort -t. +1 > /tmp/00mc_current cd %D find . -type f -print0 | xargs --null ls -l | cut -c33-1000 | sort -t. +1 > /tmp/00mc_other kdiff /tmp/00mc_current /tmp/00mc_other rm -f /tmp/00mc_current /tmp/00mc_other |
local% telnet remote.computer.etc ... remote% printenv MAIL /var/mail/user33 (to see mail file location) remote% cd /var/mail remote% ftp local.computer (open ftp to local computer) ... (give local username, pass) ftp> bin 200 Type set to I. (mail may contain binary chars) ftp> put user33 200 PORT command successful. 150 Opening BINARY mode data connection for ... 226 Transfer complete. local: user33 remote: user33 1412735 bytes sent in 1.1e+02 seconds (12.80 Kbytes/s) bye (back to remote computer) remote% rm /var/mail/user33 (remove your remote mail all at once) remote% mail No mail. (logical, isn't it?) remote% logout (Don't worry about completely removing your mail file; you will get further email; if you don't believe that, send yourself an email at user33@remote. Of course, you can also choose not to remove it and let it grow slowly...) local% mail -f user33 |
1. Use fdisk's 't' command to change the partition's type to 'Linux native' 2. Make a Linux filesystem on it: mkfs -t ext2 /dev/hda6 3. Add and entry for /dev/hda6 to /etc/fstab Use mount point: /aux, fsckorder: 2 4. mkdir /aux 5. reboot 6. that's all! |
First, let me point out that, given the above situation, Midnight Commander will not be able to read into the file, when you press Enter on bigfile.tar.gz, because it still needs space to store temporary files (probably the same amount of space needed when decompressing and de-tarring the file). Midnight Commander will just fill up the /tmp directory on the root partition and will finally fail with a 'disc full' message :-( So this does not solve the problem. Even worse, after trying and not succeeding, remember to go to /tmp and erase the big files that Midnight created and could no longer erase, because it ended in error.
Luckily, there is a smart and relatively simple solution to this.
First, if you don't have it already, generate a list of the files in
the archive:
gzip -c -d /mnt/cdrom/bigfile.tar.gz | tar -tv > bigfile.list |
gzip -c -d /mnt/cdrom/bigfile.tar.gz | tar -xv fdonea/PROG |
install ... append="ether=5,0x320,eth0" prompt |
|
mformat a: |
Category: Software name | Pros | Cons |
Email reader: kmail | POP3, attach, folders, PGP, spell | would not append to saved file, would not send email to 5 people at once (or I'm too dumb...tell me!); Also, inbox has to be emptied manually, otherwise, in the event of a forced termination, the entire (say, 200 email) inbox queue will be re-created |
New mail notifier: knewmail | You can't miss new mail, you have to click a pop-up window to acknoledge, also uses sound card | sometimes it only announces the first email |
diff tool: kdiff | clear | mouse only? |
File manager: Midnight Commander (mc) | fast, 100 per cent keyboard, menus, time saving commands, compare directories, wonderful FTP file system and recursive retrieval, plus other goodies | The shell goes bananas sometimes |
Simple X text editor: xedit | very fast, arrow keys, X Window Copy and Paste | No goto line, no macros, generally too simple... |
Powerful text editor: emacs | macros, customizations, keyboard, more-than-an-editor is actually a better name for this software | takes too many seconds to start |
Web file retriever (WWW robot): wget | non-interactive, command line | I'd rather have 'Partial content' files deleted |
CD MP3 extractor: grip | works with cddb, converts CDs to MP3 with just a few mouse clicks | |
Multiple HTML file printer: htmldoc | makes printing even hundreds of small HTML files a child's play (useful for printing FAQs, books etc from the WEB) | It seems to load images into a memory list, so if you change or edit them you need to restart htmldoc (valid for the GUI version). Otherwise it will include the old graphics. |
Data entry application: xmbase-grok | makes it very easy to add data to flat file databases, has highly customizable input forms. | not relational, no SQL support |
E-mail me if you want more details about anyhting here.
vmlinuz root=/dev/hda2 |
vmlinuz root=/dev/hda5 |
/sbin/lilo |
# device mountpoint filesystemtype options dump fsckorder /dev/hda5 / ext2 defaults 1 1 /dev/hda7 /home ext2 defaults 1 2 /dev/hda6 swap swap defaults 0 0 /dev/fd0 /mnt/floppy msdos noauto,rw,user 0 0 /dev/fd0 /floppy_ext2 ext2 noauto,rw,user 0 0 /dev/hdb /mnt/cdrom iso9660 noauto,ro,user,unhide,exec 0 0 /dev/hda1 /DOS msdos noauto,rw,user 0 0 none /proc proc defaults 0 0 |
telnet 10.0.0.15 Trying 10.0.0.15... Connected to 10.0.0.15. Escape character is '^]'. Connection closed by foreign host. ------ or, if I used rlogin instead: rlogin 10.0.0.15 rcmd: 10.0.0.15: Address already in use |
Check the script: you should have a newline as the last character in the script source file. If the newline is not there, the last line seems to be ignored, or the whole script runs weirdly. I currently do not know why this happens, please tell me if you do. I also do not understand why editors don't silently add newlines at the end of the file.
Also watch for unneeded commands in the .cshrc initialization file, they too can affect the way scripts work (for instance, I kept a cd command in mine for years, before realizing that it was guilty of a lot of erratic script behaviour, especially about finding files and directories). If you really need to have such a commmand, keep it only in interactive shells, like this:
# do a cd only in interactive shells if($?prompt) then cd endif |
boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=300 default=l # linux, original kernel image=/boot/vmlinuz-2.0.32 label=l root=/dev/hda3 read-only # linux, experimental kernel image=/boot/vmlinuz.new label=new root=/dev/hda3 read-only # windows 95 other=/dev/hda1 label=w table=/dev/hda |
make xconfig make dep make clean make |
rpm -V kernel-headersIf files are reported missing, then do:
rpm --force -ivh kernel-headersRemember to do rpm -Va once in a while....
chsh Changing shell for root [/bin/bash]: /bin/tcsh |
/usr/bin/nice ./a.out |
man tcsh |
With new computers, it may also be that your computer (i.e. graphics card, with 2-4MB or more of video memory) can do 24bpp (i.e. have true colour) but the default video mode is a failsafe 8bpp. With Linux you might try:
startx -- -bpp 24 |
startx -- -bpp 16 |
Ctrl-Alt-F2 | to get a text mode login screen (just log in normally) |
startx -- :1 -bpp 16 | and voila!...you have 16bpp |
Many publicly funded institutions still have Unix computers bought not too long ago that can only do 8bpp. That's puzzling to me, since a Linux PC is usually faster, better and, of course, costs a lot less (Unix computers manufacturers are only too happy to have found a niche where competition is less tough because governments like to spend/misspend tax payer money on expensive equipment - hopefully this is changing now, with Linux and free/GNU software being the major players. And, by the way, NASA switched its Oracle databases to MySQL :-) :-) But that's another story...).
chgrp -R group33 your_directory |
So, I'm in search of simple solutions to the following:
I usually launch whatever windows I can with a string in the title bar
(that ideally is kept while the window is minimized), like this:
nxterm -e EMAIL
Yes, it produces an error, but at least I get the
string in the title bar!!! Anyone know something more elegant?
NEW!!
Recently, I have succeeded to adapt fvwm to do that
(it involved recompilation of source files), more about that later..