Thursday 23 April 2015

Elementary OS Freya - Part 3 Viber running on 32 bit Linux

Viber for Windows running in ElementaryOS Freya on my Dual Monitor system with ViberStart and ViberKill added to Docky **  Wallpaper - Henning Island Whitsundays QLD
 
It had to happen!  I use Viber a hell of a lot and while the Viber people have released the 64 bit packages for Linux, it is a pain to get it working on 32 bit Linux.  Since I had already made Viber for Windows run on Mint, I decided to see if it would run in Elementary.  The good news was, it did.  The bad news I suppose is that I need to post the method here and bore people with details.

In the past I had used WINE to install Viber and it used to run, but somewhere in a recent release of either Linux or Viber for Window, the excutable would install, the come up with errors every time it ran.

A couple of weeks ago however I remembered PlayOnLinux and decided to see if it was good for more than games.  It is in pretty well all repositories, so I just installed it and opened it.

So here is a rather lengthy diatribe on getting it set up.  There are no messy configurations to do and no extra dll files and stuff to find as I had to in Wine.  You simply follow what is written here and it should all work.

Where you see the path /home/YOUR-USER-NAME/.PlayOnLinux/  Simply change 'YOUR-USER-NAME' to whatever is the username for that home folder. 

So an example if your logged in user is robert would be to change:

/home/YOUR-USER-NAME/.PlayOnLinux/wineprefix/_/drive_c/users/YOUR-USER-NAME/Local Settings/Application Data/Viber/Viber.exe

to :
/home/robert/.PlayOnLinux/wineprefix/_/drive_c/users/robert/Local Settings/Application Data/Viber/Viber.exe

ANOTHER WARNING that will be mentioned again below. 

When you get to either entering a command in a Terminal to start Viber, watch out for spaces and backslashes in the path.  If they are not in the right place - it won't work!

OK  HERE GOES:

Install PlayOnLinux

Download Viber for Windows.
Install the ViberSetup.exe or Viber.exe (whatever whatever it was called) using PlayOnLinux.


Open PlayOnLinux.  It was in the Applications Menu, Games, PlayOnLinux.

