原创 Ubuntu:Edgy cn

2008-3-11 23:02 27085 8 8 分类: 软件与OS

Ubuntu:Edgy cn



From




Image:Ubuntuguide_logo.png


Contents

[hide]





非官方 Ubuntu 6.10 (Edgy Eft) 入门指南


鉴于 Ubuntu 6.10 (Edgy Eft) 刚刚发布, 本指南仍在不断更新。请加入进来帮助我们测试完善这个指南.

这份手册的英文原作者是马来西亚吉隆坡的Chua Wen Kiat。 目前由拉脱维亚大学Linux中心 维护,任何人都可以参与编辑。

请到官方的 UbuntuGuide.org 论坛 讨论这个指南。

为了防止Wiki遭到蓄意破坏,只有注册用户才能修改这个Wiki和创立新帐号。 如果你想加入创作团队,请发中文或者英文Email给[ usa点chen-AT-gmail点com ]。 请不要忘记 说明你想要的帐号名称以及你想要创建或者修改哪些内容。





MikrobartOrvilsQuashJiyuu0CargoGabemorrBytecopekrampoSimosStubbyeljacoshaiThunderMHasileadammichaelroachBelisarivsCheatorHankTamalKaotikssoniahKutanMehdirichuxShadymanHavarillfr0zen_penguinLouisShadymanshanlot751EtienneRabid9797Mantas Smelevičiusperspectoffphloseadogsmalugo2debugPakosRedBassCyberAngelCogeeldineroycorreAlgimantasBucinskasUficAntidrugueVahidLouis KingRsinghBorut-TCinglallsTownrayANtuMaLaMpete alleboneGreenstarThe TurkRonBCompotatojoMbrasigma80EnlightenedswineKarthikeyanemorrp1Th0rv4ldjspanglerSevoirand other friends of our community edit









之前版本







