January 11, 2013

Install official VMWare-Tools via yum repository for RedHat and CentOS


Edit: RHEL 7 and CentOS 7 now officially recommends open-vm-tools via their own repository -- i.e. sudo yum -y open-vm-tools , then reboot -- that is all!  If you are still using RHEL/CentOS 5 or 6, then continue below:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(Sources: http://packages.vmware.com/tools/docs/manuals/index.html)

All instructions assuming root or sudo.

Special Note: May have to remove old versions prior to upgrades:
vmware-uninstall-tools.pl  or
rpm -e VmwareTools or
yum remove vmware-tools[-esx] or ..?..


First, add gpg keys for repositories:
wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
rpm --import ./VMWARE-PACKAGING-GPG-RSA-KEY.pub
rpm --import ./VMWARE-PACKAGING-GPG-DSA-KEY.pub


Adding the appropriate sources depend on Release-Version and Architecture:

(Tools version can be 4.0latest, 4.1latest, 5.0latest, or 5.1latest)
(Release can be rhel5 or rhel6)
(Architecture can be i386 or x86_64)

***** edit: Thanks to Anonymous (Nov 1 2013), please do not use "*latest" as VMWare now recommends the static url/folder.  Ex: "5.1u3". Find yours by traversing http://packages.vmware.com/tools/esx/ 
***** edit: As of Early 2014, I find "*.latest" is still working with ESXi 5.1 and CentoOS 6.5 -- proceed at your own discretion.

Confirm your distro with cat /etc/redhat-release

Confirm your architecture with uname -m (or -a) (if i686, use i386)

Create the repository file /etc/yum.repos.d/vmware-tools.repo and edit it to contain the following, based on the above confirmations and desired vmware version:
(your baseurl will be http://
packages.vmware.com/tools/esx/<version>/<release>/<architecture>)
(note various examples are commented with #)
----------------------------------------------------------------------------------------------
[vmware-tools]
name=VMware Tools

baseurl=http://packages.vmware.com/tools/esx/5.1latest/rhel6/x86_64
#baseurl=http://packages.vmware.com/tools/esx/5.1latest/rhel6/i386
#baseurl=http://packages.vmware.com/tools/esx/5.1latest/rhel5/i386
#baseurl=http://packages.vmware.com/tools/esx/5.1latest/rhel5/x86_64
#baseurl=http://packages.vmware.com/tools/esx/4.0latest/rhel6/x86_64
#baseurl=http://packages.vmware.com/tools/esx/4.0latest/rhel5/i686
#baseurl=http://packages.vmware.com/tools/esx/4.0latest/rhel6/i686
enabled=1
gpgcheck=1

----------------------------------------------------------------------------------------------
 

Installation for VMWare 4.x tools (option 1 or 2 exclusively):
option 1) 4.x including X11 dependencies:
yum install vmware-tools
option 2) 4.x excluding X11 dependencies (headless):

yum install vmware-tools-nox

Installation for VMWare 5.x tools:
Step 1) Confirm PAE or not (if not PAE, will not see it):
uname -a


Step 2) Install kmods: (option 1 or 2 exclusively)
Option 1) non-pae:
yum install vmware-tools-esx-kmods
Option 2) pae:
yum install vmware-tools-esx-kmods-PAE

Step3) Install tools: (option 1 or 2 exclusively)
Option 1) including X11 dependencies:
yum install vmware-tools-esx
Option 2) excluding X11 dependencies (headless):
yum install vmware-tools-esx-nox

Note, This can be done in one line, but "kmods" must be FIRST
yum install vmware-tools-esx-kmods[-kerneltype] vmware-tools-esx[-nox]
where [-kerneltype] is "-PAE" or nothing and "-nox" or not.

Therefore, this is the no pae, no X (headless) install command:
yum install vmware-tools-esx-kmods vmware-tools-esx-nox

~~~
As always, good luck!


Please consider crypto tipping:
  
-------------

January 05, 2013

Open .URL files in Linux


EDIT:  Comments to this post have very nice solutions, honorable mention goes to Trogdor's 3rd post using bash -c "cat %f | grep URL | cut -d'=' -f2 | xargs firefox &" but first place goes to Christian Schmidt for his grep 'URL=' < "$1" | cut -d'=' -f2 | xargs -n1 xdg-open .

