tail -f /var/log/messages on laptops, i toss on the LTS version of ()buntu, set w00t pass, apt-get update && apt-get dist-upgrade && apt-get install kubuntu-desktop, set kdm as the default and rock on. that way, when a new LTS is released in a few years, it's no big hassle to upgrade. =============================================================== #### X Forwarding #### console: loadkeys . X: setxkbmap -layout ssh name@box export DISPLAY=":0" =============================================================== #### WIFI tweaks #### Am working round it with a manual trick: #iwconfig wlan0 rts 800 #iwconfig wlan0 rate 54M #iwconfig wlan0 rts off iwconfig wlan0 rts 800 && iwconfig wlan0 rate 54M && iwconfig wlan0 rts off =============================================================== #### Mouse control stuff #### To disable mouse acceleration: xset m 1 1 Slow the mouse down in xorg.conf, with e.g. Option "Sensitivity" 0.2 Alternatively, could use: xset m 1/5 1 =============================================================== #### Freeing caches (bonsiakitten) #### ----------------------------------------------------- To free pagecache the user should run "sync" first!: # echo 1 > /proc/sys/vm/drop_caches To free dentries and inodes: # echo 2 > /proc/sys/vm/drop_caches To free pagecache, dentries and inodes: echo 3 > /proc/sys/vm/drop_caches swapoff -a && swapon -a =============================================================== ### XSYS COMMANDS #### X-Sys 2 has the following implemented commands: /XSYS & /EXSYS - Output current version, either to channel or echoed on screen. /CPUINFO & /ECPUINFO - Echoes or says current cpu statistics /SYSUPTIME & /ESYSUPTIME - Echoes or says current uptime /OSINFO & /EOSINFO - Echoes or says various OS statistics /SOUND & /ESOUND - Echoes or says the current sound card, as determined by ALSA /NETDATA & /ENETDATA - Echoes or says total amount transferred through a network interface. Use like: `/netdata eth0' (where eth0 is a network interface) /NETSTREAM & /ENETSTREAM - Echoes or says amount of bandwidth being used. Use like: `/netstream eth0' (where eth0 is a network interface) /DISKINFO & /EDISKINFO - Echoes or says free space on partitions. The DISK command has a few arguments as follows: ALL - Displays every partitions /mount - Displays free space for that specific mount point No arguments just displays total free space /MEMINFO & /EMEMINFO - Echoes or says memory information. /VIDEO & /EVIDEO - Echoes or says the current video card on the PCI bus /ETHER & /EETHER - Echoes or says the current network card on the PCI bus /DISTRO & /EDISTRO - Echoes or says which distro you're running If this doesn't work for your distro, look for a *-release file or similar in /etc E-mail this to chainsaw@gentoo.org and the big one: /SYSINFO & /ESYSINFO - Complete system information! =============================================================== #### KDE Desktop setup #### ----------------------------------------- Seperating desktop pictures on KDE4 vi ~/.kde4/share/config/plasmarc vi .kde4/share/config/plasma-desktoprc add the stanza [General] perVirtualDesktopViews=true =============================================================== route add -net default gw 192.168.2.1 dev eth0 route del -net default gw 192.168.2.1 dev eth0 =============================================================== #### Portage stuff #### cd /usr/portage/net-print/foo2zjs && ebuild foo2zjs-20081129.ebuild manifest FEATURES="-collision-protect -protect-owned" emerge -va foo2zjs how do i find out what files emerge -va {package} installed? equery files {package} FEATURES=-collision-protect emerge -va1 $(qfile -qC /usr/lib/cups /etc/cups | sed -e "s:net-print/cups$::") emerge --changed-use --with-bdeps y -uD1 --jobs=5 @system @world emerge -vDNua world --with-bdeps y emerge -vDNua world --with-bdeps y PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/amd64-stable" emerge -aG glibc gcc binutils PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/amd64-stable" emerge -uG @system emerge --deselect sys-apps/systemd; emerge -av1 sys-fs/udev `eix -c --world` for the packages that are installed on purpose, `eix -c --installed` for everything that's installed. To clean/remove uneeded packages from /usr/portage/disfiles #### eclean-dist -d To reread the postmerge messages? /var/log/portage/elog/summary.log /var/lib/portage/world world file lives here =============================================================== #### Creating a bootable thumbdrive #### dd the image i.e dd if=livedvd.iso of=/dev/sdb bs=8192k =============================================================== =============================================================== GOOGLE SEARCHING bugzilla +ebuild site:forums.gentoo.org site:forums.gentoo.org =============================================================== #### Caffeine #### It is by will alone I set my mind in motion; It is by the alkaloid Caffeine that the thoughts acquire speed, the limbs acquire shakes, the shakes become a warning. It is by will alone I set my mind in motion. ============================================================================ TO REMOVE ALL COMMENTED LINES FROM A FILE egrep -v "(^#|^ *$)" /etc/lilo.conf ============================================================================ HARD DRIVE NAMING tune2fs -L {name} /dev/sdXx to name an ext filesystem (drive) so that it uses that 'label' when auto-mounted ntfslabel /dev/sdXx {name} to name an ntfs filesystem (drive) so that it uses that 'label' when auto-mounted. ============================================================================ X :1 -ac & DISPLAY=:1 startfluxbox will start another X session on f8 (or next available) and start fluxbox on it ============================================================================ To change regulatory domain settings for your system: http://linuxwireless.org/en/users/Documentation/iw#Updating_your_regulatory_domain root@localhost# ifconfig wlanX down root@localhost# iw reg set BO root@localhost# iwconfig wlanX | grep [T]x-Power Output will display Tx-Power, verify that Tx-Power=30. http://linuxwireless.org/en/users/Documentation/iw#Setting_TX_power If Tx-Power is not set to 30, do: root@localhost# iwconfig wlanX txpower 30 root@localhost# ifconfig wlanX up ============================================================================ The script I have right now for turning off laptop's internal display and turning on the 2 externel, and arranging them as a extended desktop: xrandr --output LVDS1 --off && xrandr --output HDMI2 --auto --output HDMI3 --auto --right-of HDMI2 ============================================================================ ============================================================================ RSYNC VIA SSH FROM rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/ TO rsync -avz /this/dir/ -e ssh remoteuser@remotehost:/remote/dir ============================================================================ To disable transition effects in the screensaver of KDE: add EffectsEnabled=false to the end of ~/.kde4/share/config/kslideshow.kssrc ============================================================================ Clone NTFS on /dev/sda1 to /dev/sdg1: ntfsclone --overwrite /dev/sdg1 /dev/sda1 ============================================================================ *** Converting .MPG files to .3GP ffmpeg -i clip-1.mpg -s qcif -vcodec h263 -ac 1 -ar 8000 -ab 32 -y clip-1.3gp ffmpeg -i inputfile.mpg -s qcif -vcodec h263 -acodec aac -ac 1 -ar 8000 -r 25 -ab 32 -y outputfile.3gp *** Convert from AVI to 3GP ffmpeg -i inputfile.avi -s qcif -vcodec h263 -acodec aac -ac 1 -ar 8000 -r 25 -ab 32 -y outputfile.3gp *** Convert from 3GP to AVI ffmpeg -i clip.3gp -f avi -vcodec xvid -acodec mp3 -ar 22050 file.avi *** Convert mp4 to mpg ffmpeg -i Test-Video-1.mp4 -target ntsc-vcd Test-Video-1.mpg *** Converty wmv to mp4 ffmpeg -i inputfile.wmv -an -ar 44100 -b 300k -s 320x240 -vcodec mpeg4 output.mp4 #### ffmpeg info #### /usr/bin/ffmpeg -i {input.flv} -y -v 0 -f mpeg2video -target ntsc-dvd {location/filename.mpeg} mpeg converstion /usr/bin/ffmpeg -i {input.flv} -y -v 0 -acodec libmp3lame -f avi -vcodec mpeg4 {location/filename.avi} avi conversion /usr/bin/ffmpeg -i {input.flv} -y -v 0 -f mpeg2video -target ntsc-dvd {location/filename.mpeg} mpeg converstion /usr/bin/ffmpeg -i {input.flv} -y -v 0 -acodec libmp3lame -f avi -vcodec mpeg4 {location/filename.avi} avi conversion /usr/bin/ffmpeg -i {input.flv} -y -v 0 -f mpeg2video -target ntsc-dvd {location/filename.mpeg} mpeg converstion /usr/bin/ffmpeg -i {input.flv} -y -v 0 -acodec libmp3lame -f avi -vcodec mpeg4 {location/filename.avi} avi conversion ============================================================================ MISC CRAP alias sprunge="curl -F 'sprunge=<-' http://sprunge.us" foo 2>&1 | sprunge gpg -e < file > file.enc gpg -d < file.enc > file update > somefile 2>&1 gcc -march=native -E -v - &1 | grep cc1 <-- will show you what '-march=native' will use. all i did was follow the gentoo wiki guide (https://wiki.gentoo.org/wiki/Bluetooth). stay on the path for bluez4. i forgot why i chose bluez4 over 5, but i remember that it was important. then set -pulseaudio use flag for blueman fsck.ext3 -f -p -v -c -k /dev/blah-blah lspci -k | grep use | sort -u strace kmail 2>&1 /usr/bin/john -incremental -stdout | aircrack-ng -a 2 --bssid [bssid goes here] pentestwifi.cap -w - rsync -vzaP {source} {target} mount -t debugfs none /sys/kernel/debug/ ls='ls --color=auto -lahF --time-style=+%F" "%H":"%M' mplayer tv:// -tv driver=v4l2:device=/dev/video0:noaudio /etc/udev/rules.d/70-persistent-net.rules ============================================================================ LAPTOP TOUCHPAD CONFIGURATION Griz64: cp /usr/share/X11/xorg.conf.d/50-synaptics.conf /etc/X11/xorg.conf.d/; then edit /etc/X11/xorg.conf.d/50-synaptics.conf to your liking Griz64: see https://wiki.gentoo.org/wiki/Synaptics#Fixed_Configuration synclient TapButton1=1 .xinitrc ============================================================================ grknight, i've never 'blacklisted' anything in Gentoo. How do I go about that? Griz64_: echo -e "blacklist drm\nblacklist radeon" >> /etc/modprobe.d/radeon-disable Griz64_: that will prevent loading on boot. then you can do 'modprobe -r -a radeon drm && modprobe fglrx' to affect the running system (with xorg stopped) ============================================================================ Freenode info /chanserv op #gentoo-chat /mode -o Griz msg nickserv ghost nick pass muteacct /^msg chanserv op $C $N; /wait 50; /mode +q \$a:$0; /wait 50; /deop $C $N do a /whois first, to get their account name, then do /muteacct freenode /msg chanserv flags #Gentoo-Chat-OPs *!*@unaffiliated/monkeh +v+O+t+A /msg chanserv set #gentoo-chat-ops MLOCK +s set the channel as SECRET oftc /msg chanserv access #Gentoo-Chat-OPs add UberPinguin chanop /msg chanserv set #Gentoo-Chat-OPs autoop on /msg chanserv access #Gentoo-Chat-OPs add UberPinguin master #### SINSUN FORMAT #### $ban 108 set reason PermaBan for language and attempting to abuse an OP. /msg chanserv flags #Gentoo-Chat-OPs *!*@gentoo/developer/tomwij +v+O+t+A /msg ChanServ akick #gentoo-chat list /msg chanserv akick #gentoo-chat add smiley because monkeh told me too /remove #Gentoo-Chat {user} yanks them out of the channel but does NOT invoke the auto-rejoin on their client! /remove #Gentoo-Chat edit_21 /msg MemoServ READ NEW Examples for AKICK: /msg ChanServ AKICK #foo ADD bar you are annoying | private op info /msg ChanServ AKICK #foo ADD *!*foo@bar.com !T 5d /msg ChanServ AKICK #foo DEL bar /msg ChanServ AKICK #foo LIST /msg ChanServ AKICK #Gentoo-Chat ADD DonationFN Your messages of hate are never welcome. /msg ChanServ AKICK #Gentoo-Chat ADD {$USER} {$MESSAGE} /msg ChanServ AKICK #Gentoo-Chat ADD %s You've just earned yourself a PermaBan. Congratulations!! ============================================================================ xrandr --rmmode 1368x768 xrandr --newmode "1368x768" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync xrandr --addmode default "1368x768" xrandr --addmode HDMI-0 "1368x768" xrandr --output HDMI-0 --mode 1368x768 ============================================================================ 1 00-1E-8C-3F-76-4E 192.168.222.2 Enabled Modify Delete 2 00-C0-CA-26-9B-D4 192.168.222.5 Enabled Modify Delete 3 0C-EE-E6-A9-31-13 192.168.222.7 Enabled Modify Delete ============================================================================ KERNEL STUFF make silentoldconfig -- silences already-set options, but still prompts you for any new stuff make olddefconfig -- just accepts the defaults for any new options To clean kernel sources and create a default .config file make clean && make distclean && make mrproper && make defconfig genkernel --kernel-config=/some/config --no-clean --bootloader=grub2 --callback="module-rebuild rebuild" all && mount /boot && grub2-mkconfig > /boot/grub2/grub.cfg && init 6 ; genkernel --install --no-clean --makeopts=-j7 --no-mountboot --zfs --integrated-initramfs --callback="module-rebuild rebuild" all grub2-mkconfig -o /boot/grub/grub.cfg Kernel build line cd /usr/src && cp /usr/src/linux/.config /usr/src/linux-$1 && unlink /usr/src/linux && ln -s /usr/src/linux-$1 /usr/src/linux && cd linux && make oldconfig && make all modules_install install && module-rebuild rebuild ============================================================================ Asalamalakem ============================================================================ FUSE FILESYSTEM INFO sshfs griz@192.168.222.7:/home/griz/ /home/griz/fusemounts fusermount -u /home/griz/fusemounts UNMOUNTING SSHFS fusermount -u -z /home/griz/sshfs-mount-point ============================================================================ mtab | * Updating /etc/mtab ... mtab | * The support for updating /etc/mtab as a file is mtab | * deprecated and will be removed in the future. mtab | * Please run the following command as root on your system. mtab | * ln -snf /proc/self/mounts /etc/mtab