1。首先下载linux-headers,并且确保你已经装了gcc和g++,如果没有,apt-get it。
sudo apt-get install linux-headers-$(uname -r)
2。装vmware-tools,简单说一下
tar xzf VMware-workstation-5.0.0-13124.tar.gz
sudo ./vmware-install.pl
装的过程中先不要运行vmware-config.pl
3。按照下面的说明编辑/usr/bin/vmware-config-tools.pl。
或到http://forum.ubuntu.org.cn/viewtopic.php?t=16120下载我已经编辑好的vmware-config-tool.rar, 解压缩后把里面的vmware-config-tools.pl直接copy到/usr/bin,覆盖同名文件。
**************************************
find
**************************************
# BEGINNING OF THE SECOND LIBRARY FUNCTIONS
# Global variables
my %gDBAnswer;
my %gDBFile;
my %gDBDir;
my $cBackupExtension = '.BeforeVMwareToolsInstall';
my $cRestorePrefix = 'RESTORE_';
my $cRestoreBackupSuffix = '_BAK';
my $cRestoreBackList = 'RESTORE_BACK_LIST';
my $cSwitchedToHost = 'SWITCHED_TO_HOST';
my $cXModulesDir = '/usr/X11R6/lib/modules';
my $cX64ModulesDir = '/usr/X11R6/lib64/modules';
my $gXMouseDriverFile = '';
my $gXVideoDriverFile = '';
my $gIs64BitX = 0;
**************************************
below add
**************************************
# The location of the modules dir has changed in X.org 7
my $cXModulesDir7 = '/usr/lib/xorg/modules';
my $cX64ModulesDir7 = '/usr/lib64/xorg/modules';
**************************************
find
**************************************
sub xserver_bin {
return '/usr/X11R6/bin';
}
**************************************
below add
**************************************
sub xserver7 {
return '/usr/bin/X';
}
**************************************
find
**************************************
$x_server_file = xserver6();
**************************************
below add
**************************************
} elsif ($x_version == 7) {
$x_server_file = xserver7();
**************************************
find (make sure to find the CORRECT one)
**************************************
set_uid_X_server($x_server_file);
}
**************************************
below add
**************************************
sub xorg_7 {
my $xconfig_path = '/etc/X11';
my $xconfig_file_name = 'xorg.conf';
my $xversion = 7;
my $xversionAll = '';
my $xserver_link = '';
my $major;
my $minor;
my $sub;
$xversionAll = direct_command(shell_string(xserver7()) . ' -version 2>&1') =~
/X Protocol Version 11.* Release (/d+/./d+)/ ? $1 : '0.0.0';
if (defined $ENV{'XORGCONFIG'} && file_name_exist('/etc/X11/' .
$ENV{'XORGCONFIG'})) {
$xconfig_path = '/etc/X11';
$xconfig_file_name = $ENV{'XORGCONFIG'};
} elsif (defined $ENV{'XORGCONFIG'} &&
file_name_exist('/usr/X11R6/etc/X11/' . $ENV{'XORGCONFIG'})) {
$xconfig_path = '/usr/X11R6/etc/X11';
$xconfig_file_name = $ENV{'XORGCONFIG'};
} elsif (file_name_exist('/etc/X11/xorg.conf-4')) {
$xconfig_path = '/etc/X11';
$xconfig_file_name = 'xorg.conf-4';
} elsif (file_name_exist('/etc/X11/xorg.conf')) {
$xconfig_path = '/etc/X11';
$xconfig_file_name = 'xorg.conf';
} elsif (file_name_exist('/etc/xorg.conf')) {
$xconfig_path = '/etc';
$xconfig_file_name = 'xorg.conf';
} elsif (file_name_exist('/usr/X11R6/etc/X11/xorg.conf-4')) {
$xconfig_path = '/usr/X11R6/etc/X11';
$xconfig_file_name = 'xorg.conf-4';
} elsif (file_name_exist('/usr/X11R6/etc/X11/xorg.conf')) {
$xconfig_path = '/usr/X11R6/etc/X11';
$xconfig_file_name = 'xorg.conf';
} elsif (file_name_exist('/usr/X11R6/lib/X11/xorg.conf-4')) {
$xconfig_path = '/usr/X11R6/lib/X11';
$xconfig_file_name = 'xorg.conf-4';
} elsif (file_name_exist('/usr/X11R6/lib/X11/xorg.conf')) {
$xconfig_path = '/usr/X11R6/lib/X11';
$xconfig_file_name = 'xorg.conf';
}
print wrap("/n/n" . 'Detected X.org version ' . $xversionAll . '.'
. "/n/n", 0);
($major, $minor, $sub) = split_X_version($xversionAll);
# If there is an existing driver, replace it by ours.
if ($major == 7) {
backup_file_to_restore($gXVideoDriverFile, 'OLD_X4_DRV');
if (file_name_exist($gXVideoDriverFile)) {
unlink $gXVideoDriverFile;
}
# Install the drivers.
my %p;
undef %p;
if ($minor == 0) {
# This is the best driver we can install for X.org 7.0.0
install_file(db_get_answer('LIBDIR') . '/configurator/XOrg/6.8.x' .
($gIs64BitX ? '_64' : '') . '/vmware_drv.o',
$gXVideoDriverFile, /%p, 1);
install_file(db_get_answer('LIBDIR') . '/configurator/XOrg/6.8.x' .
($gIs64BitX ? '_64' : '') . '/vmmouse_drv.o',
$gXMouseDriverFile, /%p, 1);
} else {
print wrap("/n/n" . 'No mouse driver for X.org version: ' . $xversionAll . '.'
. "/n/n", 0);
}
fix_X_link('7');
} else {
error ('Problem extracting verion of X.org' . "/n/n");
}
return ($xversion, xconfig_file_abs_path($xconfig_path, $xconfig_file_name),
$xversionAll);
}
**************************************
find
**************************************
if (file_name_exist(xserver6())) {
**************************************
REPLACE by
**************************************
if (file_name_exist(xserver7())) {
if (is64BitElf(xserver7())) {
$gIs64BitX = 1;
# 64-bit FreeBSD puts it's 64-bit X modules in lib not lib64
if (vmware_product() ne 'tools-for-freebsd') {
$gXMouseDriverFile = "$cX64ModulesDir7/input/vmmouse_drv.o";
$gXVideoDriverFile = "$cX64ModulesDir7/drivers/vmware_drv.o";
} else {
$gXMouseDriverFile = "$cXModulesDir7/input/vmmouse_drv.o";
$gXVideoDriverFile = "$cXModulesDir7/drivers/vmware_drv.o";
}
} else {
$gXMouseDriverFile = "$cXModulesDir7/input/vmmouse_drv.o";
$gXVideoDriverFile = "$cXModulesDir7/drivers/vmware_drv.o";
}
($xversion, $xconfig_file, $xversionAll) = xorg_7();
} elsif (file_name_exist(xserver6())) {
**************************************
SAVE & CLOSE the file
**************************************
4。下载http://ftp.cvut.cz/vmware/vmware-any-any-update101.tar.gz
下载http://ftp.cvut.cz/vmware/vmware-tools-any-update1.tar.gz
5。解压缩这两个文件,并用vmware-tools-any-update1里的runme.pl替换vmware-any-any-update101里的同名文件。
6。现在进入vmware-any-any-update101并运行 ./runme.pl
7。运行结束后,你还需要手工把/usr/lib/vmware-tools/configurator/XOrg/6.8.x/vmmouse_drv.o 拷贝到/usr/lib/xorg/modules/input/
8。用 sudo vi /etc/X11/xorg.conf 打开文件,并找到
Section "InputDevice"
Identifier "Configued Mouse"
Driver "mouse" 这儿改为 Driver "vmmouse"
Option "Protocol" "ps/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "yes"
EndSection
9。重起,应该一切就OK了!
May this will help you a little!
If you have any question,you can refer to these two articles:
http://www.vmware.com/community/thread.jspa?threadID=36866&tstart=0
https://wiki.ubuntu.com/VmWare
sudo apt-get install linux-headers-$(uname -r)
2。装vmware-tools,简单说一下
tar xzf VMware-workstation-5.0.0-13124.tar.gz
sudo ./vmware-install.pl
装的过程中先不要运行vmware-config.pl
3。按照下面的说明编辑/usr/bin/vmware-config-tools.pl。
或到http://forum.ubuntu.org.cn/viewtopic.php?t=16120下载我已经编辑好的vmware-config-tool.rar, 解压缩后把里面的vmware-config-tools.pl直接copy到/usr/bin,覆盖同名文件。
**************************************
find
**************************************
# BEGINNING OF THE SECOND LIBRARY FUNCTIONS
# Global variables
my %gDBAnswer;
my %gDBFile;
my %gDBDir;
my $cBackupExtension = '.BeforeVMwareToolsInstall';
my $cRestorePrefix = 'RESTORE_';
my $cRestoreBackupSuffix = '_BAK';
my $cRestoreBackList = 'RESTORE_BACK_LIST';
my $cSwitchedToHost = 'SWITCHED_TO_HOST';
my $cXModulesDir = '/usr/X11R6/lib/modules';
my $cX64ModulesDir = '/usr/X11R6/lib64/modules';
my $gXMouseDriverFile = '';
my $gXVideoDriverFile = '';
my $gIs64BitX = 0;
**************************************
below add
**************************************
# The location of the modules dir has changed in X.org 7
my $cXModulesDir7 = '/usr/lib/xorg/modules';
my $cX64ModulesDir7 = '/usr/lib64/xorg/modules';
**************************************
find
**************************************
sub xserver_bin {
return '/usr/X11R6/bin';
}
**************************************
below add
**************************************
sub xserver7 {
return '/usr/bin/X';
}
**************************************
find
**************************************
$x_server_file = xserver6();
**************************************
below add
**************************************
} elsif ($x_version == 7) {
$x_server_file = xserver7();
**************************************
find (make sure to find the CORRECT one)
**************************************
set_uid_X_server($x_server_file);
}
**************************************
below add
**************************************
sub xorg_7 {
my $xconfig_path = '/etc/X11';
my $xconfig_file_name = 'xorg.conf';
my $xversion = 7;
my $xversionAll = '';
my $xserver_link = '';
my $major;
my $minor;
my $sub;
$xversionAll = direct_command(shell_string(xserver7()) . ' -version 2>&1') =~
/X Protocol Version 11.* Release (/d+/./d+)/ ? $1 : '0.0.0';
if (defined $ENV{'XORGCONFIG'} && file_name_exist('/etc/X11/' .
$ENV{'XORGCONFIG'})) {
$xconfig_path = '/etc/X11';
$xconfig_file_name = $ENV{'XORGCONFIG'};
} elsif (defined $ENV{'XORGCONFIG'} &&
file_name_exist('/usr/X11R6/etc/X11/' . $ENV{'XORGCONFIG'})) {
$xconfig_path = '/usr/X11R6/etc/X11';
$xconfig_file_name = $ENV{'XORGCONFIG'};
} elsif (file_name_exist('/etc/X11/xorg.conf-4')) {
$xconfig_path = '/etc/X11';
$xconfig_file_name = 'xorg.conf-4';
} elsif (file_name_exist('/etc/X11/xorg.conf')) {
$xconfig_path = '/etc/X11';
$xconfig_file_name = 'xorg.conf';
} elsif (file_name_exist('/etc/xorg.conf')) {
$xconfig_path = '/etc';
$xconfig_file_name = 'xorg.conf';
} elsif (file_name_exist('/usr/X11R6/etc/X11/xorg.conf-4')) {
$xconfig_path = '/usr/X11R6/etc/X11';
$xconfig_file_name = 'xorg.conf-4';
} elsif (file_name_exist('/usr/X11R6/etc/X11/xorg.conf')) {
$xconfig_path = '/usr/X11R6/etc/X11';
$xconfig_file_name = 'xorg.conf';
} elsif (file_name_exist('/usr/X11R6/lib/X11/xorg.conf-4')) {
$xconfig_path = '/usr/X11R6/lib/X11';
$xconfig_file_name = 'xorg.conf-4';
} elsif (file_name_exist('/usr/X11R6/lib/X11/xorg.conf')) {
$xconfig_path = '/usr/X11R6/lib/X11';
$xconfig_file_name = 'xorg.conf';
}
print wrap("/n/n" . 'Detected X.org version ' . $xversionAll . '.'
. "/n/n", 0);
($major, $minor, $sub) = split_X_version($xversionAll);
# If there is an existing driver, replace it by ours.
if ($major == 7) {
backup_file_to_restore($gXVideoDriverFile, 'OLD_X4_DRV');
if (file_name_exist($gXVideoDriverFile)) {
unlink $gXVideoDriverFile;
}
# Install the drivers.
my %p;
undef %p;
if ($minor == 0) {
# This is the best driver we can install for X.org 7.0.0
install_file(db_get_answer('LIBDIR') . '/configurator/XOrg/6.8.x' .
($gIs64BitX ? '_64' : '') . '/vmware_drv.o',
$gXVideoDriverFile, /%p, 1);
install_file(db_get_answer('LIBDIR') . '/configurator/XOrg/6.8.x' .
($gIs64BitX ? '_64' : '') . '/vmmouse_drv.o',
$gXMouseDriverFile, /%p, 1);
} else {
print wrap("/n/n" . 'No mouse driver for X.org version: ' . $xversionAll . '.'
. "/n/n", 0);
}
fix_X_link('7');
} else {
error ('Problem extracting verion of X.org' . "/n/n");
}
return ($xversion, xconfig_file_abs_path($xconfig_path, $xconfig_file_name),
$xversionAll);
}
**************************************
find
**************************************
if (file_name_exist(xserver6())) {
**************************************
REPLACE by
**************************************
if (file_name_exist(xserver7())) {
if (is64BitElf(xserver7())) {
$gIs64BitX = 1;
# 64-bit FreeBSD puts it's 64-bit X modules in lib not lib64
if (vmware_product() ne 'tools-for-freebsd') {
$gXMouseDriverFile = "$cX64ModulesDir7/input/vmmouse_drv.o";
$gXVideoDriverFile = "$cX64ModulesDir7/drivers/vmware_drv.o";
} else {
$gXMouseDriverFile = "$cXModulesDir7/input/vmmouse_drv.o";
$gXVideoDriverFile = "$cXModulesDir7/drivers/vmware_drv.o";
}
} else {
$gXMouseDriverFile = "$cXModulesDir7/input/vmmouse_drv.o";
$gXVideoDriverFile = "$cXModulesDir7/drivers/vmware_drv.o";
}
($xversion, $xconfig_file, $xversionAll) = xorg_7();
} elsif (file_name_exist(xserver6())) {
**************************************
SAVE & CLOSE the file
**************************************
4。下载http://ftp.cvut.cz/vmware/vmware-any-any-update101.tar.gz
下载http://ftp.cvut.cz/vmware/vmware-tools-any-update1.tar.gz
5。解压缩这两个文件,并用vmware-tools-any-update1里的runme.pl替换vmware-any-any-update101里的同名文件。
6。现在进入vmware-any-any-update101并运行 ./runme.pl
7。运行结束后,你还需要手工把/usr/lib/vmware-tools/configurator/XOrg/6.8.x/vmmouse_drv.o 拷贝到/usr/lib/xorg/modules/input/
8。用 sudo vi /etc/X11/xorg.conf 打开文件,并找到
Section "InputDevice"
Identifier "Configued Mouse"
Driver "mouse" 这儿改为 Driver "vmmouse"
Option "Protocol" "ps/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "yes"
EndSection
9。重起,应该一切就OK了!
May this will help you a little!
If you have any question,you can refer to these two articles:
http://www.vmware.com/community/thread.jspa?threadID=36866&tstart=0
https://wiki.ubuntu.com/VmWare