Monday, June 30, 2014

Downloading files remotely using PuTTY

Recently at work I found myself in a situation where I needed a file from my home server and I had just replaced my work laptop and still didn't have a linux installation available. After doing a bit of searching I found out that I can use PuTTY under windows to directly download this file through an SSH tunnel. Here is how you can do that.

Open the windows command prompt by typing "run" in the search box and pressing enter.

Once you have the terminal open find the path to the folder where putty is located, on my windows 7 install that equates to C:/Program Files x86\Putty

from there just make sure you have the file pspc.exe available (if you don't know, the command "dir" shows files , but I'm assuming if you know how to use PuTTY you also know how to navigate windows using the terminal.

Run pscp by typing the command

pscp.exe 

now enter the command

pscp.exe username@x.x.x.x:/file_path/filename c:\directory\filename

where username pertains to your credentials to log into the server via SSH remotely. x.x.x.x is obviously the ip address of the server you are trying to download the file from. The first path pertains to the path of the file you want to retrieve (yes you have to know this in advance, if you don't just SSH normally and figure it out first). Then the last path is the path of where you want you new file to be downloaded into.

I hope this is helpful for when you can't just use sshfs under linux. If you don't know what SSHFS is look it up, it's basically an SSH method of mounting a samba directory remotely. I may post more on that at some point.

Tuesday, June 17, 2014

Linux distro sampling pt3 - Debian Xfce + Xubuntu 14.04

Debian 7 Xfce edition (VM)

Next I decided to give Debian Xfce a try since I saw that I had already downloaded the torrent for it a few weeks ago. I have had quite a bit of experience with xfce from my previous Xubuntu installs. Once again, using a non-Ubuntu distro makes it so I have to learn quite a few new things, however using Xfce does seem to make it a bit more familiar to me. I think just changing from GNOME to Xfce has the potential to make this experience much better. It appears just as stable and consistent as the other DE, while being much more lightweight and looking much much more pleasing in my opinion. Judge it yourself.



Xubuntu 14.04 (VM)

Next I decided it might be a good idea to see if Ubuntu 14.04 would work well on my ASUS P550C laptop as a VM since I'm too chicken to try dual booting it on this machine. After trying it I realized it wasn't going to happen. Not only unity is extremely sluggish and buggy in this machine as a VM. Besides that the mini toolbar for Virtual box keeps leaving this dark bar where it comes out to, which makes it look pretty sloppy. Removing this black bar seems to require removing the mini Toolbar which I don't want to do either.

Due to these reason I tried Xubuntu 14.04 the Trusty Tahr next. I'm used to Xubuntu from all my other VMs and once again I must say Xubuntu makes for the best VM experience I've had so far. It can look beautiful, it works, it's fast and good on resources. Just perfect really. Plus have I mentioned how pretty your OS can look?

At some point I might put together a nice looking Xubuntu setup and maybe post something about all my setting for folks interested in what I did.

Monday, June 9, 2014

Linux distro sampling pt2 - Debian 7 on ASUS P550CA

Recently I got a new ASUS P550C laptop from work. As with most my machines nowadays I try to run some form of Linux on them to accomplish some of the tasks in which Windows is handicapped at performing. Well I will begin this post first talking about my experience with the actual computer first.

Laptop Review: ASUS P550C (also called ASUS P550CA on the website)

First of all, this laptop is fairly impressive at first glance. It has a nice 15" screen, it has a relatively nice keyboard that features a keypad which I'm very thankful for (no backlight though... I'm spoiled, I know!). It has a nice finish and it is very light in my opinion, which may be a bad opinion since I'm used to my alienware (performance and weight are often mutually exclusive). Right from the get-go I notice some issues with my wi-fi adapter. It would disconnect under windows every 5-10 minutes. I started using a cable because of it. The wifi is also completely not supported by ubuntu so I also had to use a cable under my dual boot Ubuntu 14.04 install I started with. Eventually the wifi completely gave up which I alerted to the it people. After they contacted the Tiger Direct they mentioned that this particular adapter has been giving users some headache. For those curious I'm speaking about Mediatek MT7630E 802.11bgn. Long story short, I just received a new machine.

The other major complaint I have regard the UEFI/booting rubbish that made it extremely difficult to dual boot Ubuntu on my first machine. My new machine so far has been even worst. Every time I try to install Ubuntu 14.04 it basically tells me I can only overwrite Windows. It does not display the "install alongside" option which is a bit scary. For this reason I don't want to do the partitions on my own since I don't want to have to fix the windows booting garbage that is now standard in so many machines.

In summary, I had a great first impression of my ASUS P550C laptop which soon turned into frustration. This ASUS laptop is very Linux unfriendly as far as I'm concerned, so I must give some thumbs down to ASUS for manufacturing a laptop in the year 2014 that simply can't play nice with other operational systems.

Debian 7 (VM)

Anyway, done with my rant on ASUS. Now that I've been scared enough I decided to just install VirtualBox and use linux through a VM on my work machine which is what I was doing before anyway. I decided that before I settle on one distro I wanted to sample a few to see what is the most practical and useful to me for the types of needs I will have at work.

Well the first thing I have to say is that trying to use Debian was the first time I realized how Ubuntu centric my Linux experience has been up to this point. There are so many choices and small differences working with Debian coming from Ubuntu based distros. The most striking for me was the fact that I didn't know how to work under root. As a lot of you know, in Ubuntu you can simply use sudo on everything, apparently Debian requires you to log in as root in order to perform a lot of different admin tasks. Anyway, there it is, I'm a linux noobie outside of ubuntu.


Unfortunately for me there is a pretty good learning curve to migrate to this version of Debian. I can definitely see the appeal of this distro as it seems very stable and full of great admin tools right from the clean install. Unfortunately, it is a tad too new for me at this point. I will certainly consider it when I have a bit more free time to learn how to get the most out of it. The other reason I am hesitant of using this distro on my laptop is the desktop environment, I do not like Gnome very much. For this reason I decided to see if Debian Xfce is a bit more friendly to someone like me... (continued on pt.3)

Saturday, April 19, 2014

Review of Ubuntu 14.04: The Trusty Tahr is out

I must admit, this was the most anticipated release of Ubuntu so far for me. I had been using 12.04 for a while on my main machine and I was eager to get my hands on this shiny new version of my favorite Linux distro.

After downloading the iso via torrent I installed it and here are my initial comments:

I very much like the aesthetic changes done, including the login screen, the colours and particularly the window resizing overhaul. I thought these would be barely noticeable for me but coming from 12.04 I definitely feel that the overall package looks shinier and more pleasant to look at.

I find it unfortunate that Ubuntu One is closing down but I do believe this doesn't really reflect on the health of canonical in general. One aspect of Ubuntu I think needs an overhaul is the software centre. It has pretty much looked the same for a while and if anything I think it may have looked better a few years ago than it looks now. I personally feel that while the rest of the OS has been evolving into a beautiful piece of software, the software centre still looks the same and it is already looking pretty dated.

*Before I continue, let me say that I have already adopted 14.04 to be my desktop OS for the next while. That's because I really really do like it. However I do have some criticism as well, so I wish that anyone reading this does not get discouraged from trying this distro based on the rest of my post.*

While I was very excited to use the latest HUD from Unity, I felt slightly disappointed so far because while the HUD idea is brilliant to the point of being almost revolutionary to me, it is still not doing what I believe it should be doing. I love the idea of having the HUD where I can not only use to open files and applications in my own computer, I would love to be able to easily pick filters and search engines that can be integrated to Unity that way. From my limited experience so far, it looks interesting but it is far from being what it should be. Part of the problem is that I did not find the HUD to be very user friendly and perhaps having a tutorial would be useful or some other way to really make the HUD intuitive and customizable. Once Ubuntu can do that effectively I would not be surprised if other OSs copied the idea because it is simply brilliant.

Some of the issues I had in the past with Ubuntu such as difficulty installing supported software like "Steam" are still there. I don't know why but when I try to install steam from the Ubuntu Software Centre it doesn't offer me an option to just "install", instead it says "Buy" which eventually leads me to errors.  I really hope little glitches like that are taken care of soon because I strongly believe having an OS that works as it is intended all the time is vital if Ubuntu is ever to be a true competitor of Apple and Microsoft.

I've also encountered some problems with my sounds settings. For some reason my earphones only produce sounds from the left side. I know it's not a harware issue since Windows plays sounds fine on my machine. After doing some research I haven't been able to find an easy solution yet and it is a bit frustrating. So often Linux advocates bash new users because they say Linux is too hard to use consistently and this exemplifies what I mean exactly. I know that it is often a result of hardware manufacturers not paying as much attention to Linux, however, in order for Linux to really become popular accross the board, it needs to have issues like this addressed.

While Ubuntu still offers all the customization that it has offered in the past, I don't like that Canonical has disabled a lot of the options that use to be out of the box such as multiple workspaces and things like that. I also think they have made some of the settings a bit harder to access now which is likely an attempt to "dumb down" the OS to make it more user friendly. Unfortunately I do not like having to spend so much time tweaking my distro just so it could run like my Ubuntu 11.10 use to run. But if doing things like this helps to get more users I can forgive Canonical for it, but maybe offer an option during install for "new user" vs "seasoned user".

Overall though, I am extremely excited to be finally running Ubuntu 14.04 Trusty Tahr. I have been waiting for this version for a while and I am very impressed with what I have seen so far. After attempting to use quite a few other distros like Xubuntu, Mint 16, Kali, Debian and Ubuntu Gnome, I still feel that Ubuntu continues to deliver the best experience of all of these. Mint has climbed significantly in popularity, but to be perfectly frank I don't think it offers any more user friendliness than Ubuntu does. I strongly recommend Ubuntu to anyone wanting to try Linux for the first time as it is a great system, and I would love to see some of the more persistent problems with the distro disappear so that Ubuntu can really make an impact on the desktop market. Unity may be a source of a lot of differences of opinion, but in my opinion Unity is the most inovative, the most attractive and the desktop environment with the most potential to become the new standard in the future. Keep up the good work Canonical.


Saturday, February 22, 2014

Minty Review: Linux Mint 16 (cinnamon flavor)

After being on the top of the chart for more than a couple of years, I finally decided to give Linux Mint a try, after all why are people using it so much? I must say I was biased previously because I though Mint looked a little too boring for me and aside from being an easy to use sort of distro, I didn't see the appeal. To be perfectly honest, I never thought Ubuntu was hard to use so even that appeal I don't quite understand.

Anyway, now that I've played with Mint for about a week, I feel like I can form a more relevant opinion, and to be honest I was not impressed. First of all, as I feared the OS to me looks very vanilla, and offered as far as I saw, nothing dramatically interesting. As I mentioned, often mint is labeled as a great distro to start with, and while it is easy to use, I had two crashes in my first day of use and one of them was while watching a regular video. I feel that a distrubution that is known for media compatibility out of the box should be able to play simple videos without a hiccup.Ubuntu 13.04 VM or my Xubuntu 12.04 VM. I had a lot of issues getting a few pieces of software, including my email client to work smoothly and that didn't help me have a good opinion of it.

I do need to disclose that I was running it as a virtual machine, so perhaps my experience would have been better on a hard install, but these are issues I didn't seem to have with my

Perhaps I am being unfair by reviewing Mint as a VM, but I've done that with other distros before and considering Mint's reputation, I don't feel that it requires special treatment on my review.

Overall, I feel that Mint, much like Ubuntu, has really helped bring Linux to a lot of new users, and I applaud them for that. I think that if there is anything that can be done to make Linux more popular, it should be done. With all the discourse regarding online privacy, the NSA and hackers, a shift to Linux is a great first step into trying to protect yourself. The Internet is my favorite invention of the 20th century and I truly believe that popularizing Linux is just another step into giving people online freedom, and ensuring that we stay in control of our own private habits. So Mint gets points for doing that, however as a distrubution for someone like me, I wasn't impressed. In my opinion Ubuntu is just as easy to use to a user with some computer knowledge and it offers a much more inovative experience. I have to admit I am an Unity fan boy, even though it is bulky. If I want a less meaty distro, my current pick is Xubuntu, I have yet to see another really lightweight distro that looks so good and functions so well.

Sunday, February 16, 2014

ANOVA with SPSS: quick tutorial

I've recently had to do quite a bit of statistics for my project in school and I ended up having to learn it with a new software for compatibility with what my professor uses, which is SPSS. It's probably a good statistical package to learn since it's one of the most popular ones around the world. Since I had no idea how to do anything on it before this, I had to do a bit of reading and thought there would be some value in posting a quick step by step guide on how to run a one-way anova test using SPSS.

For completness, I'm using IBM SPSS Statistics 22. So load up your SPSS (which is shockingly bulky imho). I imagine that if you are reading this post you know what an ANOVA is but in case you don't, ANOVA stands for ANalysis Of VAriance. If you are familiar with the student's t-test, an ANOVA is similar to that. However, while a t-test compares the means of two groups, an ANOVA compares the means of several groups. It looks across all your data and spits out a number (F) which tells you how significant the variance is across all your groups. This will tell you whether there is an overall effect after looking at all your data. A One-Way ANOVA does just that, and it looks specifically across one factor such as different treatment groups. If you hear about a Two-Way ANOVA, that's when you have multiple factors to be compared, for instance you may have different treatment groups in a drug study, but you may also want to look at how those treatment groups change over time, say the course of a month. Then you need to look at changes between groups, (does drug X make animals sick?) as well as within groups (do animals taking drug X become resistant to the drug over a period of time?). Lastly, from an ANOVA, you can also do a Post Hoc comparisson, which is essentially a t-test across all your groups. If you have an overall effect from your ANOVA (F > critical value) then you compare each group to see if they have p < 0.05 for significance. In my example I will use the Bonferroni test which is a more conservative one. There are other popular options such as the less conservative LSD, as well as Tukey's and Dunnett's test.


Open your data or enter your data, for me I had everything in excel before, so it was just a matter of copying and pasting everything. However, in SPSS, as you may or may not know, you can also assign your groups as a different type of data. On the bottom there are two tabs, to work on your groups click on "Variable View". There you will see all your variables, and in my case I eddited the varialbe "Group" by pressing on the cell under "Values".


There you should label each numeric value that represents one of your groups to a label that makes sense to you. Click OK and go back to the original tab, "Data View".


 Now to actually run the test, first find out what columns of data you are actually going to analyze. The sheet I'm using as an example contains all my data from one of my taste reactivity experiments, and includes a lot of behavioural data I have no interest in running stats on. For this example I am interested in running a one-way ANOVA comparing across all my treatment groups, however only testing the total number of gaping reactions.

To do that, find in the menu the option "Analyze" > "Compare Means" > "One-Way ANOVA..."

That should lead you to a smaller pop-up window where you will put your treatment group column under "Factor" and place the data you want analyzed under "Dependent List" which corresponds to your dependent variables. From there click on "Post Hoc..."


There you can chose what type of Post Hoc comparisson you want to make, in my case I am doing a Bonferroni test.


Now, still in the  ANOVA screen, go to "Options..." and click "Descriptive" which I believe will provide you with some of the basic statistical values for your data such as means, standard deviation, standard error and so forth.

From there click continue and OK to run your test. Voila, you should see a report page. On the top you will find your descriptives separated by your groups. N will be the total number of individuals in your groups, your mean, SEM, etc. Below will be your general ANOVA results, which will give you your degrees of freedom, your F value and your significance value. My degrees of freedom are 5 and 50, as you sometimes see them represented as F(5,50), and my F which is 5.475. This is sufficient for me to claim significance in my data, notice the .000 value under significance as well which is similar to a p-value that you are used to.

Below you will find your Post Hoc Tests, in my case Bonferroni. Each row block will have all your comparissons between one group to all the other groups. See in my figure below a comparisson between my Saline group to all other groups. Notice that the only significant difference lies between group Lor6 and my vehicle group. It has a * next to it and you will notice that significance is 0.002, which is >0.05.


Saturday, February 15, 2014

Change the resolution of your VirtualBox Ubuntu VM using Win7 host

I've been using VirtualBox to have easy access to linux on my Windows 7 machine for a while, however, one thing that has always kept me from using it more consistently is the fact that my VMs usually come with a small native resolution making it difficult to work on my VM primarily. Well I decided recently I should change that, so that perhaps I will start using my VM more for a lot of my day to day needs.

It turns out changing this resolution is a bit more laborous that I would have thought. I started by giving my VM more video memory and more power in general, as well as updating drivers and that wasn't the problem. This is a VirtualBox setting that I need to change. In order to make those changes, follow the instructions below:

First click on the VirtualBox menu option "Devices" and look for "Install Guest Additions" (figure1). From there you will get a pop up asking if you trust this source and then you will be asked about downloading a CD image from the web, just proceed and wait for it to download and install whatever it needs to install. Once this is complete, the next step will vary slightly from distro to distro, but you basically want to mount whatever it downloaded. On Ubuntu 13.10, you should see an iso image appear on the bottom of your unity menu bar, click on that.


When you open the image you should see several options of files which you will have to chose the one appropriate to your need. Since my host is a Windows 7 64-bit, I will copy the file of the appropriate exe file to your desktop.

From here open you distro's terminal and go to desktop. For me it was just a matter of typing cd Desktop/

From here type

$ chmod +x xfilenamex

xfilenamex is the name of the file that you copied of course which in my case was

$ chmod +xVBoxWindowsAdditions-amd64.exe

This will give you priviledge to run this particular file. Next execute the file via

$ sudo ./VBoxWindowsAdditions-amd64.exe

again change the filename to whatever file pertains to your OS.This will ask you for your root credentials and install the guest additions. Now you can close your terminal and shutdown your VM

$ sudo shutdown -h now

From there go to your Windows 7 and open the windows terminal. If you don't know how, just type "cmd" on after pressing the windows button. From there look for the folder where your VM is installed on Windows. in my case it was under Program Files, but not the x86 one for some reason. There you should see Oracle\VirtualBox.

From there type

VBoxManage setextradata "xOSnamex" "CustomVideoMode1" "xresolutionx"

in my case

VBoxManage setextradata "u1310" "CustomVideoMode1" "1680x1050x32"

This didn't actually seem to do the trick, so I went ahead and also ran the following command:

VBoxManage setextradata global GUI/MaxGuestResolution 1680,1050

Now load your VM up as you normally would and this did the trick for me. I'm not sure if you need the first VBoxManage command so if you want to try just using the global command go ahead and try it out. If it works post a comment to let me know. Again I'm using a Windows 7 host OS, trying to run a Ubuntu 13.10 VM on it.