Saturday, August 12, 2017

How to install OpenVPN

How to install OpenVPN and how to make it accessible through the built-in Network GUI on Ubuntu 16.04.3.

Here's how;

1.  Open a Terminal window.

2.  Type the following two commands, hitting ENTER after each.

      sudo apt-get install openvpn

      sudo apt-get install network-manager-openvpn-gnome

3.  That's it, your done with software install part.



To add an openVPN connection make sure you've got your KEY file from your VPN provider, mine had a .opvn extension.

1.  Click on your Network Indicator icon and select EDIT CONNECTIONS.

2.  Click on the ADD button.

3. Click on the little arrow in the Drop Down Box (beside ETHERNET)

4. Select the IMPORT A SAVED VPN CONFIGURATION option.

5.  Browse to and select your .OVPN Key file you got from your VPN provider.

6.  Fill in your USER NAME and PASSWORD and click on the SAVE button.


That's it your done, your VPN has been added.  Just Click on the Network Indicator icon (from step 1) and select VPN Connections and pick your newly created VPN connection to connect to it.



Tuesday, August 08, 2017

Changing the Alt+Left Mouse Click action to work with Photoshop CS2

After doing a fresh install of Ubuntu 16.04.3 and reinstalling WINE 2.01 I couldn't use any of the Photoshop CS2 tools that need the an ALT+Left Mouse Click.  Ubuntu would intercept this key combo and would initiate a Windows Move action instead of the tool action.

To change Alt+Left Mouse Click action from "Move Window" in Ubuntu 16.04.3 you will need to do the following:

1.  Open Ubuntu Software Center, search for and install  CompizConfig Settings Manager or CCSM.

2.  Once installed start CompizConfig Settings Manager and click on the Windows Management button on the left.

3.  Then click on the Move Window option.

4. Now Uncheck the Initiate Window Move which should disable it.

5.  Or you can also select a different Key Combination to activate the Initiate Window Move action if you use that feature or if disabling it doesn't work for you.

Your done.  You should now be able to use your Alt+Left Mouse Click in WINE with Photoshop CS2 or any other app that needs that key combo. (I changed mine to <SUPER><Left Mouse Click> which worked for me).


WINE, Photoshop CS2, "Unable to continue because of a hardware or system error. Sorry, but this error is unrecoverable."

I did a clean install of Ubuntu 16.04.3 including the 4.10 Linux kernel after a system crash.  When I did, I had to do a fresh clean install of WINE 2.01.  I then installed Adobe Photoshop CS2 from an ISO of it's install CD.  It installed just fine with no errors and it booted once.  When I tried to start it a second time it crashes upon startup with an "Unable to continue because of a hardware or system error. Sorry, but this error is unrecoverable." This error now occurs on every time I tried to start it.  Rebooting and nothing else I found fixed this.  After a lot of Googling I found a solution that worked and I figured out how you can avoid this problem altogether.

HOW TO AVOID THIS PROBLEM

To avoid the "unrecoverable hardware error" problem with Photoshop CS2 under WINE do the following BEFORE YOU INSTALL PHOTOSHOP CS2:

1. Search for and install WINETRICKS from you Ubuntu Software Center.

2. Launch (run) WINETRICKS (in Terminal type winetricks)

3. Check the "Select the Default Wineprefix" and click OK.

4.  Check "Install a Font" and click OK.

5. Check all the Microsoft Fonts including CORE FONTS and click OK.

6. Wait until it finishes doing the installs.

7. Once it's finished just install install Photoshop CS2 as usual under WINE.

By installing the Microsoft CORE FONTS first you should have avoided the problem and your Photoshop install should be able to boot every time.


HOW TO FIX THE PROBLEM

If you installed Photoshop CS2 before the CORE FONTS and you've ran it more than once and you're getting the error message "Unable to continue because of a hardware or system error. Sorry, but this error is unrecoverable." do the following to fix it:

Using Nautilus (or your favorite file browser) navigate to:
Replace [USER NAME] with your user name.

/home/[USER NAME]/.wine/drive_c/users/[USER NAME]/Application Data/Adobe/Photoshop/9.0/Adobe Photoshop CS2 Settings/

 NOTE:  In Nautilus you'll have to go to VIEW and select SHOW HIDDEN FILES to see the .wine directory.


Once in the /home/[USER NAME]/.wine/drive_c/users/[USER NAME]/Application Data/Adobe/Photoshop/9.0/Adobe Photoshop CS2 Settings/ directory do the folowing:

1. Delete the corrupted file, Adobe Photoshop CS2 Prefs.psp or rename it.

2. Start Photoshop CS2.

3. After Photoshop CS2 has started and while Photoshop CS2 is running,  navigate back to the /home/[USER NAME]/.wine/drive_c/users/[USER NAME]/Application Data/Adobe/Photoshop/9.0/Adobe Photoshop CS2 Settings/ directory and copy the newly re-created Adobe Photoshop CS2 Prefs.psp file to a safe known location (make a copy of it).

4. Close Photoshop CS2, which will corrupt the Adobe Photoshop CS2 Prefs.psp file in that directory. (this is why we made a copy and put it in a safe known place).

5. With Photoshop CS2 closed, copy our good copy of Adobe Photoshop CS2 Prefs.psp (the one we put in a safe known place in step 3) back to the  /home/[USER NAME]/.wine/drive_c/users/[USER NAME]/Application Data/Adobe/Photoshop/9.0/Adobe Photoshop CS2 Settings/ directory, replacing the corrupt one.

DO NOT RESTART PHOTOSHOP YET DO STEP 6 FIRST.

6.  Now install the CORE FONTS by doing the steps 1-6 in the above HOW TO AVOID THIS PROBLEM section (DO NOT DO STEP 7, don't reinstall Photoshop or you'll just recreate the problem).

That's it, you should now be able to start and use Photoshop CS2 as much as you want now.  But we are still not done.  On Ubuntu the ALT key + Left Mouse Click is mapped to a Move Windows Function and won't let you use it with certain tools in Photoshop (i.e. Clone Tool).  Don't worry we can fix this too but that will be in the next article.

Monday, August 07, 2017

Update to 16.04.3 Broke Nvidia Drivers

I tried to force an update to 16.04.3 with the 4.10 kernel and it crashed my Nvidia graphic drivers. This was not unusual as I've had to reinstall my graphic's drivers before after a kernel update.  When I followed my usual steps, it didn't work.  I tried uninstalling the drivers, purging them and even tried to reinstall the generic stock graphic drivers.  In the end I just trashed my system to the point where it wouldn't boot.

By "Forced an Update" I mean updating my Linux Kernel with the following command;
(I recommend against doing this if you're using priority Nvidia Drivers unless they are up-to-date)

sudo apt install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04

As I said that command crashed me, so be careful.  After I did a total reinstall using the 16.04.3 ISO with the 4.10 kernel it worked just fine with priority Nvidia driver.  I noticed I was using and trying to reinstall the NVIDIA-Linux-x86_64-361.45.11 version of the driver when it crashed me.  After the clean install and using the Ubuntu Priority Video Driver Install it worked but the the driver version was NVIDIA-Linux-x86_64-375.66 so maybe if I used the newer driver I wouldn't have trashed my system. (Note the newest is NVIDIA-Linux-x86_64-384.59 but I was scared to try it :-)  )

The data in the Home directory was still readable and I had a newer/bigger SSD laying around so I decided to just start fresh with a clean install.  The reinstall went well and I recovered all the data including my Virtualbox VM's.  The only problem I had was with Photoshop CS2 under wine 2.01.  It wasn't WINE's fault it was mine.  I eventually fixed it and I'll do another post on what went wrong, how to fix it, and how to avoid it.