Ubuntu

Recompile VirtualBox kernel module in Ubuntu

เวลาเราเปลี่ยน kernel ใหม่ เจ้า VirtualBox ก็ต้องถูกคอมไพล์ส่วน kernel module ใหม่ด้วย โดยใช้คำสั่งนี้

sudo /etc/init.d/vboxdrv setup

ถ้าไม่อยากมานั่งคอมไพล์ใหม่เองทุกครั้งให้ติดตั้ง Dynamic Kernel Module Support (DKMS) เอาไว้ คงต้องรอเปลี่ยน kernel ครั้งหน้าว่าจะทำงานได้จริงหรือเปล่า

Bluetooth file transfer in Ubuntu 9.04

เนื่องด้วยหลังจากทำการติดตั้ง Ubuntu 9.04 บนโน๊ตบุ๊คแล้ว Bluetooth ก็ดูเหมือนจะใชได้ดี เลยทดสอบแค่ส่งไฟล์จากโน๊ตบุ๊คไปหามือถือ แล้วก็ถือว่าผ่าน

เป็นเวลานานกว่าจะมารู้ตัวว่ามันส่งไฟล์จากมือถือเข้าโน๊ตบุ๊คไม่ได้ เลยพึ่งพาพี่กูเกิลเจ้าเก่าหาคาถามาได้ดังนี้

sudo apt-get install gnome-bluetooth bluez-utils python-bluez

เวลาจะใช้ก็เรียกโปรแกรมที่ชื่อ Bluetooth File Sharing ขึ้นมาเป็นอันใช้ได้

Enable USB support for Virtualbox on Ubuntu host

  • Create a user group called "usbfs" and remember its group ID.
  • Add the following lines to /etc/fstab (need root permission) and replace "1001" with the group ID you just created.

    # 1001 is the USB group ID
    none /proc/bus/usb usbfs devgid=1001,devmode=664 0 0

  • Connect the USB device.
  • In virtual machine setting go to USB section and add device to the virtual machine.
  • Start the virtual machine and your USB device should be mounted and ready to function.
  • **Remark** USB device must be unmounted in Ubuntu before virtual machine can recognize it.

Completely remove KVM to prevent error in Virtualbox

ปกติเวลาจะ uninstall โปรแกรมใน Ubuntu ก็ใช้คำสั่ง

sudo apt-get remove packagename

แต่เรื่องมีอยู่ว่าช่วงนี้ผมต้องลองใช้โปรแกรมจำพวก Visual Machine หลายตัวซึ่งจะมีบางกรณีที่โปรแกรมจะไม่สามารถทำงานได้ถ้าโปรแกรมอีกตัวหนึ่งติดตั้งไว้อยู่ โดยที่ผมเจอจะเป็นกรณีที่ Virtualbox ไม่สามารถเรียกใช้ Visual Machine ได้ถ้าโปรแกรม KVM ยังถูกติดตั้งอยู่ในระบบ

แต่หลังจากถอด KVM ออกไปแล้วก็ยังไม่สามารถใช้ Virtualbox ได้อยู่ดี ก็เลยต้องพึ่งลูกพี่กูเกิลตามระเบียบ ซึ่งก็ได้ความว่าถ้าใช้คำสั่งตามด้านบนระบบจะลบแค่ตัวโปรแกรมแต่พวก config file ต่างๆ จะยังเก็บไว้อยู่ ทำให้ Virtualbox ยังคิดว่ามี KVM ถูกติดตั้งอยู่ในระบบ ฉะนั้นเราต้องถอนรากถอนโคนมันด้วยคำสั่งนี้

sudo apt-get purge packagename

วิญาณของ KVM ก็ไปสู่สุขคติไม่มากวนใจอีกต่อไป

An user-friendly way to mount ISO image in Ubuntu

Normally, this is how I mount an ISO image file in Ubuntu

sudo mount -o loop -t iso9660 /path/to/iso/image/image.iso /where/to/mount/

I always forget this command since I don't have to deal with this type of file much so I have to google it every time I want to mount this one.

Fortunately, in my last attempt I found an easy way to mount an ISO file, Gmount-iso.

Read the rest of this entry »