1

I want to run VMWare Player as root (because I understand this is the only way that allows me to pass a raw hard drive to my VM).

I am able to start Player from the terminal with "sudo -i vmplayer" but I can't get it to launch from the GUI. I have created a .desktop file, I have tried a shell file (allow to execute as a program), I have tried the menu editor and edited the line with which vmplayer is invoked to include sudo but nothing works. It just doesn't do anything (on the desktop).

What do I need to do to be able to just click on an icon in my favorites bar and launch vmplayer as root?

Thanks for your help.

shooboo
  • 11

1 Answers1

1

This answer is based on How to run .desktop icon from sudo:

  1. Open your terminal and run this command

    cd /usr/share/applications
    

    Or

    cd /usr/local/share/applications
    

    where the vmware-player.desktop file exists

  2. After that run this command

    sudo gedit vmware-player.desktop
    
  3. Replace

    Exec=sudo /usr/bin/vmplayer %u
    
  4. Save the file and run this command below

    sudo visudo
    
  5. Add the following line at the end of your file

    <your-username> ALL=NOPASSWD: /usr/bin/vmplayer
    
  6. Type your user name, save the file and check that your applications is there.

Hope this helps.