概述


  1. 这是一份Ubuntu 6.10 (Edgy Eft)非官方入门指南。本指南与Ubuntu及Canonical Ltd没有任何关系
  2. 本指南可以ubuntuforums.org的官方论坛上讨论(UbuntuGuide.org Forum)你现在就可以加入讨论。
  3. 如果你看到浅灰色方框,这意味你必须在终端下运行命令(应用程序-> 附件 -> 终端)或按方框内所提示的内容按其它命令执行。
  4. 为了减少键盘输入错误,请将命令复制后粘贴到终端(在命令上点击鼠标右键-> "复制" or "粘贴"。你也使用“Ctrl+C"复制及“Shift+Insert”粘贴)
  5. "sudo"表示以超级用户执行(superuser do)。"sudo"会出现"Password:"的提示,请"Password:“后输入用户密码。
  6. 如果你更深入了解任何命令更多信息,你仅简单通过输入“man”命令去查看帮助页面。例如:"man sudo"将显示”sudo“命令的帮助页面。
  7. 如果你十分厌烦每次都需要键入"apt-get", 请参看 #如何以个更便捷的方式使用(Synaptic)
  8. 使用"apt-get" and "wget"执行安装/更新/下载时,请确保你的计算机连上网络。
  9. 下载文件时,在链接上点击鼠标右键->选择“”To download file, right click on the link -> Select "链接另存为..." -> 确保文件名和扩展名的正确。
  10. 如果你想把UbuntuI翻译成本地语言或在其它方面帮助Ubuntu,请访问https://launchpad.net/
  11. 愿“humanity to others”精神永远与你同在.




如果你使用64位的版本,请所有的“i386“替换为”amd64“

入门


关于Ubuntu



Ubuntu 6.10 Edgy Eft的新特性



Edgy Eft的重要链接



Ubuntu的屏幕截图



Kubuntu的屏幕截图



Xubuntu的屏幕截图



Edubuntu的屏幕截图



查看Ubuntu程序/函数库列表



下载Ubuntu



免费订购 Ubuntu 光盘



There will be no Edgy Eft ShipIt CDs (Announcement), instead you can still obtain Ubuntu 6.06 Dapper Drake LTS CDs via ShipIt.

请注意投递这些光盘需要四到六周的时间。鼓励你复制,更改和重分发这些光盘,当然是越多越好!


使用Ubuntu的帮助



获得更多的应用程序



获得更多的桌面主题



软件库


如何添加其它的软件库



sudo cp -p /etc/apt/sources.list /etc/apt/sources.list_backup
sudo gedit /etc/apt/sources.list

  • 用以下内容替换文件中的所有内容

如果使用本地镜像,你可以在archive.ubuntu.com之前加"cc." before (cc = 你的国家代码)
e.g. deb http://lv.archive.ubuntu.com/ubuntu edgy main restricted universe multiverse

## Add comments (##) in front of any line to remove it from being checked.   
## Use the following sources.list at your own risk.

deb http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy-proposed main restricted universe multiverse

## MAJOR BUG FIX UPDATES produced after the final release
deb http://archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse

## UBUNTU SECURITY UPDATES
deb http://security.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted universe multiverse

## BACKPORTS REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse

## PLF REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
deb http://packages.freecontrib.org/plf edgy-plf free non-free
deb-src http://packages.freecontrib.org/plf edgy-plf free non-free

## CANONICAL COMMERCIAL REPOSITORY (Hosted on Canonical servers, not Ubuntu
## servers. RealPlayer10, Opera, DesktopSecure and more to come.)
deb http://archive.canonical.com/ubuntu edgy-commercial main

## Listen
#deb http://theli.free.fr/packages/ edgy listen

  • 保存编辑好的文件

wget http://packages.freecontrib.org/ubuntu/plf/12B83718.gpg -O- | sudo apt-key add -
sudo apt-get update


  • 你也可以使用更复杂的配置: sources.list 注意有一定风险!

  • 只有在明白的所做的配置才去更改默认的。 混合软件库会导致系统breakage.

更新Ubuntu


如何手动更新Ubuntu



sudo apt-get update
sudo apt-get upgrade
sudo apt-get dselect-upgrade


使用更新管理器: 系统 -> 系统管理 -> 更新管理器


安装其它软件


如何使用 Easy Ubuntu


  • 参考 #概述
  • Easy Ubuntu是一个轻巧的工具,能使新手十分容易为Ubuntu安装多种软件: 媒体编码(codecs), 字体, Macromedia Flash 和 Sun Java.

打开应用程序菜单-> 附件 -> 终端 然后运行以下命令:


wget http://easyubuntu.freecontrib.org/files/easyubuntu-3.023.tar.gz
tar -zxf easyubuntu-3.023.tar.gz
cd easyubuntu
cp packagelist-dapper.pot packagelist-edgy.pot
cp packagelist-dapper.xml packagelist-edgy.xml
sudo python easyubuntu.in

  • 在Easy Ubuntu 窗口中,选择相应的选项按钮为Ubuntu下载安装合适的软件。
  • Note: Users of the previous EasyUbuntu 3.0 version may experience issues with installing Flash and Java.
  • 如果希望能自动升级,请按以下步骤进行操作:

不同的Ubuntu版本需要不同的命令:

Ubuntu:


sudo gedit /etc/apt/sources.list

Kubuntu:


sudo kate /etc/apt/sources.list

编辑器打开后,将以下内容加到你的/etc/apt/sources.list 文件末尾:


deb http://easyubuntu.cafuego.net main easyubuntu

现在,EasyUbuntu就会自动升级了。



如何为Ubuntu, Kubuntu和Xubuntu安装Automatix2


  • Read #概述
  • Automatix2是基于python语言的Automatix重写版本:界面更友好,能够自动为Ubuntu, Kubuntu和Xubuntu安装为许多常用软件。
  • 注意: , 安装之前,请注意某些编码在特定的国家是被限制使用的!您有责任确保没有触犯这些法律。

sudo gedit /etc/apt/sources.list 

  • 将以下内容加到/etc/apt/sources.list文件末

## Automatix repo
deb http://www.getautomatix.com/apt edgy main

  • : Kubuntu/Xubuntu 用户需要去掉所用附加软件库的注释(把“deb”前的#去掉),同时也需要加上automatix软件库。

  • 获得 GPG key

wget http://www.getautomatix.com/apt/key.gpg.asc
gpg --import key.gpg.asc
gpg --export --armor 521A9C7C | sudo apt-key add -


  • 更新 APT

sudo apt-get update

  • 运行以下命令安装Automatix2

sudo apt-get install automatix2


  • Automatix2 可从菜单运行

菜单 -> 系统 -> Automatix

  • Automatix2也可从终端运行,在终端中键入以下命令

automatix2


安装附加软件的其他脚本


wget http://www.iki.fi/kuparine/comp/ubuntu/install.sh
sh install.sh

关于这种安装的更多信息,可以在以下网站找到:http://www.iki.fi/kuparine/comp/ubuntu/install.html


如何安装J2SE运行环境(JRE)及相应Mozilla Firefox插件


注意: Automatix2包含了该软件。如果你已经使用过Automatix2, JRE及相应的插件应该已经安装好。



sudo apt-get install sun-java5-jre sun-java5-plugin

  • 当出现提问, 请选择同意DLJ协议

  • 将J2SE设置为默认的JVM (很多软件需要J2SE:Frostwire, RSSOwl ,Mozilla Firefox的java插件):

sudo update-alternatives --config java

然后选择相应的J2SE选项(通常是第三项).


如何安装JRE v5.0 Update 9


注意: Automatix2包含了该软件。如果你已经使用过Automatix2, JRE及相应的插件应该已经安装好。




选择 "Java Runtime Environment (JRE) 5.0 Update 9" 然后点击"Download"
接受(Accept)许可证协议书
下载 "Linux self-extracting file"

  • 安装必需的工具 :

sudo apt-get install java-package

  • 创建 Ubuntu 软件包 :

fakeroot make-jpkg jre-1_5_0_09-linux-i586.bin

  • 安装生成的软件包 :

sudo dpkg -i sun-j2re1.5_1.5.0+update09_i386.deb




  • 重新启动 Mozilla Firefox
  • 如果出现错误提示,试试把文件名的09改成合适的版本号。

如何安装java开发套件(JDK) v5.0



sudo apt-get install sun-java5-jdk

  • 接受出现的许可证协议。

  • 设置Sun's JVM为默认Java版本:

sudo update-java-alternatives -s java-1.5.0-sun

  • 编辑/etc/jvm 把/usr/lib/jvm/java-1.5.0-sun这行移到JVM选项顶部:

gksudo gedit /etc/jvm

如何安装Mozilla Firefox插件:Flash 播放器 (Macromedia Flash)



sudo apt-get install flashplugin-nonfree
sudo update-flashplugin

注意: 如果出现错误提示:软件没有找到,试试用Gnash (GNU Flash替代)


sudo apt-get install libflash-mozplugin

  • 重新启动Mozilla Firefox



Note: 如果访问带有flash内容网站,firefox出现崩溃,按以下方法解决:


sudo gedit /usr/bin/firefox

and add the following line as last but one line of the file:


export XLIB_SKIP_ARGB_VISUALS=1

现在 firefox应该不可能再崩溃了。
(Launchpad bug report: [3])


  • 重新启动 Mozilla Firefox



Note: 如果Flash播放器中声音无法正常工作(例如在YouTube):


sudo apt-get install alsa-oss
gksudo gedit /etc/firefox/firefoxrc

更改:


FIREFOX_DSP=""

为:


FIREFOX_DSP="aoss"

  • 重新启动Mozilla Firefox,现在Flash播放器应该能够播放声音了。

如何为 Mozilla Firefox 更新 Flash Player 9 Beta (Macromedia Flash) 插件


备注: 程序包含在Automatix2中. 如果您已经安装使用了Automatix2, 本程序可能已经被安装了



wget http://download.macromedia.com/pub/labs/flashplayer9_update/FP9_plugin_beta_101806.tar.gz
tar xvzf FP9_plugin_beta_101806.tar.gz
sudo cp flash-player-plugin-9.0.21.55/libflashplayer.so /usr/lib/flashplugin-nonfree/

  • 重启 Mozilla Firefox

如何安装PDF阅读器(Adobe Reader)及相应Mozilla Firefox插件



sudo apt-get install acroread mozilla-acroread acroread-plugins

  • 应用程序-> 办公 -> Adobe Reader
  • 重新启动 Mozilla Firefox

注意: 正在运行SCIM时,你将无法运行Adobe Reader 7.0。如果你已经通过 系统->系统管理->语言支持 安装了其他语言,并运行SCIM。需通过以下方法来解决该问题。


gksudo gedit /usr/bin/acroread

修改:


#!/bin/sh
#


为:


#!/bin/sh
#
GTK_IM_MODULE=xim

保存文件。 Adobe Reader 7.0 将会正常运行。

See also:



如何安装下载管理器 (Downloader for X)



sudo apt-get install d4x

  • 应用程序 -> Internet -> Downloader for X

如何安装密码管理器(Revelation)



sudo apt-get install revelation

  • 应用程序 -> 附件 -> Revelation Password Manager

安装FTP客户端程序 (gFTP)



sudo apt-get install gftp

  • 在菜单中选择 Applications(程序) -> Internet(互联网) -> gFTP

如何安装IRC客户端(XChat)


注意: Automatix2已经包含该程序, 如果你已经使用Automatix2, 该程序应该已经安装了



sudo apt-get install xchat xchat-systray 

  • 应用程序 -> Internet -> XChat IRC

如何安装文件共享工具(LinuxDC++)



wget -c http://easylinux.info/uploads/linuxdcpp.tar.gz
sudo tar zxvf linuxdcpp.tar.gz -C /opt
gksudo gedit /usr/share/applications/linuxdcpp.desktop

  • 在新增的文件内加入下面这几行

[Desktop Entry]
Encoding=UTF-8
Name=LinuxDC++
Exec=linuxdcpp
Terminal=false
Type=Application
StartupNotify=true
Icon=/opt/linuxdcpp/pixmaps/linuxdcpp.png
Categories=Application;Network;

  • 保存编辑好的文件

  • 应用程序 -> Internet -> LinuxDC++
  • 如果利用CVS来生成最新版本,可以参考this guide

如何安装P2P BT客户端 (Azureus)


注意: Automatix2已经包含该程序, 如果你已经使用Automatix2, 该程序应该已经安装了





sudo apt-get install azureus

  • 应用程序 -> Internet -> Azureus

  • (替代方法) 以上方法装的Azureus通过gcj编译生成的, 也可以选择使用Sun公司的Java.


wget http://kent.dl.sourceforge.net/sourceforge/azureus/Azureus_2.5.0.0_linux.tar.bz2
sudo tar jxvf Azureus_2.5.0.0_linux.tar.bz2 -C /opt/
sudo gedit /usr/share/applications/azureus.desktop

  • 在新增的文件内加入下面这几行

[Desktop Entry] 
Name=Azureus
Comment=Java BitTorrent Client
Exec=/opt/azureus/azureus
Icon=/opt/azureus/Azureus.png
Terminal=false
Type=Application
Categories=Application;Network;

  • 保存编辑好的文件

  • 应用程序 -> Internet -> Azureus

如何安装 P2PB BT客户端 (Bittornado)


注意: Automatix2已经包含该程序, 如果你已经使用Automatix2, 该程序应该已经安装了



sudo apt-get install bittornado bittornado-gui

  • 应用程序 -> Internet -> Bittornado Client

如何安装P2P eMule客户端(aMule)


注意: Automatix2和Easy Ubuntu已经包含该程序, 如果你已经使用Automatix2和Easy Ubuntu之一, 该程序应该已经安装了



sudo apt-get install amule

  • 应用程序 -> Internet -> aMule

如何安装P2P Gnutella客户端 (FrostWire)


注意: Automatix2已经包含该程序, 如果你已经使用Automatix2, 该程序应该已经安装了



wget -c http://www.users.on.net/~stubby/FrostWire-4.10.9-2.i586.deb
sudo dpkg -i FrostWire-4.10.9-2.i586.deb

  • 应用 -> Internet -> FrostWire

如何安装即时通讯软件 (Skype)


注意: Automatix2已经包含该程序, 如果你已经使用Automatix2, 该程序应该已经安装了



  • Ubuntu Edgy 已经不再将Skype纳到库里,你必须自己从Skype下载DEB软件包:

wget http://www.skype.com/go/getskype-linux-deb

  • 安装下载的软件包:

sudo dpkg -i skype_debian-*.deb


  • 应用程序 > Internet > Skype

如何安装WinPopup (LinPopUp)



sudo apt-get install linpopup
gksudo gedit /usr/share/applications/linpopup.desktop

  • 将下列代码插入新建的文件中:

[Desktop Entry]
Name=LinPopUp
Comment=LinPopUp
Exec=linpopup
Icon=/usr/share/pixmaps/linpopup.xpm
Terminal=false
Type=Application
Categories=Application;Utility;

  • 保存该文件
  • Applications -> Accessories -> LinPopUp

如何安装多媒体编码



sudo apt-get install gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base \
gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse \
gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse w32codecs


Stubby: 除了wmv, 所有其他编码解码器都工作正常

Radiobuzzer: WMV9编码解码器工作不正常-特别是对于amd64用户. 进阶用户应参考 这个补丁


如何安装才能播放DVD


ironss:
gstreamer提供的dvd插件位于plugins-bad (抑或ugly?),可靠性不好.
然而您可以用以xine作为后端的Toteme来播放DVD视盘. 您可以一直用到gstreamer能够真正回放dvd之时. 注意,
按照下列之建议, 您不必安装xine-ui或mplayer



sudo apt-get install libdvdread3 
sudo /usr/share/doc/libdvdread3/install-css.sh
sudo apt-get install totem-xine

Stubby: gstreamer之dvd插件还未引入dapper. 下列指示将导致不能适当运作



sudo apt-get install libdvdcss2

如何安装MIDI音色服务器(Timidity++)(译注:即波表合成器)


  • 参考 #概述
  • 参考 #如何添加其它的软件库
  • Timidity允许那些没有MIDI硬件或者不具备内建MIDI处理能力的声卡的用户(大多数用户都是如此)能够通过一个软件合成器回放MIDI音乐.

  • 首先安装Timidity

sudo apt-get install timidity

  • 将Timidity设置为系统加载时启动

sudo gedit /etc/default/timidity

  • 将下面这行解除注释(删去前面的"#")

#TIM_ALSASEQ=true

  • 同时加载所需模块

sudo gedit /etc/modules

  • 将下列内容添加到上述文件末尾

snd-seq-device
snd-seq-midi
snd-seq-oss
snd-seq-midi-event
snd-seq

  • 重启

如何安装多媒体播放器 (xine-ui)



sudo apt-get install xine-ui libxine-extracodecs

  • 应用程序 -> Sound & Video -> xine

如何安装媒体播放器(VLC)含Mozilla Firefox插件



sudo apt-get install vlc vlc-plugin-* mozilla-plugin-vlc

  • 为了能让VLC播放视频流, 您还需要安装下列程序包.

apt-get install avahi-daemon
apt-get install avahi-utils

应用程序 -> Sound and Video -> VLC Media Player

How to install Multimedia Player (Mplayer) with plug-in for Mozilla Firefox



sudo apt-get install mozilla-mplayer

程序 -> 声音和视频-> MPlayer Movie Player


如何安装多媒体播放器(Totem)的火狐狸插件



sudo apt-get install totem-gstreamer-firefox-plugin

  • 重启火狐狸

如何安装多媒体播放器(XMMS)



sudo apt-get install xmms xmms-skins
wget -c http://easylinux.info/uploads/xmms-wma_1.0.4-2_i386.deb
sudo dpkg -i xmms-wma_1.0.4-2_i386.deb

  • 程序 -> 声音和视频 -> XMMS

如何安装多媒体播放器(amaroK)



sudo apt-get install amarok

  • 程序 -> 声音和视频 -> amaroK

如何安装多媒体播放器(RealPlayer 10)



sudo apt-get install realplay

注意: 'realplay' 从PLF软件库安装RealPlayer 10 , 须遵守安装引导。 'realplayer'从multiverse安装RealPlayer 8 。

  • 程序 -> 声音和视频 -> RealPlayer 10
  • 将自动安装火狐狸的插件以播放real视频。
  • 要避免闪烁或屏幕空白,进入
  • RealPlayer 10 -> 工具 -> 属性 -> 硬件 -> Uncheck XVideo



可选源



如何安装Stream Directory Browser (streamtuner)



sudo apt-get install streamtuner
sudo apt-get install streamripper

  • 程序 -> 声音和视频 -> streamtuner

How to install Music Organizer (Cowbell)



sudo apt-get install cowbell

  • Applications -> Sound & Video -> Cowbell Music Organizer

How to install ID3 Tag Editor (EasyTAG)



sudo apt-get install easytag

  • Applications -> Sound & Video -> EasyTAG

How to install Video Editor (Kino)



sudo apt-get install kino
sudo apt-get install kinoplus
sudo apt-get install kino-timfx
sudo apt-get install kino-dvtitler

  • Applications -> Sound & Video -> Kino Video Editor

如何安装音频编辑软件 (Audacity)



sudo apt-get install audacity

  • Applications -> Sound & Video -> Audacity

如何安装作曲软件 (NoteEdit)



sudo apt-get install noteedit lilypond
sudo gedit noteedit.desktop

  • 在新建文件中添加下面几行

[Desktop Entry]
Name=NoteEdit
Comment=A free music score editor
Exec=noteedit
Icon=/usr/share/app-install/icons/noteedit.xpm
Terminal=false
Type=Application
Categories=Application;AudioVideo;

  • 保存文件
  • Applications -> Sound & Video -> NoteEdit

How to install Music Manager and Player (Banshee)



sudo apt-get install banshee

How to install DVD Ripper (dvd::rip)



sudo apt-get install dvdrip vcdimager cdrdao subtitleripper
sudo ln -fs /usr/bin/rar /usr/bin/rar-2.80
gksudo gedit /usr/share/applications/dvdrip.desktop

  • Insert the following lines into the new file

[Desktop Entry]
Name=dvd::rip
Comment=dvd::rip
Exec=dvdrip
Icon=/usr/share/perl5/Video/DVDRip/icon.xpm
Terminal=false
Type=Application
Categories=Application;AudioVideo;

  • Save the edited file
  • Applications -> Sound & Video -> dvd::rip

How to install DVD Ripper (AcidRip)



sudo apt-get install acidrip



Note: AcidRip will not recognize dvd if dma is turned on. If so undo the process #How to speed up CD/DVD-ROM.


How to install CD Ripper (Goobox)



sudo apt-get install goobox
sudo rm -f /usr/share/applications/goobox.desktop
gksudo gedit /usr/share/applications/goobox.desktop

  • Insert the following lines into the new file

[Desktop Entry]
Name=CD Player & Ripper
Comment=Play and extract CDs
Exec=goobox
Icon=goobox.png
Terminal=false
Type=Application
Categories=Application;AudioVideo;

  • Save the edited file
  • Applications -> Sound & Video -> CD Player & Ripper

How to install Image Viewer (digiKam)



sudo apt-get install digikam digikamimageplugins kipi-plugins

  • Applications -> Graphics -> digikam

How to install Picasa image organizer



gksudo gedit /etc/apt/sources.list

  • Add the following lines at the end of file

# Google Picasa for Linux repository
deb http://dl.google.com/linux/deb/ stable non-free

  • Save the edited file

sudo apt-get update
sudo apt-get install picasa

  • Applications -> Graphics -> Picasa


How to install Internet TV (DemocracyTV beta)



  • If your system has a 32bit processor (i386) open a Terminal and type

wget http://ftp.osuosl.org/pub/pculture.org/democracy/linux/ubuntu/democracyplayer-data_0.9.0.2-1ubuntupcf_all.deb
wget http://ftp.osuosl.org/pub/pculture.org/democracy/linux/ubuntu/democracyplayer_0.9.0.2-1ubuntupcf_i386.deb
sudo apt-get upgrade
sudo dpkg -i democracyplayer-data_0.9.0.2-1ubuntupcf_all.deb
sudo apt-get install mozilla-browser mozilla-psm mozilla-dev
sudo dpkg -i democracyplayer_0.9.0.2-1ubuntupcf_i386.deb




  • if your system has a 64bit processor (amd64)

wget http://ftp.osuosl.org/pub/pculture.org/democracy/linux/ubuntu/democracyplayer-data_0.9.0.2-1ubuntupcf_all.deb
wget http://ftp.osuosl.org/pub/pculture.org/democracy/linux/ubuntu/democracyplayer_0.9.0.2-1ubuntupcf_amd64.deb
sudo apt-get upgrade
sudo dpkg -i democracyplayer-data_0.9.0.2-1ubuntupcf_all.deb
sudo apt-get install mozilla-browser mozilla-psm mozilla-dev
sudo dpkg -i democracyplayer_0.9.0.2-1ubuntupcf_amd64.deb


  • in both cases you might also need to install dependencies of the player package if dpkg returns a dependency error.

sudo apt-get -f install

  • to get support for more formats you have to install libxine-extracodecs (check Restricted Formats for more info)

sudo apt-get install libxine-extracodecs

or use an alternate procedure: double click (or right click and
select "Open with gdebi") on the deb files so they are opened with
gdebi, first democracyplayer-data_0.9.0.2-1ubuntupcf_all.deb and after
that democracyplayer_0.9.0.2-1ubuntupcf_i386.deb (if you have a 32bit
processor) or democracyplayer_0.9.0.2-1ubuntupcf_amd64.deb (if you have
a 64bit processor)


  • Applications -> Sound & Video -> Democracy TV

How to install Vector Graphics Editor (Inkscape)



sudo apt-get install inkscape



Second installation method:


1. Download the official Inkscape Linux installer.
2. Choose a mirror and save it to your Desktop.
3. Right-click it, enable "Properties --> Permissions --> Owner:Execute" and close the dialogue box. (One-time procedure)
4. Double-click it and follow the instructions.
5. Install the support code system-wide, if you have the root password. (One-time procedure)

NOTE: You can and should install the program as a User, rather than Root. This is easily accomplished with the second method.


How to install Opera web browser


Package may be not found in the repository --Radiobuzzer 22:12, 25 October 2006 (EEST)



sudo apt-get install opera

  • Applications -> Internet -> Opera

  • To get java working go to
    Tools->Preferences->Advanced->Content-> Check "Enable
    Java". Click the "Enable Java..." button enter
    "/usr/lib/jvm/java-1.5.0-sun/jre/lib/i386" (for sun java) in the new
    dialog and then click the "Validate Java Path" button.

How to install Email Client (Mozilla Thunderbird)


Note: Program included in Automatix2. I you have already used Automatix2, this program may have been installed



sudo apt-get install mozilla-thunderbird

  • Applications -> Internet -> Thunderbird Mail Client

How to install Newsreader (Pan)



sudo apt-get install pan

  • Applications -> Internet -> Pan Newsreader

How to install RSS/RDF/Atom Newsreader (RSSOwl)



wget -c http://easylinux.info/uploads/rssowl_linux_1_1_3_bin.tar.gz
sudo tar zxvf rssowl_linux_1_1_3_bin.tar.gz -C /opt/
sudo chown -R root:root /opt/rssowl_linux_1_1_3_bin/
gksudo gedit /usr/bin/runRSSOwl.sh

  • Insert the following lines into the new file

export MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${MOZILLA_FIVE_HOME}:${LD_LIBRARY_PATH}
cd /opt/rssowl_linux_1_1_3_bin/
./run.sh

  • Save the edited file

sudo chmod +x /usr/bin/runRSSOwl.sh
gksudo gedit /usr/share/applications/RSSOwl.desktop

  • Insert the following lines into the new file

[Desktop Entry]
Name=RSSOwl
Comment=RSSOwl
Exec=runRSSOwl.sh
Icon=/opt/rssowl_linux_1_1_3_bin/rssowl.xpm
Terminal=false
Type=Application
Categories=Application;Network;

  • Save the edited file
  • Applications -> Internet -> RSSOwl

How to install Web Authoring System (Nvu)



sudo apt-get install nvu
sudo rm -f /usr/share/applications/nvu.desktop
gksudo gedit /usr/share/applications/nvu.desktop

  • Insert the following lines into the new file

[Desktop Entry]
Name=Nvu
Comment=Web Development Editor
Exec=nvu
Icon=nvu.xpm
Terminal=false
Type=Application
Categories=Application;Development;

  • Save the edited file
  • Applications -> Internet -> Nvu

How to install Web Development Environment (quanta plus)



sudo apt-get install quanta

  • Applications -> Programming -> Quanta Plus

How to install Project Management Application (Planner)



sudo apt-get install planner

  • Applications -> Office -> Project Management




How to install jedit



wget -c http://optusnet.dl.sourceforge.net/sourceforge/jedit/jedit_4.3pre6_all.deb
sudo dpkg -i jedit_4.3pre6_all.deb

  • Applications -> Programming -> Programmers text editor jedit

Note: Install jedit on Dapper Drake might cause broken
package which leads to Synaptic Package Manager fails to function. To
remove see #How to remove jedit when Synaptic package manager fails after install.


How to install Accounting Application (GnuCash)


Note: Program included in Automatix2. I you have already used Automatix2, this program may have been installed



sudo apt-get install gnucash

  • Applications -> Office -> GnuCash

How to install Desktop Publishing Application (Scribus)



sudo apt-get install scribus

  • Applications -> Office -> Scribus

How to install Diagram Editor (Dia)



sudo apt-get install dia-gnome

  • Applications -> Graphics -> Dia

How to install Compiled HTML Help (CHM) Viewer (xCHM)



sudo apt-get install xchm

  • Applications -> Graphics -> xCHM

How to install CD/DVD Burning Application (GnomeBaker)


Note: Program included in Automatix2. I you have already used Automatix2, this program may have been installed



sudo apt-get install gnomebaker

  • Applications -> Sound & Video -> GnomeBaker

How to install CD/DVD Burning Application (K3b)



sudo apt-get install k3b libk3b2-mp3

  • Applications -> Sound & Video -> K3b

How to install Dialup PPP Client (GNOME PPP)



sudo apt-get install gnome-ppp

  • Applications -> Internet -> GNOME PPP

How to install Broadband ADSL/PPPoE Client (RP-PPPoE)



wget -c http://easylinux.info/uploads/rp-pppoe-3.6.tar.gz
sudo tar zxvf rp-pppoe-3.6.tar.gz -C /opt/
sudo chown -R root:root /opt/rp-pppoe-3.6/
gksudo gedit /usr/share/applications/RP-PPPoE.desktop

  • Insert the following lines into the new file

[Desktop Entry]
Name=RP-PPPoE
Comment=RP-PPPoE
Exec=gksudo /opt/rp-pppoe-3.6/go-gui
Icon=pppoeconf.xpm
Terminal=false
Type=Application
Categories=Application;Network;

  • Save the edited file
  • Applications -> Internet -> RP-PPPoE

怎样安装启动服务管理器 Boot-Up Manager (BUM)



sudo apt-get install bum

  • 菜单 System -> Administration -> Boot-Up Manager

How to install Partition Editor (GParted)



sudo apt-get install gparted

  • Applications -> System Tools -> GParted

How to install Firewall (Firestarter)



sudo apt-get install firestarter

  • Applications -> System Tools -> Firestarter

How to install network traffic analyzer (Ethereal)



sudo apt-get install ethereal

  • Applications -> Internet -> Ethereal

How to install Vulnerability Scanner (Nessus)



sudo apt-get install nessus
sudo apt-get install nessusd
sudo nessus-adduser
sudo ln -fs /etc/init.d/nessusd /etc/rc2.d/S20nessusd
sudo /etc/init.d/nessusd start
gksudo gedit /usr/share/applications/Nessus.desktop

  • Insert the following lines into the new file

[Desktop Entry]
Name=Nessus
Comment=Nessus
Exec=nessus
Icon=/usr/share/pixmaps/nessus.xpm
Terminal=false
Type=Application
Categories=Application;System;

  • Save the edited file
  • Applications -> System Tools -> Nessus

How to install RAR Archiver (rar)


Note: Program included in Automatix2. I you have already used Automatix2, this program may have been installed



sudo apt-get install rar 
sudo apt-get install unrar

  • Applications -> Accessories -> Archive Manager

如何安装额外的字体



sudo apt-get install xfonts-intl-arabic
sudo apt-get install xfonts-intl-asian
sudo apt-get install xfonts-intl-chinese
sudo apt-get install xfonts-intl-chinese-big
sudo apt-get install xfonts-intl-european
sudo apt-get install xfonts-intl-japanese
sudo apt-get install xfonts-intl-japanese-big
sudo apt-get install xfonts-intl-phonetic
sudo apt-get install gsfonts-x11
sudo apt-get install msttcorefonts
sudo fc-cache -f -v





注: Ubuntu Dapper 版本内含 DejaVu 字体 (由Bitstream Vera衍生出来), 该字体充分支持拉丁文,希腊文,西里儿文为基础的语言.

如何安装中文输入法 (SCIM)


以下信息假设您已经安装了中文支持,若不知道如何安装请参考 这里

请注意,SCIM已经安装了默认的精简版, 要安装中文,日文或韩文支持请使用 系统>管理>语言支持. wiki有更多准确的信息



sudo apt-get install language-pack-gnome-zh language-pack-gnome-zh-base language-pack-zh language-pack-zh-base language-support-zh
sudo apt-get install scim scim-modules-socket scim-modules-table scim-pinyin scim-tables-zh scim-input-pad
sudo sh -c " echo 'export XMODIFIERS=@im=SCIM ; export GTK_IM_MODULE="scim" ; scim -d ' > /etc/X11/Xsession.d/95xinput "
sudo chmod 755 /etc/X11/Xsession.d/95xinput

  • 英文环境下运行SCIM请修改环境设置如下:

sudo gedit  /etc/environment

LANGUAGE="en_US:en"
LC_CTYPE="zh_CN.UTF-8"
LANG="en_GB.UTF-8"
GST_ID3_TAG_ENCODING=GBK

  • 你可以在这里找到设置 系统 -> 首选项 -> SCIM 输入法设置
  • 运行SCIM

按 'Ctrl + Space'

如何安装桌面小程序(gDesklets)


注: Automatix2已包含本程序. 如果您已在使用Automatix2, 本程序应已安装



sudo apt-get install gdesklets
sudo apt-get install gdesklets-data


如何安装基本编译器 (build-essential)



sudo apt-get install build-essential

如何安装.rpm到.deb的转换程序(Alien)



sudo apt-get install alien

如何安装集成开发环境 (Anjuta)



sudo apt-get install anjuta

  • Applications -> Programming -> Anjuta IDE

如何安装 C# 集成开发环境 (MonoDevelop)



sudo apt-get install mono mono-gmcs mono-gac mono-utils monodevelop

如何安装JAVA集成开发环境 (Eclipse)



sudo apt-get install eclipse

  • 应用程序 -> 编程开发 -> Eclipse
  • Ubuntu 6.10默认安装Eclipse 3.2.0

如何安装3D建模工具 (Blender 3d)



sudo apt-get install blender

  • Applications -> Graphics -> Blender 3D modeller

如何安装Tuxracer游戏



sudo apt-get install planetpenguin-racer planetpenguin-racer-data planetpenguin-racer-extras

  • Applications -> Games -> planetpenguin-racer

如何安装Frozen-Bubble游戏



sudo apt-get install frozen-bubble

  • Applications -> Games -> Frozen-Bubble

如何安装Scorched3D游戏



sudo apt-get install scorched3d
gksudo gedit /usr/share/applications/scorched3d.desktop

  • 在上面的文件中插入下列内容

[Desktop Entry]
Name=Scorched 3D
Comment=A 3D Remake Of Scorched Earth
Exec=scorched3d
Icon=
Terminal=false
Type=Application
Categories=Application;Game;ArcadeGame;

  • 保存文件
  • Applications -> Games -> Scorched 3D

如何安装即时战略游戏(globulation 2 alpha21)


wget http://globulation2.org/releases/0.8.21/glob2_alpha21_i386.deb
sudo dpkg -i glob2_alpha21_i386.deb

如果dpkg显示了一个依赖包错误,那么您可能需要安装下列依赖包


sudo apt-get -f install

键入下列命令启动游戏


glob2

如何安装虚拟天文馆(Stellarium)



sudo apt-get install stellarium
gksudo gedit /usr/share/applications/stellarium.desktop

  • 在上面的文件中插入以下内容

[Desktop Entry]
Name=Stellarium
Comment=Virtual planetarium
Exec=stellarium
Terminal=false
Type=Application
Categories=Application;Education;
Icon=stellarium

  • Applications -> Education -> Stellarium

第二种安装方案 method: (version 0.6.2)


1. 下载 Stellarium Linux installer.
2. 保存文件到桌面.
3. 右键点击该文件, 钩选 "Properties --> Permissions --> Owner:Execute", 关闭对话框. (一次性手续)
4. 双击文件, 跟随其随后的指示.
5. 如果您知道root的密码,那么将支持代码安装于全系统中. (一次性手续)

注: 您可以而且应该以普通用户而非root来安装此程序. 用第二种方案很容易达成上述目的.


如何安装用于 Firefox 的 Google Toolbar(工具栏)


目前版本的 Google Toolbar 在 Ubtuntu 6.06 中的 FireFox 1.5.0.5 下工作正常。

在 Firefox 中, 点击下面的链接

http://www.google.com/tools/firefox/toolbar/

然后点击那个大的下载按钮。


如何安装 Google Earth



wget -c http://dl.google.com/earth/GE4/GoogleEarthLinux.bin
sudo sh GoogleEarthLinux.bin

  • 保持 /usr/local/google-earth 作为安装路径。
  • 安装完成后点击 Exit. 如果你希望运行这个程序,请参考下面的注意

sudo cp /usr/local/google-earth/googleearth.desktop /usr/share/applications/

  • Applications(应用程序) -> Internet(互联网) -> Google Earth

  • 注意: 如果你第一次是从安装程序中启动 Google Earth,那么下次就需要 root 权限才能运行。修复这个问题:

sudo chmod 777 -R ~/.googleearth

How to install KDE Edutainment applications



sudo apt-get install kdeedu

  • Applications -> Education -> ...

How to install Internet Explorer + Flash 9



This will install a wine'd version of Internet Explorer 6 with Flash 9, as well as IE 5.5/5.01 if you really want them.


  • Note: This installed Flash 9 will NOT be available in browsers other than IE.
  • Install Cabextract. Open a terminal and run

sudo apt-get install cabextract

  • Open a terminal and run this:

wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

Do not run this as root (no sudo), as this can cause the script to malfunction and ruin your X configuration.


How to install Python Development Tools



Python Dev Tools


sudo apt-get install gcc libc6-dev python-dev python-setuptools python2.4-profiler

Install EZ Setup (tool for installing Python stuff)


wget http://peak.telecommunity.com/dist/ez_setup.py
sudo python ez_setup.py

Upgrade Setup Tools


sudo easy_install -U --script-dir /usr/local/bin setuptools

Install TurboGears Framework (optional)


sudo easy_install --script-dir /usr/local/bin TurboGears

如何安装 Windows 应用程序 (Wine)



Wine 不是一个模拟器。Wine 是一个 Windows API 的开源实现,构筑于 X 和 Unix 之上。可以把 Wine
看作一个能够运行 Windows 程序的兼容层。Wine 并不需要 Microsoft Windows,因为它本身就是 Windows API
的一个完全自由的替代品,由100%的非 Microsoft 的代码组成。尽管如此, 只要有原生的 Windwos 动态链接库(native
Windows DLL)存在,Wine 就可以随意的使用。

换句话说,Wine 使你可以在 Linux 下运行 Windows 应用程序。


  • 首先为 Wine 添加软件库:

gksudo gedit /etc/apt/sources.list

  • 在文件的最后添加下面几行

# Repository for wine
deb http://wine.budgetdedicated.com/apt dapper main
deb-src http://wine.budgetdedicated.com/apt dapper main

  • 保存编辑的文件

sudo apt-get update
sudo apt-get install wine


How to install a Drop Down Terminal like in First Person Shooters (tilda)



Do you want a console like in a first person shooter? Tilda should take care of you.


sudo apt-get install tilda

  • The default keybinding is F1. To change the default
    keybinding, either enter tilda -C at the terminal, or right click on
    the tilda terminal then click Preferences. While in preferences, you
    can change other things such as transparency, font, size, and window
    size.

其它图形桌面环境


如何安装KDE



sudo apt-get install kubuntu-desktop

注意: 安装需要大约400MB的磁盘空间

  • 系统(System) -> 退出(Log Out) -> 登出(Log Out)
  • 从KDE登录: 点击 会话(Sessions) 然后选择 KDE

如何安装 XFCE



sudo apt-get install xubuntu-desktop

  • 系统(System) -> 退出(Log Out) -> 登出(Log Out)
  • 从XFCE登录: 点击 会话(Sessions), 然后选择 XFCE




如何安装 XFCE 4.4 预览版 (4.3.90.1)


  • to install Xfce 4.4 beta 1 (4.3.90.1) on a fresh install of Dapper:


sudo apt-get install build-essential gcc pkg-config libglib2.0-0 \
libglib2.0-dev libgtk2.0-0 libgtk2.0-dev libxml++2.6c2a libxml++2.6-dev \
libvte-dev libvte4 a2ps libxpm-dev libxpm4 alsa-source alsa alsa-base \
alsa-oss alsa-utils libxml-parser-perl libpng12-0 libpng12-dev libdbh1.0-dev

chmod +x xfce4-4.3.90.1-installer.bin
sudo ./xfce4-4.3.90.1-installer.bin


  • finally to enable Xfce, you may need to enable it on the desktop manager (mark allow Xfce manage desktop)

How to install FluxBox



这有一些 截图. Fluxbox是一种流行的轻量级的窗口管理器。


sudo apt-get install fluxbox

让它随GDM启动

echo "exec startfluxbox" > ~/.xinitrc

让它登录时播放悦耳的声音

sudo apt-get install sox
gedit ~/.fluxbox/startup

  • 查找到以下行:

exec /usr/local/bin/fluxbox

  • 在以上行之前插入以下内容Put:

play /usr/share/sounds/login.wav > /dev/null 2>&1 &

  • 放松去听吧.

Eye Candy 爱看的 


如何安装Xgl/Compiz(Nvidia)










sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gksudo gedit /etc/X11/xorg.conf

  • 找到下面这节(section)

Section "Module"
Load "i2c"
Load "bitmap"
...
Load "type1"
Load "vbe"
EndSection

  • 将下面两条注释掉(如果有的话)

#	Load	"dri"
# Load "GLcore"

  • 确保glx模块的装入

	Load	"glx"

  • 找到下面这节(section)(您的具体内容可能有所不同)

Section "Device"
Identifier "NVIDIA Corporation NV34M [GeForce FX Go5200]"
Driver "nv"
BusID "PCI:1:0:0"
EndSection

  • 上面这节中, Identifier和BusID保持不变, 其余的以下面内容代替

Section "Device"
...
Driver "nvidia"
...
Option "RenderAccel" "true"
Option "AllowGLXWithComposite" "true"
EndSection

  • 找到下面这节(section)

Section "Screen"
Identifier "Default Screen"
Device "NVIDIA Corporation NV34M [GeForce FX Go5200]"
Monitor "Generic Monitor"
DefaultDepth 16

  • 确保DefaultDepth设置为24

	DefaultDepth	24

  • 保存文件
  • 安装Xgl/Compiz

sudo apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome
sudo cp /etc/gdm/gdm.conf-custom /etc/gdm/gdm.conf-custom-backup
gksudo gedit /etc/gdm/gdm.conf-custom

  • 用下面的内容替换原来的所有内容

# GDM Configuration Customization file.
#
# This file is the appropriate place for specifying your customizations to the
# GDM configuration. If you run gdmsetup, it will automatically edit this
# file for you and will cause the daemon and any running GDM GUI programs to
# automatically update with the new configuration. Not all configuration
# options are supported by gdmsetup, so to modify some values it may be
# necessary to modify this file directly by hand.
#
# To hand-edit this file, simply add or modify the key=value combination in
# the appropriate section in the template below. Refer to the comments in the
# gdm.conf file for information about each option. Also refer to the reference
# documentation.
#
# If you hand edit a GDM configuration file, you should run the following
# command to get the GDM daemon to notice the change. Any running GDM GUI
# programs will also be notified to update with the new configuration.
#
# gdmflexiserver --command="UPDATE_CONFIG <configuration key>"
#
# For example, the "Enable" key in the "[debug]" section would be specified by
# "debug/Enable".
#
# You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
# re-read the new configuration settings. You can also restart GDM by sending
# a HUP or USR1 signal to the daemon. HUP behaves like gdm-restart and causes
# any user session started by GDM to exit immediately while USR1 behaves like
# gdm-safe-restart and will wait until all users log out before restarting GDM.
#
# For full reference documentation see the gnome help browser under
# GNOME|System category. You can also find the docs in HTML form on
# http://www.gnome.org/projects/gdm/
#
# NOTE: Lines that begin with "#" are considered comments.
#
# Have fun!

[daemon]

[security]

[xdmcp]

[gui]

[greeter]

[chooser]

[debug]

[servers]# Override display 1 to use Xgl
0=Xgl

[server-Xgl]
name=Xgl server
command=/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo
flexible=true

  • 创建一个脚本文件用以启动时运行Xgl/Compiz

gksudo gedit /usr/bin/thefuture

  • 插入下列内容. 将.us替换成您自己的键盘映射. 如.gb为英国. 在终端中键入ls /usr/share/xmodmap可以查看键盘映射的详细列表. 如果不确定,则不需要修改.us (United States)

#!/bin/bash
gnome-window-decorator & compiz --replace gconf decoration wobbly fade minimize cube rotate zoom scale move resize place switcher &
xmodmap /usr/share/xmodmap/xmodmap.us

  • 保存文件

sudo chmod 755 /usr/bin/thefuture

  • 在此会话中运行compiz

thefuture

  • 让compiz随系统而启动
    • System -> Preferences -> Sessions
    • Startup Programs -> Add


/usr/bin/thefuture


  • 疑难解答
    • 如果Xgl/Compiz看上去不工作, 或出现错误, 在将"thefuture"加入启动程序后,重启计算机即可.
    • 如果移动窗体会拖慢系统的响应速度, 从终端运行gconf-editor.
      找到apps/compiz/general/screen0/options. 将
      detect_refresh_rate设置为disable,并将刷新率(refresh rate)设成60. 现在应该全可以了吧...
    • 如果您使用的是非默认键盘(其他语言), 在设置System/Settings/Keyboard时错误连连,那么您可能要将其改为正确的键盘映射.
    • 您还可以将所谓的Super-key映射成您键盘上的windows键.
    • 如果您不想要底部的扩展工具条(bottom expanded panel), 只需在终端输入"killall gnome-panel".


  • 提示
    • 切换窗口 = Alt + Tab
    • 排列和查看所有窗口 = F12 这是个开/关状态键; 点击一个窗体将此窗体放大并前置.
    • 将桌面变成立方体 = Ctrl + Alt + 左/右箭头
    • 将桌面变成立方体 - 当前激活之窗口跟随 = Ctrl + Shift + Alt + 左/右箭头
    • 手工旋转立方体 = Ctrl + Alt + 鼠标左键
    • 变窗口为半透明/不透明(translucent/opaque) = 目前只有"transset"功用
    • 放大一次 = Super-key + 鼠标右键
    • 手工放大 = Super-key + 鼠标滚轮上滚
    • 手工缩小 = Super-key + 鼠标滚轮下滚
    • 移动窗口 = Alt + 鼠标左键
    • 移动窗口的吸靠 (会粘在边界上) = Ctrl + Alt + 鼠标左键
    • 调整窗口大小 = Alt + 鼠标右键


如何安装Xgl/Beryl (ATI)


(From Beryl Forums)



First make sure you have 3d acceleration available in a normal gnome session.
There are lots of howtos for this , Google if you need any help with that.
So if glxinfo shows direct rendering: yes , then you are good to go. If not xgl and Beryl wont work!


  • 更新您的系统

sudo apt-get update
sudo apt-get dist-upgrade

  • 准备和更新程序库

sudo gedit /etc/apt/sources.list

  • 将 quinstorms' 和 reggaemanus' 程序库添加到 /etc/apt/sources.list

deb http://www.beerorkid.com/compiz/ dapper main
deb http://xgl.compiz.info/ dapper main
deb-src http://xgl.compiz.info/ dapper main

  • 下载和导入quinnstroms库的gpg密钥

 wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add -

  • 更新源

sudo apt-get update

  • 安装所需之软件包

sudo apt-get install xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 beryl beryl-core beryl-manager beryl-plugins beryl-plugins-data beryl-settings emerald emerald-themes

  • 制作xgl的启动脚本

sudo gedit /usr/bin/startxgl.sh

  • 添加到脚本

Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1 
# Start GNOME
exec gnome-session

  • 将脚本变为可执行

sudo chmod 755 /usr/bin/startxgl.sh

  • 为登录管理器制作一个xgl会话

sudo gedit /usr/share/xsessions/xgl.desktop

  • 将下列内容加入到该会话

[Desktop Entry]
Encoding=UTF-8
Name=XGl
Exec=/usr/bin/startxgl.sh
Icon=
Type=Application

  • 添加

beryl
emerald

到gnome会话启动程序. (到"系统", "设定", "会话", 点选startup programs选项卡)


  • 重启
  • In the login manager you can now choose a session named Xgl
  • Answer to following question that you want to use Xgl for this
    session only (if something went wrong you are logged in next time using
    standard session)
  • If everything works fine , you can set it as the default
    session , remember you can always login a normal gnome session if you
    want.

  • If you own an x series radeon and have problems with lockups, read this post:

http://ubuntuforums.org/showthread.php?t=150854

Note for all cards: glxinfo will show that direct rendering is not working , dont worry thats normal when you are running xgl.


如何安装Beryl/AIGLX (Nvidia)


(来源 Ubuntu Forums)



  • 确保所有软件包都最新

Install your *ubuntu-desktop metapackage specific to your DE, e.g. sudo apt-get install ubuntu-desktop
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

  • 添加软件库

gksudo gedit /etc/apt/sources.list

  • 将下述内容添加到文件末尾:

deb http://dev.realistanew.com/beryl edgy beryl
deb http://beryl-mirror.lupine.me.uk/beryl edgy beryl

(如果您需要64bit版本的beryl,将下列添加到库列表)


deb http://ubuntu.lupine.me.uk/ edgy main-amd64

  • 保存文件

sudo apt-get update

  • 安装Beryl

sudo apt-get install beryl-core beryl-plugins beryl-plugins-data emerald beryl-settings beryl-manager beryl beryl-dev emerald-themes

  • 备份xorg.conf

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gksudo gedit /etc/X11/xorg.conf

  • 将下列内容添加到xorg.conf的"Screen"节(section)

# Enable 32-bit ARGB GLX Visuals
Option "AddARGBGLXVisuals" "True"

# If you are using an older version of compiz that
# does not support rendering into the Composite
# Overlay Window, you will need to disable clipping
# of GLX rendering to the X Root window with this
# option, or you will get a blank screen after
# starting compiz:
Option "DisableGLXRootClipping" "True"

  • 将下列内容添加到xorg.conf的"Device"节(section)

Option          "TripleBuffer" "true"

  • 按ctrl+alt+backspace,重启X

  • 启动Beryl

beryl-start

或者


beryl-manager

如何安装其他启动画面


  • Read #General Notes
  • This installs a minimalistic splash screen that appears when
    the computer is booting up and shutting down. It is devoid of any text
    messages.

wget -c http://www.users.on.net/~stubby/usplash-minimalistic_0.1.deb
sudo dpkg -i usplash-minimalistic_0.1.deb
sudo update-alternatives --config usplash-artwork.so

  • Select the minimalistic alternative
    (/usr/local/lib/usplash/minimalastic.so) by entering the corresponding
    number. If you ever want to revert back to the original splash, select
    the default (/usr/lib/usplash/usplash-default.so)


商业软件


如何安装 Windows 9X/ME/2000/XP (Win4Lin)



如何安装 Windows 应用程序 (CrossOver Office)



如何安装 Windows Games (Cedega)



用户管理


如何设定/改变/启用 root 使用者的密码



sudo passwd root

如何禁用 root 使用者这个帐号



sudo passwd -l root

如何允许以 root 身份登入进 GNOME



安全标签页 -> 安全 -> 允许本地系统管理员登录 (勾选)

如何在终端模式里切换到 root 身份



sudo -s -H
Password: <specify user password>

如何新增/编辑/移除系统使用者帐号


  • 请参阅 #概述
  • 系统 -> 系统管理 -> 用户和组
  • 用户和组

用户标签页面 -> 添加用户.../属性/删除

或者

sudo useradd jim
sudo userdel jim

  • 更多信息请参阅

man usermod

如何新增/编辑/移除系统群组


  • 请参阅 #概述
  • 系统 -> 系统管理 -> 用户和组
  • 用户和组

组标签页面 -> 添加组.../属性/删除

如何自动登入GNOME (不安全)


  • 请参阅 #概述
  • 系统 -> 系统管理 -> 登录窗口
  • 登录窗口首选项

安全标签页 -> 自动登录 ->
启用自动登录 (勾选)
用户: 选择 "系统用户名"

如何允许更多的 sudo 用户



export EDITOR=gedit && sudo visudo

  • 在文件末尾添加如下一行内容

system_username	ALL=(ALL) ALL

  • 保存编辑好的文件

如何使用 "sudo" 时不需要任何密码提示 (不安全)



export EDITOR=gedit && sudo visudo

  • 找到这一行

...
system_username ALL=(ALL) ALL
...

  • 用下面这一行取代

system_username	ALL=(ALL) NOPASSWD: ALL

  • 保存编辑好的文件

如何下指令结束目前 "sudo" 会话



sudo -K

如何更改文件/目录的权限



鼠标右键点击文件/目录 -> 属性

权限标签页 -> 读取/写入/执行 (Checked the permissions for Owner/Group/Others)

如何更改文件/目录的所有者



sudo chown system_username /location_of_files_or_folders

如何更改文件/目录的所有者



sudo chgrp system_groupname /location_of_files_or_folders

Hardware


Activate side-mouse-buttons in FireFox


Just add two lines to xorg.conf will activate side-mouse-buttons in
FireFox. This should work with most 5-button mouse. Here is a list of
mice that worked with this instruction.


  • Logitech MX510
  • Logitech MX518
  • Logitech MX700
  • Intellimouse Explorer (first edition)



Backup Gnome configuration file


sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

Modify the Gnome configuration file


gksudo gedit /etc/X11/xorg.conf

Find the Input Device section for your mouse and add two lines as
shown below. You may also increase the number of buttons if your mouse
has more than 7, just fix the rest of the section based upon the number
of buttons (remember back/forward, wheel click & tilt left/right
all count as buttons)

Change:


Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
...
Option "Protocol" "ExplorerPS/2"
...
Option "Emulate3Buttons" "true"
EndSection

to:


Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
...
Option "Protocol" "ExplorerPS/2"
...
Option "Emulate3Buttons" "true"
Option "Buttons" "7"
Option "ButtonMapping" "1 2 3 6 7"
EndSection


At this point you can reboot your computer or reboot Gnome
(Ctrl-Alt-BackSpace) to see if your forward/back buttons work in
FireFox. They still won't work in Nautilus yet until you install the
imwheel dameon.


Install & Configure IMWheel


  • Install IMWheel

sudo apt-get install imwheel

  • Modify IMWheel configuration file

gksudo gedit /etc/X11/imwheel/imwheelrc

  • Insert the following at the bottom of this existing file

".*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right

"(null)"
None, Up, Alt_L|Left
None, Down, Alt_L|Right




  • Create IMWheel start-up script

sudo mkdir /home/login
gksudo gedit /home/login/mouse

  • Insert the following into this new file

#!/bin/sh
exec xmodmap -e "pointer = 1 2 3 6 7 4 5" &
exec imwheel -k -b "67" &
exec $REALSTARTUP

  • Grant execution for everyone to this new script

sudo chmod +x /home/login/mouse

  • Configure this script to be executed at start-up
    1. Select 'System' > 'Preferences' > 'Sessions'
    2. Click the StartUp tab
    3. Click Add, then input: /home/login/mouse
    4. Click OK, then Close


  • Reboot your computer or your Gnome environment and then test your back/forward mouse buttons in Nautilus

How to install Graphics Driver (NVIDIA)



sudo apt-get install nvidia-glx nvidia-kernel-common
sudo nvidia-glx-config enable

  • Should the above not enable the new driver, you can enable it manually by opening the X config file:

sudo gedit /etc/X11/xorg.conf


  • and replacing "nv" with "nvidia"


  • Enable XvMC by creating the nVidia XvMC configuration file

sudo gedit /etc/X11/XvMCConfig

  • Insert the following line into the new configuration file, to tell the players the name of the nVidia XvMC shared library:

libXvMCNVIDIA_dynamic.so.1

  • To use XvMC to accelerate video playback, use the following flags. See [[4]] for more details.

xine -V xxmc filename.ts
mplayer -vo xvmc -vc ffmpeg12mc filename.ts

How to install Beta Graphics Driver (NVIDIA)


This section is borrowed from http://ubuntuforums.org/showthread.php?t=263851



sudo gedit /etc/apt/sources.list

  • Add the following line at the end

deb http://amaranth.selfip.com edgy lrm

  • Save the edited file

sudo apt-get update
sudo apt-get install nvidia-glx libxorg-sched-yield-hack0
sudo apt-get upgrade

  • The upgrade should update your linux-restricted-modules & linux-restricted-modules-common packages.

sudo nvidia-xconfig

  • Restart the computer and your new drivers should be installed.

How to setup pivot (screen rotation) with default X.org NVIDIA drivers



  • Some LCD monitors are equipped with the pivot feature, to take
    advantage of it the display has to be rotated 90 degrees. The default
    nVidia drivers shipped with X.org ("nv") support software screen
    rotation. Note that it's unaccelerated and can be slow, read #How to install Graphics Driver (NVIDIA) if you decide to install the proprietary driver.


  • To rotate the screen find the "Device" section for the "nv" driver in the /etc/X11/xorg.conf file:

Section "Device"                                                                
Identifier "NVIDIA Corporation NV34 [GeForce FX 5200]"
Driver "nv"

  • Add the following options to this section:

       Option "Rotate" "CW"

Where the "Rotate" option has two possible values (depending on the orientation of the monitor):


  1. CW - rotate the display clockwise (right).
  2. CCW - rotate the display counterclockwise (right).


How to setup pivot (screen rotation) with proprietary NVIDIA drivers



  • Some LCD monitors are equipped with the pivot feature, to take
    advantage of it the display has to be rotated 90 degrees. The
    proprietary nVidia drivers support hardware rotation with the Xrandr
    extension.

  • To enable rotation support find the "Device" section for the "nvidia" driver in the /etc/X11/xorg.conf file:

Section "Device"                                                                
Identifier "NVIDIA Corporation NV34 [GeForce FX 5200]"
Driver "nvidia"

  • Add the following option to this section:

       Option          "RandRRotation" "on"


  • Then the display can be rotated (direction depends on the orientation of the monitor) by:

  1. Setting the "Rotation" property to either "Left" or "Right" in the "System > Preferences > Screen Resolution" dialog.
  2. Issuing either "xrandr -o left" or "xrandr -o right" command.

How to disable NVIDIA graphics logo on GNOME startup



sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gksudo gedit /etc/X11/xorg.conf

  • Find this section

 ...
Section "Device"
Identifier "NVIDIA Corporation NV11 [GeForce2 MX/MX 400]"
Driver "nvidia"
BusID "PCI:1:0:0"
...

  • Add the following line below it

   Option		"NoLogo"


How to install Graphics Driver (ATI)



How to install Graphics Driver (Intel)


Note: This driver is for Intel® 82830M, 82845G, 82852GM, 82855GM, 82865G, and 82915G/GM graphics controller-based products only.



wget -c http://downloadmirror.intel.com/df-support/8211/eng/dri-I915-v1.1-20041217.i386.rpm
sudo alien dri-I915-v1.1-20041217.i386.rpm
sudo dpkg -i dri-i915_v1.1-20041218_i386.deb

How to Correct the Graphics Resolution (Intel)



  • Intel 915g, 945g, etc. graphics chipsets only have a limited
    set of resolutions initially installed, despite the correct driver
    being detected.
  • Install the resolution altering tool:

sudo apt-get install 915resolution

  • Run the following to see the availible modes:

915resolution -l

  • Choose a resolution you don't need and replace, for example the following changes 1920x1440 to 1920x1200

915resolution 5c 1920 1200

  • This should add the option for that resolution to the "System>Preferences>Screen Resolution" tool.
  • If it works correctly then you can make the change permanent:

sudo gedit /etc/rc.local

  • Simply add the command you typed in above before:

exit 0

How to detect CPU temperature, fan speeds and voltages (lm-sensors)



sudo apt-get install lm-sensors

Create file called mkdev.sh, and paste in the following


#!/bin/bash

# Here you can set several defaults.

# The number of devices to create (max: 256)
NUMBER=32

# The owner and group of the devices
OUSER=root
OGROUP=root
# The mode of the devices
MODE=600

# This script doesn't need to be run if devfs is used
if [ -r /proc/mounts ] ; then
if grep -q "/dev devfs" /proc/mounts ; then
echo "You do not need to run this script as your system uses devfs."
exit;
fi
fi

i=0;

while [ $i -lt $NUMBER ] ; do
echo /dev/i2c-$i
mknod -m $MODE /dev/i2c-$i c 89 $i || exit
chown "$OUSER:$OGROUP" /dev/i2c-$i || exit
i=$[$i + 1]
done
#end of file

Make this file executable, then run it


sudo chmod +x mkdev.sh
./mkdev.sh

Now detect sensors, and answer "y" to all questions.


sudo sensors-detect

Load the modules into kernel


sensors -s

Now, let's see the output


sensors




How to control fan speed (lm-sensors)


Install and config lm-sensors first, see section above. Then run pwmconfig to test your fans


pwmconfig

If you can control fan speeds, great. Now creat a file called /etc/init.d/fancontrol, and paste in the following


#!/bin/sh
#
# Fancontrol start script.
#

set -e

# Defaults
DAEMON=/usr/sbin/fancontrol
PIDFILE=/var/run/fancontrol-pid
PATH=/sbin:/bin:/usr/sbin:/usr/bin

test -f $DAEMON || exit 0

. /lib/lsb/init-functions


case "$1" in
start)
log_begin_msg "Starting fancontrol daemon..."
start-stop-daemon --start -o -q -m -b -p $PIDFILE -x $DAEMON
log_end_msg $?
 ;;
stop)
log_begin_msg "Stopping fancontrol daemon..."
start-stop-daemon --stop -o -q -p $PIDFILE
log_end_msg $?
 ;;
