ข้ามไปที่เนื้อหาหลัก

บทความ

กำลังแสดงโพสต์ที่มีป้ายกำกับ linux

arm-linux-gcc installation embeded system

Note that all software download is from their download page install arm-linux-gcc 1. download "ARM-Linux GCC 4.3.2" 2. export PATH=/usr/local/arm/4.3.2/bin:$PATH run HelloWorld 1. download "Linux examples" 2. cd /examples/hello 3. make their Makefile is peatty simple, you can adapt for your own CROSS=arm-linux- all: hello hello: $(CROSS)gcc -o hello hello.c clean: @rm -vf hello *.o *~ ref : Micro2440 Chinese Manual 2010-02-04

ลองใช้ Bloom : facebook photo uploader

หลังจากที่พยายาม เปิดหน้า upload รูปของ facebook ด้วย firefox หลายครัง มันทำให้ หมาไฟ เดี๊ยงไปทุกครั้ง ( เป็นความลำบากของ linux จริงๆ เมื่อไหร่ firefox มันจะซ่อม java ให้มันดีๆหน่อย ) จะอัพ ผ่าน simple uploader ของมัน ก็ขี้เกียจนั่งกดทีละไฟล์ ผ่าน gmail แม่งก็จำกัดขนาดของเมล์ที่จะส่ง อัพทิ้งไว้ทั้งคืนก็ไม่เสร็จ เลยลองไปหา client มาดู มีหลายอันเหมือนกัน แต่ส่วนใหญ่ เลิกพัฒนากันไปหมดแล้ว และเขาแนะนำ ตั้วนี้กัน Bloom TIPS : เวลารัน รันด้วย Java Web Start ของ Sun น๊ะจ๊ะ ถ้ารันจาก OpenJDK มันจะมีปัญหาตอนล็อกอิน ตอนล๊อกอิน ปลอดภัยประมาณนึง เพราะว่า ต้องไปล็อกอินที่หน้าของ facebook เอง เท่าที่ลองใช้ดู ก็ไม่มีปัญหาอะไร ลากๆ แล้วกด upload เท่านั้นเอง

matlab shortcut shortkey preferences in ubuntu linux

default เป็น ของ emac ไม่ถูกใจ อยากใช้เหมือน windows เซตตามนี้ ปล. มีให้เซต สองที่นะ Command Window Key กับ Editor debugger key binding ที่อยู่ทางขวา ที่ไม่ได้วงไว้ด้วยอ่ะ

Andrea Vedaldi's matlab sift toolbox library version 09.17 on ubuntu linux

กว่าจะลงได้ ลากเลือด จดไว้หน่อย เสือกใช้ gcc version เก่า >> sift_compile Warning: You are using gcc version "4.3.3-5ubuntu4)". The earliest gcc version supported with mex is "4.0.0". The latest version tested for use with mex is "4.2.0". To download a different version of gcc, visit http://gcc.gnu.org เอ้า จัดไป เวอร์ชั่นเก่าก็ได้ $ sudo ln -s /usr/bin/gcc-4.1 /usr/bin/gcc ข้างบน คือ วิธีหน้าโง่ จริงๆ เข้าไปแก้ใน ไฟล์ คอนฟิก ${HOME}/.matlab/R2008b/mexopts.sh ก็ได้ CC='/usr/bin/gcc-4.1' #'gcc' gcc version เก่า แม่ง ไม่มี stdc++ มาให้อีก ลิงก์ lib ให้มันซะ ไม่งั้นมัน error ld library ( จริงๆ เซต LD_LIBRARY_PATH ก็น่าจะได้ ) $ sudo ln -s /usr/lib/libstdc++.so.6.0.10 /usr/lib/libstdc++.so เท่านั้นแหละ compile ผ่านละ พอไป make บน linux $ make mex -I. CFLAGS='$CFLAGS -I. -pedantic -Wall -g -O3 -Wno-variadic-macros ' imsmooth.c -o imsmooth mex: unrecognized option '-I.' This is pdfTeXk, Version 3.141592-1.40.3 (Web2C ...

How to write c++ connect to RS-232 on ubuntu linux

