Fixing VMWARE tools on kali linux to enable copy paste properly - especially when you are doing OSCP

Hi Folks,

So if you are playing around with kali linux on a VM you might have faced the issue of getting the vmware tools work properly. Especially when you want to copy paste files and clipboard contents between guest and host. This is very annoying thing and took lot of my precious time when i was doing OSCP course. Here is how i fixed it.



My Setup


I run a kali linux distro on vmware player which is recommended for doing the OSCP course. By default it has GNOME as the default GUI. I kind of hate it as it uses lot of resources and has all those stupid animations and stuff. I want something clean and precise when i am working, i am not into looks and too many features, just the bare minimum responsive system is always my favourite.

So I installed LXDE which is light weight GUI for linux. you can install it with following command

apt-get install lxde-core lxde kali-defaults kali-root-login desktop-base


This will not make LXDE you default GUI, so if you reboot, you will need to choose LXDE from the menu while logging in. To make it default you can run the command

 update-alternatives --config x-session-manager

Now you will be presented with a wizard like interface to choose default GUI, choose LXDE if you want to make it default GUI.

First things First


First of all, Kali Linux new versions comes with open vm tools pre installed, this should supposedly enable all functionalities but unfortunately it doesn't work just like that. So typically eveyone installs VMware tools on top of this.

To fix it properly first remove any additional libraries that you have installed, in my case its vmware tools. To uninstall it you have to issue the command

/usr/bin/vmware-uninstall-tools.pl

if you have virtualbox additions you can uninstall it  by the something like this (based on version it may differ)

/opt/VBoxGuestAdditions-5.0.16/uninstall.sh

just make sure its all gone for good

sudo aptitude purge virtualbox-guest-x11 virtualbox-dbg virtualbox-dkms

Now uninstall open vm tools

aptitude purge open-vm-tools open-vm-tools-desktop open-vm-tools-dkms

Remove any residual files

rm -rf /etc/vmware-tools/

Now that everything is properly gone. Do a restart to clean up everything.


Lets start


Lets install open vm tools properly

apt-get install open-vm-tools open-vm-tools-desktop fuse

Now open the file /etc/rc.local on a text editor and add following lines towards the end of file just before the exit 0 statement

sudo mkdir /var/run/vmblock-fuse
sudo su -l -c "vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse"

Now create a file /root/.config/autostart/copypaste-autostart.desktop with following contents

[Desktop Entry]
Type=Application
Name=copypaste start
Comment=Start copy paste and drag n drop for vm tools
Exec=/root/Desktop/OSCP/setup/cpaste.sh
OnlyShowIn=LXDE
Now create a file /root/Desktop/OSCP/setup/cpaste.sh  (note: you can create in any location, just make sure to add that location on the previous step file contents for parameter Exec) with following contents

#!/bin/sh -e
sudo chmod u+s /usr/bin/vmware-user-suid-wrapper
vmware-user-suid-wrapper


Thats it. Now restart and you should have copy paste functionality working properly. In case drag and drop does not work, just right click copy and then paste it works everytime for me.

Enjoy. Please do provide your feedback. 





Comments

  1. Take your business to new heights with our innovative virtual advertising answers. From content advertising to conversion optimization, we will assist you acquire amazing results and surpass your competition. Here at quadrobits.com

    ReplyDelete
  2. Follow some steps, After the installation is complete, reboot your Kali Linux system, After rebooting, make sure the open-vm-tools service is running, let us know if you face difficulty we have experts who provide many types of business research paper for students and help them in their academics.

    ReplyDelete
  3. It changed my life when I came into this useful tutorial on how to repair VMware Tools on Kali Linux. The procedure went considerably more smoothly thanks to the blog's step-by-step directions, especially for someone like myself who is still getting the hang of things. As a student and finding Masters Dissertation Proposal Services Uk and also Thank you for the troubleshooting instructions; they really saved my life. The explanations were really clear. I'm grateful that the author shared this important information since it helped me save a lot of time and frustration. Anticipating more thought-provoking postings like to this one!

    ReplyDelete
  4. pg ยอดเยี่ยมเกมออนไลน์สล็อตบนมือถือแบบใหม่ปัจจุบันของโลกสมัครเล่น PG SLOT วันนี้ไม่มีเบื่อไม่ซ้ำซากในแบบการเล่นเดิมๆอีกต่อไปเป็นเกมสล็อตที่แจ๊คพอตแตกหลายครั้งที่สุดลองเลย

    ReplyDelete
  5. Has anyone managed to go through the hard ground of dissertation? May I have some priceless advice and referrals for legitimate Dissertation Help platforms? Are there any credible sites or sources that have hugely contributed to your research and writing process?

    ReplyDelete

Post a Comment