顯示具有 Ubuntu 標籤的文章。 顯示所有文章
顯示具有 Ubuntu 標籤的文章。 顯示所有文章

2015年4月13日

Linux ACL 檔案存取控制

$ sudo apt-get install acl

http://linux.vbird.org/linux_server/0240network-secure-1.php#acl_support

2010年4月2日

2010年3月25日

Linux Dialog

Dialog - display dialog boxes from shell scripts
Dialog: An Introductory Tutorial
Install dialog
Ubuntu $ apt-get install dialog
Redhat,CentOS $ yum install dialog

Example
$ (echo "30"; sleep 2; echo "50"; sleep 2; echo "100") | dialog --gauge "test gauge" 10 40 0

2010年2月19日

Custom Tab Completion

Custom Tab Completion
Programmable Completion
# unicode(1) completion
# put this file in /etc/bash_completion.d/unicode

have unicode &&
_unicode()
{
local cur

COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}

if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-h --help -x --hexadecimal \
-d --decimal -r --regexp -s --string -a --auto \
-m --max= -i --io= -c --charset-add= \
-C --colour= -v --verbose -w --wikipedia' -- $cur ) )
fi

}
[ "${have:-}" ] && complete -F _unicode $filenames unicode

$ unicode -<tab><tab>

2010年2月17日

Ubuntu play a DVD video ISO image

How to play a DVD video ISO image
$ sudo aptitude install gxine
$ gxine dvd://media/DVDIMAGE.ISO

2010年2月6日

Ubuntu trash-cli

trash - Command line trash utility
Install trash-cli
$ apt-get install trash-cli

$ touch test.txt
$ trash test.txt
$ list-trash
2010-02-06 17:51:07 /home/solnone/test.txt
$ restore-trash
0 2010-02-06 17:51:07 /home/solnone/test.txt
What file to restore [0..0]: 0
$ list-trash
$ trash test.txt
$ empty-trash

2010年2月5日

Ubuntu 9.10 move file to Trash

move file to Trash
$ mv filename ~/.local/share/Trash/files/

alias trash
$ alias trash='_(){ mv $@ ~/.local/share/Trash/files/; }; _'
$ trash filename

2010年1月15日

Linux Library 套件相依關係圖


$ apt-get install apt-rdepends signing-party
$ D=grep ; apt-rdepends -d $D | springgraph > $D.png ; gnome-open $D.png

Ubuntu 查尋 unicode

$ apt-get install unicode
$ unicode 中文
U+4E2D CJK UNIFIED IDEOGRAPH-4E2D
UTF-8: e4 b8 ad UTF-16BE: 4e2d Decimal: 中
中 (中)
Uppercase: U+4E2D
Category: Lo (Letter, Other)
Bidi: L (Left-to-Right)

U+6587 CJK UNIFIED IDEOGRAPH-6587
UTF-8: e6 96 87 UTF-16BE: 6587 Decimal: 文
文 (文)
Uppercase: U+6587
Category: Lo (Letter, Other)
Bidi: L (Left-to-Right)

$ unicode -x 4e2d
U+4E2D CJK UNIFIED IDEOGRAPH-4E2D
UTF-8: e4 b8 ad UTF-16BE: 4e2d Decimal: 中
中 (中)
Uppercase: U+4E2D
Category: Lo (Letter, Other)
Bidi: L (Left-to-Right)

2009年12月28日

安裝 Ubuntu 開機管理程式 (grub startup manager)

安裝 Startup Manager
$ sudo apt-get install startupmanager
執行 Menu -> 系統 -> 管理 -> 開機管理程式

安裝佈景主題畫面
$ sudo apt-get install grub-splashimages

How to make your own splashimage for GRUB2 on ubuntu 9.10

2009年12月16日

Anjuta 2.28 Wrong Warning and error opening terminal for debugging

Anjuta 2.28 Wrong Warning and error opening terminal for debugging
The problem is within the anjuta source code. Anjuta tries to start anjuta_launcher, but the filename is called anjuta-launcher. Symlink /usr/bin/anjuta-launcher to /usr/bin/anjuta_launcher fixes this problem.
$ sudo ln -s /usr/bin/anjuta-launcher /usr/bin/anjuta_launcher