ลองอะไรโง่ๆ แบบ คุยกันเองดิ๊ ต่อ serial เข้า COM1 กับ COM2 $ cat /dev/ttyS0 $ echo "Hello" > /dev/ttyS1 จากนั้นมันก็ขึ้น $ cat /dev/ttyS0 Hello ได้ล่ะ ต่อไปลอง USB to serial เราใช้ของ Prolific Technology, Inc. PL2303 Serial Port ( วิธีดูคือ $ lsusb ) เช็คก่อนว่าแม่งอยู่ dev ไหน $ tail -f /var/log/messages Oct 23 21:39:00 dsin-laptop kernel: [ 8115.163551] sd 7:0:0:0: [sdb] Attached SCSI removable disk Oct 23 21:39:00 dsin-laptop kernel: [ 8115.163610] sd 7:0:0:0: Attached scsi generic sg2 type 0 Oct 23 21:42:16 dsin-laptop kernel: [ 8311.437150] usb 2-1: USB disconnect, address 8 Oct 23 22:04:04 dsin-laptop -- MARK -- Oct 23 22:24:04 dsin-laptop -- MARK -- Oct 23 22:44:04 dsin-laptop -- MARK -- Oct 23 22:51:13 dsin-laptop kernel: [12448.145053] usb 5-1: new full speed USB device using uhci_hcd and address 3 Oct 23 22:51:13 dsin-laptop kernel: [12448.307168] usb 5-1: configuration #1 chosen from 1 choice Oct 23 22:51:13 dsin-laptop kernel: [12448.312019] pl2303 5-1:1.0: pl2...

Try "google earth" for "linux" on "ubuntu"

Download from here Installation $ chmod +x GoogleEarthLinux.bin $./GoogleEarthLinux TIPS : At fly to .., you can also search from latitude and longitude ( i.e. 37 25 19.07 N, 122 05 06.24 W ). see another support format from google

ubuntu update

ทุกที เวลาเข้า update manager ถ้ามันมีเวอร์ชั่นใหม่ มันจะอัพเดตให้เลย แต่คราวนี้ ก็รอ ร๊อ รอ 8.10 มันออกมาชาตินึงแล้ว มันก็ยังไม่มาสักที เลยลองหาใน พี่กู ได้ตามนี้ ของเรามันดันเลือกไว้ที่ Long term support releases only เวงกรำ -*- แก้เป็น Normal releases ซะ ก็หมดเรื่องหมดราว ref : ubuntu.com

ลอง kopete

pidgin มันไม่ support webcam อ่ะ เลยไปหาตัวใหม่มาลง นั่นคือ kopete ออนได้หลายๆอันเหมือน pidgin แต่ดีกว่าตรงที่ support webcam ด้วย เห็นเขาว่า สำหรับ yahoo webcam โปรแกรม gyache (สำหรับ yahoo เท่านั้น ) ดีกว่า แต่ก็ขี้เกียจลอง ช่างมันละกัน อาจจะ move จาก pidgin มาเป็น kopete นะเนี่ย

pixel art บน linux โดยใช้ gimp

ปรับตามนี้ pencil เลือกเป็น pixel (1x1 square) [ shortcut N ] eraser เหมือนกัน เลือกเป็น pixel (1x1 square) [ shortcut shift+E ] pallete ใช้ ColorMap เข้าใจว่าใช้ได้เฉพาะตอนที่อยู่ใน Indexed mode (GIF, PNG) ( วิธีเปลี่ยน mode คือ Image > Mode > Indexed .. ) วิธีเอา ColorMap ออกมาคือ กด ที่ลูกศรแล้วเลือก Add tab.. วิธีเพิ่มสีใน ColorMap คือ กดตรงเครื่องหมายบวก ( + ) ส่วนวิธี edit สีใน ColorMap คือ double click ที่สีนะ shortcut ที่เป็นประโยชน์ X : สลับสี FG และ สี BG + : Zoom In - : Zoom out อันนี้ลองเล่นๆ reference : eglug

[ Plone ] ลง plone บน ubuntu linux

I have just download Plone 3.1.5.1 from the Plone download page . I choose this one. Get Plone for Linux/BSD/Unix (35MB) Unified Installer - for Linux/BSD/OS X/UNIX/Solaris (compiles and installs Python, Zope and Plone plus dependencies for you) And I follow what is written in a README file that is working pretty well . This is what I did. I install for a non super-user, in stand alone mode. >> ./install.sh standalone ตอนนี้อาจจะต้องลง g++ ก่อน After installation, the system will inform the admin's password generated for you. For example, Username: admin Password: 1wX6Gdjq and this is how I start Plone >> $HOME/Plone-3.1/zinstance/bin/instance start After starting Plone...