force-reload|restart)
sh $0 stop
sh $0 start
 ;;
*)
log_success_msg "Usage: /etc/init.d/fancontrol {start|stop|restart|force-reload}"
log_success_msg " start - starts system-wide fancontrol service"
log_success_msg " stop - stops system-wide fancontrol service"
log_success_msg " restart, force-reload - starts a new system-wide fancontrol service"
exit 1
 ;;
esac

exit 0

Make it excutable


sudo chmod +x /etc/init.d/fancontrol

Test it


/etc/init.d/fancontrol start

and


/etc/init.d/fancontrol stop

If it works fine, autoload it when you reboot. Insert the following line into /etc/rc.local, before "exit 0"


/etc/init.d/fancontrol start




How to show nvidia GPU temperature (nvidia-settings)



At a terminal, type


nvidia-settings




How to monitor CPU, GPU temperatures, fan speeds and voltages (GKrellM)





  • Install hddtemp first to monitor hard drive temperatures

sudo apt-get install hddtemp

GKrellM is a hardware monitor that can display CPU and GPU
temperatures, fan speeds, voltages, CPU load, network load, disk
activity, disk temperature, memory usage, and swap usage. The
installation is very easy, and configuration is just a few
mouse-clicks. You can set alerts to warn you if the CPU is too hot or
there is a fan failure. The hddtemp utility works with GKrellM to allow
it to sense the disk temperature, as keeping your disks cool (e.g. less
than around 40C) will allow them to last longer than if they run
continually at higher temperatures (e.g. above 50C).


