Dec 12

转自:http://blog.yam.com/lijohnson/article/25390911
原标题:《在64位元環境下編譯安裝wine 32bit/64bit》

安装这个方法来编译安装Wine成功率太高了,几乎没有失败过,以前安装网上的其他方法十有八九不能成功,主要原因是编译环境不全,文中的托管在source code上的脚本太有用了,建议试试。

Ubuntu升上9.10後,wine就變得怪怪的,安裝時只能裝套件管理程式的wine 1.2,卻無法安裝主要的wine,從軟體中心安裝也會出現相依性錯誤,只裝1.2的話,運行部份程式又會出錯,最後只好自己手動編譯wine了。

1.下載source code
http://sourceforge.net/projects/wine/files/Source/下載原始碼,目前最新為1.1.33,下載完畢後,直接按右鍵解壓縮。

2.編譯/安裝 for 32bit wine
(1).前置作業

wget http://winezeug.googlecode.com/svn/trunk/install-wine-deps.sh
sudo sh install-wine-deps.sh

此為安裝編譯32位元wine所需的環境套件。

(2).編譯/安裝

./configure
make depend
make
sudo make install

其中make大概要半個小時左右。

(3).運行
wine “檔案名稱”,例如:wine notepad。

(4).移除

sudo make uninstall wine

3.編譯/安裝 for 64bit wine
(1).編譯/安裝

./configure --enable-win64
make depend
make
sudo make install

make同樣會花很久的時間。

(2).運行/移除
同32位元說明。

雖然最後我的問題還是沒有解決,但還是把花了一個早上研究的結果給紀錄一下。另外要說明的是,若是安裝64位元的wine,將只能執行64位元的win程式,若執行32位元的會出現錯誤訊息。

4.相關連結
WineOn64bit – The Official Wine Wiki http://wiki.winehq.org/WineOn64bit
Wine64 – The Official Wine Wiki http://wiki.winehq.org/Wine64
WineHQ http://www.winehq.org/

Dec 12

转自:http://eliteleisure.blog.sohu.com/170648018.html

本方法适用于XP与Ubuntu双系统重新安装XP后修复Grub引导的情况,也适用于在XP下无光驱通过加载Ubuntu LiveCD修复Grub引导的情况,而我自己则是属于那种无光驱无U盘启动的情况。

相信安装过Ubuntu 10.10的朋友都有LiveCD的安装光盘,我们今天就用Ubuntu 10.10的LiveCD的来修复grub2的引导。启动Ubuntu 10.10光盘,选择LiveCD模式,进入之后选择进入终端,先在终端输入如下命令:

sudo fdisk -l (注意是小写的L,不是数字的1,此步用于确定电脑中安装 Ubuntu 10.10的所在分区的位置,输入以后会输出类似如下信息,找到ID为83的那行,记住/dev/sdaX的情况,比如本人的电脑是/dev /sda7,以下就以此为例,你自己的请加以更改)

root@Magtron:/boot/grub# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e95f2

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3661    29400064    7  HPFS/NTFS
/dev/sda2            3661        7308    29297664   83  Linux
/dev/sda3            7308       60802   429685761    5  Extended
/dev/sda5            7308        7430      975872   82  Linux swap / Solaris
/dev/sda6            7430       12171    38083584   83  Linux
/dev/sda7           12171       15818    29296640    b  W95 FAT32
/dev/sda8           15819       60802   361326592   83  Linux

然后再输入:

sudo -i (此步用于得到root权限,无需输入密码,方便以下操作)
mount /dev/sda7 /mnt
mount /dev/sda6 /mnt/boot (如果没 /boot 单独分区这步跳过)
grub-install --root-directory=/mnt/ /dev/sda

和前面一样,要装入第二硬盘的把sda改为sdb。

修复后却无法引导Windows了。可以用下面的方法解决:

进入Ubuntu系统,打开终端,重建Grub列表

sudo update-grub

如果想修改启动顺序,可以修改/boot/grub目录下的grub.cfg文件。

Nov 01

转自:http://www.noobslab.com/2012/05/mac-os-x-lion-for-ubuntu-1204-precise.html