On the right, choose Install a Program.
When the Install Menu opens, look at the bottom and click on Install a non-listed program.  (If you don't see an option to Install a non-listed program, open and close a few of the Install options.  It will turn up at the bottom of one of them eventually as a line of text link)

The Manual Installation dialog will open, click Next
If you have NOT used PlayOnLinux before, click on install a program in a new virtual drive
Type in a name for your new virtual drive WITH NO SPACES

Now, Mr Intelligence here forgot to type in a name, so I ended up with a virtual drive called "_" 

NOTE !!!  Don't skip typing in a NAME for the virtual drive.    

Click Next and Follow the rest of the prompts


Yep, so my drive is in a folder called 'underscore'.
In the examples below I used 'NAME-OF-VIRTUAL-DRIVE'  to represent whatever you call your PlayOnLinux virtual drive when asked.

You should be asked if you want to Use another version of Wine. Configure Wine or Install some libraries.  You can skip this and click Next.

Once you get through this stuff you should be asked to Please select the install file to run.
Click Browse and find the installation file wherever you downloaded it. 
In my case, in a folder called Software Downloaded/Viber
Click the Viber.exe file and wait.

It 'SHOULD" install to the following directory - but it could take some finding. 
Do a search for Viber.exe in your file manager and you should find it in something like this below  NOTE the dot before PlayOnLinux - it is a Hidden Folder so if you go looking for it, select Show Hidden Files in your File Manager:  

/home/YOUR-USER-NAME/.PlayOnLinux/wineprefix/NAME-OF-VIRTUAL-DRIVE/drive_c/users/YOUR-USER-NAME/Local\ Settings/Application\ Data/Viber/Viber.exe

Find executable and open with PlayOnLinux and SAVE the association Always Open This Type etc..
Once it has opened, you will be asked to provide your phone number.  A pin code will be sent to your mobile.
Enter the pn and Viber should open.  If you already have Viber on a device, you shoudl see your contacts.
Once you verify it is working, close Viber and close PlayOnLinux.

NOTE playonlinux Terminal command is in LOWER case, even though the folder name is mixed upper and lower case.



Then use this command in a terminal to start Viber. 

playonlinux /home/YOUR-USER-NAME/.PlayOnLinux/wineprefix/NAME-OF-VIRTUAL-DRIVE/drive_c/users/ross/Local\ Settings/Application\ Data/Viber/Viber.exe

Viber for Windows does not like to shut down in Linux so I Kill Viber with this (I made an executable script).
In my Mint 17 if I don;t kill Viber Process after I close the actual Viber Program, my monitors shut down and they don't want to start again.
---------------
!#/bin/bash
   # a simple script to kill the processes in memory at the same time as killing Viber for Windows
   # By Ross Devitt
   # Kills Wine version of Viber.
   # I found I need it because Viber causes monitor power save mode to cut in and shuts doem my screens.
pkill Viber.exe     # Kills Viber
pkill playonlinux   # Kills PlayOnLinux
pkill python        # Kills Python to stop PlayOnLinux restarting itself over and over
pkill explorer.exe  # Kills the Windows bits
 
---------------

Once that is done you should be able to use the command in a script, a link or a launcher.
I opened my /home/me/Desktop folder and Right Clicked in the folder and created a 'Link ro Application'
then I just pasted this into the Command box on the Application tab:

playonlinux /home/YOUR-USER-NAME/.PlayOnLinux/wineprefix/NAME-OF-VIRTUAL-DRIVE/drive_c/users/YOUR-USER-NAME/Local\ Settings/Application\ Data/Viber/Viber.exe

Next I changed the icon for the Viber icon and put VIBER in the Name field.  I left the Work path empty.

I hope this helps a few people who want to use Viber in 32 bit Elementary OS Freya or otehr 32 bit Linux Distros.



Remember - there IS a working 64 bit Viber for Linux, but it is a pig to set up in 32 bit distros.

This post might seem to have too much detail, but it is easy to miss things so there are lots of reminders in there.

Have fun with ElementaryOS and Viber.


RossD.





Wednesday 22 April 2015

Elementary OS Freya - Part 2

Elementary OS Freya across 2 monitors using Docky instead of Plank
Wallpaper - Henning Island - Whitsundays Queensland Australia

After installing Elementary OS on my multimedia computer on Sunday, then yesterday deciding I liked it enough to try it on my main desktop, I'm already finding the experience enlightening.  Docky is installed and available on either screen.

There doesn't seem to be a way to extend the panel at the top across the right screen, but that is not an issue.  Simply opening settings, clicking on 'Display' and clicking the star in the top left of one the screens shown will swap that screen to become the primary monitor.

The main advantage I can see for using Plank as the dock is that it uses far less memory than Docky, but it is simply not as configurable or versatile.

My initial plan was to use Freya to test and swap back to XFCE for regular tasks until I had set up things like my Brother printers and scanners, along with configuring my VPN.  But all that was achieved in such a short time, I just forgot to open XFCE once I had repaired GRUB after the Elementary installation.

Which I suppose might be the topic for another post.  Because Freya wrecked my GRUB configuration and it was annoying to fix.  If it happens to you, do a search for a tool called     '   grub-customizer   '      and there's a link I will dig up to help manually edit /etc/default/grub.   It was pretty straight forward, and was caused my my manual partitioning because I have several operating systems installed.  If I had to guess, I  think I probably accidentally installed GRUB to the wrong MBR.

I mentioned earlier that I first installed Elementary OS on my multimedia computer.  This is a five year old Lenovo AMD computer that was leftover when I closed my computer businesses following serious injuries in an accident in 2004.  I was left with a lot of fairly expensive equipment that was too good to throw away but not good enough to sell.

Five years on, the junk heap has become a source of all sorts of innovation.  Connected to a cheap ($190 - Chinese) TV, I could ditch the video player and adding my old Logitech speakers I suddenly had cinema sound.  Now with the National Broadband Network connected at 25mbps/5mbps I have streaming YouTube whenever I want it on a 32 inch TV.

I had tried several different Linux distros and desktops but Freya is the first I have really liked for this purpose.  On the Multimedia sustem I have left Plank as the dock simply 'because' it uses minimal memory.



Tuesday 21 April 2015

Elementary OS Freya - Part 1

I've just started using a new Linux Distro that impressed me so much I have installed it as my secondary OS.  However, I seem to be using it far more than my primary one.

I've enjoyed KDE for years, with my current favourite being the Mint variety,  and I love the way I can set it up in so many ways with themes and tools.  But I also run XFCE because it is faster and very configurable once you get to know it.

But Elementary OS is in a class of its own when it comes to simple.  It installs pretty well as a bar bones OS, but in a beautifully themed way.  I have to admit it screwed up my GRUB menu and I will make a separate post on how to fix that, because I've had that happen often enough with side by side installations of other distros. 

Elementary OS Freya is available here:  http://elementary.io/  and the first thing to do after installation is to open a terminal and issue the following commands:

sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily
sudo apt-get update
sudo apt-get install elementary-tweaks

That will add a means to configure various parts of Freya because Elementary takes minimal to new lows.   Now when you open the Settings Menu there will be an entry in the top row (personal) called tweaks.

I added LibreOffice, Openshot, Firefox, PlayOnLinux, Dolphin, OpenVPN and the Gnome configuration too for openvpn, VLC, SMPlayer, Geeqie, Xsane, Gimp, Xara Extreme, ImageMagick and a few other odd dthings I use in my day to day life that I can't remember for the moment.

One interesting thing about Elementary OS Freya was that it found a heap of software already on my system and put it in the menu under 'Other'.  That is not too unusual, most other distros do that.  What I didn;t expect was for quite a lot of them to actually start, without having to install them, while others did not.  So for example, Shape Collage showed in the menu but did not start, but one of the best Drag and Drop website editors ever, QNEWB did run.

Installing my VPN provider onto OpenVPN took all of 2 minutes to add one server.  I have yet to add the other 20 or so.

I have a two monitor system with one being a Samsung TV connected to the DVI out, and the other a VGA LED monitor connected to VGA out.  Freya picked up both and configured them without any input from me.

The desktop is clean and simple and one thing it lacks is the ability to extend the dock or the panel across two screens, or even to have a separate panel or dock on each monitor.  Easy fixed:       sudo apt-get install docky 

In System Settings > Applications  a simple couple of mouse clicks made Dolphin my default File manager and Firefox my default Browser.  Then I did the same to make LibreOffice my default Text Editor.  I realised Geary was my only real option for email, but I use Gmail, so I installed Gnome Gmail from the Software Centre an set that as Email Default.

Ok, Enough form the moment.  Part 2 will be in the next few days I think.

Cheers,

RossD

Tuesday 14 April 2015

FTP uploads and downloads in LINUX the Easy way

Something many Linux users either don't know, or forget is that years ago we didn't have fancy specialised programs to manage file transfers across a network.  We either did it from the command line or later, within a file browser.  But once the Internet came of age, specialised programs proliferated.

In Linux, one of the most popular is FileZilla.  It makes managing websites easy and is great to use.  But once in a while I am on another computer that does not have Filezilla or another similar program.  Now, it is easy to log into my server using a web browser to download files, and it is also possible to use a browser to upload files,  But what about editing them?

Here's the trick, for relatively new Linux users.  Your ordinary every day file manager, Dolphin, Thunar, Nautilus (or whatever it is called now) and the others, can access your web server anywhere in the world as long as you know your login ID and password.

Now, if as I do, you have a dual monitor setup you have a distinct advantage, because you can open the local files you are working on in a window on one screen and the folder you are working on at the remote server in another screen.  Of course, you can also split the file manager window itself, or tile yoour file managers on one screen.  I just find it convenient to keep the server on one screen and the local computer on another screen.

Although I use Mint 17 XFCE at present on my main computer I have made Dolphin (the file manager from KDE) my default file manager.  I just prefer the way it looks and feels.  So I will use Dolphin as my example.  Other file managers may have different keyboard short cuts but the commands will be in a menu somewhere.

I open Dolphin to my local working directory with the files for the website I am working on.  There are always two directories (folders) for any currently active web site.  One has an exact copy of the website as it is, once it is proven to be working correctly.  The other is my 'working' folder, where I make and test changes before I upload.

So I open the /home/my websites/current website working/  folder in Dolphin.  These are my local files.

Then I open a new Dolphin window.  In this new window I can either use the View menu to find 'Location bar > Editable location, or I can hit the F6 key.  Either will open an 'address bar' in Dolphin.  In that window I type Without The Quotes:
'ftp://mywebsitename.com'
A few moments late a dialog will ask for my Login and Password.  Enter those correctly and you now have access to your server just as if it was on your local computer.

Drag and drop between both open windows or a split window in your file browser works exactly as it does on your own computer.
You can click on an image in your file manager's server window and it will open in your default image viewer.  Right click a html file and select open with, to edit the file in your text editor.

Now, a word of WARNING here.  Editing files directly on a server is NEVER a good idea.  I only mention it because it is possible.

But for simply uploading and downloading files and for quickly viewing images to make sure they are correct it is great.
One other thing.  File Preview will work.  So unlike most FTP programs, if you use your browser for your FTP work, you can see the images in the folders on the server as thumbnails.

Ross Devitt

Viber on 32 bit Linux in 2015

Viber is available for Linux in 64 bit Deb and RPM packages, but not in 32 bit.  There are some work arounds for running the 64 bit packages in 32 bit, but I can never get the things to run.

I tried installing the Windows exe file using Wine, but that failed as well.  At the time of writing, 11th April 2015, Viber is at about V5.1.something.  This is what I did to get it runnng on Mint 17 XFCE 4.12.  I have not tested it with video or voice, as I didn;t have an active web cam.  But I did test it in chat, and it was fine.  I don't use a cam, so I cannot help there.

This is long winded, but it should work.  Watch for the 'backslash and space' in any Windows (Wine) paths where folder names have spaces.  Miss one and nothing works.  If Viber won;t run, chances are you got one wrong, so step throud using cd folder and ls each one as you go until you fine one that won;t open.  Then check if there's a space.  Remember Windows is a BACK slash and a Space.
So: /Folder/Another Folder/Application  would be written in a command or script as:   /Folder/Another\ Folder/Application

OK  Here Goes:
Install PlayOnLinux

Download Viber for Windows.
Install the ViberSetup.exe or Viber.exe (whatever whatever it was called) using PlayOnLinux.

Now that's not as easy as it sounds, but on Mint 17 XFCE 4.12 this is what I think I did:

Open PlayOnLinux.  It was in Menu, Games, PlayOnLinux.
On the right, choose Install a Program.
When the Install Menu opens, look at the bottom and click on Install a non-listed program
The Manual Installation dialog will open, click Next
If you have NOT used PlayOnLinux before, click on install a program in a new virtual drive
Type in a name for your new virtual drive WITH NO SPACES
Click Next and Follow the rest of the prompts
Now, Mr Intelligence here forgot to type in a name, so I ended up with a virtual drive called "_"
Yep, my drive is in a folder called 'underscore'.
You should be asked if you want to Use another version of Wine. Configure Wine or Install some libraries.
I messed around configuring Wine, but I suspect I may not have had to.
Once you get through this stuff you shoud be asked to Please select the install file to run.
Click Browse and find the installation file wherever you downloaded it. 
In my case, in a folder called Software Downladed/Viber
Click the Viber.exe file and wait.

It 'SHOULD" install to the following directory - but it could take some finding. 
Do a searh for Viber.exe in your file manager and you should fine it in something like this below:  

/home/ross/.PlayOnLinux/wineprefix/_/drive_c/users/ross/Local Settings/Application Data/Viber/Viber.exe

Find executable and open with PlayOnLinux and SAVE the association Always Open This Type etc..
Once it has opened, you will be asked to provide your phone number.  A pin code will be sent to your mobile.
Enter the pn and Viber should open.  If you already have Viber on a device, you shoudl see your contacts.
Once you veryfy it is working, close Viber and close PlayOnLinux.

Then use this command in a terminal to start Viber.  NOTE playonlinx Terminal command is in LOWER case.

playonlinux /home/ross/.PlayOnLinux/wineprefix/_/drive_c/users/ross/Local\ Settings/Application\ Data/Viber/Viber.exe

Viber for Windows does not like to shut down in Linux so I Kill Viber with this (I made an executable script).
In my Mint 17 if I don;t kill Viber Process after I close the actual Viber Program, my monitors shut down and they don't want to start again.
---------------
#!/bin/bash
pkill Viber.exe
# Kills Wine version of Viber.
# Needed for now because Viber causes monitor power save mode to cut in.
---------------

I tried adding pkill playonlinux, but while it kills the process it doesn't seem to close the PlayOnLinux window :-(

Once that is done you should be able to use the command in a script, a link or a launcher.
I opened my /home/me/Desktop folder and Right Clicked in the folder and created a 'Link ro Application'
then I just pasted this into the Command box on the Application tab:
playonlinux /home/ross/.PlayOnLinux/wineprefix/_/drive_c/users/ross/Local\ Settings/Application\ Data/Viber/Viber.exe

Next I changed the icon for the Viber icon and put VIBER in the Name field.  I left the Work path empty.

I hope this helps a few people who want to use Viber in 32 bit Linux.

RossD.