sudo apt-get install gkrellm

To run the program


Click Applications -> System Tools -> GKrellM

To configure the settings,


Right click on GKrellM -> Configuration

I was struggling with lm_sensors before, but it doesn't detect all
of the sensors on my computer. Later I found "GKrellM". It displays the
GPU temperature on my nVidia 6600 GT out of the box. GKrellM also has
plugins that show weather info, set reminders, etc.

Add an audio alert (optional Step): Here is how to play
an audio message when the CPU is too hot or a fan fails. First you need
to find or record your own audio alert files. (I use Audacity to record
my own.) Then go to:


Configuration -> Builtins folder (Left side)-> Sensors -> Temperatures folder (Right side)-> CPU -> Alerts Button

Paste ONE of the following lines into a Terminal window first to
test the sound. If you have two sound cards, you can use "-ao
oss:/dev/dsp1" option to route the sound to the second sound card.
Modify the file path and name so it points to the correct file. If you
can hear the sound, then copy that line to a command line text field on
the GKrellM's Alerts window.


mplayer /home/myfolder/alert_messages/heat_alert.mp3
mplayer -ao oss:/dev/dsp1 /home/myfolder/alert_messages/heat_alert.mp3

How to identify Modem chipset



wget -c http://easylinux.info/uploads/scanModem.gz
gunzip -c scanModem.gz > scanModem
chmod +x scanModem
sudo cp scanModem /usr/bin/

  • To identify Modem chipset

sudo scanModem
gedit Modem/ModemData.txt

How to install Windows Wireless Drivers (Ndiswrapper)






  • Find out if you have acx module loaded. Because acx module interferes with windows driver, we need to remove it if it is found.

lsmod | grep acx

  • Remove the acx module if found. It could also be acx_pci or
    similar. Please Note: New kernel updates will auto load the acx module
    again. So repeat the following two commands every time the kernel is
    updated.

sudo rmmod acx
sudo mv /lib/modules/2.6.15-26-386/kernel/drivers/net/wireless/acx /root/

  • Install ndiswrapper and drivers

sudo apt-get install ndiswrapper-utils
sudo ndiswrapper -i /location_of_your_wireless_driver/your_driver.inf
sudo ndiswrapper -l
sudo modprobe ndiswrapper

  • Set ndiswrapper to load on startup

sudo ndiswrapper -m
gksudo gedit /etc/modules

  • Add the following module to the list

ndiswrapper

  • Now you can configure your wireless card with ifconfig and iwconfig.

e.g. Supposing wlan0 is your wireless device.

sudo iwconfig wlan0 essid "AP" key ababababababababab mode Managed
iwconfig

  • You sould now be able to see the MAC address of the access point and signal rate.

How to enable WPA with Ndiswrapper driver


  • First, make sure the Ndiswrapper driver works by itself without encryption.

  • Create a file called /etc/wpa_supplicant.conf, and paste in the following. Modify the ssid and psk values.

ctrl_interface=/var/run/wpa_supplicant
network={
ssid="YourWiFiSSID"
psk="YourWiFiPassword"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
}

  • Test it. Make sure your router is broadcasting its SSID.

sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd

  • If you WPA works. Load it automatically when you reboot.

gksudo gedit /etc/network/interfaces

  • Change your wlan0 section to the following.

If you are using static IP:


auto wlan0
iface wlan0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.1
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

or this, if you are using dhcp.


auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant




  • Reboot

How to install Modem Driver (SmartLink)



uname -r (must be 2.6.10-5-386)
wget -c http://easylinux.info/uploads/sl-modem-modules-2.6.10-5-386_2.9.9a-1ubuntu2+2.6.10-34_i386.deb
sudo dpkg -i sl-modem-modules-*.deb
sudo apt-get install sl-modem-daemon

How to configure PalmOS Devices



gksudo gedit /etc/udev/rules.d/10-custom.rules

  • Insert the following line into the new file

BUS="usb", SYSFS{product}="Palm Handheld*", KERNEL="ttyUSB*", NAME{ignore_remove}="pilot", MODE="666"

  • Save the edited file
  • Add the pilot-applet to the Taskbar by Right-Clicking on an empty spot
  • Follow the instructions on screen

怎样显示分区表



sudo fdisk -l

  • 你也可以使用菜单来打开 System(系统) -> Administration(管理) -> Disks(磁盘)

怎样显示文件系统磁盘空间使用情况



df -Th

  • 你也可以使用菜单 System(系统) -> Administration(管理) -> Disks(磁盘)

怎样列出已经映像(mount)的设备



mount

怎样列出PCI设备



lspci

怎样列出USB设备



lsusb

How to speed up CD/DVD-ROM



e.g. Assumed that /dev/cdrom is the location of CD/DVD-ROM

sudo hdparm -d1 /dev/cdrom
sudo cp /etc/hdparm.conf /etc/hdparm.conf_backup
gksudo gedit /etc/hdparm.conf

  • Append the following lines at the end of file

/dev/cdrom {
dma = on
}

  • Save the edited file

How to mount/unmount CD/DVD-ROM manually, and show all hidden and associated files/folders



e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM

  • To mount CD/DVD-ROM

sudo mount /media/cdrom0/ -o unhide

  • To unmount CD/DVD-ROM

sudo umount /media/cdrom0/

How to forcefully unmount CD/DVD-ROM manually



e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM

sudo umount /media/cdrom0/ -l

怎样重新映像(mount) /etc/fstab 中的设备而无须重启



sudo mount -a

How to install a Wacom tablet


For a detailed guide with screenshots about how to configure the
"Extended input devices" in your graphic applications, please follow
the official Dapper guide at https://wiki.ubuntu.com//Wacom

With the version of the Linux Wacom driver (0.7.2) in Ubuntu
6.06 Dapper Drake, if you unplug you tablet, it won't function when you
plug it back in and you will have to restart X. For this reason, it is
best to leave the tablet plugged in. This limitation will be removed
when the 0.7.4 version of the driver is included in Ubuntu.



  • 1. Using Synaptic package manager, check if the packages
    xserver-xorg-input-wacom and wacom-tools are already installed - if
    not, install them. If you prefer using the command line, you can also
    execute :

     sudo apt-get install xserver-xorg-input-wacom wacom-tools

  • 2. Save a copy of your /etc/X11/xorg.conf :

      sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

  • then edit it with the command line :

      gksudo gedit /etc/X11/xorg.conf

  • and change all /dev/wacom occurences into /dev/input/wacom (created by wacom-tools udev scripts), then save the file.

  • You should be ready to go after you have restarted X. Remember
    to configure the "Extended input devices" in your graphic applications
    (Gimp, Inkscape), however you can already check if it's working by
    moving your stylus on the tablet : the mouse cursor should go through
    the whole screen.

How to enable Multicore Support


  • This should work for both Multicore systems and SMP systems

sudo apt-get install linux-686-smp

  • You can check that this works by running the following and seeing two CPUs listed

cat /proc/cpuinfo

How to enable Large Widescreen Support


  • 24/23" widescreen monitors sometimes have issues running 1920x1200.
  • Examples include: Dell 2405, HP 2335 or an Apple Cinema Display.

sudo gedit /etc/X11/xorg.conf

  • Add the following line to the appropriate "Monitor" section

