Monday, September 08, 2008

Linux下通过wine安装google chrome

Chrome还没有linux下完整可用的版本,如果你有兴趣编译,这里有linux下Chrome的编译指南

目前在linux下跑Chrome,wine成了唯一可能的方式,幸运的是,通过geek们的尝试,Chrome已经可以用wine驱动。

安装 wine

首先需要安装 wine 的最新版本 1.1.3。如果你是 Ubuntu 用户:

wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

For Ubuntu Hardy (8.04):

sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -O /etc/apt/sources.list.d/winehq.list

For Debian Etch (4.0):

sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/etch.list -O /etc/apt/sources.list.d/winehq.list
sudo apt-get update
sudo aptitude install wine

安装 winetricks

wget http://www.kegel.com/wine/winetricks
sudo cp winetricks /usr/local/bin

安装Chrome的依赖包

winetricks riched20 riched30 flash
winetricks allfonts

安装Chrome

wget http://gpdl.google.com/chrome/install/149.27/chrome_installer.exe
wine chrome_installer.exe

启动Chrome

Chrome安装完成后,无法直接启动,需要一点 hacking,我使用下面的小脚本代替 wine chrome 启动:

$ cat ~/bin/chrome
#!/bin/sh
Exec=env WINEPREFIX="$HOME/.wine" wine "C:\\windows\\profiles\\$LOGNAME\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chrome.exe" --new-http --in-process-plugins

Note: HTTPS 无法正常工作。

No comments:

Post a Comment