Many People Search for Macbuntu 12.04/Macbuntu 11.10/Mac4lin, Mac Ubuntu theme and so on. So here we are ready with Mac OS X Lion Theme for Ubuntu 12.04 Precise Pangolin and Hopefully Mac Theme will work with Linux Mint 13.

Now Theme Installation:
1. Download Mac OS X Lion Wallpapers
2. Install Latest Cairo Dock
3. To Install Mac OS X Lion Theme on Ubuntu 12.04 Precise Pangolin open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal:

sudo add-apt-repository ppa:noobslab/themes
#Now Enter This Command then go to install commands
sudo apt-get update
#Install Icons
sudo apt-get install mac-os-lion-icons
#Install Theme
sudo apt-get install mac-os-lion-theme

4. Apply Mac OS X Splash:

Install Following commands to install splash:

wget http://dl.dropbox.com/u/53319850/NoobsLab.com/Paw-OSX.zip

unzip Paw-OSX.zip

sudo cp -R Paw-OSX/ /lib/plymouth/themes
sudo update-alternatives --install /lib/plymouth/themes/default.plymouth default.plymouth /lib/plymouth/themes/Paw-OSX/paw-osx.plymouth 100

Enter following command and select paw-osx splash:

sudo update-alternatives --config default.plymouth

Now Enter this command:

sudo update-initramfs -u

If you don’t like Paw Splash, You can get back Ubuntu splash:
Enter following command and select Ubuntu Splash number:

sudo update-alternatives --config default.plymouth

Now Enter this command to update Splash:

sudo update-initramfs -u

See the following picture.

5. Install Compiz Setting Manager to Autohide Unity Launcher:

sudo apt-get install compizconfig-settings-manager

6. Install Gnome Tweak Tool to change Themes, Icons, Cursors:

sudo apt-get install gnome-tweak-tool

Oct 20

转自:http://xzcblog.appspot.com/2012/01/12/linux,知识4.html

在之前我们已经介绍了通过uGet使用aria2来进行下载,但是这样只是使用aria2最简单的功能,现在我们来介绍一下aria2的常用命令。

简单篇
一般使用使用 aria2 下载文件,只需在命令后附加地址即可。比如我们下载QQ如:

aria2c http://example.com/filename.txt

如果需要重命名的话加上–out或者-o参数:

aria2c --out=newfilename http://example.com/filename.txt
aria2c -o newfilename http://example.com/filename.txt

分段下载利用 aria2 的分段下载功能可以加快文件的下载速度,对于下载大文件时特别有用。为了使用 aria2 的分段下载功能,你需要在命令中指定 s 选项。如:

aria2c -s 2 http://example.com/filename.txt

-s配合-x 和-j可更好使用如:

aria2c -s 2 -x 2 -j 10 http://example.com/filename.txt

这将使用 2 个连接来下载该文件。s 后面的参数值介于 1~5 之间,你可以根据实际情况选择。

断点续传在命令中使用 c 选项可以断点续传文件。如:

aria2c -c http://example.com/filename.txt

验证文件是否正确:
有的时候为了确认下载的文件时候正确或是否被人修改需要验证md5码,这里可以使用一下命令:

aria2c -c -x16 -s20 -j20 --checksum=md5=xxxxxxxxxxxxx http://example.com/filename.txt

其中md5可以修改成你需要的校检方法,后面的xxxxx改成正确的校检码。

高级篇
BT下载:

aria2c ‘xxx.torrnet‘
aria2c '磁力链接'

列出种子内容:

aria2c -S target.torrent

下载种子内编号为 1、4、5、6、7 的文件:

aria2c --select-file=1,4-7 target.torrent

设置BT端口:

aria2c --listen-port=51413 ‘xxx.torrent’

设置dht端口:

aria2c --dht-listen-port=51413 ‘xxx.torrent’

有的文件下载是需要引用页,我们可以这样输入如:

aria2c --referer=http://im.qq.com/qq/2011/ 'http://example.com/filename.txt'

有时我们需要错误信息时要加上–log如:

aria2c --log=xxx --referer=http://im.qq.com/qq/2011/  'http://example.com/filename.txt'

限速下载
单个文件最大下载速度:

aria2c --max-download-limit=300K -s10 -x10 -j10 'http://example.com/filename.txt'

整体下载最大速度:

aria2c --max-overall-download-limit=300k -s10 -x10 -j10 'http://example.com/filename.txt'

下载需要cookie验证的文件:

aria2c --header=“Cookie:cookie名称=cookie内容“ ‘http://example.com/filename.txt‘

aria2c --load-cookies=cookie文件 ‘http://example.com/filename.txt'

其中cookie文件需要自己手动导出,导出方法为chrome用户需使用此扩展,firefox需使用此扩展,使用扩展导出离线页面cookie命名为cookie_text

当然这样使用很麻烦所以我们可以通过alias来进行简化:

alias xunlei=’aria2c -s 6 -c –load-cookies=/home/user/cookie_text’

Ubuntu系统需要把此命令添加进.bashrc文件中

以后使用需要此cookies时只要使用下面命令即可:

xunlei “下载链接” -o xxx

好了,常用的几个命令就介绍到这里了,更多的使用方法可以使用。
man aria2c和aria2c -h 查看。

Oct 20

转自:http://www.techlw.com/2012/02/5-cool-themes-for-unitygnome-shell-in.html

You can install these themes easily in Ubuntu 12.04 Precise Pangolin/Ubuntu 11.10 Oneirc Ocelot/Linux Mint.

1. Zukitwo Colors Theme
This theme set contains GTK2, GTK3 and GNOME Shell themes in all 7 colours from Shiki-Colors (Brave, Dust, Human, Illustrious, Noble, Wine and Wise), as well as a colour-neutral GNOME Shell theme (Zukitwo-Colors) and Metacity/Mutter and XFWM themes for Dust (Zukitwo-Dust) and the rest (Zukitwo-Colors). (Zukitwo-Dust has separate Metacity/Mutter and XFWM themes as part of its colour-scheme.)

To install this theme open Terminal and enter command:

mkdir ~/.themes
wget -O zukitwo-colors http://goo.gl/QNt1b
tar -xzvf zukitwo-colors.tar.gz -C ~/.themes

2. ANew Start Theme
ANewStart suite is a slick, clear theme for GNOME desktop environment.
It’s designed to work under Gnome-Shell, Gnome-Fallback and Unity. For Unity and Gnome-Fallback mode, please read the README file inside the pack.

To install this theme open Terminal and enter command:

mkdir ~/.themes
wget -O anewstart http://goo.gl/Mk67J
unzip anewstart.zip -d ~/.themes

3. ANew Start Blood Theme
ANewStartBlood is the first attempt to port ANewStart guidelines in a dark fashion. Since the choices done here (this “bloodiness” that pervades all the theme) are surely tough to digest, maybe I’ll plan another more easy-going version.

To install this theme open Terminal and enter command:

mkdir ~/.themes
wget -O anewstartblood http://goo.gl/SJi9x
unzip anewstartblood.zip -d ~/.themes

4. Adwaita Cupertino Theme
Tested in GNOME 3.2 and Unity.
There are 2 versions, one based on the colors of Snow Leopard and the other Lion. Option border or border-less.

To install this theme open Terminal and enter command:

mkdir ~/.themes
wget -O adwaita-cupertino http://goo.gl/UGXOA
tar -xzvf adwaita-cupertino.tar.gz -C ~/.themes

5. Gnomish Dark Theme
This is a clean dark theme for GTK3, based on Adwaita (provided by gnome-themes-standard), plus a matching GNOME-Shell theme.
The package also includes a GTK2 theme, that depends on the latest Murrine engine and makes GTK2 windows fairly similar to GTK3 ones. If you don’t want to install Murrine anymore, you could replace the folder ‘gtk-2.0’ with that of Adwaita but you’ll lose the above-mentioned similarity.

To install this theme open Terminal and enter command:

mkdir ~/.themes
wget -O GnomishDark http://goo.gl/wVTmb
tar -xjvf GnomishDark.tar.bz2 -C ~/.themes