2009年12月9日

Installing 64-bit Flash Player in Ubuntu 9.10 Karmic Koala

Installing 64-bit Flash Player in Ubuntu 9.10 Karmic Koala

Save this script as getflashx64.sh
#!/bin/bash
# Script created by
# Romeo-Adrian Cioaba romeo.cioaba@spotonearth.com
# Super minor updates by jason.melton[at]gmail[dot]com
# Updates by Alejandro Cuervo 3[at]cuervo[dot]net
# more very minor updates by damien[at]groovey[dot]com
# and one more update by Antonio Cassano bigbroantonio[at]yahoo[dot]it
# Released under GPL

echo "Closing Firefox"
sudo killall -9 firefox

echo "Downloading and instaling Getlibs for required libraries"
wget http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb
sudo dpkg -i getlibs-all.deb

echo "Removing previous installs of flash:"
sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f ~/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -f /usr/lib/firefox-addons/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper

echo "Installing ia32-libs and nspluginwrapper"
sudo apt-get install ia32-libs nspluginwrapper

echo "Getting libs"
sudo apt-get install libcurl3 libnss3-1d libnspr4-0d
# sudo getlibs -p libcurl3
# sudo getlibs -p libnss3-1d
# sudo getlibs -p libnspr4-0d

echo "Installing Flash Player 10"
cd ~
wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
tar zxvf libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
sudo mv libflashplayer.so /usr/lib/mozilla/plugins/
sudo nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so

echo "Linking the libraries so that firefox can see them."
sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/mozilla/plugins/
sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/firefox-addons/plugins/

echo "Done :-)"
echo "You may re-start Firefox now"

And run it via
$ sudo bash getflashx64.sh

2009年11月25日

Ubuntu 9.10 installer doesn’t recognize the hard drive

解決 ubuntu 9.10 安裝程式抓不到硬碟的問題

1) Boot into a live session using the LiveCD (without installing)
2) Open Terminal
3) Type "sudo apt-get remove dmraid" and hit Enter (command without quotes)
4) Start the installer by double-clicking on its icon

Can Partition in 9.04 but not in 9.10
First hard disk is not visible during install
can't install ubuntu 9.10

2008年12月6日

在無 GUI 的環境下使用 Java awt 元件

Using Headless Mode in the Java SE Platform
  1. Java 設定系統屬性 java -Djava.awt.headless=true
  2. 程式中設定系統屬性 System.setProperty("java.awt.headless", "true");
  3. Ubuntu Java V1.6 中設定環境變數 export DISPLAY=:0.0;

2008年5月26日

Ubuntu NetBeans IDE 6.1

NetBeans IDE 6.1
install JDK 6
設定環境變數
$ sudo vim /etc/environment
CLASSPATH=/usr/lib/jvm/java-6-sun/lib
JAVA_HOME=/usr/lib/jvm/java-6-sun
安裝
$ ./netbeans-6.1-linux.sh

Ubuntu, NVIDIA and Two Monitors

Ubuntu, NVIDIA and Two Monitors

$ sudo apt-get install nvidia-settings
$ sudo nvidia-settings

2008年5月11日

Google Notebook 已可在 Firefox 3.0b5 執行

Google Notebook
新版的 Google Notebook Version 1.0.0.19
已可在 Ubuntu 8.04 with Firefox 3.0b5 下執行
Google Notebook How do I add clippings to a notebook?

2008年5月9日

Ubuntu 8.04 install Eclipse

Eclpise
download 之後,解壓縮
$ tar zxvf eclipse-***-linux-gtk.tar.gz

執行 eclipse
$ ./eclipse/eclipse

若出現下列訊息
Could not initialize the application's security component.
The most likely cause is problems with files in your application's profile directory.
Please check that this directory has no read/write restrictions and your hard disk is not full or close to full.
It is recommended that you exit the application and fix the problem.
If you continue to use this session, you might see incorrect application behaviour when accessing security features.

Eclipse Error - Security Component?
則先建立目錄 .mozilla/eclipse
$ mkdir ~/.mozilla/eclipse

再次執行 eclipse 就不會在出現 the application's security 的訊息了

網誌存檔