Modeline	"1920x1200" 154 1920 1968 2000 2080 1200 1203 1209 1235

  • For example the HP2335 should now look like:

Section "Monitor"
Identifier "hp L2335"
Option "DPMS"
Modeline "1920x1200" 154 1920 1968 2000 2080 1200 1203 1209 1235
EndSection

How to setup the surround speakers (5.1 and others) with ALSA



  • Edit the ~/.asoundrc file, create it if it doesn't exist:

gedit ~/.asoundrc

  • Enter the following section:

pcm.!default {
type plug
slave.pcm "surround51"
slave.channels 6
route_policy duplicate
}

  • This will allow to play the surround output and duplicate the stereo output to all 6 channels (not only front ones).

CD/DVD刻录


如何格式化 CD-RW/DVD-RW 碟片



例如 假设 /dev/cdrom/ 是 CD/DVD-ROM 所在的位置

sudo umount /dev/cdrom
cdrecord dev=/dev/cdrom blank=fast

如何刻录文件/目录到 CD/DVD



nautilus burn:///

  • 文件浏览器: CD/DVD Creator

  • 将 文件/目录 拖到窗口

文件 -> 写入碟片... -> 写入

如何刻录镜像 (ISO) 文件到 CD/DVD



在镜像 (ISO) 按鼠标右键 -> 写入碟片... -> 写入

如何复制 CD/DVD



如何从 CD/DVD 建立镜像 (ISO) 文件



例如 假设 /dev/cdrom/ 是 CD/DVD-ROM 所在的位置

sudo umount /dev/cdrom
dd if=/dev/cdrom of=file.iso bs=1024

如何从目录建立镜像 (ISO) 文件



mkisofs -o file.iso /location_of_folder/

如何生成 MD5 校验和文件



md5sum file.iso > file.iso.md5

如何验证文件的 MD5 校验和



例如 假设 file.iso 和 file.iso.md5 是在相同目录下

md5sum -c file.iso.md5

如何不刻录就挂载/卸载镜像 (ISO) 文件


  • 请参阅 #概述
  • 要挂载镜像文件 (ISO) 时

sudo mkdir /media/iso
sudo modprobe loop
sudo mount file.iso /media/iso/ -t iso9660 -o loop

  • 要卸载镜像文件 (ISO) 时

sudo umount /media/iso/

如何设置/修改 CD/DVD 刻录机的刻录速度


  • 请参阅 #概述
  • 应用程序 -> 系统工具 -> 配置编辑器
  • 配置编辑器

/ -> apps -> nautilus-cd-burner -> default_speed (set/change the burn speed)

如何启用 CD/DVD 刻录机的 burnproof


  • 请参阅 #概述
  • 应用程序 -> 系统工具 -> 配置编辑器
  • 配置编辑器

/ -> apps -> nautilus-cd-burner -> burnproof (勾选)

如何启用 CD/DVD 刻录机的 overburn


  • 请参阅 #概述
  • 应用程序 -> 系统工具 -> 配置编辑器
  • 配置编辑器

/ -> apps -> nautilus-cd-burner -> overburn (勾选)

网络


如何设置Google Talk



如何激活/禁用网络连接


  • 请参阅 #概述
  • 系统 -> 系统管理 -> 联网
  • 网络设置

连接标签页 -> 选择 "以太网连接" -> 激活/禁用

如何配置网络连接


  • 请参阅 #概述
  • 系统 -> 系统管理 -> 联网
  • 网络设置

连接标签页 -> 选择 "以太网连接" -> 属性
连接 -> 启用这个连接 (勾选)
连接设置 -> 设置: 选择 "DHCP/静态 IP 地址"

DNS 标签页 -> DNS 服务 -> 添加/删除


如何配置拨号连接


  • 请参阅 #概述
  • 要设置拨号连接

sudo pppconfig

  • 要开启拨号连接

sudo pon provider_name

  • 要断开拨号连接

sudo poff

如何配置宽带连接



sudo pppoeconf

如何改计算机名


  • 请参阅 #概述
  • 系统 -> 系统管理 -> 联网
  • 网络设置

General Tab -> Host Settings -> Hostname: Specify the computer name 

  • 保存并结束所有执行中的程序, 重启电脑

如何改计算机描述



sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf

  • 找到这一行

...
server string = %h server (Samba, Ubuntu)
...

  • 用下面这一行取代

  server string = new_computer_descriptions

  • 保存编辑好的文件

sudo testparm
sudo /etc/init.d/samba restart

如何更改计算机的网域名称(Domain)/群组名称(Workgroup)



sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf

  • 找到这一行

...
workgroup = MSHOME
...

  • 用下面这一行取代

  workgroup = new_domain_or_workgroup

  • 保存编辑好的文件

sudo testparm
sudo /etc/init.d/samba restart

如何在使用 DynDNS 的服务和动态 IP 的情况下指定主机名称(Hostname)



sudo apt-get install ipcheck
sudo gedit /etc/ppp/ip-up.d/dyndns_update.sh

  • 将下列语句插入新文件

 #!/bin/sh

USERNAME=myusername
PASSWORD=mypassword
HOSTNAME=myhostname.dyndns.org

cd /root/
if [ -f /root/ipcheck.dat ]; then
ipcheck -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME
else
ipcheck --makedat -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME
fi

  • 保存编辑好的文件

sudo chmod 700 /etc/ppp/ip-up.d/dyndns_update.sh
sudo sh /etc/ppp/ip-up.d/dyndns_update.sh

如何简单的开放目录共享



用鼠标右键单击文件夹 -> 共享文件夹

共享文件夹 -> 共享方式: 选择 "SMB"
共享属性 -> 名称: 指定共享名称

如何浏览网域内的其他计算机



例如 假设您的网络连接已经正确设定好
如果没有找到电脑或网络文件夹,试试直接访问它们
请参阅 #如何不先挂载就读取网络共享目录

  • 位置 -> 网络服务器

如何不先挂载就读取网络共享目录



例如 假设您的网络连接已经正确设定好
网络主机的 IP: 192.168.0.1
共享中的目录名称: linux

  • Applications -> Run Application...(Edit by firingstone:It seems this cannot be done in dapper,no such menu)
  • Run Application

smb://192.168.0.1/linux

如何手动挂载/卸载网络共享目录,并允许所有使用者都可读取



例如 假设您的网络连接已经正确设定好
网络主机的 IP: 192.168.0.1
网络主机的使用者名称: myusername
网络主机的登录密码: mypassword
共享中的目录名称: linux
主机上要挂载的目录: /media/sharename

  • 要挂载网络共享目录时

sudo mkdir /media/sharename
sudo mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword

  • 要卸载网络共享目录时

sudo umount /media/sharename/

如何手动挂载/卸载网络共享目录,并允许所有使用者都可读取和写入



例如 假设您的网络连接已经正确设定好
网络主机的 IP: 192.168.0.1
网络主机的使用者名称: myusername
网络主机的登录密码: mypassword
共享中的目录名称: linux
主机上要挂载的目录: /media/sharename

  • 要挂载网络共享目录时

sudo mkdir /media/sharename
sudo mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword,dmask=777,fmask=777

  • 要卸载网络共享目录时

sudo umount /media/sharename/

如何在系统启动时,自动挂载网络共享目录,并允许所有使用者都可读取



例如 假设您的网络连接已经正确设定好
网络主机的 IP: 192.168.0.1
网络主机的使用者名称: myusername
网络主机的登录密码: mypassword
共享中的目录名称: linux
主机上要挂载的目录: /media/sharename

sudo mkdir /media/sharename
sudo gedit /root/.smbcredentials

  • 将下列语句插入新文件

username=myusername
password=mypassword

  • 保存编辑好的文件

sudo chmod 700 /root/.smbcredentials
sudo cp /etc/fstab /etc/fstab_backup
sudo gedit /etc/fstab

  • 在文件末尾添加如下一行内容

//192.168.0.1/linux    /media/sharename smbfs  credentials=/root/.smbcredentials    0    0


如何在系统启动时,自动挂载网络共享目录,并允许所有使用者都可读取和写入



例如 假设您的网络连接已经正确设定好
网络主机的 IP: 192.168.0.1
网络主机的使用者名称: myusername
网络主机的登录密码: mypassword
共享中的目录名称: linux
主机上要挂载的目录: /media/sharename

sudo mkdir /media/sharename
sudo gedit /root/.smbcredentials

  • 将下列语句插入新文件

username=myusername
password=mypassword

  • 保存编辑好的文件

sudo chmod 700 /root/.smbcredentials
sudo cp /etc/fstab /etc/fstab_backup
sudo gedit /etc/fstab

  • 在文件末尾添加如下一行内容

//192.168.0.1/linux    /media/sharename smbfs  credentials=/root/.smbcredentials,dmask=777,fmask=777  0    0


如何使用无线网络模块(ipw2200)并启用无线数据传输协议(WPA)



如何设置并启用 PPTP tunnels (VPN)



或者

  • 手动安装

wget -c http://linux.edu.lv/uploads/content/pptp.tar.gz
tar zxvf pptp.tar.gz
sudo sh ./pptp/install

  • 要设置 PPTP 客户端

sudo gedit /usr/share/applications/pptpconfig.desktop

  • 用以下几行内容替换文件原有内容

[Desktop Entry]
Name=PPTP Client
Comment=Configure and start PPTP tunnels (VPN)
Categories=Application;Network
Encoding=UTF-8
Exec=gksudo pptpconfig
Icon=gnome-remote-desktop.png
StartupNotify=true
Terminal=false
Type=Application

  • 以上内容对默认文件作了以下三方面修改:应用程序被放置到应用程序/Internet 类别里, gksudo 以超级用户来运行程序,此外我们还选择了一个漂亮的菜单图标。
  • 运行客户端 应用程序 -> Internet -> PPTP Client

如何设置网络管理器并启用WPA1和WPA2支持


Ubuntu Dapper in typical cases can configure WPA to work out of the
box with minimal hassle. You'll need to install network-manager.



For Ubuntu:


sudo apt-get install network-manager-gnome

For Kubuntu (will install knetworkmanager):


sudo apt-get install network-manager-kde

Logout/Reboot.

Ubuntu users should now see the NetworkManager Applet in the Gnome notification area. Kubuntu users will probably have to run knetworkmanager before they see NetworkManager in the systray.

If instead, you get a "The NetworkManager applet could not find some required resources. It cannot continue." message, then:


sudo gtk-update-icon-cache -f /usr/share/icons/hicolor

Once Network-Manager is installed, click on the NM icon in the
notification area (default is at the top right of Ubuntu/Gnome). Choose
your network, then enter your passphrase. Type a password for the
keyring, and you're set.

If you don't see your network, click "Create New Wireless
Network...", type your essid/networkname, then choose "WPA Personal"
for wireless security.


  • Note: If you installed Kubuntu then installed ubuntu-desktop
    & network-manager-gnome, you may not be able to use network-manager
    in Gnome, if at all. In this case, you may have to use WPA Supplicant
    and do some manual editing of conf files to get WPA up and running.

  • Note: When you first log into Gnome/KDE, the keyring
    application will ask for a password. Future revisions of
    Network-Manager should resolve this.

远程访问


通过XDMCP远程登录


XDMCP是什么?

GNOME windows can support several different users simultaniously.
Unlike vncviewer that just duplicates the current screen on a remote
system, XDMCP allows several different users to login and run different
GNOME sessions at the same time. So if you have a fast computer runing
Ubuntu, several users can use their slow machines to login and run
heavy applications only available on the fast machine.


How to turn on the XDMCP feature

To turn on the XDMCP feature on the fast computer, click the menu


System -> Administration -> Login Window 

In the Login Window Preferences dialog window, select


Remote Tab -> Style: Same as Local ->  Close the dialog window -> Restart the PC

How to login from another PC running Ubuntu

1. Reboot the slow PC and stop at the login screen
2. Click Options at the lower left corner of the login screen
3. Select "Remote Login via XDMCP"
4. On the dialog window, type in the host name or ip of the fast computer you want to login to




Remote Desktop Sharing/Duplication via VNC


How to configure remote desktop (not secure)


Warning! Remote Desktop will only work if there's a GNOME login session
Leaving computer with an unattended GNOME login session is not secure
Use (System -> Lock Screen) and switch off the monitor when computer is left unattended

  • System -> Preferences -> Remote Desktop
  • Remote Desktop Preferences

Sharing ->
Allow other users to view your desktop (Checked)
Allow other users to control your desktop (Checked)

Security ->
Ask you for confirmation (Un-Checked)
Require the user to enter this password: (Checked)
Password: Specify the password

How to connect into remote Ubuntu desktop


e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
Read #How to configure remote desktop (not secure)
Remote Ubuntu machine: 192.168.0.1

vncviewer -fullscreen 192.168.0.1:0

  • To quit vncviewer

Press 'F8' -> Quit viewer

How to connect into remote Ubuntu desktop via Windows machine


e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
Read #How to configure remote desktop (not secure)
Remote Ubuntu machine: 192.168.0.1

  • If you have a router remember to open the appropiate port. The default one is 5900

This process is called port forwarding port forwarding

  • Download DotNetVNC: Here or RealVNC Here

this is a free DotNet version that require the DotNet framework available from microsoft here
The RealVNC website was created and maintained by the
original developers of VNC during their time at AT&T. RealVNC comes
in Free, Personal, and Enterprise editions - the latter two costing
money.


  • Open the VNC client you have chosen, and insert the connection
    string formatted like this <LINUX BOX IP><:DESKTOP
    NUMBER>|<::PORT>

In example use: 192.168.1.2:0 or 192.168.1.2::5900 to
connect to desktop 0, to connect to desktop 1 use 192.168.1.2:1 or
192.168.1.2::5901 and so on


How to connect into remote Ubuntu desktop via OSX


e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
Read #How to configure remote desktop (not secure)
Remote Ubuntu machine: 192.168.0.1

  • If you have a router remember to open the appropiate port the default one is 5900

This process is called port forwarding port forwarding

  • Download ChickenOfTheVNC: Here

  • Open ChickenOfTheVNC, and insert the host (IP adress of remote
    machine), the display number (0 is default and is port 5900) and the
    password.

In example use: Host: 192.168.0.1, Display 0, Password: password

Windows


How to mount/unmount Windows partitions (NTFS) manually, and allow all users to read only






e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows

  • To mount Windows partition

sudo mkdir /media/windows
sudo mount /dev/hda1 /media/windows/ -t ntfs -o nls=utf8,umask=0222

  • To unmount Windows partition

sudo umount /media/windows/

How to mount/unmount Windows partitions (FAT) manually, and allow all users to read/write



e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
Local mount folder: /media/windows

  • To mount Windows partition

sudo mkdir /media/windows
sudo mount /dev/hda1 /media/windows/ -t vfat -o iocharset=utf8,umask=000

  • To unmount Windows partition

sudo umount /media/windows/

How to mount Windows partitions (NTFS) on boot-up, and allow all users to read only



e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows

sudo mkdir /media/windows
sudo cp /etc/fstab /etc/fstab_backup
gksudo gedit /etc/fstab

  • Append the following line at the end of file

/dev/hda1    /media/windows ntfs  nls=utf8,umask=0222 0    0


How to mount Windows partitions (FAT) on boot-up, and allow all users to read/write



e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
Local mount folder: /media/windows

sudo mkdir /media/windows
sudo cp /etc/fstab /etc/fstab_backup
gksudo gedit /etc/fstab

  • Append the following line at the end of file

/dev/hda1    /media/windows vfat  iocharset=utf8,umask=000  0    0


How to mount Windows partitions (NTFS) on boot-up, and allow users read and write access


Warning: Ntfs writing support is still experimental. You should not
enable it on production machines and/or volumes you don't have backups
of. Proceed at your own risk!



sudo apt-get install libfuse2 fuse-utils

  • Download the latest ntfsprogs package (these are from the Dapper repositories, so they are safe to install.)

libntfs8
ntfsprogs
libfuse2
fuse-utils


  • Install the downloaded packages

sudo dpkg -i libfuse2_*.deb fuse-utils_*.deb ntfsprogs_*.deb libntfs8_*.deb

  • Add fuse to the list of modules to load

echo fuse | sudo tee -a /etc/modules

  • Create a user group to access the ntfs disks

sudo addgroup ntfs

  • The output should look something like this, remember the GID
    (the number printed after the group name) as it may differ and we will
    need it later:

Adding group `ntfs' (1002)...
Done.


  • Create the local mount folder and edit the fstab file to mount the disks to this folder.

e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows

sudo mkdir /media/windows
sudo cp /etc/fstab /etc/fstab.bak
gksudo gedit /etc/fstab

  • Append the following line at the end of file, using the GID
    number previously. The umask following this GID allows write access
    just to owner (root) and group (ntfs), and read access to everyone.

/dev/hda1    /media/windows    ntfs-fuse    auto,gid=1002,umask=0002    0    0

  • Save the edited file.

  • Add users to the ntfs group, where "username" is the name of the user you would like to have write access

sudo adduser username ntfs


sudo rm /sbin/mount.ntfs-fuse && sudo ln /usr/bin/ntfsmount /sbin/mount.ntfs-fuse

  • If you reboot now, the disk will be writable to the selected
    users when they logon. If you want the changes to take effect
    immediately without rebooting, execute the following command, ignoring
    the errors about "/" and others not being unmounted. You'll have to
    logout from all your user sessions for the new group to be acknowledged
    (usually a logout from your graphical session and login back again will
    do it).

sudo modprobe fuse && sudo umount -a && sudo mount -a


Security


What are the basic things I need to know about securing my Ubuntu


  • Read #General Notes
  • Ensure hard drive is first in BIOS boot-up sequence
    • To prevent trespassers from using Linux Installation CD which allows them to gain root user access
    • To prevent trespassers from using Linux Live CD (e.g.
      UBUNTU/KNOPPIX/MEPIS) which allows them to destroy/browse/share the
      entire hard drive
    • To prevent trespassers from installing another Operating System

  • Ensure a password is set for BIOS
    • To prevent trespassers from changing the BIOS boot-up sequence

  • Ensure computer is located at a secured place
    • To prevent trespassers from removing computer's hard drive
      which allows them to destroy/browse/share the entire hard drive from a
      different computer
    • To prevent trespassers from removing computer's on-board battery which resets the BIOS password

  • Ensure passwords used on the system cannot be easily guessed
    • To prevent trespassers from cracking password file using brute force attacks (e.g. John the Ripper)
    • Create password with minimum length of 8 characters
    • Create password with mixture of characters/numbers, and upper/lower case
    • Not create a password with just a single or just a typical
      union of main languages (english, german, french, spanish...)
      dictionary words

  • Ensure interactive editing control for GRUB menu is disabled

  • Ensure history listing is disabled in Console mode

  • Ensure Ctrl+Alt+Del is disabled in Console mode
    • To prevent trespassers from restarting the system without permission in Console mode
    • Read [[#How to disable Ctrl+Alt+Del from restarting computer in Console mode]]

  • Ensure interactive option is set for remove, copy and move of files/folders in Console mode

  • For day to day usage, login as a normal user

  • Disable root user account, use "sudo" instead
    • To reduce the amount of time spent with root privileges, and thus the risk of inadvertently executing a command as root
    • "sudo" provides a more useful audit trail (/var/log/auth.log)
    • Read #How to disable root user account

  • Install a Firewall

  • Perform vulnerability test


How to disable all interactive editing control for GRUB menu



  • Run This:

grub-md5-crypt 

Password: 
Retype password:
$1$tumnZ1$xB/shuXs7MlawZXkLiBDV/

  • Backup your current configuration file

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst

  • Find this section

...
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$tumnZ1$xB/shuXs7MlawZXkLiBDV/
# password topsecret
...

  • Add the following line below it

password --md5 $1$tumnZ1$xB/shuXs7MlawZXkLiBDV/ (encrypted password above)

  • Find the section(s) that look like this (note the 'recovery mode' and the word 'single'):

...
title Ubuntu, kernel 2.6.10-5-386 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.10-5-386
savedefault
boot
...

  • Add lock between the title and root lines:

...
title Ubuntu, kernel 2.6.10-5-386 (recovery mode)
lock
root (hd0,1)
...

  • Save the edited file

This will make it so your grub console will require a password to
edit the lines, and the recovery modes won't work unless the password
is typed. To access the other grub options at the menu, follow the
instructions at the bottom of the screen. It will be something like
pressing p and typing your password.


How to disable history listing in Console mode



rm -f .bash_history
gedit ~/.bash_profile

  • Add the following:

export HISTFILESIZE=4
unset HISTFILE=5

# Change this to a reasonable number of lines to save, I like to save only 100.
export HISTSIZE=1

# Ignores duplicate lines next to each other
export HISTCONTROL=ignoredups

This will disable Bash history for the user, retaining keystroke
history and recall to use while limiting recall history to 100 lines.
This will also not record duplicate lines next to each other.


How to disable Ctrl+Alt+Del from restarting computer in Console mode



sudo cp /etc/inittab /etc/inittab_backup
gksudo gedit /etc/inittab

  • Find this line

...
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
...

  • Replace with the following line

#ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

  • Save the edited file

sudo telinit q

How to enable prompt before removal/overwritten of files/folders in Console mode



sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup
gksudo gedit /etc/bash.bashrc

  • Append the following lines at the end of file

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

  • Save the edited file

How to setup a LoJack system for your laptop





What: Quote from Wikipedia: "LoJack is an aftermarket
vehicle tracking system that allows cars to be tracked by police after
being stolen. The manufacturer claims a 90% recovery rate. The name
"LoJack" is a play on the word "hijack," meaning the theft of a vehicle
through force."

Why: If your laptop is ever stolen and connected
to the Internet. You will be able to find out from what IP it connects
to the Internet from and contact the authorities.

How:


  • Get a free dynamic IP account from one of the many providers. Here we will use DynDNS.


sudo apt-get install ddclient 

  • Edit the configuration file /etc/ddclient.conf using you fevorite text editor (emacs, gedit, kedit or even vi)

sudo emacs /etc/ddclient.conf

  • Make it look like this:

# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf
pid=/var/run/ddclient.pid
protocol=dyndns2
use=web
server=members.dyndns.org
login=YourNameHere
password='YourPasswordHere'
YourHostNameHere.gotmyip.com

NOTE:
* Make sure that you use the web IP detection method.
* Specify your own user id instead of the place holder YourNameHere.
* Specify your own password instead of the place holder YourPasswordHere, make sure to surround it with single quotes.
* The last line should specify the hostname you registered with the dynamic IP service.

  • You can now start the ddclient daemon, or wait until your next reboot.

sudo /etc/init.d/ddclient start

  • The hostname you registered with your dynamic IP service should be updated. You can test it with the ping command:

ping YourHostNameHere.gotmyip.com

Even if your laptop has a firewall that prevents pings the
hostname should resolve to the IP of the network gateway that your
laptop is connected to.
Now all that is left is for someone to steal your laptop.....

References:



Boot Menu


How to gain root user access without login


  • Read #General Notes
  • Easiest method (will not work if GRUB menu password is set)
    • Boot-up computer
    • If GRUB menu is hidden, press 'Esc' to enter the GRUB menu
    • Select


Ubuntu, kernel 2.6.10-5-386 (recovery mode)


How to modify kernel boot-up arguments, to gain root user access


  • Read #General Notes
  • Boot-up computer
  • If GRUB menu is hidden, press 'Esc' to enter the GRUB menu
  • If GRUB password is set, press 'p' to unlock the GRUB menu
  • Select

Ubuntu, kernel 2.6.10-5-386

  • Press 'e' to edit the commands before booting
  • Select

kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash

  • Press 'e' to edit the selected command in the boot sequence
  • Add "rw init=/bin/bash" to the end of the arguments

grub edit> kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash rw init=/bin/bash

  • Press 'b' to boot

How to use Ubuntu Installation CD, to gain root user access


  • Read #General Notes
  • Boot-up computer into Ubuntu Installation CD
  • At "boot:" prompt, add "rescue" to the argument

boot: rescue

  • Follow the instructions on screen

How to change root user/main user password if forgotten



# passwd root

  • To change main user password

# passwd system_main_username

How to change GRUB menu password if forgotten



grub

grub> md5crypt
Password: ****** (ubuntu)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst

  • Find this line

...
password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
...

  • Replace with the following line

password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)

  • Save the edited file

How to restore GRUB menu after Windows installation



How to identify the name of the boot drive (hd0, hd1, hd2, etc)


Press "c" on boot menu. If you don't see a boot menu, press ESC key first when booting to show the boot menu.

Type:


root (hd0,0)

Most likely you will get "(hd0,0) ext2fs", which should be your
current Linux drive. Now change hd0 to hd1 to see what is there.


root (hd1,0)

If you get "(hd1,0) filesystem type unknown, partition type 0x7", then hd1 is a Windows drive.

Now change hd1 to hd2, keep going until you reach hd7.


怎样把Windows启动选项加入到Grub菜单



假设 /dev/hda1 是Windows分区所在位置

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst

  • 将下面几行添加到文件末尾

title		Microsoft Windows
root (hd0,0)
savedefault
makeactive
chainloader +1

  • 保存 /boot/grub/menu.lst

How to boot into Windows installed on a seperate SATA drive



This configuration applies to people who have Linux installed on a
IDE drive, and Windows installed on a seperate SATA. The IDE drive
boots first, so we need to add an entry to the boot menu on the Linux
disk. Here we assume the name of your Windows drive is hd1. If you are
not sure, click the link above to find out.


sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst

  • Append the following lines at the end of file.

title           Windows XP on SATA drive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1,0)+1

  • Save the edited file

How to read Linux partitions (ext2, ext3) in Windows machine



或者


Tips & Tricks


怎样重启GNOME(不用重启计算机)


  • 阅读 #概述
  • 保存并关闭所有应用程序

按组合键 'Ctrl + Alt + Backspace'


或者

sudo /etc/init.d/gdm restart

How to turn on Num Lock on GNOME startup



sudo apt-get install numlockx
sudo cp /etc/X11/gdm/Init/Default /etc/X11/gdm/Init/Default_backup
gksudo gedit /etc/X11/gdm/Init/Default

  • Find this line

...
exit 0

  • Add the following lines above it

if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi


How to remap the Caps Lock key as another Control key



gksudo gedit /etc/console-tools/remap

In the Console

  • Change

#s/keycode  58 = Caps_Lock/keycode  58 = Control/;

to


s/keycode  58 = Caps_Lock/keycode  58 = Control/;

  • Save your work

sudo /etc/init.d/console-screen.sh

  • Try using it

In X Windows

gksudo gedit ~/.Xmodmap

  • Add this:

keycode 66 = Control_L
clear Lock
add Control = Control_L


  • Now, apply the changes.

xmodmap ~/.Xmodmap

  • To apply them on startup
    • If ~/.xinitrc does not exist,


cp /etc/X11/xinit/xinitrc ~/.xinitrc

  • In all cases

gedit ~/.xinitrc

  • Make the first line this:

xmodmap ~/.Xmodmap

  • Restart X (Ctrl - Alt - Backspace)
  • Log In, a dialog should pop up, add .Xmodmap to the left side with the add button, and Save.

怎样设置程序在登入GNOME时自动运行


  • 阅读 #概述
  • System(系统菜单) -> Preferences(偏好) -> Sessions(进程)
  • 在Sessions(进程对话框)中

Startup Programs Tab(启动程序) -> Add(加入)/Edit(编辑)/Delete(删除)

怎样加速Ubuntu



How to switch to Console mode in GNOME



Press 'Ctrl + Alt + F1' (F2 - F6)

  • To switch between consoles in Console mode

Press 'Alt + F1' (F2 - F6)

  • To switch back to GNOME mode

Press 'Alt + F7'

How to disable Ctrl+Alt+Backspace from restarting X in GNOME



sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gksudo gedit /etc/X11/xorg.conf

  • Append the following lines at the end of file

Section "ServerFlags"
Option "DontZap" "yes"
EndSection


How to enable Ctrl+Alt+Del to open System Monitor in GNOME



gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_9 "<Control><Alt>Delete"
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_9 "gnome-system-monitor"

怎样刷新GNOME桌面



killall nautilus

怎样刷新Gnome面板



killall gnome-panel

How to enable autosave in Gedit and disable creation of some_file~ files


  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor

/ -> apps -> gedit-2 -> preferences -> editor -> save -> create_backup_copy (Unchecked)
/ -> apps -> gedit-2 -> preferences -> editor -> save -> auto_save (Checked)

How to show all hidden files/folders in Nautilus


  • Read #General Notes
  • Places -> Home Folder
  • To temporary show all hidden files/folders in Nautilus

Press 'Ctrl + H'

  • To permanently show all hidden files/folders in Nautilus

Edit Menu -> Preferences

Views Tab -> Default View -> Show hidden and backup files (Checked)

How to browse files/folders as root user in Nautilus



gksudo gedit /usr/share/applications/Nautilus-root.desktop

    • Insert the following lines into the new file


[Desktop Entry]
Name=File Browser (Root)
Comment=Browse the filesystem with the file manager
Exec=gksudo "nautilus --browser %U"
Icon=file-manager
Terminal=false
Type=Application
Categories=Application;System;


  • To browse files/folders as root user in Nautilus
    • Applications -> System Tools -> File Browser (Root)


How to change default file type "Open with" program



Right click on file -> Properties

Open With Tab -> Add
Select "Open with" program

Select "Open with" program (Checked)

How to change preferred email client to Mozilla Thunderbird



Mail Reader Tab -> Default Mail Reader -> Command: mozilla-thunderbird %s

How to open files as root user via right click



gedit $HOME/.gnome2/nautilus-scripts/Open\ as\ root

  • Insert the following lines into the new file

for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gksudo "gnome-open $uri" &
done

  • Save the edited file

chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root


Right click on file -> Scripts -> Open as root

How to disable beep sound in Terminal mode


Not for Dapper---- firingstone



Edit Menu -> Current Profile...

General Tab -> General -> Terminal bell (Un-Checked)

How to handle mss protocol in Mozilla Firefox






  • Open your firefox.
  • Type as url: about:config

Now just right click somewhere into the main window. A little box with options to choose will appear. Choose "new", then "string". Then copy the following line into the appearing text field:


network.protocol-handler.app.mms

Into the next text field copy this:


/usr/bin/X11/vlc

Now you do the same thing again, but this time you do not choose "string" but "boolean", and the line to copy is:


network.protocol-handler.external.mms

Then set


true

How to handle rtsp (realmedia) protocol in Mozilla Firefox






  • Open your firefox.
  • Type as url: about:config

Now just right click somewhere into the main window. A little box with options to choose will appear. Choose "new", then "string". Then copy the following line into the appearing text field:


network.protocol-handler.app.rtsp

Into the next text field copy this:


/usr/bin/X11/realplay

Now you do the same thing again, but this time you do not choose "string" but "boolean", and the line to copy is:


network.protocol-handler.external.rtsp

Then set


true

How to load Web site faster in Mozilla Firefox


  • Read #General Notes
  • Applications -> Internet -> Firefox Web Browser
  • Mozilla Firefox

Address Bar -> about:config

Filter: ->
network.dns.disableIPv6 -> true
network.http.pipelining -> true
network.http.pipelining.maxrequests -> 8
network.http.proxy.pipelining -> true

  • Restart Mozilla Firefox

How to disable beep sound for link find function in Mozilla Firefox


  • Read #General Notes
  • Applications -> Internet -> Firefox Web Browser
  • Mozilla Firefox

Address Bar -> about:config

Filter: -> accessibility.typeaheadfind.enablesound -> false

  • Restart Mozilla Firefox




如何以更便捷方式使用apt-get(新立得软件包管理器)


  • Read #概述
  • System -> Administration -> Synaptic Package Manager
  • To enable the extra Universe and Multiverse repositories
    1. Settings -> Repositories
    2. In the Installation Media tab, click Add. There are three
      separate repositories; Dapper Drake, Security Updates and Updates.
      Select each repository and check Officially supported, Restricted
      copyright, Community maintained (Universe) and Non-free (Multiverse).
      Ensure you click OK between each repository to save your changes
    3. You should now see those three repositories under Channels.
      Make sure Officially supported, Restricted copyright, Community
      maintained (Universe) and Non-free (Multiverse) appears under each
      repository


  • To add backports and PLF (new versions of many applications. Unsupported. May contain illegal packages. Use at own risk.)
    1. Settings -> Repositories
    2. Click on Add and then Custom
    3. Paste the following four lines into the box and click Add Repository, one line at a time:


deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse

deb http://packages.freecontrib.org/plf edgy-plf free non-free
deb-src http://packages.freecontrib.org/plf edgy-plf free non-free

  • To refresh the list of known packages (equivalent to apt-get update)

Edit Menu -> Reload Package Information

  • To install all possible upgrades (equivalent to apt-get upgrade)

Edit Menu -> Mark All Upgrades... -> Default Upgrade
Edit Menu -> Apply Marked Changes

  • To search for a package (equivalent to apt-cache search package_name)

Edit Menu -> Search... Specify the package name

  • To install the selected package (equivalent to apt-get install package_name)

Select "package_name"
Package Menu -> Mark for Installation
Edit Menu -> Apply Marked Changes

  • To remove installed package (equivalent to apt-get remove package_name)

Select "package_name"
Package Menu -> Mark for Removal
Edit Menu -> Apply Marked Changes

What packages do the extra repositories provide



  • The PLF repository provides
    1. DVD playback support (libdvdcss2)
    2. Skype
    3. Sun Java SDK (Software Development Kit) and JRE (Java Runtime Environment)
    4. Opera Web browser
    5. RealPlayer 10
    6. Win32 binary multimedia codecs


How to install/uninstall .deb files



sudo dpkg -i package_file.deb

  • To uninstall .deb file

sudo dpkg -r package_name

How to find out which version of a package I have installed


dpkg -l packagename

How to convert .rpm files to .deb files



sudo alien package_file.rpm

How to compile .deb files from source


  • Read #General Notes
  • Read #如何添加其它的软件库
  • There are various programs available to help automate the
    process of create .deb files from source. For more information, see the
    links at the end of this section. A basic well tested method is
    described here.
  • Install the necessary software to build the source
    (build-essential may be all that is necessary, though there may be
    other dependencies) and checkinstall (which creates deb files).

sudo apt-get install checkinstall build-essential

  • In the directory where you have extracted the source, after you have run ./configure and make you can create a .deb file and install it with either of the following commands. The second -D option creates a .deb file in the directory that you can share with others or install without needing the source.

sudo checkinstall

or


sudo checkinstall -D


How to rename all files in directory at once



wget -c http://easylinux.info/uploads/mvb_1.6.tgz
sudo tar zxvf mvb_1.6.tgz -C /usr/share/
sudo chown -R root:root /usr/share/mvb_1.6/
sudo ln -fs /usr/share/mvb_1.6/mvb /usr/bin/mvb


  • To rename all files in directory at once

mvb NEW_NAME

How to manipulate all image files in directory at once



sudo apt-get install imagemagick
wget -c http://easylinux.info/uploads/bbips.0.3.2.sh
sudo cp bbips.0.3.2.sh /usr/bin/bbips
sudo chmod 755 /usr/bin/bbips

  • To manipulate all image files in directory at once

bbips

How to set System-wide Environment Variables



sudo cp -p /etc/profile /etc/profile_backup
gksudo gedit /etc/profile

  • Append the System-wide Environment Variables at the end of file
  • Save the edited file

How to save "man" outputs into files



man command | col -b > file.txt

How to hide GRUB menu on boot-up



sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst


  • Find this line

...
#hiddenmenu
...

  • Replace with the following line

hiddenmenu

  • Save the edited file

How to change the timeout seconds for GRUB menu on boot-up



sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst

  • Find this line

...
timeout 3
...

  • Replace with the following line

timeout     X_seconds

  • Save the edited file

How to change default Operating System boot-up for GRUB menu



sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst

  • Find this line

...
default 0
...

  • Replace with the following line

default     X_sequence

  • Save the edited file

How to display Splash Image for GRUB menu on boot-up



e.g. Assumed that hd0,1 is the location of Ubuntu boot partition

wget -c http://easylinux.info/uploads/ubuntu.xpm.gz
chmod 644 ubuntu.xpm.gz
sudo mkdir /boot/grub/images
sudo cp ubuntu.xpm.gz /boot/grub/images/
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst

  • Find this section

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
...

  • Add the following line below it

splashimage (hd0,1)/boot/grub/images/ubuntu.xpm.gz

NOTE: If you have seperate boot partition use this line: splashimage (hd0,1)/grub/images/ubuntu.xpm.gz

  • Save the edited file

How to convert Wallpaper to Splash Image for GRUB menu



e.g. Assumed that wallpaper.png is the Wallpaper to be converted to Splash Image
splashimage.xpm.gz is the Splash Image for GRUB menu

convert -resize 640x480 -colors 14 wallpaper.png splashimage.xpm && gzip splashimage.xpm


How to display only one kernel on GRUB menu



sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup-`date +%F`
gksudo gedit /boot/grub/menu.lst

  • Find this line

...
# howmany=all
...

  • Replace with the following line

# howmany=1

Where 1 means to keep the last kernel, 2 to keep the last 2 kernels,
etc. Do not delete the # symbol. The menu will be updated once a new
kernel will be updated by the system, not before.


  • Save the edited file

How to force GDM to system beep when login screen ready


  • Read #General Notes
  • This is useful on computers where headphones are usually
    plugged in, allowing them to utilize the speakers for this
    attention-getting task.

echo foo >> ~/foo.wav

  • System -> Administration -> Login Window -> Accessibility

Now make sure the "Login Screen Ready" check mark is checked. Click
on the folder icon and navigate to your home folder and select
"foo.wav".


rm foo.wav

The drop down menu should now say "(None)"


怎样暂时跳过某些启动时加载的服务



在服务加载时按 'Ctrl + C' 可中断该服务加载

怎样启动/禁止某项服务在计算机启动时加载



How to clean /tmp/ folder contents on shutdown



sudo cp /etc/init.d/sysklogd /etc/init.d/sysklogd_backup
gksudo gedit /etc/init.d/sysklogd

  • Find this section

...
stop)
log_begin_msg "Stopping system log daemon..."
start-stop-daemon --stop --quiet --oknodo --exec $binpath --pidfile $pidfile
log_end_msg $?
...

  • Add the following line below it

  rm -fr /tmp/* /tmp/.??*

  • Save the edited file

How to scroll up and down to view previous outputs in Console mode



Press 'Shift + Page Up'

  • To scroll down to view previously outputs

Press 'Shift + Page Down'

How to find out which version of Ubuntu I am using


cat /etc/issue




How to set up (automatic) background/wallpaper-changer application for GNOME





  • Read #General Notes
  • To install the script into a different location than your home directory, replace "~" with your path

cd ~
wget http://members.chello.at/horst.jens/files/wallpaperchanger.py
chmod +x wallpaperchanger.py
~/wallpaperchanger.py
gedit ~/.wallpaperchanger/wallpaperchangerconfig.py

  • Edit all the lines not beginning with an "#" according to your needs. Save the file and close gedit.

  • To create an menu entry for wallpaperchanger:

Click the menuitems: Applications -> Accessoires -> Alacarte Menu Editor -> File -> New Entry:
Name: wallpaperchanger
command: ~/wallpaperchanger.py


  • To change desktop background every time you reboot your computer:

Click the menuitems: System -> Preferences -> Session -> Startup Programs -> Add:
~/wallpaperchanger.py

How to set up automatic background change (KDE)



  • Go to K-menu -> System Settings -> Desktop -> Background
  • Choose Slide Show
  • Press Setup...
  • Press Add... to add pictures you wish to see as desktop background
  • Set 'Change picture after' to desired picture rotation interval.
  • Press 'OK'

How to add keyboard layouts for other languages



  • Go to System -> Preferences -> Keyboard
  • Choose Layouts
  • Press Add... to add the secondary keyboard layout. It is simpler to have two layouts; the maximum is currently four for Xorg.
  • Choose Layout Options
  • Expand option Group Shift/Lock behaviour
  • Choose the key combination that enables you to switch between
    keyboard layouts. The default is by pressing both Alt keys at the same
    time. A common alternative is to use Alt+Shift.
  • Press Close.

See #How to add the Keyboard (Layout) Indicator applet to add the Keyboard Indicator applet.


How to add keyboard layouts toggle for other languages (Xfce)


  • use *.lst files on /etc/X11/xkb/rules to select 2nd_laguage_code

setxkbmap -option grp:switch,grp:alt_shift,grp_led:scroll us,2nd_laguage_code

  • you can add it to a startup file, which will be set to be
    executed on startup, with the following lines (remember to 'chmod +x'
    the file):

#!/bin/tcsh
setxkbmap -option grp:switch,grp:alt_shift,grp_led:scroll us,il

How to add the Keyboard (Layout) Indicator applet



  • Right-click on empty space on the top panel so that you see the pop-up menu.
  • Click Add to Panel...
  • Choose Keyboard Indicator (it is under the Utilities section, at the end)

The Keyboard Indicator applet appears on the panel. The default
language should be USA for U.S. English. You can either right-click on
this applet for more options or see above on how to configure.


How to type extended characters



  • Add the keyboard layout US English International (with dead keys)
  • Make US English International (with dead keys) the default keyboard layout.

The key marked ['"] is now a dead key. When you press it, nothing
happens. However if you press a consonant immediately afterwards, the
consonant appears with an accent.


  • ' + a = á
  • ' + e = é
  • and so on for i-í, o-ó, y-ý, c-ć, z-ź, n-ń, l-ĺ, u-ú, r-ŕ

  • " + a = ä
  • " + e = ë
  • and so on for y-ÿ, u-ü, i-ï, o-ö

Similarly, ` and a consonant generates à, è, ù, ì, ò.
Similarly, ~ and a consonant generates ã, ũ, ĩ, õ, ñ.

