Install Photoshop and other Windows apps and games in Ubuntu

Photoshop CC 2015 on Ubuntu 16.04 "Xenial"

Photoshop CC 2015 on Ubuntu 16.04 “Xenial”

Photoshop CC 2015 is listed with a “Gold” rating at WineHQ which is great news. I can confirm that it runs under Ubuntu Xenial 16.04.

In addition there are a lot of other apps and games that can be installed. Below I give examples for installing Kindle and Notepad++.

We are going to be installing the latest development version of Wine from the official WineHQ PPA. We will also need the most recent development version of winetricks. See below for complete installation instructions.

Here is the page at WineHQ for Photoshop CC 2015 (there are also pages for other versions).

Here’s the entire process in a nutshell:

Install very latest Wine from the official Wine PPA:

sudo apt-key add Release.key
sudo apt-add-repository ''
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel mono-complete

Download winetricks:
(Note: I like to put it in my ~/bin directory. If you do make sure your ~/.profile is set to include ~/bin in $PATH although it is not strictly required in the steps below.)

wget; chmod +x winetricks; mv winetricks ~/bin

Create 32-bit prefix exclusively for Photoshop:

WINEARCH=win32 WINEPREFIX=~/.photoshop32 ~/bin/winetricks

Select Install an application but once the list of available applications show, click Cancel.

In the next window that appears select Install a Windows DLL or Component. In the list of available components select and install the following:

atmlib gdiplus msxml3 msxml6 vcrun2005 vcrun2005sp1 vcrun2008

Back at the previous screen select Install a font and select and install the following:

corefonts lucida tahoma unifont

Back at the previous screen select Change settings. Select the following and click OK:

fontsmooth=rgb win7

Note that the list of above components reported to work by different people at the WineHQ site varies but for certain you need atmlib and gdiplus and you must set the Windows version to win7. You may want to try changing or removing other components.

As noted on the WineHQ page for Photoshop CC 2015 there may font rendering issues related to the gdiplus library. In winetricks select Run winecfg and then in the winecfg Libraries tab select *gdiplus and press the Edit button. Change it from Native (Windows) to Builtin (Wine).

Install Photoshop (32-bit):

WINEPREFIX=~/.photoshop32 WINEARCH=win32 wine Set-up.exe

The installer will open and you can run a normal install.

IMPORTANT: On my system at about 25% into the installation it appears to fail and says “Installation Failed. Your installation encountered errors.”  However the installation is still running in the background.  Its important to wait several minutes and allow the installation to complete.  Wait for all hard disk activity to cease.

Once it is installed there will be an entry in ~/.local/share/applications/wine/Programs/ named Adobe Photoshop CC 2015 (32 Bit).desktop

In the Plasma menu under Applications -> Wine -> Programs there is an entry for Adobe Photoshop CC 2015 (32 Bit) and it does run.

If you need to wipe everything and try again

rm -rf ~/.photoshop32 ~/.local/share/applications/wine*

This wipes everything and gives you a completely clean slate. Obviously use with caution if you have other Wine apps installed.

Install Adobe Acrobat DC
In order to install Adobe Acrobat DC I had to first install it on a Windows system. When you install it it will ask where you want to extract the contents of the installation package. I choose to install it into a subfolder inside the same folder that the installation package is in. The extract subfolder will contain the Setup.exe that is needed to install Acrobat in Wine. Then copy the folder to your Linux system.

mkdir -p ~/.wine/acrobat_dc
WINEARCH=win32 WINEPREFIX=~/.wine/acrobat_dc ~/bin/winetricks

In Winetricks choose to install a Windows DLL or component and install atmlib and mspatcha

Now install Acrobat DC:
WINEARCH=win32 WINEPREFIX=~/.wine/acrobat_dc wine let the install run and finish
Now use rsync to copy over some missing files from the Windows sytem. On my computer Windows was mounted under /mnt/win:
cd ~/.wine/acrobat_dc/drive_c/Program\ Files/Adobe/Acrobat\ DC/
rsync -rv --size-only /mnt/win/Program\ Files\ \(x86\)/Adobe/Acrobat\ DC/ .
cd ~/.wine/acrobat_dc/drive_c/Program\ Files/Common\ Files/Adobe/
rsync -rv --size-only /mnt/win/Program\ Files\ \(x86\)/Common\ Files/Adobe/ .

The first time Acrobat is run there will be a couple error messages that appear. They should not appear again.

Installing other apps (optional):

I recommend installing apps to their own directory, and using 32-bit over 64. To install Kindle just run:

WINEARCH=win32 WINEPREFIX=~/.kindle32 ~/bin/winetricks

Choose Install an application and you will find Kindle in the list of available applications.

To install Notepad++ you would do something like:

WINEARCH=win32 WINEPREFIX=~/.npp ~/bin/winetricks

then select Notepad++ from the list of applications.

You get the idea. Just remember the key things: you may need to install fonts and should usually set the Windows version to win7 in the Change settings section. You may also need to install Windows components or DLL's which is beyond the scope of this article.

When you run winetricks you'll see there's a good list of applications and games readily available.

You could also create a generic container for 32-bit applications:

WINEPREFIX=~/.wine32 WINEARCH=win32 ~/bin/winetricks

And you can also install an app directly with:

WINEPREFIX=~/.wine32 WINEARCH=win32 wine 32bit_app.exe

And for 64-bit use:

WINEPREFIX=~/.wine64 WINEARCH= ~/bin/winetricks

Or to install a 64-bit app directly:

WINEPREFIX=~/.wine64 WINEARCH= wine 64bit_app.exe

Final note

I hope this will inspire people en masse to ditch Windows permanently, choose to use Linux, and be more involved with free software. Please see my other guide KDE Plasma with Kubuntu – Setup, notes, ideas.

Credits, Thanks & Help: How do I create a 32-bit WINE prefix? Wine

Linux really is the future

I’ve been back to using Linux now for a while and I’ve pretty much completely forgotten that I was even using Windows before. But its not just that – its not just that my experience is the same as before: Its so much better.

Linux is so awesome. Its so fun to use. There are so many cool things about it.

Today I managed to set up my system where I have three virtual desktops: One main desktop that is for general-type stuff, then one desktop for one of my online courses, and the third desktop for my other course.

I have browser windows relevant to each course open in each virtual desktop. I also have Okular open with relevant texts in each desktop, and of course terminal windows in which I write code.

Having it organized like this is such a huge leap. I can keep all my stuff for each programming course together in one desktop. When I want to study or work on it I just switch to it. And when I want, I switch away from it and can do other things.

This helps so much in preventing things getting cluttered and from getting overwhelmed trying to keep track of too many things.

I frequently – pretty much always – have many things going on simultaneously. I can burn out easily or just get overwhelmed and lose track of things, after which I have to start over again which is difficult.

I go through this all the time. But my goal is to not have to, because things will be organized.

As I’m working on my system right now I have this feeling as if I can sense the future – this very positive, bright, cool future of which Linux and free, Open Source software is a major part.

Mainstream media is engaging in manipulation

What is wrong about the story that she only has pneumonia? First of all, in the video above you can see that her body appears to become rigid and her elbows are bent and her hands are behind her back in what appears to be abnormal posturing a sign of severe brain injury. Her body is rigid and then the knees buckle. She collapses and is carried by two people. In this video and the one from the other angle you can clearly see her feet dragging. He body has gone limp. Front rigid to limp. Whatever causes that is hard core. It is not pneumonia. Or – it is not just pneumonia. That may be how this lie is being pushed: They say “She has pneumonia.” A fact which may be at least partially truthful. But – and this is critical – she may have something else. Whatever else is not being said. Its being left out.

Then they could go back and claim “We didn’t lie. She did have pneumonia.” Only that the pneumonia wasn’t the serious issue. There was another issue.

Think about the last time you felt light-headed. Maybe you got up too fast or something. How do you react? You generally bend over to support your hands on your knees, or will put your hands out to support yourself on something like a chair or table if one is available. You do not do what she did. What happened with her body is highly abnormal and more like some kind of seizure.

And this idea is supported precisely because, only an hour later, she seemed to be up and about and professing to feel fine. Think about it: If you had a respiratory infection so bad that it made you faint or have some kind of seizure, you would be feeling like complete shit. If the infection was raging in your body so bad that it had reached that point – and none of this adds up because if it was even moderately close to being before such a point the person would have been feeling so run-down and crappy they would not have even wanted to attend an event – there’s no way – no way – that an hour later you’d be all kipper and upbeat and happy. No fucking way.

Hilary’s attempt to make it seem like she was ok afterwards actually proves to me that there was something more like a seizure which occurred. Because yes, after a seizure a person would be back to normal.

Which means that her taking off a couple days and not flying to the West coast – is just a lie, a scam to make it seem like she actually has pneumonia.

She doesn’t have pneumonia. And you could see the knee-jerk, classic Clintonian playbook of flat-out denial being enacted from the outset of this episode. Just as both Clintons have lied about so many other things.

These people are the most full-of-shit, scumbag liars.

The Curiosity Rover just took the coolest pictures of Mars! Marsrover Curiosity begeistert mit Fotos von Gesteinsformationen

Sandstone formations which emerge from from wandering dunes.

Upgrade Kubuntu 16.04 ‘Xenial’ from Plasma 5.5 to Plasma 5.6

Using the Kubuntu Backports PPA its possible to upgrade from Plasma 5.5 to 5.6 Plasma 5.6.5 and Frameworks 5.23 now in Backports for Kubuntu 16.04

Instructions are here:

KDE Community Wiki:Kubuntu/PPAs:Kubuntu Backports

Donate to KDE

War is natural

War is a natural part of being a human. Humans eat. Sleep. Have sex. And they also engage in war.

There is nothing unnatural about engaging in war. Not engaging in war is actually unnatural. It is delusion to think that a human being should never engage in war. A human being has to engage in war. It is a necessary part of living.

I’m writing this because I want people to understand that war is natural. You may take a Buddhist, Christian, or other point of view in your life. Or you may take a Taoistic one. Regardless, you should not feel bad about engaging in war. It is part of being human.

War is like a responsibility. It is one of the things you need to do to survive.

If you believe that war is bad, if you adhere to this delusion, you will damage yourself. You will damage others.

We are at war but, out of delusion, we may not perceive it or may not want to perceive it. But we are at war. And we need to recognize it, and fight. And win.



Playing darts with probability

We were asked to do some exercises with arrays in one of my programming courses and one of the things I wanted to do was create a method (function) to generate a random array.

Some of the exercises involved testing to see if any of the numbers in an array are negative. I could have just created a method to generate a random amount of equally positive and negative numbers. So for example it could have picked random numbers between -10 and 10.
rnum = rand.nextInt(21) - 10; //range of -10 thru 10

But that would have been kind of boring. If some of the exercises involve testing for negative numbers, then I would not want it to be the case that negative numbers occur very frequently. With equal positive and negative numbers, the probability is 50% which seems too high because basically you’re pretty much guaranteed to always have a negative number.

So, I thought about lowering the probability. One way to kind of cheat would be to just clip the range of negative numbers. For example generate random numbers between -5 and 10. That cuts down the probability of negative numbers to 33%.
rnum = rand.nextInt(16) - 10; //range of -5 thru 10. sloppy.

But I did not like this idea. So then I started to think: What is the best way to assign a weight of my choosing to randomly switch the sign within the complete range of any randomly generated number from positive to negative?

This is more clean because first of all I only need to generate positive numbers, and any potential random number that is generated could have the possibility of being negative. Furthermore, by using a weighted random generator, I would be able adjust the frequency with which negative numbers occur.

How to do this?

This is actually really fun to think about. The way I thought of the problem is this: For any particular weight that I want to use, how do I create something that randomly generates a response that can be used to assign a random attribute – in this case negativity – to some other thing?

In other words, let’s say that I choose 20% as my desired weight. How do I do something such that doing it will result in one possibility 20% of the time, and some other possibility the other 80% of the time? I need to generate some kind of thing which will always follow these odds and is able to be tested so that I can use it to assign negativity to a number.

The answer is actually really simple: I just pick a random number in a range which corresponds to the entire range of possibilities, that is 100%. The most logical thing is just a range of numbers which correspond to the complete set of probabilities.

So if I take the range of numbers from 1 – 100 and I randomly select numbers from it, I know that 20% of the time the number will be in the range 1-20 and 80% of the time it will be in the range of 21 – 100 (I think I got this right).

So all I have to do is select a random number in the range 1 – 100 and test: If its below 21 then I say “make the number negative”. Otherwise I leave it alone.

To change the weight I just change the comparison test to another value. For 15% I would test for 15 or below. Etc.
wrand = rand.nextInt(100) + 1; // use for weight
if (wrand <= weight) rnum *= -1; //weight can be set to any value

To give you an idea, here are some random arrays I generated. They consist of 10 elements (numbers).

In these first I have the weight set to 50%. 50% of the numbers should be negative:
[4, 9, -6, 6, -7, -5, 9, -5, 4, -3] (5 negative numbers)
[5, -2, -3, -5, 7, 1, -2, 3, -6, 8] (5 negative numbers)
[-10, 10, -1, -5, -3, 7, 6, 3, -4, -10] (6 negative numbers)

You can see its following the probability weight very closely.
Now I switch the weight to 20%:
[-1, 10, -8, 7, 5, 6, 1, -5, 8, 4] (3 neg.)
[5, 4, -10, 5, 10, -4, 10, -9, 7, 10] (3 neg.)
[3, 1, 10, -2, 10, 3, 7, 5, 1, 3] (1 neg.)


In this case its pretty straightforward. But then I started thinking about doing something more complex. What if I had multiple things each of which has its own weight. For example what if I was dealing with the letters of the alphabet and I wanted to use the rate of frequency of each letter to generate random pseudo-words which follow the actual probabilities of letters in English?

If you look at the list there you will see that the probabilities are given to a level of precision of thousandths of a percent. One thousandth of a percent is one part in 100,000. The frequency rates for all the letters must add up to 100%, or 100,000/100,000. Thus if I were to write an algorithm to do this I would need to select a random number in the range of 1 - 100,000. Each letter's probability would correspond to a sub-range of numbers. I would then have to test each random number against the ranges of letters.

To make it more efficient I would check in order of decreasing frequency starting with the most common letter.

This would of course create only crude pseudo-words because there are a lot of other probabilities that occur with letters. For example some letters occur more frequently as the first letter of a word. Obviously some letters occur more frequently after each other. Etc. Its no doubt very complex and I wonder about people who are involved with cryptographic analysis and all the probabilities they account for with regard to the occurrences of letters in words, and words relative to each other. It must get mind-bogglingly complex.

Anyhow, I was reading some stuff and found an interesting page about what is called Rejection Sampling. In it they use the example of throwing darts at a dart board overlaid with a probability curve which I thought was kind of a neat way to visualize it.

Another possible application of weighted randomness I thought of is a crooked card game. That is a card game that essentially cheats. Based on who the cards are being dealt to, the game could skew the probabilities of cards a player gets. This also gets interesting. Because in cards you have a limited set of items to choose from (a card deck). You would have to be able to weight the random selection of an element in a finite set to favor some elements of the set (i.e. low-value cards and cards different than what the player already has) and disfavor others (high-value cards and cards which the player doesn't already have). This actually seems like it would be really fun to try although I'm not going to do it now because I have homework :-) But think about it: You could try to tweak the amount of cheating to a level that is just below being detectable. Then you could run experiments on people. Hehe. LOL.

Another thing this makes me think about: It goes beyond a card game and could be part of any potential game. For example I was thinking of something like SimCity. You could use random weightedness for a lot of things to create simulations of things. In a way you could be like a god and tweak your own world with whatever probabilities you would like. Does that seem fun? LOL Ok, I'm a geek... LOL

It really does make me wonder though about other things. To what extent is randomness a part of complex modeling systems? For examples there are attempts to model the universe from the moment of the big bang. The distribution of matter in the universe is not uniform, but its not completely random either. This is interesting.

If you thought about it logically for a minute, it almost seems odd that the universe isn't perfectly uniform. Think about it: If you start off with the inflaton and then compute from there, why wouldn't everything be perfect? Why would there be any randomness? It seems odd because you could ask "Where does that randomness come from?" "Was the inflaton itself somehow imperfect?"

References: Generate A Weighted Random Number

Videos on Feminism

I hope its ok to post these here. Millennial Woes is extraordinary. What he says is insightful, grounding, and healing.

Around 18 minutes in the below video what he says about it being “tragic” is so intense it made me cry.

Taking a break from Twitter

After the initial honeymoon with using Twitter and the stimulation of finding other people posting information and ideas, I found for the past few days that I needed to pause.

One reason was practical: I have a lot of homework to do. I end up spending too much time when I start reading Twitter. I read tweets which link to other information and then end up spending all this time reading or watching stuff.

But I can’t just waste huge gobs of time like that every single day. I have to take breaks.

So I did for a few days but today I feel I needed a dose and – there it was waiting for me. It feels good. Twitter is such a pickup. I love that there are people aware of all the bullshit and lies. People standing up and speaking truth. People providing facts and information that is blocked from the oligarchy-controlled Big Media.

I got my dose, feel better, and can continue with my homework.

There’s probably something about this: My brain needs to do different things. I have to do analytic activity (programming). I also have to do creative activity (playing music). It seems like when the mind gets too saturated in one track that things begin to stagnate.

I don’t know what exact category of mental activity Twitter falls into, but I’m finding that Twitter is one important area that I need to stimulate. But just like all the other areas it has to be balanced with everything else.

Thanks to all the people on Twitter with their excellent tweets and information! I love you guys!

Page 21 of 103« First...10...1920212223...304050...Last »