Saturday, December 26, 2009
Cheese webcam problem in Crunchbang
It can be solved by run like this "cheese --sync"
Change Superkey to right-Alt in Crunchbang
- Create .Xmodmap file in /home/[usr]
- insert these code
remove mod1 = Super_R
add mod4 = Super_R
3. edit autostart.sh
4. add "(sleep 1s && xmodmap ~/.Xmodmap) &"
Sunday, December 13, 2009
Wednesday, December 2, 2009
ubuntu 9.04 upgrade kernel 2.6.31 makes blank screen
and add: ro i915.modeset=0 quiet splash
Thursday, November 12, 2009
Pidgin doesn't show correct display font
Friday, September 25, 2009
Diablo2 exp on ubuntu 9.04 via wine
create symbolic link or copy from windows into
/home/$(id-nu)/.wine/dosdevices/c:/Program Files
if you want to play diablo2 in linux
you must have d2loader
http://d2loader.blizzsector.net/
and if you want multi resolution you must have d2multirese
http://www.moddb.com/games/diablo-2/news/d2multires
install winetricks then vcruntime2005
Monday, September 14, 2009
fix 9.04 intel driver problem
Tuesday, September 8, 2009
Thursday, September 3, 2009
Linux boot partition
To insert menu for boot windows just go,
/boot/grub/menu.lst
Recovery Ubuntu after install Windows
As above, when Windows is reinstalled, the master boot record will be overwritten. This can be avoided by backing up the boot sector, by following the instructions from step 2 in the above section 'Installing Windows After Ubuntu'. An alternative method, which has the advantage of not requiring forward planning, is to use the Ubuntu LiveCD to reinstall the GRUB boot sector, here are step-by-step instructions, to be run after Windows has been reinstalled:
1. Boot into a LiveCD
2. Open a terminal
3. Open the GRUB Command line utility by typing
sudo grub
4. Tell GRUB where your Ubuntu partition is by entering
root (hdA,B)
Where 'A' is the hard-drive number, starting at 0, and 'B' is the partition number, starting at 0. For example, if Ubuntu was installed on the second partition of the first hard-drive, the command should be
root (hd0,1)
5. Tell GRUB which drive to put the boot sector on
setup (hd0)
(replacing 0, as above, if a drive other than the first is used as the boot device)
6. Leave the GRUB Command line
quit
and reboot.
Friday, August 14, 2009
extract multiple rar
filename.rar.001
filename.rar.002
filename.rar.003
filename.rar.004
filename.rar.005
//command
cat filename.rar* > filename.rar
Tuesday, August 11, 2009
rip dvd and mount iso dvd in ubuntu
dd if=/dev/sr0 of=thecorrs.iso bs=1024
to mount :
sudo mount -o loop -t iso9660 /wherever/iso/image/is/image.iso /media/iso/
to umount :
sudo umount /media/iso
*force umount
umount -f -l /mnt/cdrom
Monday, August 10, 2009
No sound in Ubuntu 9.04 firefox,vlc
*No sound after upgrade when using meebo to send a message in the first time, meebo need sound to beep and then the audio is muted
Monday, July 20, 2009
เปลี่ยนนามสกุลไฟล์
for old in *.TTF; do echo $old; done
This will give me a list of all *.TTF files. Now to rename the file I use the command mv
mv something.TTF something.ttf
This just like renaming. I don't know how to use the command rename though. Finally to cutout only name without file's extension
for old in *.TTF; do echo `basename $old .TTF` ; done
This will give you the files without their extensions. Finnally I add the new extension .ttf to this and use the command mv to rename all file ending with .TTF to their old name but new extension .ttf
for old in *.TTF; do mv $old `basename $old .TTF`.ttf ;done
I know that I am just a nope showing something trivial to those who working with linux but, you know, it might be some people don't know this.
ที่มา : http://monoguy.exteen.com/20080901/rename-multiple-files-in-ubuntu
Sunday, July 19, 2009
Resize batch images in Ubuntu
for i in `ls`; do convert -resize 800x800 -quality 65 $i resized_$i; done
Tuesday, June 30, 2009
default firefox search plugins for google
ไปที่ /usr/lib/firefox-addons/searchplugins/ แล้วโหลด http://www.mozillalinks.org/download/google.xml
มาทับ แก้ไข template="http://www.google.com/search" เป็น template="http://www.google.co.th/search"
Friday, June 12, 2009
IPV6 in Fedora11 causes rpmfusion couldn't be install
Check if the module is loaded
IPv6 functionality is being made available to the system by the ipv6 kernel module. To check if this module is currently loaded in your system, issue the following command as root:
lsmod | grep ipv6
If you see ipv6 in its output, then the module is loaded.
Performing this check is absolutely not necessary. It is included in this article for completeness.
Disable IPv6
You can prevent a module from being inserted into the kernel by either blacklisting it or by completely disabling it.
In this case, since you will most probably turn off the IPv6 firewall (ip6tables) as well, it is highly recommended to completely disable the ipv6 module, to avoid any accidental loading of the IPv6 stack without any firewall protection at the same time.
How the module blacklist works
This information about blacklisting a kernel module exists here for educational purposes. It has been mentioned above that for ipv6 it is important to completely disable it.
From the modprobe.conf man page:
Modules can contain their own aliases: usually these are aliases describing the devices they support, such as “pci:123…”. These “internal” aliases can be overridden by normal “alias” keywords, but there are cases where two or more modules both support the same devices, or a module invalidly claims to support a device: the blacklist keyword indicates that all of that particular module’s internal aliases are to be ignored.
So, blacklist indicates that a module’s aliases should be ignored. But, what happens if an application requires to load that specific module or if root uses modprobe to load it on demand? Let’s test it…
To blacklist the module, simply save the following line in a file inside /etc/modprobe.d:
blacklist ipv6
Next, disable any services that use IPv6, eg ip6tables or any IPv6-enabled network interfaces and reboot (mandatory).
After you’ve logged-in again, try, for example, to load the ipv6 module with the modprobecommand (as root):
[root@centos]# modprobe -v ipv6 insmod /lib/modules/2.6.18-53.1.14.el5/kernel/net/ipv6/ipv6.ko [root@centos]# lsmod | grep v6 ipv6 251393 8
The blacklisted module has been loaded. This is what happens if it is needed by a system service, regardless of the fact that it has been blacklisted. In the case of ipv6 this could be a security risk, provided that the ipv6 firewall has been turned off but some network interfaces still use IPv6. So, frankly, it is suggested to read on how to disable the module more aggressively…
Completely disable the ipv6 module
To completely disable IPv6 in your system, all you have to do is save the following line in a file inside /etc/modprobe.d/.
install ipv6 /bin/true
The above line means: whenever the system needs to load the ipv6 kernel module, it is forced to execute the command true instead of actually loading the module. Since /bin/true, does absolutely nothing, the module never gets loaded.
Again, it is required to reboot for the changes to take effect.
It is obvious that this is an aggressive method to disable kernel modules, but it guarantees that the module never gets loaded.
This is the recommended way to disable IPv6.
Other Configuration Tasks
Since the IPv6 functionality has been disabled, you can disable the ip6tables service (IPv6 Firewall). Issue the following command as root:
chkconfig ip6tables off
It is also a good idea, since the ip6tables service has been turned off, to disable any IPv6-related functionality in the network interface configuration. Even if you do not do this, the IPv6 stack will not be initialized because the ipv6 module cannot be loaded. But, generally, you could set the following options to “no” inside your network interface scripts, for example:/etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT=no IPV6_AUTOCONF=no
Finally, In fedora 8 or newer you can safely remove the following option from the /etc/sysconfig/network file, if it exists:
NETWORKING_IPV6=no