That said, here is my original post (which may be worth it just for the gnome association circus):
-----------------------

I've a ton of .URL files, created by drag-and-drop from Mozilla Firefox within MS-Windows.  These files are not automatically usable in Linux, which really sucks.  Googling did provide the solution though, and here I'll share my notes:

Create a script named open-url.sh (i like to store my scripts in ~/scripts/) containing the following:
#!/bin/sh
# opens Windows .URL files in your default browser
# requires: xdg-open sed grep xargs
sed 's/^BASEURL=/URL=/' "$1" | grep -m 1 '^URL=' | sed 's/^URL=//' | sed 's/\r//' | xargs xdg-open

Now make it executable with chmod +x open-url.sh

Now you can associate .URL files with the script.  This might be the hard part, as I did fight with it in gnome; however, XFCE was straight forward.

If you are having particular problems in gnome, my notes report the following:
Duplicate the file /usr/share/applications/firefox.desktop into /usr/share/applications/web-link.desktop, and edit the latter to point to the script you created.

Edit: You may consider using ~/.local/share/applications/ instead. I've found it's easier for gnome to find the new .desktop here.

Edit: be sure to give it an appropriate Name= and GenericName=

Then associate the .URL files with the web-link.desktop file.

Edit: Possibly the best way to associate in gnome3 is right-click the file and "Open Other" choosing the new name you've given with the Name= from the .desktop previously edited. THEN, most importantly, right click the file again, then choose properties, and highlight the new name and click "Set as Default".

Additionally, even though Firefox was my default browser, my environment insisted on opening with Chromium.  I was forced to manipulate the xdg-open command.  Below are commands that may help you: xdg-open
xdg-settings get default-web-browser
xdg-settings set default-web-browser firefox.desktop
There is some chance, you may need to look into gnome-open or gvfs-open.

Edit: You can do OSX .webloc files too with the following script:
#!/bin/sh
# opens OSX .webloc files in your favourite browser
# requires: grep awk xdg-open
# or edit for similar like gnome-open
grep string "$1" | awk -F\> '{print $2}' | awk -F\< '{print $1}' | xargs xdg-open


You may wish to read http://steronius.blogspot.com/search/label/xdg-mime%20default for setting mime-types.

Good luck.
~~~

Please consider crypto tipping:
  

April 30, 2011

Hating (and Fixing) Natty's Unity

As a Ubuntu user on my primary home computer, i wanted the updated OS (Natty Narwhal 11.04) with newer 2.6.38 kernel for various updates, fixes, and Wacom compatibility. Sure some of these updates I had "patched" but that wasn't good enough.

I rebooted into Unity... It didn't seem so bad at first -- I'm also a Mac OSX user at work and it was very similar, albeit a poor, implementation of that. (I even have my dock on the left.)

After about 20 minutes I was no longer liking unity. But i wanted to enable my rotating desktop and continue to review unity. I ran the compizconfig-settings-manager from the menu, turned on the rotating cube effect, and thus began to completely bork unity. I lost the frames first and eventually lost the dock and title bar also.

Alt-tab and desktop switching was lost too and I was soon out of usability of my system. The only thing that really saved me was i already had "nautilus-open-terminal" installed so i was able to right-click the desktop for the terminal window.

It took awhile to search for the fixes, so I'll list them. You'll need to have the compiz settings manager installed:
sudo apt-get install compizconfig-settings-manager

It took quite awhile to find the command to launch it. In the terminal, run:
ccsm

Go to "preferences" toward the bottom left, and either select "default" or re-select "unity" this should re-load the frames, but i was forced to "sudo reboot" to get everything in order.

At this point, I non-verbally begged for gnome again. Again, it took awhile, but I found i could select the default interface by running
gdmsetup
from the terminal and selecting "Ubuntu Classic". This is already available for you if you have to login, but I had setup auto-login so it was not selectable for me.

Once I was rebooted again I followed the suggestions from http://ubuntuforums.org/showthread.php?t=1742581 to remove Unity completely and will unlikely attempt it again.

Also, I like the new overlay scrollbar, but often enough it slows effeciency down due to having to locate the scroll area; therefore, I zapped it from existence too:
sudo apt-get purge liboverlay-scrollbar-*

Please consider crypto tipping: