Sunday, August 17, 2014

New Ubuntu Install Essentials

This is a live document I am keeping for myself of everything I need to do when I setup a new machine with Ubuntu. It is not intended to necessarily be useful for anyone else.

PPAs

ppa:libreoffice/ppa
ppa:git-core/ppa
ppa:jtaylor/keepass
ppa:byobu/ppa
ppa:dlech/keepass2-plugins



sudo add-apt-repository ppa:libreoffice/ppa

sudo add-apt-repository ppa:git-core/ppa
sudo add-apt-repository ppa:jtaylor/keepass
sudo add-apt-repository ppa:byobu/ppa
sudo add-apt-repository ppa:dlech/keepass2-pluginssudo add-apt-repository ppa:openjdk-r/ppa

Programs To Install

zsh
oh-my-zsh
byobu
Google Chrome
keepass2
git
gitgssh
unity-webapps-gmail
unity-webapps-googlecalendar
unity-webapps-googleplus
unity-webapps-pandora
unity-webapps-youtube
Owncloud
keepass2-plugin-application-indicator
keepass2-plugin-application-menu
keepass2-plugin-keepasshttp
gnucash
openjdk-8-jre
wine

sudo apt-get install zsh byobu keepass2 git gitk gitg ssh unity-webapps-gmail unity-webapps-googlecalendar unity-webapps-googleplus unity-webapps-pandora unity-webapps-youtube keepass2-plugin-application-indicator keepass2-plugin-application-menu keepass2-plugin-keepasshttp gnucash openjdk-8-jre wine
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
rm google-chrome-stable_current_amd64.deb
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_14.04/Release.key

sudo apt-key add - < Release.key
rm Release.key
sudo apt-get update
sudo apt-get install owncloud-client
ssh-keygen -t rsa -C "maxolasersquad@gmail.com"
# This then needs to be added to https://github.com/settings/ssh
wget --no-check-certificate http://install.ohmyz.sh -O - | sh
cd ~/.oh-my-zsh/
git remote add maxolasersquad git@github.com:maxolasersquad/oh-my-zsh.git
git pull maxolasersquad master
git push maxolasersquad master
byobu-enable

Firefox Plugins

https://addons.mozilla.org/en-us/firefox/addon/uacontrol/
This needs to be configured as follows.
Site: www.netflix.com
Custom: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/31.0

Weather Indicator

sudo add-apt-repository ppa:pywapi-devel/ppa
sudo add-apt-repository ppa:weather-indicator-team/ppa

Next, these entries need to be changed from 'trusty' to 'saucy'.

sudo apt-get update
sudo apt-get install indicator-weather

Tuesday, August 12, 2014

Facebook Messenger Controversy Explained

I have seen a number of people on Facebook reposting a "news" articles explaining the privacy violations of Facebook's Messenger application. A number of people have declared that they have uninstalled Facebook from their phone completely. Even the reviews featured on the application's page on the Google Play Store are all complaining about the privacy invasion.


The article, which I am not linking to here (you can Google it), set off a lot of red flags. I have never written an application for Android, though I have followed their developer's tutorials a few times. I'm not an expert on Android development, but I have a rough understanding of the basics.

When writing applications for a desktop computer (PC, Mac, etc.) applications have a lot of access to the computer hardware. Mobile devices are much more restrictive. Android locks out key functionality of the hardware from the applications that are installed. Before an application can have access to these parts of the system the application must first "request" permission. This is done by declaring in a file what permissions you need for your application. This includes permission to make and receive calls, access to the contact list, use the microphone, GPS, etc. This allows users to review and approve an application's access before installing it.

However, if an application needs any access to one of these resources it can either always have access to that resource or never have access. This can make some applications look more scary than they are. For example, an application that shows you the weather based on the city you are in will need access to your GPS and the Internet. Granting these permission could allow this application to surreptitiously spy on you without your knowledge and report that back to some database, but it does not necessarily follow that it is actually spying on you.

This is how the Messenger scare is working. For example, there is a feature that allows you to record an audio clip and then send it to a friend to listen to whenever they have the chance. To provide this functionality the application has to require access to the microphone. With this access the application could be listening in on you. However, the mere fact of the application having this permission is very, very different than proof  that it is spying on you. In fact, it is not evidence at all. Fortunately it actually is possible to know if the application is using this permission for these purposes, but I'll get to that later.

There is a great deal of irony in seeing people complain on Facebook about the privacy implications of their messenger application. It is hard to imagine how the privacy concerns of Facebook itself can be acceptable, but the possible implications of the Messenger applications are not. There are much better ways to protect your privacy than uninstalling a single application.

One way I protect myself is by running an aftermarket version of Android called Cyanogenmod. It is based on the Android Open Source Project and is fully open source. The version of Android that carriers ship contain a lot of proprietary code that they have written to customize the experience. In the past some carriers have been shown to spy on their users in ways that where very embarrassing to the companies, and they where forced to remove it. However, there is no guarantee that many devices are not reporting on their users in ways that users would not agree with. In a post Snowden-world this is more than paranoia, but actually very likely.

A nice feature of Cyanogenmod is that it provides much more fine-grained control over an applications privacy settings. Usually if you do not trust an application to have a permission it is requesting, your only recourse is to not install the application at all. Privacy guard allows the users to turn off any feature, or put it on "always ask." It also reports how often an application has used a permission and when it did it last. This allows us to peer into what an application is actually doing with the access it is requesting.

What follows is a very long list of all of Messenger's permissions and reports on its use.

Click to enlarge
So let's talk a little about what is going on here. As you can see, Messenger has to ask me before it can know my location. The only time it ever actually does that is when I message somebody. and that's only because I checked the "New messages include your location by default" box in Settings. It has never attempted to read my call log, calendar, SMS (text message) database or send or a text message, record audio, or make a phone call. In fact almost everything in here is looking pretty legit. Almost.

You may notice the "Read Contacts" section. I have it set to Deny. Why? Look at the subtext. "Allowed 1854 times, denied 429 times." I had set this to Ask for a little while. I noticed that whenever I made or received a phone call or text message that the Messenger app was trying to read my contacts. I can imagine some semi-legitimate reasons why it might be doing this. For example, it may be trying to gauge who are the friends I contact the most so that it can then prioritize their posts on Facebook.

However, this is too creepy. I do not want Facebook knowing this level of detail about my life. I do not want them knowing every time I send or receive a phone call or text message and who I was communicating with. I think that there is an actual new story behind this and would be worth someone's time to grill Facebook on and educate the public.

And that's the real point. There are legitimate privacy implications of these portable computing devices we are carrying around in our pocket. People need to be more informed on what those implications are and have the education necessary to make informed decisions on how to manage these privacy concerns. Yellow-journalism articles that spread half-truths, getting people riled up about nothing-much are more hurtful than they are good.

Friday, January 17, 2014

It May Be Time to Abandon Artificial Sweeteners

I have never been a fan of artificially sweetened food products. At first I just wanted things that are delicious, but as I get older I am thinking more and more about my health, and so these decisions are becoming more important. However, I feel that if I am going to put trash in my body, it should at least be delicious.

I find artificial sweeteners to be disgusting. I can pick them out too. When my wife buys something artificially sweetened, sometime on accident, I notice the flavor immediately. Many people claim that they cannot tell the difference in the taste, but I can definitely tell the difference. The worst part, for me, is the horrible aftertaste that artificial sweeteners leave on my tongue.

So when I want to be healthy I consume things that are both healthy and delicious. I can enjoy a glass of water, a plate of broccoli, or use a carrot as a snack with no problem. A lot of more recent research, though, is suggesting that choosing food products sweetened with real sugar may be more healthy than their low-calorie, artificially sweetened counterparts.

In Trends in Endocrinology & Metabolism, researcher Susan Swithers publishes "Artificial sweeteners produce the counterintuitive effect of inducing metabolic derangements" findings that show artificial sweeteners may be messing up our body's ability to properly process real sugar, which she discussed on NPR's Science Friday.

According to Swithers, when our brain detects sugar from smell or taste it tells your digestion system to get ready to start processing the sugar very soon. As most of us know, our bodies ability to properly process sugar is vital to our health. When it cannot process sugar right it can lead to diabetes. When we train our bodies that the sensation of sweet does not equate to the consumption of sugar, our bodies gets tired of your nose and tongue crying wolf and stops directing our digestion system appropriately. When we really do consume sugar our bodies stop processing sugar like it should and, according to Swithers, could be leading to an increased risk of diabetes.

There is also evidence found by researchers at John Hopkins University that those who consume foods using artificial sweeteners may also be making up for the lost calories by consuming them in higher quantities in other foods. There are many reasons why this may be true, but the overall result may not be quite what dieters are looking for.

At the end of the day, if we want to be healthy we need to stop consuming unhealthy foods and switch to more healthy foods. Tea and coffee can be healthy zero-calorie drinks in moderation, for those who simply find moving to drinking more water to be too hard.