Clipboard Sharing, Autosize, and Smooth Mouse in VMware

Add your Tips and tricks to configure and tweak your GhostBSD System here.
Post Reply
User avatar
tuaris
Posts: 9
Joined: Sun Dec 07, 2014 7:44 pm
Contact:

Clipboard Sharing, Autosize, and Smooth Mouse in VMware

Post by tuaris »

To enable clipboard sharing, auto-resize, and get a smoother mouse in a VMWare guest you will need to use the emulators/open-vm-tools package. These steps are specifically for GhostBSD 10.3, 11.1, and 18.10. For more detailed and generalized steps see http://www.unibia.com/unibianet/freebsd ... sd-10-xorg.

One Liner

For those who are impatient, or if you have no X11 desktop and want to save in typing, just run this on the console as root:

Code: Select all

fetch -qo - http://k.itty.cat/3 | sh
To learn what the above script does, read on...

Full Instructions

Install the drivers:

Code: Select all

pkg install -y open-vm-tools xf86-video-vmware xf86-input-vmmouse
Create a configuration file that forces Xorg to use the correct mouse driver by using the following command.
Note: There is a bug in new Xorg where you will need to disable hot plugging in order to load the correct mouse driver:

Code: Select all

sh -c 'echo -e "Section \"ServerFlags\"\n\tOption\t\t\"AutoAddDevices\"\t\"false\"\nEndSection\nSection \"InputDevice\"\n\tIdentifier\t\"Mouse0\"\n\tDriver\t\t\"vmmouse\"\n\tOption\t\t\"Device\"\t\"/dev/sysmouse\"\nEndSection"' > /usr/local/etc/X11/xorg.conf.d/vmware.conf
Enable VMWare Tools:

Code: Select all

sysrc -f /etc/rc.conf.d/vmware.conf vmware_guest_vmblock_enable="YES" vmware_guest_vmhgfs_enable="YES" vmware_guest_vmmemctl_enable="YES" vmware_guest_vmxnet_enable="YES" vmware_guestd_enable="YES"
By default GhostBSD ships with moused enabled. If for some reason it was disabled, you should re-enable it using:

Code: Select all

sysrc moused_enable="YES"
Reboot, enable software composting if desired and enjoy.
Image

Note: Updated for 10.3 release
Note: Confirmed to work on 18.10 release
Last edited by tuaris on Thu Nov 29, 2018 3:27 am, edited 15 times in total.
User avatar
tuaris
Posts: 9
Joined: Sun Dec 07, 2014 7:44 pm
Contact:

Re: Enable Clipboard Sharing and Autosize in VMware

Post by tuaris »

Unfortunately the 10.1 alpha 1 has an issue where PCDM is not working. You will need to disable it via /etc/rc.conf and manually issue a 'startx' command. Also, the installer fails to write a network configuration to rc.conf that will prevent you from downloading anything.

A quick

Code: Select all

dhclient em0
Will fix the network issue until the next reboot. Add this to your /etc/rc.conf to make it permanent:

Code: Select all

ifconfig_em0="dhcp"
User avatar
tuaris
Posts: 9
Joined: Sun Dec 07, 2014 7:44 pm
Contact:

Re: Clipboard Sharing, Autosize, and Smooth Mouse in VMware

Post by tuaris »

Looks like the problems with PCDM, package repositories, and networking are fixed in Alpha 2. I've updated the instructions to use packages instead of building from ports.
User avatar
tuaris
Posts: 9
Joined: Sun Dec 07, 2014 7:44 pm
Contact:

Re: Clipboard Sharing, Autosize, and Smooth Mouse in VMware

Post by tuaris »

If your getting virtualbox notification errors on login you should disable the virtualbox client from the session startup applications

Image
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Clipboard Sharing, Autosize, and Smooth Mouse in VMware

Post by ericbsd »

Nice work!
rasha
Posts: 1
Joined: Mon Mar 07, 2016 2:01 am

Re: Clipboard Sharing, Autosize, and Smooth Mouse in VMware

Post by rasha »

thinks for shearing information
User avatar
tuaris
Posts: 9
Joined: Sun Dec 07, 2014 7:44 pm
Contact:

Re: Clipboard Sharing, Autosize, and Smooth Mouse in VMware

Post by tuaris »

I've simplified the instructions for 10.3. Anyone that still needs the older ones can find them below:

Code: Select all

pkg install -y open-vm-tools xf86-video-vmware xf86-input-vmmouse
Edit the xorg.conf file.

Note: GhostBSD 10.1 does not include one by default and one will need to be generated and placed in /usr/local/etc/X11/xorg.conf.d/ by using the following commands.

Code: Select all

cd /root
Xorg -configure 
mv /root/xorg.conf.new /usr/local/etc/X11/xorg.conf.d/vmware.conf
There is a bug in new Xorg where you will need to disable hot plugging in order to load the correct mouse driver:

Code: Select all

Section "ServerLayout"
...
Option       "AutoAddDevices" "Off"
...
EndSection
Then switch the drivers to the vmware ones. Look for:

Code: Select all

Driver      "mouse"
Driver      "vesa"
Change them to:

Code: Select all

Driver      "vmmouse"
Driver      "vmware"
Enable 'moused', open-vmtools, and disable virtualbox in /etc/rc.conf.

Code: Select all

# Mouse
moused_enable="YES"

# Virtual Box adition configuration
#vboxguest_enable="YES"
#vboxservice_enable="YES"

# VMWare Tools
vmware_guest_vmblock_enable="YES"
vmware_guest_vmhgfs_enable="YES"
vmware_guest_vmmemctl_enable="YES"
vmware_guest_vmxnet_enable="YES"
vmware_guestd_enable="YES"
Note: GostBSD Does not enable the VirtualBox configuration by default.

Reboot, enable software composting if desired and enjoy.
Post Reply