HP LaserJet P1005 บน ubuntu linux

หลังจากลงจาก System > Administrator > Printing แล้ว พอกดปรินท์ปุ๊ป complete ปั๊ป โดยไม่มีกระดาษออกมาซักกะใบ อ้าว !? ก็ลองไปโหลดมา build เอง โหลดและทำตามนี้ http:// foo2xqx .rkkda.com ปรากฎว่า . . . Printer error Printer 'HP_Laserjet_P1005':'other' พอปริ้นท์แล้ว กระดาษโดนดูดเข้าไป พร้อมกับ ออกมาหน้าเปล่าๆ ออกมา เวงกรำ -*- มารู้เอาตอนหลังว่า มันต้องแกะพลาสติกสีส้มๆ ออกสองอันตรงตลับหมึกด้วยนะครับ ( มี 2 ที่ ) แบบว่า เห่อของใหม่ จะรีบใช้อะ เลยลืมแกะ พอแกะออกก็ใช้ได้เลย อายจัง แล้วก็ ubuntu มันสั่ง print ทีละหลายๆหน้า แบบ fineprint ของ windows ได้เลย ไม่ต้องลงโปรแกรมอะไรเพิ่ม สะดวกดีๆ จะเซทใน Evince Document Viewer 2.22.2 หรือ ใน System > Administrator > Printing ก็ได้

แชร์เน็ตคอมพิวเตอร์ให้ มือถือ Nokia N70 ผ่าน bluetooth ( ไม่ต้องเสียค่า gprs ) ด้วย gnubox

บน ubuntu linux 1. ถ้ายังไม่ลง bluez-utils ก็ลงซะ ต่ออุปกรณ์ bluetooth กับเครื่องด้วย 2. ถ้ายังไม่ start bluez-utils ก็ start 3. สร้างไฟล์ /etc/ppp/peers/dun ก็อปนี่ไป 460800 debug 192.168.1.1:192.168.1.2 ms-dns YOUR_DNS_ADDRESS lock crtscts noauth NOTE : YOUR_DNS_ADDRESS ไปดูมาจาก /etc/resolv.conf 4. Set up internet connection sharing $ sudo iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE enable ip forwarding $ sudo sysctl –w net.ipv4.ip_forward=1 5. $ sudo dund --listen call dun 6. Launch GnuBox, select 2box Bluetooth->LANAccess not to require encryption บนโทรศัพท์ 1. โหลด gnubox_N70.sis ( ตัว testing ) จากเว็ปไซท์ gnubox ลงไปที่เครื่อง ลงให้เรียบร้อย 2. สร้าง accesspoint ชื่อ Bt ( วิธีสร้างไปที่ Tools > Settings > Connection > Access Point แล้ว new default settings ใส่ชื่อ Bt ค่านอกนั้น ช่างมัน ไม่ต้องไปเปลี่ยน ) 3. เปิด gnubox ขึ้นมา 4. install > create records 5. options > close ( สำคัญมากกกกก !) 6. เปิด gnubox ขึ้นมาใหม่ 7. 2box bluetooth > se...

Flex builder on linux

1. ลง elicpse 2. โหลด flex builder จากเวปของ adobe 3. $ sudo chmod +x flexbuilder_linux_install_a3_033108.bin $ ./flexbuilder_linux_install_a3_033108.bin 4. File -> New -> New Flex Project <mx:application xmlns="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:text text="Hello World" fontsize="45"> </mx:text> <

ROM Game บน ubuntu linux

