星期二, 5月 25, 2010

linux note

 Open Office is pretty slow and painful to use out of the box.  This simple step by step procedure speeds up the software, making it much more pleasant to use.

Open OOo (I use writer for this process). Select Tools -> Options. Select Memory.

Number Of Steps: 20
Use for OpenOffice.org: 128
Memory Per Object: 20
Number Of Objects: 20
Enable Quickstarter: Checked

Select Java.
Use a JRE: Checked (Alternately, Uncheck if you do not have Sun Java installed)
Select the radio button of the appropriate Java Engine if needed.

Click OK
Close OOo


 P5Q-EM
Sensor Properties:
Sensor Type    Winbond W83627DHG (ISA 290h)

modprobe w83627ehf force_id=0x8860


ssh -R 2215:localhost:22 icarus@X.X.X.X -N -f sleep 20
ssh edward@localhost -p 2215


mencoder -profile svi -vf scale=480:800,harddup

sysctl vm.max_writeback_pages=8192

VBoxManage   modifyvdi vmxpd.vdi compact

vmware-modconfig -–console -–install-all


mkfs.ext3 -b 4096 -j -E stride=32 -m 1  -O dir_index,filetype  /dev/md15
mkfs.ext4 -b 4096 -j -E stride=64,stripe-width=128 -m 1  -O dir_index,filetype
#Create xfs filesystem with a 64 megabyte log
mkfs.xfs -f -l size=64m /dev/hda3
#Mount filesystem with 8 log buffers, and atime and diratime disabled
mount -o noatime,nodiratime,logbufs=8 /dev/hda3 /mnt/gentoo/


rpmbuild --target=i686-redhat-linux --define 'dist .el5'   --define '_without_speex 1'  --rebuild ffmpeg-0.5-2.rf.src.rpm



find ../ -name "*rar" -print0 | xargs -0 -Iname unrar -o-  x name


mv /usr/lib/vmware/modules/binary /usr/lib/vmware/modules/binary.old
vmware-modconfig -–console -–install-all --validate-kernel-headers --validate-gcc


with 11.2: Found out that ipv6 is no longer a module, it is in the
kernel, so you can administratively disable with a kernel option in
grub's menu.lst of ipv6.disable=1 but individual applications can
still send out v4 and v6 queries. In my case yast2 -> software ->
online update still sends out both, until I find out how to disable.



http://wiki.centos.org/HowTos/OS_Protection


ALSA Driver
I got a simple solution for this compile problem.
Just open the ”./include/adriver.h” file in a text editor, go to line 100 and do one of the following :
Comment out the typedef : //typedef unsigned int fmode_t;
Change the kernel number : #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
(I've got the 2.6.27-xxxx so this effectively cancels the typedef without breaking compat with older kernels)
No if only I could get this laptop to make some noise … :(



VMWARE E1000 NIC QUICK HOW TO:

The steps are for VMWare Server 1.0, but may be similar
for other versions of VMWare.  Use at your own risk.
No warranty is expressed or implied.

Some users have reported problems with the Lance (default)
and VMXNet network card drivers with FreeBSD 6.x.  If these
occur, it is recommended to use the E1000 driver in their place.

1. In /etc/rc.conf, change ifconfig_lnc0 to ifconfig_em0
2. Make the same change in /usr/local/etc/conftemplates/rc.conf
3. shutdown -h now
4. (On host) Edit the /FreeBSD.vmx
5. Add a line:
    ethernet0.virtualDev = "e1000"
   Just below:
    ethernet0.present = "TRUE"
6. Boot the VM


ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg

把 Linux 桌面錄製為視頻。

cmake CMAKE_C_FLAGS=Release -DQTC_MODIFY_MOZILLA=true  -DQTC_DEFAULT_TO_KDE3=true ..

cmake -DQTC_DEFAULT_TO_KDE3=true  -DQT_PLUGINS_DIR=/usr/lib/qt-3.3/plugins -DQTC_BUILD_CONFIG_MODULE=true ..

cmake CMAKE_C_FLAGS=Release COMPILE_FLAGS="-O3 -march=core2 -mtune=core2 -mmmx -msse -msse2"  -DQT_PLUGINS_DIR=/usr/lib/qt-3.3/plugins -DQTC_BUILD_CONFIG_MODULE=true ..





:h motion.txt
:h syntax.txt
:h encoding
:h map.txt
:h tabpage.txt
:tabnew
:tabedit  /etc/hosts

Backup and restore


# dd if=/dev/hda of=/dev/hdc bs=16065b                # Copy disk to disk (same size)
# dd if=/dev/sda7 of /home/root.img bs=4096 conv=notrunc,noerror # Backup /

# dd if /home/root.img of=/dev/sda7 bs=4096 conv=notrunc,noerror # Restore /
# dd bs=1M if=/dev/ad4s3e | gzip -c > ad4s3e.gz                  # Zip the backup
# gunzip -dc ad4s3e.gz | dd of=/dev/ad0s3e bs=1M                 # Restore the zip

# dd bs=1M if=/dev/ad4s3e | gzip | ssh eedcoba@fry 'dd of=ad4s3e.gz' # also remote
# gunzip -dc ad4s3e.gz | ssh eedcoba@host 'dd of=/dev/ad0s3e bs=1M'
# dd if=/dev/ad0 of=/dev/ad2 skip=1 seek=1 bs=4k conv=noerror    # Skip MBR

    # This is necessary if the destination (ad2) is smaller.