![]() |
Howto...Here I'll list things I learned while fiddling with UNIX/Linux/MacOS X (which is a BSD derivate).mediawiki gives "Fatal exception of type MWException Error" errorAdd the following to the end of LocalSettings.php:require_once "$IP/extensions/LocalisationUpdate/LocalisationUpdate.php"; $wgLocalisationUpdateDirectory = "$IP/cache";Made sure www-data: owns all of the mediawiki files and dirs. axcall gives connect but no dataaxcall to host x gives a connect but no output: restart ax25d on host x.see how much data needs to be written do disk for sync()grep -e Dirty: -e Writeback: /proc/meminfo PulseAudio: pipe audio-in to audio-outgst-launch pulsesrc ! pulsesink remove audio from a video fileUse one of these:ffmpeg -i example.mkv -c copy -an example-nosound.mkv ffmpeg -i example.mkv -vcodec copy -an example-nosound.mkv(which one depends on ffmpeg version)
Rebuilding VMware kernel modulesvmware-modconfig --console --install-all Make boot-fsck (ext2/3) abortableIn file /etc/e2fsck.conf:[options] allow_cancellation = true .m1v to .mpgmencoder-mt -of mpeg -ovc copy -o output.mpg input.m1v MySQLAR doesn't work at all when installing from tar-file on DebianMake sure that a user 'mysqlar(d)' was created (with home-directory pointing to the data-directory), also make sure that that user has write-rights on the datadir. Move the mysqlar.cfg to /etc, move the .daily file to /etc/cron.daily (same thing for mysqlar.weekly and monthly).Add the following to the crontab of root: */5 * * * * hourly=1 daily=1 weekly=1 monthly=1 /usr/local/bin/mysqlar_graph > /dev/nullAlso apply this patch first before installing. It makes mysqlard handle database restarts more gracefully. SVN: "Error: Entry 'com.cpp' has unexpectedly changed special status"svn pd svn:special com.cpp... and retry e.g. your commit command. "IBM ToolsCenter bootable media creator" refuses to download updates/diagnosticsSolution: run as rootXen vm: "hwcap index 0 already defined as nosegneg"Change /etc/ld.so.conf.d/libc6-xen.conf so that hwcap 1 nosegneg is replaced by hwcap 0 nosegneg.IBM Director (5.20.3) complains about a certificate which is about to expireThe following message is logged: The certificate that is used for CIMOM authentication, located in the data\cim\keystore\ibmd_cert.jks file, will expire soon..You can fix that by entering the following on the server itself: /opt/ibm/director/bin/dircli certmgr -g Extract audio from videostream (e.g. .flv-file)mplayer -dumpaudio file-in.flv -dumpfile file-out.mp3 In Debian: rc.local seems to aborts halfwayIn the shebang-line, remove the '-e' switch.E.g. #!/bin/sh -ebecomes #!/bin/shThe premature exit is caused by a command having a non-0 exit. Problems while mounting a CIFS/SMB shareEnable debugging in the kernel for more details on what is going on:echo 1 > /proc/fs/cifs/cifsFYI cannot change data mode on remountYou'll see that message if you're trying to remount a filesystem with a different journalling option.Solution is to explicit give all parameters to mount so that it doesn't look at fstab. E.g.: mount -o remount,rw /dev/sda1 / SuSE 10 & VLAN
Maximum file-integrity
Symantec backup Linux agent does not start (on Debian)Make sure you've installed the "libstdc++5" package.To check if it'll work, run /opt/VRTSralus/bin/beremote --log-console. Please note that you cannot end that process with ^c. Enabling GRUB to boot from RAID1 MD /boot deviceMake sure your md0-device (which contains /boot) is clean, e.g. not rebuilding.# grub grub> root (hd0,0) grub> setup (hd0) grub> root (hd1,0) grub> setup (hd1) Mirror Write ConsistencyIt seems that Linux doesn't enable a mirror-write-consistency-scheme by default when creating a RAID1 MD-device. You can enable it afterwards with:mdadm -G /dev/md0 -binternalOr, if you want to put it on an external device (and not within the md itself - this is prefered for performance reasons): mdadm -G /dev/md0 -b /dev/MWCBITMAPDEVICEAlso see the mdadm man-page. SuSE 11 not executing PHP scriptsCheck that in /etc/php5/apache2/php.ini short_open_tag is set to 'On'.EntropyKey on LinuxDo not install ekeyd-uds_*.deb.Apache ignoring .htaccessMake sure you add AllowOverride AuthConfig to the <Directory>-statements in the site-definition (e.g. /etc/apache2/sites-enabled/000-default).Asterisk & SpeedTouch home 546 adsl modemFor it to work you first need to disable the "SIP helper" (which is not helping at all).Log-in to your modem (usually: telnet 10.0.0.138) and give the following command:
IBM 9417-HB7 / Lenovo L171P and XorgA working monitor-device section would be:Section "Monitor" Option "CalcAlgorithm" "XServerPool" HorizSync 30-81 Identifier "MonitorUSB" Option "DPMS" VendorName "ibm lenovo" VertRefresh 56-76 EndSection Hot adding cpus in VMwareIf you hot-add cpus to a vm in VMware, you need to switch them on to be able to use them:for i in /sys/devices/system/cpu/cpu[0-9]*/online ; do echo $i ; echo 1 > $i ; done Asus EEE PC 901 & 2.6.30 kernelWhen installing the 2.6.30 kernel one might notice that wireless doesn't work. At least on Debian testing of 2006/6/17. This can be fixed with:apt-get install rt2860-source tar jxf /usr/src/rt2860.tar.bz2 modules/rt2860/common/rt2860.bin mv modules/rt2860/common/rt2860.bin /lib/formware Disabling scrolling with cursor in browserOccasionally I suddenly had a cursor in my browser which made scrolling a hell. You can disable this by pressing 'F7'. It is called "caret browsing" and is an accessibility feature.32bit on 64bit DebianInstalling a 32bit package on a 64bit system:dpkg -X debfile.deb /emul/ia32-linux bind9/named won't resolve altough zone-files look correctIt seems bind is sensitive for spaces instead of tabs in the zone-files."Aangifte 2008" application of Dutch "belastindienst" crashes when downloading known dataWork-around:
Resetting password of a MediaWiki userMediaWiki is the software behind Wikipedia.UPDATE user SET user_password = MD5(CONCAT(user_id, '-', MD5('newpassword'))) WHERE user_id = NRReplace 'NR' by the user_id (and 'newpassword' by the new password of course) of the user from which you want to change the password. bc rounds off the results downYou can make bc emit more digits by adding 'scale=x; ' to your command.e.g.: echo 'scale=4; 2/3' | bc Re-adding a disk to a md raid1-set after temporary failureWhen for example one of the 2 Virtual I/O servers underneath your Linux LPAR crash or reboot etc. your md raid1-set will put the disk in error-state. To recover do the following (/dev/md1 is the raid-set, /dev/sdb6 is the disk served by the faulty VIOS):mdadm /dev/md1 --manage --set-faulty /dev/sdb6 mdadm /dev/md1 --manage -r /dev/sdb6 mdadm --add /dev/md1 /dev/sdb6 Mounting CIFS/SMB share gives "cannot mount read-only"-errorWhen mounting a share via CIFS/SMB (a microsoft windows share or samba share) I got the following error:mount: block device //servername/sharename is write-protected, mounting read-only mount: cannot mount block device //servername/sharename read-onlyThe solution was to install the 'smbfs' package. Play video with repeatUsing Mplayer:mplayer -fixed-vo -loop 0 Compiling a Debian kernel package using distccDistcc enables you to distribute a compilationjob over multiple hosts.apt-get install distcc mkdir /usr/local/distcc ln -s /usr/bin/gcc /usr/bin/g++ /usr/bin/cc /usr/bin/c++ /usr/local/distccThen before compiling:
Installing Skype 2.0 on 64-bit OpenSuSE 11.1For installing Skype 2.0 on OpenSuSE 11.1 one first need to install the following packages:
Compiling ntp using the NMEA-PPS patch for Linux-pps without fiddeling with include-filesThe method described here is not complete, it needs an extra switch added to CFLAGS. Furthermore, it assumes that you first copy some include-files around as described here. That all is not needed.If you use this: CFLAGS="$CFLAGS -I/lib/modules/`uname -r`/build/include -I/lib/modules/`uname -r`/build/Documentation/pps \ -I /usr/include -DHAVE_PPSAPI" \ LDFLAGS=-lrt ./configure --prefix=/usr/local/ntp --disable-all-clocks --disable-parse-clocks --enable-NMEA \ --enable-LOCAL-CLOCKall is fine. Ntpd is then installed in /usr/local/ntp. Then it is just a matter of adding: /usr/local/sbin/ppsldisc -d /dev/ttyS1 -v /usr/local/ntp/bin/ntpd -gto e.g. /etc/rc.local. You might notice that the ppsldisc included in the linux-pps kernel patch doesn't accept the parameters as seen above, for that use the patch which can be found here. Firefox & delete upto the first slash in de address bar with ctrl+backspaceTo be able to do so, you need to "surft to" "about:config" and then search for layout.word_select.stop_at_punctuation. Then set it to true.VIA EPIA SN10000EG & frequency scalingFor that, you don't use the acpi-variant (as you do for older EPIA systems) but instead the 'e_powersaver' module.VIA EPIA SN10000EG system gives errors when doing memtestIt seems that memtest86 v3.4 fails to correctly handle the SN10000EG motherboard. Solution is to use version 2.01.HTC SPV E650 won't connect via USB to windows in vmware workstationIt seems the HTC SPV E650's implementation of USB is not entirely correct, seen from timing point of view. This very frequently causes windows under vmware workstation not to detect it. It seems that this can be solved by switching off the phone, connecting it and then switching it on.Monitoring state of IBM Serveraid raid-set using NAGIOS'smartctl' does not work for this raid-adapter. One can use the output of the 'ipssend' command from the IBM dumplog program.e.g.: #! /bin/sh TMP=/tmp/ipssend.serverraid.$$ /usr/bin/sudo /usr/local/bps_monitoring/serveraid/ipssend getconfig 1 al > $TMP if [ `grep -c "State *: Online" $TMP` -ne 2 ] ; then echo CRITICAL one of the disks is not online rm -f $TMP exit 2 fi if [ `grep -c "Logical drives/Offline/Critical: 1/0/0" $TMP` -ne 1 ] ; then echo CRITICAL logical driver offline/critical rm -f $TMP exit 2 fi if [ `grep -c "Defunct disk drive count *: 0" $TMP` -ne 1 ] ; then echo CRITICAL one or more defunct drives rm -f $TMP exit 2 fi echo OK all fine rm -f $TMP exit 0Please note that you need to add a sudo-line for this to work: nagios ALL=(root) NOPASSWD: /usr/local/serveraid/ipssend Letting bind/named query a specific DNS server for only one specific domainAdd to the file /etc/bind/named.conf.local:zone "mydomain.com" { type forward; forward only; forwarders { 192.168.0.2; 192.168.0.6; }; };Of course you need to replace 'mydomain.com' as well as the 2 ip addresses in the 'forwarders'-line. Making postfix only send through 'smart relayhost' when direct connection is not availableI use this construction to have a fallback option when the direct connected ADSL-line is down: replace 'relayhost' in 'main.cf' by 'smtp_fallback_relay'.Firefox 3 renders pages incorrectAdd the following to the device-section of your Xorg configurationfile:Option "XAANoOffscreenPixmaps" "true" VMware 6.0.3 (build 80004) on Debian with the 'linux-image-2.6.25-2-686' kernel image
Monitoring Squid with MRTGOne can use this example (mirror) for that. One must, though, add the following to the top of the MRTG-file:EnableSnmpV3: yesat least when using recent versions of the Squid proxy server. Mounting an cifs share gives "mount error 112 = Host is down" errorMount the share with 'smbfs' instead - at least when mounting from an windows 95/98/me host.smbclient refuses the '-L' (list shares) commandSimple: place the '-L' switch before the host-address.snmptrapd suddenly processes no traps at all anymoreNewer versions of net-snmp require that you set a community or else it'll refuse everything.So add to your /etc/snmp/snmptrapd.conf: authCommunity log,execute,net publicNow all traps with community 'public' will be allowed. Check this page for more details. MySQL: removing duplicate rows from a tableFirst create a temporary table containing the cleaned-up data:CREATE TABLE without_duplicates_temp SELECT * FROM original_table GROUP BY columns, that, must, be, unique;and then just delete the original and rename the temporary table: DROP TABLE original_table; RENAME TABLE without_duplicates_temp TO original_table; Force check of all filesystems after reboot (fsck)touch /forcefsck Konig CMP-UPS 650 & NUTWhen you have a Konig CMP-UPS 650 you would like to connect to NUT, use the 'megatec' driver.How to clear the pagecache, dentries and inodesecho 3 > /proc/sys/vm/drop_cachesAfterwards, echo '0' to this file. Getting rid of that obsolete delay after password authenticationIn Debian, add nodelay to the line with pam_unix.so in /etc/pam.d/common-auth.Installing Debian 4.0r01 on system with an Intel DG965WH motherboardSystem is very slowThe solution is very simple: upgrade the bios! The difference in speed is massive. Oh I also switched on HPET timers in the bios.CD-ROM player not detectedDo a network install!
Reducing disk-access (and thus saving power)Mount filesystems with parameters:
echo 5 > /proc/sys/vm/laptop_modeExpire dirty buffers only after a day (same warning applies): echo 864000 > /proc/sys/vm/dirty_expire_centisecs Displaying .odt-files (OpenOffice) inline in MuttFirst install the odftools, then add the following to .mailcap:application/vnd.oasis.opendocument.text; odfread %s ; needsterminal Backspace does not workType:stty eraseafter that(!) press ^v and then backspace. Then press enter. _getpty() fails on IRIX with 'operation not permitted'Check to see if /usr/sbin/mkpts has mode 4755.mount -t smbfs gives "smbfs: mount_data version 1919251317 is not supported"On Debian you then need to install the 'smbfs' package, on RedHat you need 'samba-client'.Synaptic Touchpad slow on Debian 4.0Add the following to /etc/X11/xorg.conf (section 'InputDevice', identifier 'Synaptics TouchPad'):Option "MinSpeed" "1.0" Option "MaxSpeed" "1.0" Option "AccelFactor" "0.2"If it then moves too fast, adjust the 'AccelFactor'. SpamAssassin 'sa_learn'/updatedb/backups make system unresponsiveNot only can you renice the cpu priority, one can also renice the I/O priority. For this to work you need to use the 'cfq' I/O scheduler and the ionice utility.Enabling the cfq I/O scheduler: echo cfq > /sys/block/hda/queue/schedulerThen create the following script (/usr/local/bin/LP): #!/bin/sh /bin/nice -n 40 /usr/bin/ionice -c 3 $*Now when you want to run some disk-intensive process while not suffering too much, but 'LP ' in front of the command. E.g. 'LP updatedb'. Force the Linux kernel to re-read a partitiontableblockdev --rereadpt /dev/deviceDo NOT do this on a device where filesystems are mounted from. Setting the default editor to viCurrent versions of Debian have the nasty habbit of using some non-vi-compatible editor for editing crontabs etc. This can be corrected using "update-alternatives --config editor".Fixing time-management in vm-instances on VMwareInstall the VMware tools in the guest os, then in the .vmx-file set the following parameters to TRUE:
Read this pdf (written by VMware) for more details and background information. X11 forwarding over SSH on a Debian system does not workMake sure that in the file /etc/ssh/sshd_config the parameter X11Forwarding is set to yes. Also you need 'xauth' which is in the xbase-clients package.Backup to LTO3 tapestreamer performs very slowWhen using cpio the default blocksize is 512 bytes. Now the more or less optimal blocksize for an LTO3 tapestreamer is 256KB. So a better performance can be achieved by adding '--block-size=512': this lets cpio backup using 512 blocks of 512 bytes(!).During installation of the IBM Websphere application server libXp.so.6 cannot be foundOn RedHat, install the xorg-x11-deprecated-libs package.On Debian, install the libs/libxp6 package. apt-get (from Debian) suddenly segfaultsDelete the file '/var/cache/apt/pkgcache.bin' and re-run 'apt-get update'.NAT stopped working after upgrading Linux kernel to 2.6.20Edit the .config in the kernel source directory and set CONFIG_NF_CONNTRACK_ENABLED to either 'y' or 'm'.After that, run 'make oldconfig' and rebuild your kernel and its modules. Optimizing PerlFirst run the script with profiling enabled:perl -d:DProf myscript.plthen run the profile-dumper: dprofpp tmon.out Copy (duplicate) a two-dimensional array in Perl@target = map [map $_ = $_, @{$_}], @source; Optimizing a site with Mambo for search enginesThe default urls of Mambo are not compatible with search engines. This causes only(!) the front- (first) page of your website to appear in search engines like Google. The following settings solve this.In the file configuration.php (in the root of your Mambo setup), change the following line: $mosConfig_sef = '0';into $mosConfig_sef = '1';To make this work you MUST also add the following to the .htaccess file in the root of your Mambo setup: RewriteEngine On RewriteRule ^content(.*) index.php RewriteRule ^component/(.*) index.php Speeding up Firefox"Surf to": about:config and set the following parameters:browser.blink_allowed false layout.frames.force_resizability true network.http.pipelining.maxrequests 10 network.http.pipelining true network.http.proxy.pipelining true network.http.max-connections 64 network.http.max-connections-per-server 21 network.http.max-persistent-connections-per-server 8 Really slow bittorrent downloadsSometimes bittorrent downloads go really slow, even when the upload-rate is at its maximum. Now that is also the cause of the slow download: if the upstream is saturated, the acks for the download-packets are delayed enormously. Solution: limit the upload-rate to a few KB below your maximum upload-rate.Preventing webserver hackers from connecting to IRC serversSometimes when a user runs some picture-gallery or forum software, your server gets more or less hacked: a hacker will start under the user with which your webserver runs ('www-run' for example) an ircbot. You can prevent this with this:iptables -I OUTPUT -m owner -p tcp --destination-port 6660:6669 --uid-owner nobody -j REJECTThis will not work if the hacker runs his/her irc-server on a different portnumber then the ones blocked. Enabling remote X in Fedora 2/3/4In /etc/X11/gdm/gdm.conf change the line with DisallowTCP=true in it to DisallowTCP=false.Then restart X. Don't forget to adjust your firewall. Allowing remote XOn the server execute this:/usr/X11R6/bin/xauth list :0 | awk '{ print $NF }'remember that output then on the client to this: export DISPLAY=__hostname_of_your_X_server__:0 xauth add __hostname_of_your_X_server__:0 . __output_of_previos_command__ Debugging an application that expects data via STDIN
Disabling the 'accesskey' html-optionCertain sites, like freshmeat.net remap the ALT+F key to their find menu. I find this annoying. To disable this behaviour in firefox, surf to 'about:config' and double click on 'accessibility.accesskeycausesactivation' (which sets it to false).Using a TER-GX102 S GSM-modem with smstoolsIn the configurationfile put:mode = asciiLeave everything else to default-mode. Don't forget to enter phonenumber is international format (with countrycode) without the '+'! Curl always failing with errorcode 52When curl always fails with errorcode 52 also for sites that are available, add '-A curl' to the commandline.Letting Firefox open new windows in a new tab insteadIn the address-bar, enter "about:config", then search for "browser.tabs.showSingleWindowModePrefs". Double click on that line so that it becomes 'true'.Then open the preferences menu from the menu-bar. Go to "advanced" and then search for "Tools": below there you can find "Force links that open new windows to open in...", click the radio-button before "a new tab". With these settings all new windows will go to a new tab unless it has features like different size or no toolbars. If you also want these kind of windows to be opened in a tab, go back to "about:config" and search for "browser.link.open_newwindow.restriction". When found, set it to "0". VPND across torIt is possible to have a VPN accross a Tor anonymous network. For that you need vpnd which limits this 'trick' to the platforms supported by vpnd which are currently Linux and FreeBSD. You also need tsocks.On the server, you have a file vpnd.conf which looks like this: mode server server YOUR_SERVER_IP_ADDRESS PORT_NUMBER_TO_USE client 0.0.0.0 local 192.168.0.1 remote 192.168.1.1 keyfile vpnd.key randomdev /dev/urandom autoroute keepalive 300 pidfile /var/run/vpnd.pid noanswer 3 mtu 576 sendbuf 3072The local and remove address are the addresses used in the vpn. You also need to change the 'server'-line. On the client you have something like this: mode client server YOUR_SERVER_IP_ADDRESS PORT_NUMBER_TO_USE client 0.0.0.0 remote 192.168.0.1 local 192.168.1.1 keyfile vpnd.key randomdev /dev/urandom autoroute keepalive 300 pidfile /var/run/vpnd.pid noanswer 3 mtu 576 sendbuf 3072Of course, the portnumber in the server line as well as the ip-address should match with what you configured on the server side. Also make sure that 'local' and 'remote' match! After that, create a (shared) key which you will need to transport safely from the server to the client. Use an PGP encrypted e-mail for example. Starting the vpn on the server is only a matter of: vpndand on the client you type: tsocks vpndDon't forget to edit tsocks.conf so that it points to your tor-client! E.g.: server = 127.0.0.1 server_type = 5 server_port = 9050You may need to change the server ip-address (if the tor-client runs on an other box then the box running the vpnd-server) as well as the port-number. Warning: make sure that you use ip-addresses as long as tsocks doesn't support socks 4a as otherwhise you will still send out a (non-anonymized) DNS request! Postfix annoyancesPostfix refuses to deliver to a mailbox > 50MBSet 'mailbox_size_limit' to some other value:mailbox_size_limit = 2147483648 Postfix refuses e-mails > 10MBSet 'message_size_limit' to some other value:message_size_limit = 2147483648 Postfix refuses to deliver mail while there's plenty diskspace left ('452 Insufficient system storage')Set 'queue_minfree' to some other value:queue_minfree = 2024000WARNING: 'queue_minfree' must be at least 1.5 x the 'message_size_limit'! Changing size of gnuplot imagesYou for example enter this in your gnuplot script:set term pngreplace that by for example: set term png size 1024,480 Running minimalist from procmail
Run several fetchmail mail retrievals in parallelFetchmail doesn't have a standard way of retrieving mail for multiple servers at the same time. With this script you can do so:#!/bin/sh cd ~ for i in `grep -e "^ *poll " ~/.fetchmailrc | awk '{ print $2; }' | sort -u` ; do \ (mkdir -p .$i.fm ; FETCHMAILHOME=.$i.fm fetchmail -f ~/.fetchmailrc $i &) ; doneFor it to work, your .fetchmailrc should look like this: poll servernickname via hostname: Calculating effective bitrate for ADSLIP-traffic is tunneled over ATM when using ADSL. So you won't get the exact 2Mbit or what ever your ISP tells you you have.To find the real bandwitdh: divide by 9.6 and then multiply by 8. CPAN modules fail to compileThen you're probably on a RedHat >= v9 system.Do this: export LANG=Cand retry. complaints of grsecurity-kernel about RLIMIT_CORE being 0If, while running program x, a segmentation fault occurs in program x and syslog outputs the following string:Apr 17 11:55:06 yyy kernel: grsec: attempted resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 by (x:z) UID(y) EUID(y), parent (y:y) UID(y) EUID(y) then kernel tried to write a core-file for the program x to disk, BUT the max size of the core file is set to 0. Growing the maximum size of a core file: ulimit -S -c 8192 GCC (ld) complains: ld: Undefined symbols: ___gxx_personality_v0Add the following to the line with LDFLAGS=:-lstdc++ Enabling root-access on MacOS XIt is o-so-trivial:passwd rootand enter the new root-password twice. KDE only using TrueType and Type1 fonts after upgrade to 3.1.3After upgrading KDE from version 3.1.2 to 3.1.3 (in Debian), KDE suddenly only used TrueType and Type1 fonts. If you have only a limited set of fonts, this is a bit of a nuisance since everything might look a little odd then. If this is the case, check that you have switched off 'Anti Aliasing' in the font-menu of the KDE-control center. If it is off and things look still weird (after restarting KDE!) check the file /etc/fonts/local.conf and uncomment the following line:<!-- <dir>/usr/X11R6/lib/X11/fonts</dir> -->it should then look like this: <dir>/usr/X11R6/lib/X11/fonts</dir>After that, run the following command and restart KDE: fc-cache -f -v NFS shares get stale after a while or don't mount at allThis might be caused by the fact that the server really wants to have portnumbers below 1024 for the session. Adding insecure to the exports-file fixes that.Example: /home somehost(rw,insecure) Postfix (+ fetchmail) complains about mail-loopsWhen retrieving your e-mail for your domain to your local system with fetchmail via PostFix, mail seems to get bounced.If the system you're receiving the mail from uses QMail or PostFix to process your mail, add: dropdeliveredto the end of the line saying something like: user 'username' there with password 'password' is * here options ... dropdelivered 'apt-get' (Debian) says "E: Dynamic MMap ran out of room" and bails outCreate a file /etc/apt/apt.conf and put something like:Apt::Cache-Limit 67108864;in it. If it still fails, make that number higher. "Girotel" with KonquerorWhen you want to do your banking stuff in Girotel with Konqueror:
Displaying a man-page in ASCIIman ManName | col -b > ManName.txt Get a Perl-module from CPANThe easy way which also automatically fetches all modules needed by the module:perl -MCPAN -e 'install modulename'e.g.: perl -MCPAN -e 'install WWW::Search' nfs mounts mysteriously failingWhen you get the following error:rpc.mountd: refused mount request from x.x.x.x for /something (/): no export entry make sure the nfs-server can resolve the hostname of the client-system. Hard to find bugs in scriptsTo switch on tracing:set -x `at' not doing anything when running seti@homeRun atrun with -l <number of seti@home instances>.If you're running for example 2 instances of seti@home (or something similar), do: atrun -l 2.0 domain lookups returning SERVFAILSay you've setup a DNS for your domain. You did everything like the HOW-TO told you.But for every query you do, you get something like "** server can't find hostname: SERVFAIL". Then add the following: $TTL 1Dto the top of your zone-file and restart bind (named). Handling files > 2GBIn your source, before all the #include-statements, put the following:#define _LARGEFILE64_SOURCEUse open64, create64, lseek64, etc. When you want to printf an offset, use the following: printf("%lld", offset); Creating a shared libraryFirst, compile your C-code:cc -fPIC -O -c file.c -o file.oThen, create a .a-file: ar -r libname.a file.oand finally, create the shared library: ld -x -shared -soname libname.so.1 -o libname.so.1.0 --whole-archive libname.a Windows user gets message when printing through SambaAdd the following command to the printer-section:print command = echo `date` print job queued: %p %s | tee -a /dev/tty11 \ | smbclient -M %m 2>&1 > /dev/null ; lpr -r -h -P %p %s Building a Linux-kernel on an AlphaThe magic command is:make boot modules modules_installOutput-image is in arch/alpha/boot/vmlinux.gz. Also, see: http://www.cromwell-intl.com/unix/linux-alpha-kernel.html. System acting funny after updating GLIBCI found that after updating glibc and things, multiple programs started acting funny: Apache+SquirrelMail denying all logings, nmbd segfaulting, etc. etc. Stopping those processes and restarting them didn't seem to help. The only "solution" I could find was... a reboot! Very very strange. If anyone knows what I forgot to do (yes, I ran ldconfig) please tell me: folkert@vanheusden.cominetd[xxx]: getpwnam: root: No such userSo you decided to upgrade glibc to the latest and greates version, but now suddenly inetd gives this strange error in syslog and you don't seem to be able to, for example, pick up your mail through pop3. The solution is this: in /etc/nsswitch.conf replace "compat" to "files" for the following three entries:passwd: files group: files shadow: files Reducing the frequency of disk-writesI found that my Linux-system was way to noisy for my bedroom: almost every 5 seconds it was writing to disk. I found 2 solutions:1. use noflushd, but I didn't like that: it also spins down the harddisk which reduces the lifetime of your harddisk 2. fiddle around with mount-options and kernel-parameters For the last option, I did 2 things: in /etc/fstab I added 'noatime' to the options of the mounted partition: /dev/hda2 / ext3 defaults,noatime 1 1and I set some parameters which make disk-reads occur as soon as (reasonably) possible and disk-writes only when all buffers are at their limits: echo "90 500 0 0 600000 600000 95 20 0" > /proc/sys/vm/bdflush /sbin/elvtune /dev/hda -r 2048 -w 131072Warning: don't use these settings if your PC is not reliable and crashes often or when power-outtages occur frequently! Comparing files & taking some action based on outcomeMethod 1cmp -s file1 file2 || { # do something } Method 2cmp -s file1 file2 if [ $? = 1 ] then # do something fi Configuring a WIFI-setupWhen you want to change the channel or baudrate or something, first bring down the interface. I found that otherwise the changes are most of the time(!) ignored.ifconfig ethx down iwconfig ethx ... ifconfig ethx up Configuring TINC for a VPNTinc can be kind of hard to setup when you're new to it; the manual is just way to elaborate. For the impatient, I wrote a very small howto. You can find it here: tinc_mini_howto.html |