หลังจากลองเล่น Mega man II lite บน iPod Touch ไปแล้ว ทำให้นึกถึงเกมส์เก่าๆ บนเครื่อง Super Famicom ไปคุ้ยๆ ดู เจอ Emulator หลายตัวเลย ตามนี้ 1. zsnes ( Super Nintendo, Super Famicom ) install : $ sudo apt-get install zsnes run : $ zsnes 2. snes9x ( Super Nintendo, Super Famicom ) install : $ sudo apt-get install snes9x-x run : $ snes9x rom-file save : shift+F1 load save : F1 วิธีรันโดยใช้ joystick เล่นด้วย $ snes9x -joydev1 "/dev/input/js0" [rom file] หรือถ้าขี้เกียจพิมพ์ทุกรอบ ไป แก้ไฟล์ /etc/snes9x/snes9x.conf เพิ่ม /dev/input/js0 เข้าไปที่ joydev1 ก็ได้ ปล. รู้สึกว่า ตอนนี้ใช้จอยไม่ได้แล้วแหละ ไม่รู้ทำไม ตอนนี้เลยหนีไปพึ่ง ข้อ 3 นั่นก็คือ 3. snes9-gtk ( Super Nintendo, Super Famicom ) หน้าตาสวยงาม เซตโน่นนี่ได้ง่าย เหมือน Emulator บน windows เลย เสียงตอนแรกจะห่วยๆ หน่อย ให้ไปเซต ตรง Playback rate ของ Sound ผมเซตเป็น 48,000 Hz เลยนะ เยอะสุดเลย แล้วก็ทำให้รูปออกมาสวยงาม โดย Apply Scaling filter ของผมใช้ SuperEagle ขยาย Full S...

วิธี setup scanner epson CX-3700 บน ubuntu linux

1. ลงโปรแกรม sane ( จริงๆ sane support scanner มากมาย ดูได้จาก ที่นี่ ) 2. แก้ไฟล์ /etc/sane.d/epson.conf โดยการเติม usb [product ID] [device ID] ลงไป เช่น ของผม usb 0x 04b8 0x 0818 โดยไปเอา vendor id กับ device id มาจาก /etc/udev/rules.d/45-libsane.rules # Epson DX-3850 | Epson CX-3700 | Epson CX-3800 # Epson DX-3800 SYSFS{idVendor}==" 04b8 ", SYSFS{idProduct}==" 0818 " , MODE="664", GROUP="scanner" หรือ สั่งเอาก็ได้ $ lsusb Bus 003 Device 011: ID 04b8 : 0818 Seiko Epson Corp. 3. ได้ละ $ xsane ได้อย่างสบายใจ ^^ reference http://support.epson.ru/upload/library_file/11/scanner_linux.pdf http://bergslog.wordpress.com/2008/01/05/installare-scanner-epson-dx5000/ http://kubuntuforums.net/forums/index.php?topic=5987.0 บทความอื่นๆเกี่ยวกับ ubuntu

ลอง recovery file โดยใช้ ubuntu

จาก ที่ไปอ่านมา ลองเล่น photorec ดูดิ๊ $ sudo photorec จากนั้นมันก็จะเข้าสู่เมนูของมันซึ่งก็มั่วๆไปได้ มันใช้ไม่ยาก ผมขออนุญาตไม่เอา screenshot ของ shell มาให้ดูละกัน เนื่องจากไปดูของคนอื่นแล้วตกใจว่าต้องเลือกอะไรมากมาย แต่ยืนยันครับว่ามันใช้ง่ายจริงๆ พอมัน recovery เสร็จ ก็ไปอยู่ในโฟลเดอร์ที่สร้างไว้ แต่ติด permission The folder contents could not be displayed. You do not have the permissions necessary to view the contents of ... ก็เปลี่ยนเจ้าของมันซะเลย $ chown -R dsin recup_dir.1 # Give permissions as owner to user dsin. ส่วน ข้อเสียคือ ชื่อไฟล์ มันจะออกมาเป็น f ตามด้วยตัวเลข และที่เหมือนจะเหนือความคาดหมายคือ มันชื่อว่า photorec แต่มัน recover ไฟล์อื่นๆมาให้ด้วย เช่น mp3 mov mid gz zip แต่มันดันเปิดไม่ได้ซักกะอันน่ะสิ 55+ photorec ใช้ได้ทั้ง DOS, Windows, Linux, Sun Solaris, Mac OS X และที่สำคัญ ฟรี !!! ดูเพื่มเติมจาก หน้า official ของ photorec จริงๆ software พวก recovery มีอยู่มากมาย อันนี้คัดๆมาที่ใช้ฟรี ที่ใช้บน windows เช่น UndeletePlus Roadkil's Unstoppable Copier recuva (...