2009年10月20日 星期二

大批縮圖

1.安裝套件


sudo apt-get install imagemagick


2.撰寫bash script




#!/bin/bash
for i in `ls *.jpg`;
do
convert $i -resize 800×600 $i
done



http://ubuntuchocolate.wordpress.com/2007/09/22/howto-batchmass-image-resize/

2009年10月11日 星期日

在Ubuntu的Opera啟用Java

1.先檢查Ubuntu中是否有安裝Java

dpkg --get-selections | egrep java

2.在Opera中啟用Java

ref:http://www.opera.com/support/kb/view/459/

  • Go to Tools > Preferences > Advanced > Content.
  • Click the "Java options" button. If this button is dimmed, first check the "Enable Java" option.
  • Click the "Choose" button for the "Java path" field.
  • Navigate to the Java directory and click "OK". The path you are looking for is the directory of your Java installation containing the files libjava.so and libawt.so. On the command line, type: find / -name libjava.so 2> /dev/null 
    For example, on a Debian system, the path is: /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386
  • Click the "Validate Java path" button. If you get an error message, try again with a different path.
  • Click "OK" to save your changes and exit the Java dialog.
  • Click "OK" to save your changes and exit the Preferences dialog.