2008年6月10日星期二

Ubuntu 8.04加源安装Google Gadgets

注,此篇是Ubuntu 8.04下加源安装Google Gadgets的方法,用户不再需要自行编译了,而且能一直保持最新。

Google Gadgets是一套跨平台的桌面工具集,for Linux版本刚刚公布不久。

—-

在ubuntu 8.04中:

编辑源文件:

sudo gedit /etc/apt/sources.list

加入下面两行:

deb http://ppa.launchpad.net/googlegadgets/ubuntu hardy main
deb-src http://ppa.launchpad.net/googlegadgets/ubuntu hardy main

保存退出。

接下来就是更新系统和安装Google Gadgets:

sudo aptitude update

sudo aptitude install google-gadgets

提示如下信息:

keke@Lin:~$ sudo aptitude install google-gadgets
[sudo] password for keke:
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
读取状态信息… 完成
正在读取扩展状态文件
正在初始化软件包状态… 完成
正在编辑扩展状态信息… 完成
创建标签数据库… 完成
下列新软件包将被自动安装:
libmozjs0d libqtwebkit1d libxul-common libxul0d
下列“新”软件包将被安装。
google-gadgets libmozjs0d libqtwebkit1d libxul-common libxul0d
0 个软件包被升级,新安装5 个, 0 个将被删除, 同时 0 个将不升级。
需要获取 19.8MB 的存档。 解包后将要使用 61.9MB。
您要继续吗?[Y/n/?] y
警告:您将安装以下软件包的不可信版本!

不可信的软件可能会危害您的系统安全。
只有当您非常清楚地了解这就是您所要执行的操作时,才应该进行安装操作。

google-gadgets

您想忽略这条警告信息并继续执行吗?
要继续,请键入“Yes”;要中止,请键入“No”:

然后键入“Yes”,安装完成。

安装完后运行:

运行完后会在托盘出现图标,右击托盘就可以添加需要的Gadgets了。

第一次启动后会更新数据了,因为我使用代理的缘故,更新没有成功:

linux下的千千静听lmplayer - [ubuntu备案文档]

linux下的千千静听lmplayer - [ubuntu备案文档]

千千静听的最新版可以在线收听音乐和浏览网页了说,这一点貌似在linux下还没能赶上。但是lmplayer至少满足了基本需求。

下载最新版lmplayer0.6.0,方便地切换皮肤。(deb包可用)

luckykai开发的一款皮肤:http://blog.lmplayer.org/2008/06/06/luckykai发的一款皮肤

安装皮肤:解压缩后,将皮肤文件夹放置/usr/share/lmplayer/skins目录下

换皮肤的方式很简单,跟windows下的千千静听一样,界面上先右键,然后...

2008年6月2日星期一

A much easier way to install Ubuntu on a USB device (Stick or HD)!

I was reading How to install Ubuntu Linux from USB Stick posted on this site a while ago, and found it to be quite some work to get Ubuntu working on a USB stick. Besides, having to prepare your USB device, creating a separate partition on it which will be more or less “useless” after the installation, giving up 750MB of space?

There had to be a better way.

Together with a colleague of mine, I decided to figure out whether there could be an easier way to install Ubuntu on a USB device.

I found a way of doing it in a much simpler way… without creating the separate partition to store the LiveCD:

A couple of assumptions to take into account when going through this manual:

  • My computer (Dell D820 laptop) has 1 internal disk, devided into 3 partitions (dell utility - windows - Ubuntu 8.04)
  • Just one USB device (in my case a 250GB harddisk
  • BIOS configured to enable boot from internal HDD, CD/DVD and USB Storage device

(I didn’t take screenshots, so I will be explaining a lot about the screens… It looks like a lot of work, but trust me: it is not, and it really is easy:-)

  1. Insert the LiveCD into your computer;
  2. Connect your USB device;
  3. Boot your computer from the liveCD;
  4. Once Ubuntu is started, go to System - Administration - Partition Manager
    This will open the Partion Editor. Select your USB device and delete all partitions on it. Click Apply and exit Partition Editor;
  5. Double Click the Install Icon. This will start the Installer;
  6. The Welcome Screen is shown. Choose your language and click Forward;
  7. Select your Time Zone and click Forward;
  8. Choose your Keyboard Layout and click Forward;
  9. The partitioner will be started, and you will be given the choice where to install Ubuntu. Choose Guided - Use entire disk, selecting your USB device (this will most likely be /dev/sdb, don’t choose /dev/sdb1!);
  10. The next sceen you will give your username/password information. Provide the required info and hit Forward;
  11. If there is anything to migrate from other installations on your computer (most likely not), do whatever you want, and click Forward;
  12. The next screen is important - It is titled: “Ready to Install”. Be careful here: before clicking on Forward, make sure you click on the “Advanced” Button!
    This will open a new screen, giving you the option whether and where to install the bootloader. Select your USB device (in my case it was /dev/sdb) to install the bootloader to;
    Exit this screen and click on Forward in the “Ready to Install” screen, which will be shown;
  13. The installation will be started now. Just be patient, grab a cup of coffee and come back 15 minutes later, your installation will be more or less finished by then.

So you have finished the installation. However, when you will be restarting your system from USB, you will find out that the partition you just installed Ubuntu to cannot be mounted.
Here comes the trick:

  1. Once the installation is finished, reboot your PC (this is the safest) from your LiveCD, with your USB device connected;
  2. Once started, open up a terminal (Applications - Accessories - Terminal);
  3. In the Terminal, type: sudo -i (which will give you root privileges, so be careful from now on!);
  4. Change directories to /media/disk/boot/grub - This will take you to the “/boot/grub” directory on the USB device;
  5. open menu.lst with vi (make a backup first!)
  6. Go to line 130 (or somewhere in that area).
    You will find a line looking like:
    ## ## End Default options ##
    And underneath it you will find three entries pointing to your Ubuntu you just installed:
    title Ubuntu 8.04, kernel 2.6.24-16-generic
    root (hd1,0)
    kernel /boot/vmlinuz………
    initrd /boot/initrd…….
    quiet
    (the above 5 lines repeat 3 times with slight differences)
  7. The magic trick is to change (hd1,0) into (hd0,0) for all these three entries.
    Why? Booting from USB device makes your USB device hd0, in stead of hd1 at time of installation.
  8. Search for the line starting with “# groot=(hd1,0)” and change (hd1,0) to (hd0,0) - Don’t delete the # at te beginning of this line!
  9. Once you did this, you can optionally remove the remaining of the file
    (everything underneath ### END DEBIAN AUTOMATIC KERNELS LIST);
  10. Save the file, make sure it is owned by root:ubuntu (chgrp ubuntu menu.* will do)
  11. Edit device.map (in the same directory) and change the mapping of hd0 to /dev/sdb.
  12. Reboot your machine, from USB, choose the Ubuntu installation from the Boot Loader and you are one happy person.

I guess that is it. If I missed something, please comment.

Regards,

If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!

Linux 技巧:让进程在后台可靠运行的几种方法

2008 年 5 月 29 日

想让进程在断开连接后依然保持运行?如果该进程已经开始运行了该如何补救? 如果有大量这类需求如何简化操作?

我 们经常会碰到这样的问题,用 telnet/ssh 登录了远程的 Linux 服务器,运行了一些耗时较长的任务, 结果却由于网络的不稳定导致任务中途失败。如何让命令提交后不受本地关闭终端窗口/网络断开连接的干扰呢?下面举了一些例子, 您可以针对不同的场景选择不同的方式来处理这个问题。

nohup/setsid/&

场景:

如果只是临时有一个命令需要长时间运行,什么方法能最简便的保证它在后台稳定运行呢?

hangup 名称的来由
在 Unix 的早期版本中,每个终端都会通过 modem 和系统通讯。当用户 logout 时,modem 就会挂断(hang up)电话。 同理,当 modem 断开连接时,就会给终端发送 hangup 信号来通知其关闭所有子进程。

解决方法:

我们知道,当用户注销(logout)或者网络断开时,终端会收到 HUP(hangup)信号从而关闭其所有子进程。因此,我们的解决办法就有两种途径:要么让进程忽略 HUP 信号,要么让进程运行在新的会话里从而成为不属于此终端的子进程。

1. nohup

nohup 无疑是我们首先想到的办法。顾名思义,nohup 的用途就是让提交的命令忽略 hangup 信号。让我们先来看一下 nohup 的帮助信息:

NOHUP(1)                        User Commands                        NOHUP(1)

NAME
nohup - run a command immune to hangups, with output to a non-tty

SYNOPSIS
nohup COMMAND [ARG]...
nohup OPTION

DESCRIPTION
Run COMMAND, ignoring hangup signals.

--help display this help and exit

--version
output version information and exit

可见,nohup 的使用是十分方便的,只需在要处理的命令前加上 nohup 即可,标准输出和标准错误缺省会被重定向到 nohup.out 文件中。一般我们可在结尾加上"&"来将命令同时放入后台运行,也可用">filename 2>&1"来更改缺省的重定向文件名。


nohup 示例
               
[root@pvcent107 ~]# nohup ping www.ibm.com &
[1] 3059
nohup: appending output to `nohup.out'
[root@pvcent107 ~]# ps -ef |grep 3059
root 3059 984 0 21:06 pts/3 00:00:00 ping www.ibm.com
root 3067 984 0 21:06 pts/3 00:00:00 grep 3059
[root@pvcent107 ~]#

2。setsid

nohup 无疑能通过忽略 HUP 信号来使我们的进程避免中途被中断,但如果我们换个角度思考,如果我们的进程不属于接受 HUP 信号的终端的子进程,那么自然也就不会受到 HUP 信号的影响了。setsid 就能帮助我们做到这一点。让我们先来看一下 setsid 的帮助信息:

SETSID(8)                 Linux Programmer’s Manual                 SETSID(8)

NAME
setsid - run a program in a new session

SYNOPSIS
setsid program [ arg ... ]

DESCRIPTION
setsid runs a program in a new session.

可见 setsid 的使用也是非常方便的,也只需在要处理的命令前加上 setsid 即可。


setsid 示例
               
[root@pvcent107 ~]# setsid ping www.ibm.com
[root@pvcent107 ~]# ps -ef |grep www.ibm.com
root 31094 1 0 07:28 ? 00:00:00 ping www.ibm.com
root 31102 29217 0 07:29 pts/4 00:00:00 grep www.ibm.com
[root@pvcent107 ~]#

值得注意的是,上例中我们的进程 ID(PID)为31094,而它的父 ID(PPID)为1(即为 init 进程 ID),并不是当前终端的进程 ID。请将此例与nohup 例中的父 ID 做比较。

3。&

这里还有一个关于 subshell 的小技巧。我们知道,将一个或多个命名包含在“()”中就能让这些命令在子 shell 中运行中,从而扩展出很多有趣的功能,我们现在要讨论的就是其中之一。

当我们将"&"也放入“()”内之后,我们就会发现所提交的作业并不在作业列表中,也就是说,是无法通过jobs来查看的。让我们来看看为什么这样就能躲过 HUP 信号的影响吧。


subshell 示例
               
[root@pvcent107 ~]# (ping www.ibm.com &)
[root@pvcent107 ~]# ps -ef |grep www.ibm.com
root 16270 1 0 14:13 pts/4 00:00:00 ping www.ibm.com
root 16278 15362 0 14:13 pts/4 00:00:00 grep www.ibm.com
[root@pvcent107 ~]#

从上例中可以看出,新提交的进程的父 ID(PPID)为1(init 进程的 PID),并不是当前终端的进程 ID。因此并不属于当前终端的子进程,从而也就不会受到当前终端的 HUP 信号的影响了。





回页首


disown

场景:

我们已经知道,如果事先在命令前加上 nohup 或者 setsid 就可以避免 HUP 信号的影响。但是如果我们未加任何处理就已经提交了命令,该如何补救才能让它避免 HUP 信号的影响呢?

解决方法:

这时想加 nohup 或者 setsid 已经为时已晚,只能通过作业调度和 disown 来解决这个问题了。让我们来看一下 disown 的帮助信息:

disown [-ar] [-h] [jobspec ...]
Without options, each jobspec is removed from the table of
active jobs. If the -h option is given, each jobspec is not
removed from the table, but is marked so that SIGHUP is not
sent to the job if the shell receives a SIGHUP. If no jobspec
is present, and neither the -a nor the -r option is supplied,
the current job is used. If no jobspec is supplied, the -a
option means to remove or mark all jobs; the -r option without
a jobspec argument restricts operation to running jobs. The
return value is 0 unless a jobspec does not specify a valid
job.

可以看出,我们可以用如下方式来达成我们的目的。

灵活运用 CTRL-z
在 我们的日常工作中,我们可以用 CTRL-z 来将当前进程挂起到后台暂停运行,执行一些别的操作,然后再用 fg 来将挂起的进程重新放回前台(也可用 bg 来将挂起的进程放在后台)继续运行。这样我们就可以在一个终端内灵活切换运行多个任务,这一点在调试代码时尤为有用。因为将代码编辑器挂起到后台再重新放 回时,光标定位仍然停留在上次挂起时的位置,避免了重新定位的麻烦。
  • 用disown -h jobspec 来使某个作业忽略HUP信号。
  • 用disown -ah 来使所有的作业都忽略HUP信号。
  • 用disown -rh 来使正在运行的作业忽略HUP信号。

需要注意的是,当使用过 disown 之后,会将把目标作业从作业列表中移除,我们将不能再使用jobs来查看它,但是依然能够用ps -ef查找到它。

但是还有一个问题,这种方法的操作对象是作业,如果我们在运行命令时在结尾加了"&"来使它成为一个作业并在后台运行,那么就万事大吉了,我们可以通过jobs命令来得到所有作业的列表。但是如果并没有把当前命令作为作业来运行,如何才能得到它的作业号呢?答案就是用 CTRL-z(按住Ctrl键的同时按住z键)了!

CTRL-z 的用途就是将当前进程挂起(Suspend),然后我们就可以用jobs命令来查询它的作业号,再用bg jobspec 来将它放入后台并继续运行。需要注意的是,如果挂起会影响当前进程的运行结果,请慎用此方法。


disown 示例1(如果提交命令时已经用“&”将命令放入后台运行,则可以直接使用“disown”)
               
[root@pvcent107 build]# cp -r testLargeFile largeFile &
[1] 4825
[root@pvcent107 build]# jobs
[1]+ Running cp -i -r testLargeFile largeFile &
[root@pvcent107 build]# disown -h %1
[root@pvcent107 build]# ps -ef |grep largeFile
root 4825 968 1 09:46 pts/4 00:00:00 cp -i -r testLargeFile largeFile
root 4853 968 0 09:46 pts/4 00:00:00 grep largeFile
[root@pvcent107 build]# logout


disown 示例2(如果提交命令时未使用“&”将命令放入后台运行,可使用 CTRL-z 和“bg”将其放入后台,再使用“disown”)
               
[root@pvcent107 build]# cp -r testLargeFile largeFile2

[1]+ Stopped cp -i -r testLargeFile largeFile2
[root@pvcent107 build]# bg %1
[1]+ cp -i -r testLargeFile largeFile2 &
[root@pvcent107 build]# jobs
[1]+ Running cp -i -r testLargeFile largeFile2 &
[root@pvcent107 build]# disown -h %1
[root@pvcent107 build]# ps -ef |grep largeFile2
root 5790 5577 1 10:04 pts/3 00:00:00 cp -i -r testLargeFile largeFile2
root 5824 5577 0 10:05 pts/3 00:00:00 grep largeFile2
[root@pvcent107 build]#





回页首


screen

场景:

我们已经知道了如何让进程免受 HUP 信号的影响,但是如果有大量这种命令需要在稳定的后台里运行,如何避免对每条命令都做这样的操作呢?

解决方法:

此 时最方便的方法就是 screen 了。简单的说,screen 提供了 ANSI/VT100 的终端模拟器,使它能够在一个真实终端下运行多个全屏的伪终端。screen 的参数很多,具有很强大的功能,我们在此仅介绍其常用功能以及简要分析一下为什么使用 screen 能够避免 HUP 信号的影响。我们先看一下 screen 的帮助信息:

SCREEN(1)                                                           SCREEN(1)

NAME
screen - screen manager with VT100/ANSI terminal emulation

SYNOPSIS
screen [ -options ] [ cmd [ args ] ]
screen -r [[pid.]tty[.host]]
screen -r sessionowner/[[pid.]tty[.host]]

DESCRIPTION
Screen is a full-screen window manager that multiplexes a physical
terminal between several processes (typically interactive shells).
Each virtual terminal provides the functions of a DEC VT100 terminal
and, in addition, several control functions from the ISO 6429 (ECMA
48, ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and
support for multiple character sets). There is a scrollback history
buffer for each virtual terminal and a copy-and-paste mechanism that
allows moving text regions between windows.

使用 screen 很方便,有以下几个常用选项:

  • 用screen -dmS session name 来建立一个处于断开模式下的会话(并指定其会话名)。
  • 用screen -list 来列出所有会话。
  • 用screen -r session name 来重新连接指定会话。
  • 用快捷键CTRL-a d 来暂时断开当前会话。

screen 示例
               
[root@pvcent107 ~]# screen -dmS Urumchi
[root@pvcent107 ~]# screen -list
There is a screen on:
12842.Urumchi (Detached)
1 Socket in /tmp/screens/S-root.

[root@pvcent107 ~]# screen -r Urumchi

当我们用“-r”连接到 screen 会话后,我们就可以在这个伪终端里面为所欲为,再也不用担心 HUP 信号会对我们的进程造成影响,也不用给每个命令前都加上“nohup”或者“setsid”了。这是为什么呢?让我来看一下下面两个例子吧。


1. 未使用 screen 时新进程的进程树
               
[root@pvcent107 ~]# ping www.google.com &
[1] 9499
[root@pvcent107 ~]# pstree -H 9499
init─┬─Xvnc
├─acpid
├─atd
├─2*[sendmail]
├─sshd─┬─sshd───bash───pstree
│ └─sshd───bash───ping

我们可以看出,未使用 screen 时我们所处的 bash 是 sshd 的子进程,当 ssh 断开连接时,HUP 信号自然会影响到它下面的所有子进程(包括我们新建立的 ping 进程)。


2. 使用了 screen 后新进程的进程树
               
[root@pvcent107 ~]# screen -r Urumchi
[root@pvcent107 ~]# ping www.ibm.com &
[1] 9488
[root@pvcent107 ~]# pstree -H 9488
init─┬─Xvnc
├─acpid
├─atd
├─screen───bash───ping
├─2*[sendmail]

而使用了 screen 后就不同了,此时 bash 是 screen 的子进程,而 screen 是 init(PID为1)的子进程。那么当 ssh 断开连接时,HUP 信号自然不会影响到 screen 下面的子进程了。

2008年5月28日星期三

10个最佳的Linux音频播放器

1- Rhythmbox:

Rhythmbox是一个伟大的linux版本的音乐播放器. 它可以容易的帮你组织音乐内容,并且是免费的. 它的灵感来自于苹果的iTunes,它使用GStreamer多媒体库开发,在GNOME桌面环境中执行结果和效果者让人感到惊艳.



Rythmbox功能特点:

* 易于使用的音乐浏览器
* 搜索和排序
* 通过使用GStreamer而支持全部音频文件格式
* 互联网电台的支持,包括last.fm流媒体
* 支持播放列表
* 显示播放可视化效果
* 轻松在ipod,USB大容量存储音乐播放器,MTP中传输数据
* 显示专辑封面和从互联网下载歌词
* 播放,提取或烧录音频CD
* 自动下载音频播客
* 从Magnatune和Jamendo音乐商店浏览,下载相册

Rythmbox官方网站
下载Rythmbox

2- GMPC (Gnome音乐播放器客户端):GMPC 是一个很好的前端音乐播放器守护程序. 它快速并且易于使用,同时它还优于mpd的所有功能(mpd?).

功能特点:

* 元数据支持,它可以显示艺术家的形象,专辑封面,歌词等.
* 支持插件.
* 快速, gmpc作了大量优化工作,可以很完美的运行在速度很慢的机器和连接速度慢的网络中.
* 支持配置文件,轻松使用多个mpd.

下载 屏幕截图 官方网站

3- XMMS (X多媒体系统):

XMMS (X多媒体系统) 是一个伟大的多媒体播放器,几乎可以运行于所有的系统,但在linux下却有一些特殊的地方. XMMS可以播放的多媒体文件有MP3, MOD, WAV 和其它的一些输入插件. 它是一个运行在许多类UNIX系统上的有点类似Winamp但又小于它的免费音频播放器.

下载 官方网站


4- Amarok:

Amarok 是linux和unix上另一个伟大的音乐播放器. Amarok的界面非常直观. 它是免费的自由软件. 现在, Amarok是linux上最受欢迎的音频播放器.

下载 官方网站

5- Quod Libet

Quod Libet是一个使用GTK+界面库开发的播放器, 它的主要功能特点是音乐库管理. 不同于其它的以分类, 流派,艺术家和专辑方式管理, 代之是你可以搜索然后显示它. Quod Libet 在大型音乐库管理这一点上要远胜于其它linux上的播放器.

下载 官方网站

6- Audacious:Audacious 是linux或其它基于linux系统上的免费播放器. 支持它自己的大部分是自己的一些功能插件,包括所有的解码器. 大多数系统上,默认是安装一个很有用的一个插件集, 让你有能力播放mp3,ogg,和FLAC等格式文件.

功能特点 下载 官方网站

7- Exaile:

Exaile 是一个免费的自由软件,它可以运行于所以类unix操作系统中,它是目标是要小于KDE下的Amarok,所以它使用的是GTK+不是QT.

功能特点包括:

* 自动提取专辑封面
* 处理大型的音乐库
* 提取歌词
* 通过Wikipedia返回艺术家和专辑的信息
* 双向支持last.fm (both scrobbling of played songs and retrieving related songs from the last.fm server)
* 可选的ipod运行(需要python-gpod)
* 可选的MTP(需要libmtp和pymtp)
* 可选的 iTunes DAAP 音乐分享支持
* 构建于shoutcast文件浏览器
* 多选项卡式的播放列表
* 从音乐库中列出黑名单

下载 官方网站

8- Banshee:‭

Banshee一个在GNU/Linux上使用Helix和GStreamer多媒体平台库来执行播放,编码,和解码Ogg,MP3和其它的格式的自由免费的音乐播放器. 你可以播放和导入CD, 轻松的与你的ipod同步分享或播放它.‭ Banshee同样也可将播放列表报告发布到last.fm的播放列表中.‭ 还有其它的一些很酷功能如:它可以提取CD,支持播客, 漂亮整洁的播放列表, 音乐推荐, 烧录音频,MP3,CD等等!

下载 官方网站

9- BMP (Beep Media Player)

BMP 也就是蜂鸣媒体播放器. BMP 一个基于xmms的免费音乐播放器(上述). 它看来很像Winamp,也支持它的外观主题,包括xmms的. BMP 支持所以xmms能支持的格式, 主要差别在于两个播放器之间使用的插件.

下载 官方网站

10- Sonata:

Sonata另一优雅的基于GTK + MPD前端音乐播放器 (MPD:音乐播放器守护进程). 它是自由的软件具有以下功能特征:

*可收缩展开的显示界面
* 自动同步远程与本地专辑的封面
* 用户可自定义显示栏
* 自动提取歌词
* 播放列表和流媒体支持
* 支持编辑歌曲标签
* 弹出通知
* 媒体库和播放列表搜索
* Audioscrobbler (last.fm) 支持
* 多MPD配置
* 键盘友好
* 支持多媒体键
* 命令行控制

2008年5月13日星期二

Howto Install Truecrypt with GUI tool in Ubuntu Gutsy

TrueCrypt is a software system for establishing and maintaining an on-the-fly-encrypted volume (data storage device). On-the-fly encryption means that data are automatically encrypted or decrypted right before they are loaded or saved, without any user intervention. No data stored on an encrypted volume can be read (decrypted) without using the correct password/keyfile(s) or correct encryption keys. Entire file system is encrypted (e.g.., file names, folder names, contents of every file, free space, meta data, etc).

Files can be copied to and from a mounted TrueCrypt volume just like they are copied to/from any normal disk (for example, by simple drag-and-drop operations). Files are automatically being decrypted on-the-fly (in memory/RAM) while they are being read or copied from an encrypted TrueCrypt volume. Similarly, files that are being written or copied to the TrueCrypt volume are automatically being encrypted on-the-fly (right before they are written to the disk) in RAM. Note that this does not mean that the whole file that is to be encrypted/decrypted must be stored in RAM before it can be encrypted/decrypted. There are no extra memory (RAM) requirements for TrueCrypt.

Preparing your System

sudo aptitude install sun-java6-jre python-pexpect build-essential

Now you need to download the truecrypt .deb package from here for your ubuntu version.

Now you should be having truecrypt-4.3a-ubuntu-7.10-x86.tar.gz file extract this using the following command

sudo tar xzvf truecrypt-4.3a-ubuntu-7.10-x86.tar.gz

Now you have truecrypt-4.3a folder

Go into the folder and install .deb package

sudo dpkg -i truecrypt_4.3a-0_i386.deb

Now you should be able to see the following error

Selecting previously deselected package truecrypt.
(Reading database … 133570 files and directories currently installed.)
Unpacking truecrypt (from truecrypt_4.3a-0_i386.deb) …
dpkg: dependency problems prevent configuration of truecrypt:
truecrypt depends on dmsetup; however:
Package dmsetup is not installed.
dpkg: error processing truecrypt (–install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
truecrypt

To fix the above error run the following command

sudo apt-get -f install

This will complete the TrueCrypt installation.

tcgui - TrueCrypt GUI

These functions are integrated already:

Mount/Unmount TrueCrypt volumes
Create volumes easily with the wizard
Change volume password easily
Backup / Restore volume headers
Manage your favourites
Mount several volumes with one click

The tcgui looks similar to the windows GUI for truecrypt

You need to download tcgui from here

now you have tcgui.0.4.tar.gz file extract using the following command

sudo tar xzvf tcgui.0.4.tar.gz

Now you have tcgui-0.4 go in to this folder run the following command

cd tcgui-0.4

sudo bash install.sh $USER

Note:- simply copy & paste the above command

Using tcgui

If you want to open goto Applications—>Accessories—>TrueCrypt GUI

Click on “Yes” if you agree with the warranty agreement.

Once it opens you should be able to see similar to the following screen

Uninstall tcgui

If you want to Uninstall the TrueCrypt GUI open a terminal and enter the following command

sudo bash /usr/share/tcgui/uninstall.sh

Note: The group “truecrypt” will not be deleted and the changes in the sudo configuration will not be restored.

Howto Install TOR,Privoxy and Tor GUI Programs (Vidalia,Tork and Torbutton)in Ubuntu

Tor is a software project that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security. Tor protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, and it prevents the sites you visit from learning your physical location.

Tor works with many of your existing applications, including web browsers, instant messaging clients, remote login, and other applications based on the TCP protocol.

Privoxy is a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying
web page data, managing HTTP cookies, controlling access, and removing ads, banners, pop-ups and other
obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual
needs and tastes. Privoxy has application for both stand-alone systems and multi-user networks.

Install Tor and privoxy in Ubuntu

sudo aptitude install tor privoxy

This will complete the installation.

GUI Tools Available for Tor

Currently we have the following TOR GUI Applications

Vidalia

Vidalia is a cross-platform controller GUI for the Tor software, built using the Qt framework. Using Vidalia, you can start and stop the Tor software, view its status at a glance, and monitor bandwidth usage. Vidalia also makes it easy to contribute to the Tor network by helping you set up and manage your own relay.

Torbutton

Torbutton is a 1-click way for Firefox users to enable or disable the browser’s use of Tor. It adds a panel to the statusbar that says “Tor Enabled” (in green) or “Tor Disabled” (in red). The user may click on the panel to toggle the status. If the user (or some other extension) changes the proxy settings, the change is automatically reflected in the statusbar.

Some users may prefer a toolbar button instead of a statusbar panel. Such a button is included, and one adds it to the toolbar by right-clicking on the desired toolbar, selecting “Customize…”, and then dragging the Torbutton icon onto the toolbar. There is an option in the preferences to hide the statusbar panel (Tools->Extensions, select Torbutton, and click on Preferences).

Newer Firefoxes have the ability to send DNS resolves through the socks proxy, and Torbutton will make use of this feature if it is available in your version of Firefox.

TorK

TorK is a powerful anonymity manager for the KDE Desktop on Linux and Unix systems. It first helps you
to install, configure and use Tor. It then reduces the task of anonymizing most applications to a single-click, including Firefox, Opera, Konqueror, Pidgin, Kopete, SSH, and IRC. For advanced users TorK

provides detailed network information, and more, in an accessible manner.
If you wish to run TorK locally, please install the tor and privoxy packages.

Features include:

* Browse anonymously on Konqueror/Firefox/Opera.
* Send anonymous email via the MixMinion network.
* Use Internet Messaging and IRC anonymously.
* Create and manage hidden services.

Install Vidalia in Ubuntu Gutsy and Hardy

You need to edit the /etc/apt/sources.list file using the following command or Go to System->Preferences->Software Sources and enter these repositories into 3rd Party Repositories and click
on reload.

sudo gedit /etc/apt/sources.list

add the following lines

For Hardy Users

deb http://ppa.launchpad.net/adnarim/ubuntu hardy main
deb-src http://ppa.launchpad.net/adnarim/ubuntu hardy main

For Gutsy Users

deb http://ppa.launchpad.net/adnarim/ubuntu gutsy main
deb-src http://ppa.launchpad.net/adnarim/ubuntu gutsy main

Save and exit the file

Now you need to update the source list using the following command

sudo aptitude update

Install Vidalia using the following command

sudo aptitude install vidalia

this will complete the installation.

Now you need to open Vidalia Go to Applications—>Internet—>Vidalia

After opening you should be able see similar to the following screen.If you want to change the settings click on settings in the following screen

If you want to see Network Map click on View the Network on the above Screen

Tor Bandwidth usage

If Tor is working you can see similar to the following icon marked in Red in your notification area

If you want to configure firefox for browsing check this

Install TorK in Ubuntu

If you want to install TorK use the following command

sudo aptitude install tork

Install Torbutton in Ubuntu

Download Torbutton from here and install for your firefox