To type ' and ", press RightAlt+' and RightAlt+" respectively.
To type ' and ", you may also press '+<space> and "+<space> respectively.

There are more characters available by keeping RightAlt pressed and typing a character. Therefore,


  • RightAlt+q = ä
  • RightAlt+w = å
  • RightAlt+e = é
  • RightAlt+r = ®
  • RightAlt+t = þ
  • RightAlt+y = ü
  • RightAlt+u = ú
  • RightAlt+i = í
  • RightAlt+o = ó
  • RightAlt+p = ö
  • RightAlt+[ and ] for « and » respectively.
  • RightAlt+a = á
  • RightAlt+s = ß
  • RightAlt+d = ð
  • RightAlt+l = ø
  • RightAlt+; = ¶
  • RightAlt+: = °
  • RightAlt+z = æ
  • RightAlt+c = ©
  • RightAlt+n = ñ
  • RightAlt+m = µ
  • RightAlt+, = ç
  • RightAlt+/ = ¿

  • RightAlt+1 = ¡
  • RightAlt+2 = ²
  • RightAlt+3 = ³
  • RightAlt+4 = ¤
  • RightAlt+5 = €
  • RightAlt+6 = ¼
  • RightAlt+7 = ½
  • RightAlt+8 = ¾
  • RightAlt+9 = ‘
  • RightAlt+0 = ’
  • RightAlt+- = ¥
  • RightAlt+= = ×

  • RightAlt+! = ¹
  • RightAlt+@, then o = ő (and Ő).
  • RightAlt+#, then a = ā (and Ā). Similarly for ēĒ, ūŪ, īĪ, ōŌ.
  • RightAlt+$ = £
  • RightAlt+% =
  • RightAlt+^ =
  • RightAlt+& =
  • RightAlt+*, then a = ą (and Ą). Similarly for ęĘ, įĮ.
  • RightAlt+(, then a = ă (and Ă)
  • RightAlt+(, then g = ğ (and Ğ)
  • RightAlt+), then a = å (and Å)
  • RightAlt+_ =
  • RightAlt++ = ÷

How to set the Compose key to type special characters



  • Click System, Preferences, Keyboard.
  • Under Layout Options, expand on Compose key position.
  • Choose Right-Win key is compose, click Close.

Now you can type extended characters using the RightWin key (next to AltGr), according to this keyboard settings file.
Specifically, the lines that start with GDK_Multi_key are those that we can use here. The Compose key is actually GDK_Multi_key.

Some examples,


  • RightWin + C + = produces €
  • RightWin + = + C produces €
  • RightWin + C + O produces ©
  • RightWin + O + C produces ©
  • RightWin + a + ' produces á
  • RightWin + a + " produces ä
  • RightWin + a + ` produces à
  • RightWin + a + ~ produces ã
  • RightWin + a + * produces å
  • RightWin + a + ^ produces â
  • RightWin + a + > produces â
  • RightWin + a + , produces ą
  • RightWin + e + - produces ē
  • RightWin + S + 1 produces ¹
  • RightWin + S + 2 produces ²
  • RightWin + S + 3 produces ³

How to install ubuntu-title font used in Ubuntu logo



sudo apt-get install ttf-ubuntu-title

Now you can use this font in your favorite applications


How to associate Adobe Reader with files in Nautilus



Now when you double-click on a .pdf file, it will be opened with Adobe Reader.


How to print from Adobe Reader



/usr/bin/lp -d FS-1010

How to pull apart and combine pdf files



sudo apt-get install pdftk
cd
mkdir bin
cd bin
gedit pdftk_burst

  • add the following text to pdftk_burst:

#!/bin/bash
cd ${1%/*}
/usr/bin/pdftk "$1" burst
rm doc_data.txt

  • save and close pdftk_burst

gedit pdftk_cat

  • add the following text to pdftk_cat:

#!/bin/bash
cd ${1%/*}
outfile="00out.pdf"
if [ -f $outfile ] ; then
rm -f $outfile
fi
/usr/bin/pdftk *.pdf cat output $outfile

  • save and close pdftk_cat

chmod u+x pdftk_burst pdftk_cat

  • open Nautilus (Places -> Desktop) and browse to a .pdf file
  • right-click the .pdf file, select Properties, go to the Open With tab, click Add, click Use a Custom Command, click Browse, browse to pdftk_burst. Do the same with pdftk_cat.

Now, when you right-click on a .pdf file, you'll get two extra options:


  • Open With -> pdftk_burst which will convert a 30 page pdf file to 30 x 1 page pdf files
  • Open With -> pdftk_cat which will join together all the pdf files in the same directory, and create a file called 00out.pdf

Note: this won't work with pdfs with any type of protection - read man pdftk for more command line options.


How to remove jedit when Synaptic package manager fails after install



sudo dpkg --remove --force-depends --force-remove-reinstreq jedit

Now, you can use your Synaptic package manager again.


服务器


防病毒服务


如何安装防病毒服务(ClamAV AntiVirus)



sudo apt-get install clamav

如何手动升级病毒库



sudo freshclam

如何手动扫描 文件/文件夹 病毒



sudo clamscan -r /location_of_files_or_folders

如何自动扫描 文件/文件夹 病毒



例如,每天子时自动扫描 文件/目录 来搜寻病毒
* * * * * 分别代表 分 时 日 月 年

export EDITOR=gedit &&  sudo crontab -e

  • 在文件末尾添加如下一行内容

00 00 * * *  sudo clamscan -r /location_of_files_or_folders

  • 保存编辑好的文件

Print Server (cupsd)



How to install cupsd


Cupsd should be automatically installed during standard
instaltion. Checkout if there is a file "/etc/init.d/cupsys". If you
want to manually install it, do


 sudo apt-get install cupsys*

How to add a printer


  • Go to System -> Administration -> Printing.
  • Choose "Add printer".

A "Add printer wizard" should start and tell you what to do.


How to print on remote Ubuntu machine from another Ubuntu machine


  • Make sure your local printer is well configured.

  • Server ip address: 192.168.0.1
  • Client ip address: 192.168.0.23

    • Server configuration


 sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup
gksudo gedit /etc/cups/cupsd.conf

find the block

<Location />
...
Allow localhost
...
</Location>

and add the following line into it.

 Allow 192.168.0.23

Restart cups.

 sudo /etc/init.d/cupsys restart

    • Client configuration


 sudo cp /etc/cups/client.conf /etc/cups/client.conf.backup
gksudo gedit /etc/cups/client.conf

And add the following line into it.

 ServerName 192.168.0.1

Restart cups.

 sudo /etc/init.d/cupsys restart

Now try "lpq" and you should see something like

 vitek@lightfox:~$ lpq
HPLJ6P is ready
no entries

How to print on remote Ubuntu machine from a Windows machine



Samba服务


如何安装 Samba 服务器来提供 文件/文件夹 共享服务



sudo apt-get install samba
sudo apt-get install smbfs

如何 新增/编辑/移除 网络使用者的帐号



sudo smbpasswd -a system_username
sudo gedit /etc/samba/smbusers

    • Insert the following line into the new file


system_username = "network username"

    • 保存编辑好的文件

  • To edit network user

sudo smbpasswd -a system_username

  • To delete network user

sudo smbpasswd -x system_username

如何共享主文件夹并将权限设为只读 (Authentication=Yes)



sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf

  • 找到这一行

...
; security = user
...

  • 替换成以下几行

  security = user
username map = /etc/samba/smbusers


sudo testparm
sudo /etc/init.d/samba restart

如何共享主文件夹并将权限设为读写 (Authentication=Yes)



sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf

  • 找到这一行

...
; security = user
...

  • 替换成以下几行

  security = user
username map = /etc/samba/smbusers

  • 找到这一部分

...
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = no
...

  • 替换成以下几行

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = yes


sudo testparm
sudo /etc/init.d/samba restart

如何共享群组文件夹并将权限设为只读 (Authentication=Yes)



sudo mkdir /home/group
sudo chmod 777 /home/group/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf

  • 找到这一行

...
; security = user
...

  • 替换成以下几行

 security = user
username map = /etc/samba/smbusers

  • 将以下几行内容添加到文档末尾

[Group]
comment = Group Folder
path = /home/group
public = yes
writable = no
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup



sudo testparm
sudo /etc/init.d/samba restart

如何共享群组文件夹并将权限设为读写 (Authentication=Yes)






sudo mkdir /home/group
sudo chmod 777 /home/group/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf

  • 找到这一行

...
; security = user
...

  • 替换成以下几行

  security = user
username map = /etc/samba/smbusers

  • 将以下几行内容添加到文档末尾

[Group]
comment = Group Folder
path = /home/group
public = yes
writable = yes
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup


sudo testparm
sudo /etc/init.d/samba restart

如何共享公共文件夹并将权限设为只读 (Authentication=Yes)






sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf

  • 找到这一行

...
; security = user
...

  • 替换成以下几行

  security = user 
username map = /etc/samba/smbusers

  • 将以下几行内容添加到文档末尾

[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup


sudo testparm
sudo /etc/init.d/samba restart

如何共享公共文件夹并将权限设为读写 (Authentication=Yes)



sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf

  • 找到这一行

...
; security = user
...

  • 替换成以下几行

  security = user
username map = /etc/samba/smbusers

  • 将以下几行内容添加到文档末尾

[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup


sudo testparm
sudo /etc/init.d/samba restart

如何共享公共文件夹并将权限设为只读 (Authentication=No)



sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf

  • 找到这一行

...
; security = user
...

  • 用下面这一行取代

  security = share

  • 将以下几行内容添加到文档末尾

[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup

  • 保存编辑好的文件

sudo testparm
sudo /etc/init.d/samba restart

如何共享公共文件夹并将权限设为读写 (Authentication=No)



sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf

  • 找到这一行

...
; security = user
...

  • 用下面这一行取代

  security = share

  • 将以下几行内容添加到文档末尾

[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup


  • 保存编辑好的文件

sudo testparm
sudo /etc/init.d/samba restart

How to print on remote Ubuntu machine via samba



 sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
gedit /etc/samba/smb.conf

Find the following lines

 ...
# printing = cups
# printcap name = cups
...

and uncomment them.

 printing = cups
printcap name = cups

Restart cups server

 sudo /etc/init.d/cupsys restart

Now printers working on your Ubuntu machine should be acessible via samba.

SSH Server


How to install SSH Server for remote administration service



sudo apt-get install ssh

How to SSH into remote Ubuntu machine



e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
Remote Ubuntu machine: 192.168.0.1

ssh username@192.168.0.1

How to copy files/folders from remote Ubuntu machine into local machine (scp)



e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
Remote Ubuntu machine: 192.168.0.1
Remote files/folders location: /home/username/remotefile.txt
Local machine save location: . (current directory)

scp -r username@192.168.0.1:/home/username/remotefile.txt .

How to copy files/folders from local machine into remote Ubuntu machine (scp)



e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
Local files/folders location: localfile.txt
Remote Ubuntu machine: 192.168.0.1
Remote Ubuntu machine save location: /home/username/

scp -r localfile.txt username@192.168.0.1:/home/username/

How to copy files/folders from remote Ubuntu machine into local machine (rsync)



e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
Remote Ubuntu machine: 192.168.0.1
Remote files/folders location: /home/username/remotefile.txt
Local machine save location: . (current directory)

rsync -v -u -a --delete --rsh=ssh --stats username@192.168.0.1:/home/username/remotefile.txt .

How to copy files/folders from local machine into remote Ubuntu machine (rsync)



e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
Local files/folders location: localfile.txt
Remote Ubuntu machine: 192.168.0.1
Remote Ubuntu machine save location: /home/username/

rsync -v -u -a --delete --rsh=ssh --stats localfile.txt username@192.168.0.1:/home/username/

How to mount remote folders into local Ubuntu machine (sshfs)



e.g. Assumed that remote machine has installed SSH Server service
Read #How to install SSH Server for remote administration service
Remote machine: 192.168.0.1
Remote machine folder location: /media/music

  • Install sshfs

sudo apt-get install sshfs

  • Load kernel driver for sshfs

sudo modprobe fuse

  • For permanent use add 'fuse' at the end of /etc/modules

gksudo gedit /etc/modules

  • Join the 'fuse' user group

sudo adduser your_user_name fuse

  • Logout and login for this to take effect.

  • Create local mountpoint in your home directory

mkdir ~/remote_music

  • Mount the remote folder into ~/remote_music

sshfs 192.168.0.1:/media/music ~/remote_music

How to SSH into remote Ubuntu machine via Windows machine



e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service

  • Download PuTTY: Here




How to copy files/folders from/into remote Ubuntu machine via Windows machine



e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service

  • Download FileZilla: Here

How to limit the user accounts that can connect through ssh remotely



e.g. If you enable the SSH server, then any user with a valid account can connect remotely
This can lead to security risks, as there exist remote password cracking tools that
try common username/password pairs.

  • Keep a backup of the ssh server configuration file with

sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIGINAL


  • Edit the configuration file

gksudo gedit /etc/ssh/sshd_config


  • Change the parameter PermitRootLogin from yes to no. The superuser must not be able to connect directly from remote.
  • Add the parameter AllowUsers and specify the usernames (space separated) that can connect remotely.
  • You can also use DenyUsers for fine-grained selection of users.
  • If you enable the openssh server and you have no intention for now to enable remote connections, you may add AllowUsers nosuchuserhere to disable anyone connecting.




DHCP 服务


如何安装 DHCP 服务来自动指定IP 地址



e.g. 假设 "eth0" 网卡接口
IP Address Range: 192.168.0.100 to 192.168.0.200
Subnet Mask: 255.255.255.0
DNS Servers: 202.188.0.133, 202.188.1.5
Domains: tm.net.my
Gateway Address: 192.168.0.1

sudo apt-get install dhcp3-server
sudo cp /etc/default/dhcp3-server /etc/default/dhcp3-server_backup
sudo gedit /etc/default/dhcp3-server

  • 找到这一行

...
INTERFACES=""

  • 用下面这一行取代

INTERFACES="eth0"

  • 保存编辑好的文件

sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup
sudo gedit /etc/dhcp3/dhcpd.conf

  • 找到这一部分

...
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;
...

  • 替换成以下几行

# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;

#default-lease-time 600;
#max-lease-time 7200;

  • 找到这一部分

...
# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}
...

  • 替换成以下几行

# A slightly different configuration for an internal subnet.
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name-servers 202.188.0.133, 202.188.1.5;
option domain-name "tm.net.my";
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
default-lease-time 600;
max-lease-time 7200;
}

  • 保存编辑好的文件

sudo /etc/init.d/dhcp3-server restart

数据库服务器


如何安装MYSQL数据库服务器



sudo apt-get install mysql-server

  • MySql初始化只能连接至本地主机(127.0.0.1),如果你希望Internet网上的人都可以连接MySQL的话我们需要取消这个限制,打开文件/etc/mysql/my.cnf

sudo gedit /etc/mysql/my.cnf

  • 找到这一行:"bind-address = 127.0.0.1"并将它注释掉.

...
#bind-address = 127.0.0.1
...

  • MySQL默认root帐号没有密码,这存在巨大的安全隐患,你应该为其设置一个密码. 仅本地使用也应该设置一个密码. 本地机器名是你正使用的电脑名称. 更多信息请查看这里

mysqladmin -u root password your-new-password
mysqladmin -h root@local-machine-name -u root -p password your-new-password
sudo /etc/init.d/mysql restart

如何安装 MYSQL Administrator



sudo apt-get install mysql-admin


如何安装 Oracle XE版数据库



  • 添加如下信息至你的 /etc/apt/sources.list文件:

deb http://oss.oracle.com/debian unstable main non-free

  • 然后使用apt-get命令来安装软件

sudo apt-get update
sudo apt-get install oracle-xe

  • 添加你的帐号到"dba"组,(假设你的帐号名是"username")

sudo usermod -G dba -a username

Apache HTTP 服务


如何安装 Apache HTTP 服务来提供 HTTP(WEB) 服务



sudo apt-get install apache2


如何安装Apache的PHP支持


如何安装PHP


sudo apt-get install php4
sudo apt-get install libapache2-mod-php4
sudo /etc/init.d/apache2 restart

  • 测试PHP是否安装正确

gksudo gedit /var/www/testphp.php

  • 插入下列行至新文件

<?php phpinfo(); ?>


如何安装PHP5


sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart

  • 测试PHP5是否安装正确

gksudo gedit /var/www/testphp.php

  • 插入下列行至新文件

<?php phpinfo(); ?>


如何让 Apache HTTP 服务支持 MYSQL



sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php4-mysql
sudo /etc/init.d/apache2 restart

如何将 URL 映射到 /var/www/ 以外的目录?]



sudo gedit /etc/apache2/conf.d/alias

  • 将下列语句插入新文件

Alias /URL-path /location_of_folder/

<Directory /location_of_folder/>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

  • 保存编辑好的文件

sudo /etc/init.d/apache2 restart


如何修改 Apache HTTP 服务的缺省端口号



e.g. Assumed that new port number is 78

sudo cp /etc/apache2/ports.conf /etc/apache2/ports.conf_backup
sudo gedit /etc/apache2/ports.conf

  • 找到这一行

Listen 80

  • 用下面这一行取代

Listen 78

  • 保存编辑好的文件

sudo /etc/init.d/apache2 restart


如何为 Apache HTTP 服务器的 PHP 增加 RSS 语法分析



e.g. Assumed that RSS is DistroWatch.com - News

wget -c http://easylinux.info/uploads/magpierss-0.71.1.tar.gz
sudo mkdir /var/www/feeds
sudo tar zxvf magpierss-0.71.1.tar.gz -C /var/www/feeds/
sudo mv /var/www/feeds/magpierss-0.71.1/* /var/www/feeds/
sudo rm -fr /var/www/feeds/magpierss-0.71.1/
sudo chown -R www-data:root /var/www/feeds/
sudo gedit /var/www/feeds/index.php

  • 将下列语句插入新文件

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>

<title>DistroWatch.com - News</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

<style type="text/css">
/*<![CDATA[*/
/*
DEFAULT TAG STYLES
*/

body {
background: #ffffff;
margin-left: 20px;
font-family: bitstream vera sans,sans-serif;
font-size: 9pt;
}

h1 {
font-family: luxi sans,sans-serif;
font-size: 15pt;
}

/*]]>*/
</style>

</head>

<body>

<?php

require_once 'rss_fetch.inc';
error_reporting(E_ERROR);

$url = 'http://distrowatch.com/news/dw.xml';
$rss = fetch_rss($url);

if ($rss) {

echo "<h1>";
echo "<a href=$url>", $rss->channel[title], "</a><br/>";
echo "</h1>";

foreach ($rss->items as $item ) {
$url = $item[link];
$title = $item[title];
$description = $item[description];
echo "<li>";
echo "<b>Topic:</b> <a href=$url><b><u>$title</u></b></a><br/><br/>";
echo "$description<br/><br/>";
echo "</li>";
}

}
else {
echo "<a href=$url>", $url, "</a> - Server Down!<br/>";
}

?>

</body>

</html>



FTP 服务


如何安装 FTP 服务来提供文件传输服务



sudo apt-get install proftpd

如何将 FTP 用户"囚禁"(chrooted)在他们的主文件夹中



sudo cp /etc/proftpd.conf /etc/proftpd.conf_backup
sudo gedit /etc/proftpd.conf

  • 找到这一部分

...
DenyFilter \*.*/
...

  • 在它下面添加如下这行内容

DefaultRoot           ~


  • 保存编辑好的文件

sudo /etc/init.d/proftpd restart

如何将 FTP 服务器设成只允许匿名 FTP 用户读取



sudo cp /etc/proftpd.conf /etc/proftpd.conf_backup
sudo gedit /etc/proftpd.conf

  • 将以下几行内容添加到文档末尾

<Anonymous ~ftp>
User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message
<Directory *>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
</Anonymous>

  • 保存编辑好的文件

sudo /etc/init.d/proftpd restart

如何将 FTP 服务器设置成允许匿名 FTP 用户读写



sudo cp /etc/proftpd.conf /etc/proftpd.conf_backup
sudo gedit /etc/proftpd.conf

  • 将以下几行内容添加到文档末尾

<Anonymous ~ftp>
User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message
</Anonymous>

  • 保存编辑好的文件

sudo /etc/init.d/proftpd restart

如何将匿名 FTP 用户映射到 /home/ftp/ 以外的目录



sudo cp /etc/proftpd.conf /etc/proftpd.conf_backup
sudo gedit /etc/proftpd.conf

  • 将以下几行内容添加到文档末尾

<Anonymous /location_of_folder/>
User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message
<Directory *>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
</Anonymous>

  • 保存编辑好的文件

sudo /etc/init.d/proftpd restart

如何修改 FTP 服务器的缺省端口号



e.g. Assumed that new port number is 77

sudo cp /etc/proftpd.conf /etc/proftpd.conf_backup
sudo gedit /etc/proftpd.conf

  • 找到这一行

Port              21

  • 用下面这一行取代

Port              77

  • 保存编辑好的文件

sudo /etc/init.d/proftpd restart

如何在 Windows 机上 ftp 到远程 Ubuntu 机



e.g. Assumed that remote Ubuntu machine have installed FTP Server service
请参阅 #如何安装 FTP 服务来提供文件传输服务

  • 下载 FileZilla: Here

流媒体服务


如何安装 GNUMP3d 来提供流媒体服务



e.g. /var/music/ is the directory containing multimedia files

sudo apt-get install gnump3d


如何改变 GNUMP3d 包括多媒体文件的缺省目录



e.g. Assumed that new directory containing multimedia files is /home/music/

sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup
sudo gedit /etc/gnump3d/gnump3d.conf

  • 找到这一行

root = /var/music

  • 用下面这一行取代

root = /home/music

  • 找到这一行

user = gnump3d

  • 用下面这一行取代

user = root

  • 保存编辑好的文件

sudo /etc/init.d/gnump3d restart


如何改变 GNUMP3d 的缺省端口号



e.g. Assumed that new port number is 7878

sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup
sudo gedit /etc/gnump3d/gnump3d.conf

  • 找到这一行

port = 8888

  • 用下面这一行取代

port = 7878

  • 保存编辑好的文件

sudo /etc/init.d/gnump3d restart


图片相册服务


如何安装 Gallery 来提供图片相册服务



sudo apt-get install gallery (当提示要重启Apache时, 选择否(No)或取消(Cancel))
sudo apt-get install imagemagick
sudo apt-get install jhead
sudo apt-get install libjpeg-progs
sudo /etc/init.d/apache2 restart
sudo sh /usr/share/gallery/configure.sh


Gallery Configuration Wizard: Step 1
Next Step ->

Gallery Configuration Wizard: Step 2
General settings Tab ->
Admin password: Specify the password

Locations and URLs Tab ->
Album directory: /var/www/albums/
Temporary directory: /tmp/
Gallery URL: http://localhost/gallery
Albums URL: http://localhost/albums
Next Step -->

Gallery Configuration Wizard: Step 3
Next Step -->

Gallery Configuration Wizard: Step 4
Save Config ->


如何配置 Gallery 使其可以通过 Internet (主机名或固定IP)或 LAN (固定IP) 访问



e.g. Assumed that network and internet connections have been configured properly
Internet (Hostname or fix IP) or LAN (fix IP): http://www.url.com

sudo cp /etc/gallery/config.php /etc/gallery/config.php_backup
sudo gedit /etc/gallery/config.php

  • 找到这一部分

...
$gallery->app->photoAlbumURL = "http://localhost/gallery";
$gallery->app->albumDirURL = "http://localhost/albums";
...

  • 替换成以下几行

$gallery->app->photoAlbumURL = "http://www.url.com/gallery";
$gallery->app->albumDirURL = "http://www.url.com/albums";


如何配置 Gallery 使其可以通过 LAN (动态 IP) 访问



例如 假设您的网络连接已经正确设定好
LAN (dynamic IP): 192.168.0.1

sudo cp /etc/gallery/config.php /etc/gallery/config.php_backup
sudo gedit /etc/gallery/config.php

  • 找到这一部分

...
$gallery->app->photoAlbumURL = "http://localhost/gallery";
$gallery->app->albumDirURL = "http://localhost/albums";
...

  • 替换成以下几行

$gallery->app->photoAlbumURL = "/gallery";
$gallery->app->albumDirURL = "/albums";


如何 备份/恢复 Gallery 数据


  • 请参阅 #概述
  • To backup Gallery data

sudo tar zcvf gallery.tgz /var/www/albums/ /etc/gallery/

  • To restore Gallery data

sudo tar zxvf gallery.tgz -C /

疑难问题


启动时自动配置网络需要很长时间



从 ntp.ubuntulinux.org 同步时钟需要太长时间



service_name = ntpdate

怎样防止系统日期和时间被设置为 UTC (GMT)



sudo cp /etc/default/rcS /etc/default/rcS_backup
gksudo gedit /etc/default/rcS

  • 找到下面一行

...
UTC=yes
...

  • yes改为no

UTC=no

  • 保存
  • 菜单 System -> Administration -> Time and Date

设置正确的日期和时间


sudo /etc/init.d/hwclock.sh restart

怎样在GNOME中配置声音



sudo killall esd
sudo cp /etc/esound/esd.conf /etc/esound/esd.conf_backup
gksudo gedit /etc/esound/esd.conf

  • 找到下面的部分

...
auto_spawn=0
spawn_options=-terminate -nobeeps -as 5
...

  • 用下面的两行来替换上面两行

auto_spawn=1
spawn_options=-terminate -nobeeps -as 2 -d default

  • 保存文件

sudo apt-get install libesd-alsa0
gksudo gedit /etc/asound.conf

  • 把下面几行加入到asound.conf中

pcm.card0 {
type hw
card 0
}

pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.dmixer {
type dmix
ipc_key 1025
slave {
pcm "hw:0,0"
period_time 0
period_size 2048
buffer_size 32768
rate 48000
}
bindings {
0 0
1 1
}
}

  • 保存文件

sudo ln -fs /usr/lib/libesd.so.0 /usr/lib/libesd.so.1

菜单 System -> Preferences-> Sound
Sound preferences

General Tab -> Sounds for events (Un-Checked)

  • 关闭所有程序,重启。

怎样在GNOME中强制清空回收站



sudo rm -fr $HOME/.Trash/

怎样清除GNOME菜单中重复的项



rm -f $HOME/.config/menus/applications.menu


怎样更新GNOME菜单中的Places(位置)项目(比如/media/下的设备显示不出来)



sudo /etc/init.d/dbus restart

How to consume static (not dhcp) wireless LAN (WLAN) connection (KDE)


  • I assume you have successfully consumed WLAN connection in Windows

  • To enable the network device please follow the following steps
  • Go to K-menu -> System Settings -> Network Settings
  • Enable Administrator mode

  • Select Network Interfaces tab and the wireless interface (usually ath0) to configure
  • Click Configure Interface...
  • Choose Manual or Automatic. Choose Manual
  • Fill the preferred IP address to identify your computer and the netmask. Choose to activate when computer starts
  • Click Advanced Settings to for more properties

  • Select Routes tab and fill the gateway IP address
  • Make sure you choose the correct device in the right dropdown (e.g. ath0)
  • Click apply to commit all changes

  • To choose wireless connection please follow the following steps
  • Go to K-menu -> Internet -> Wireless Assistant
  • Right click on preferred connection ssid
  • Choose and complete fields for Manual connection
  • Click Ok

  • Create connection configuration

gksudo gedit /etc/wpa_supplicant.conf

  • Insert the following lines into the new file

network={
ssid="YOUR_PREFERRED_CONNECTION_SSID"
scan_ssid=1
proto=WPA
key_mgmt=WPA-PSK
psk="STRING_TO_GENERATE_PASSWORD"
#psk=123456789 #you have option to use connection key instead of connection password
}

  • Save the edited file
  • Create script to easily activate connection

gksudo gedit /etc/init.d/wifi_wpa.sh

  • Insert the following lines into the new file

#! /bin/sh
# wifi: wpa_supplicant init
echo " * [Wifi]: Enabling WPA supplicant..."
if [ -x /sbin/wpa_supplicant ]; then
/sbin/wpa_supplicant -B -i ath0 -c /etc/wpa_supplicant.conf -D madwifi -w
fi
exit 0

  • Save the edited file
  • Make sure both file readable and executable

sudo chmod +r /etc/wpa_supplicant.conf
sudo chmod +x /etc/init.d/wifi_wpa.sh

  • make wireless connection automaticaly starts when computer starts

sudo ln -s /etc/init.d/wifi_wpa.sh /etc/rcS.d/S40netwifiwpa

  • Close all opened applications, Reboot computer

怎样设置 1400x1050 分辨率



升级 Ubuntu


怎样升级 Hoary Hedgehog 到 Breezy Badger 再到 Dapper Drake


方法 A (官方)


  • 首先升级 update manager:

sudo aptitude update && sudo aptitude upgrade

  • 然后更新到新版本:

gksudo "update-manager -c -d"



方法 B (替代方法)


  • 首先,确认你已经完全upgrade了:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

  • 用root权限打开sources.list

gksudo gedit /etc/apt/sources.list


  • update 并 upgrade.

sudo aptitude update 
sudo aptitude dist-upgrade

(注意这里我们使用了 aptitude 而不是 apt-get 因为前者能更好地处理文件包之间的依赖关系。)


  • 保存,重启,欢迎来到Ubuntu。



注意: 不要跳跃版本升级,而要先升级到相邻版本,比如从 Breezy 到 Dapper 然后再到 Edgy. 如果你目前的版本是Hoary那么升级顺序是 Hoary->Breezy->Dapper->Edgy.


文章评论0条评论)

登录后参与讨论
我要评论
0
8
关闭 站长推荐上一条 /2 下一条