General dumping ground for computer-related notes
To convert video formats: ffmpeg -i foobar.avi -s 320×240 -r 23.98 output.avi
-s 320×180 for wide screen
The -r 23.98 is to fix this error: Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (23976024/1000000
which usually causes this one: Error while opening codec for output stream #0.0 – maybe incorrect parameters such as bit_rate, rate, width or height
Also handy is cpu frequency throttling or scaling, needed to keep my thinkpad T41p from overheating and automatically shutting down: First, change the governor to “userspace” us ing the gnome CPU frequency scaling monitor. Then, as root, do: echo 1100000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
For some reason this is 1.2 Ghz, but close enough. Maybe an SI units vs Gibi style units issue? But it works. Cpu temp pegged at 73 celcius instead of hitting 90+ and overheating at the full 1.7Ghz this machine runs. More information at this link.
——————————–
25 December 2007
To get Fedora 8 liveCD to boot on a Thinkpad T61p: Since the video won’t work, hit tab at the boot menu to edit the entry and add a 3 to set the runlevel. This prevents X from starting. Then issue:
system-config-display –set-driver=vesa, and then startx. Then it will run, and the installer should work as well.
When you boot into the new system you will again have to add a 3 on the kernel parameters line and run system-config-display –set-driver=vesa. Then run startx or gdm. When you log in you can then run system-config-display graphically and select a generic LCD panel 1900×1200. Log out and when gdm makes X come back you should be in business.
——————————–
5 January 2008
To enable emacs key bindings in gnome and firefox:
gconftool-2 –set /desktop/gnome/interface/gtk_key_theme Emacs –type string
(found at mozillazine.)
——————————–
5 March 2008
To batch covert a bunch of flac files to mp3:
for file in *.flac; do $(flac -cd “$file” | lame -h – “${file%.flac}.mp3″); done
(found at www.linuxtutorialblog.com)
——————————–
19 March 2008
To remove emacs splash screen/startup screen:
(setq inhibit-splash-screen t)
Or, by using the “customize” system:
M-x customize-variable inhibit-splash-screen
(found at peadrop.com and others)
——————————–
30 June 2008
To tunnel through the firewall and run vnc:
ssh -f -N -L 5901:localhost:5901 -X username@remotebox.example.com
vncviewer localhost:5901
Voila: VNC connection, secured by SSH. When you are done just
(found on slashdot)
killall ssh
.
Note that 5901 means the :1 VNC session, 5902 means :2, etc.
——————————–
11 July 2008
If a linux system comes up in single-user mode and STILL won’t let you edit things (filesystem is READ ONLY, even if the output from mount tells you rw) try
mount -o remount,rw /
(found at fedoraforum.org
——————————–
31 July 2009
Fix for firefox being really slow on DNS lookups: Enter
about:config
in the location bar. Then find the key network.dns.disableIPv6 and set it to true.
This disable IPv6 lookups which usually don’t work, at least not way back in 2009.
(found at WilksNet Tech Blog. Thanks!)