Evil Coding Monkey Ubuntu, Android, web development, open source, etc.

10Feb/140

Deploying Flex iOS7 applications on the App Store

flex-ios-appsIf you did not know already, Apache Flex is a technology (a software development kit or SDK) used to build, and deploy cross-platform mobile applications or rich Internet applications (RIA). The technology has been donated to Apache in 2011, but still uses Adobe AIR or Flash Player as runtime. For many years, Adobe has been doing a great job of keeping its runtimes compatible with Apple's guidelines and requirements.

A recent problem

In the past weeks, Apple announced that "Starting February 1, new apps and app updates submitted to the App Store must be built with Xcode 5 and iOS 7 SDK." Could this really mean the death of Flex applications for iOS?

The solution

Fortunately, Adobe released a fix that is currently available through the latest beta release of Adobe AIR. So if you plan to publish on the App Store soon, you should re-run the Apache Flex SDK Installer, and where the installer asks you to select an AIR version, just select AIR 4.0beta. Proceed with the installation, and that's it! Now build your app as you have always done, and enjoy the power cross-platform development!

Source: Building Apache Flex apps for iOS7

Update (March 2nd, 2014)

Please note that Adobe just changed the AIR versioning from 4.0 to 13.0 to synchronize it with Flash Player. When running the Apache Flex SDK installer, select the latest AIR version: AIR 13.0beta.

23Jan/1460

Ubuntu: Activate multi-touch on Elantech touchpad

elantech-touchpadIf like me you recently bought a new computer with an Elantech touchpad, and installed Ubuntu on it, chances are your touchpad lacks the multitouch features, and therefore, you can't scroll with it. This is extremely annoying to most of us. Tonight, I went back to Ubuntu bug page to realize someone has submitted a fix, and it seems to be working for many users. Just tried it on my Acer Aspire S7, and it worked perfectly for me too. So let me share it with you...

First, if you aren't sure your computer was built with an Elantech touchpad, open a terminal, and type the following:

cat /proc/bus/input/devices

You should find a block containing a line looking like this one, which confirms you are on an Elantech touchpad:

N: Name="ETPS/2 Elantech Touchpad"

Download this archive (from Ubuntu's bug reporting page).

Open a terminal, and follow these steps (after step 4, you will have no mouse at all):

cd ~/Downloads
sudo dkms ldtarball psmouse-elantech-x551c.tar.gz
sudo dkms install -m psmouse -v elantech-x551c</p>
sudo rmmod psmouse
sudo modprobe psmouse

Enjoy multitouch!

Source: Elantech clickpad/touchpad lacks multitouch features

21Aug/131

Installing Apache Flex SDK under Linux

apache-flex-small

Recently, the Apache Flex team released the latest version of Flex SDK: 4.10. This release came with a Linux installer for the first time since Adobe Flex Builder 3 alpha, several years ago. As a member of their user mailing list, I take part in certain discussions, often on the Linux support subject. It seems that users have difficulty installing the Flex SDK, even with the .deb (Debian software package) available on Apache Flex's website. Taken from those discussions, here's the easy way to install the Apache Flex SDK under Linux.

AIR dependency

Flex SDK is best installed using the SDK Installer, which requires Adobe AIR 2.6. If you didn't already know, installing Adobe AIR on Linux isn't that easy, as it is not supported by Adobe anymore. The easiest way I have found is this one:

  1. If you're using a 64-bit Linux system, install the ia32-libs (AIR is 32-bit only):
    sudo apt-get install ia32-libs
  2. Go here (http://update.devolo.com/linux/apt/pool/main/a/adobeair/) and download the AIR installer for 64-bit systems (amd64) or 32-bit (i386)
  3. Install the package you just downloaded:
    sudo dpkg -i adobeair_2.6.0.19170_amd64.deb

You're done with the installation of Adobe AIR.

Installing the SDK Installer

  1. Download the installer (.deb) here: http://flex.apache.org/installer.html
  2. Once you have downloaded the .deb, install it using dpkg (this command will force the installation, even if the AIR dependency is not resolved):
    sudo dpkg -i --force-depends apache-flex-sdk-installer-2.6.0-bin.deb
  3. Once the installer has been installed (you might encounter several warnings and errors, just ignored them), open a terminal and go the installation folder:
    cd "/opt/Apache Flex/Apache Flex SDK Installer/bin"
  4. Run the installer:
    ./Apache\ Flex\ SDK\ Installer
  5. Now you just need to decide where you want the SDK to be installed, and you're good. Everything should go smoothly.

Uninstalling the SDK Installer

I really suggest that you uninstall the SDK Installer (but not the SDK, of course!) when you're done, because it will cause you all sorts of errors with apt-get in the future. Errors that look like this:

org.apache.flex.installapacheflex:i386 : PreDepends: adobeair:i386 (>= 1:2.6.0.0) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

This can be done very easily with the following command:

sudo apt-get -f install

As always, feel free to ask any question you might have, I'll do my best to answer them. Have fun developing with Apache Flex and Linux!

16Jul/131

Advanced Linux Mouse Configuration Made Easy

logitech-mouseThose of you using a mouse with multiple buttons, such as the one shown here, probably already know how painful it can be to make it work just as you'd like on Linux. I have myself been postponing the configuration of my Evoluent VerticalMouse for years. I recently gave myself a little kick in the butt, and came up with the following solution.

Identify your mouse

First, find the exact name of your, and copy it somewhere for later use:

xinput list

Mine is: "Evoluent VerticalMouse 4"

Learn your mouse's buttons' positions

Install xev if not already installed:

sudo apt-get install xev

Open a terminal, and run xev from the command line. A small white window will open. Put your mouse in that window, and try clicking one of your mouse's buttons. You will get a lot of output for every click. You need to find a block that looks like this, the most important part being near the end (button 3 in this case):

ButtonPress event, serial 36, synthetic NO, window 0x3c00001,
 root 0x269, subw 0x3c00002, time 14058208, (44,38), root:(1725,240),
 state 0x10, button 3, same_screen YES

Now you can easily write down the number associated to every button of your mouse.

Choose the right order for your buttons

We will use xinput to change the button mapping. Starting with the button map you have just written down, you can easily swap buttons to match your preferences. For example, here's what I had at first (my mouse has three buttons like in the old times, and two thumb buttons) :

  1. Left click
  2. Middle click (paste selected text in Linux)
  3. Right click
  4. Wheel scroll up
  5. Wheel scroll down
  6. ?
  7. ?
  8. Upper thumb click (back)
  9. Wheel click (forward)
  10. Lower thumb click

Here's what I wanted :

  1. Left click (1)
  2. Right click (3)
  3. Forward (9)
  4. Wheel scroll up (4)
  5. Wheel scroll down (5)
  6. ?
  7. ?
  8. Back (8)
  9. Paste selected text (2)
  10. Lower thumb click (unused... 10)

In my case, the xinput command looks like this:

xinput -set-button-map "Evoluent VerticalMouse 4" 1 3 9 4 5 6 7 8 2 10

You can run this command in the terminal to test if your configuration works well. You can always come back to default with :

xinput -set-button-map "Evoluent VerticalMouse 4" 1 2 3 4 5 6 7 8 9 10

Make your command run at startup

We're almost done... Now create a file in your home directory with a name something like .mouse_config, and paste your xinput command in it. Open the automatic startup program that comes with your OS. Its name in Ubuntu 12.04 is Startup Applications. Add a new entry that points to your script, add a name and a description if you want to, and that's it! Enjoy a perfectly working mouse!

16Jul/120

Installing a Transmission Daemon on Ubuntu

TransmissionLet's say you have a computer (could be your home file server) on which you want to install a torrent client as daemon (command line), and manage it through a Web interface. Would be great, right? It's pretty easy to achieve but there are a couple of details you need to pay attention to.

Note: This tutorial was written for Ubuntu Server 12.04 but it doesn't mean it can't be useful for other versions or distros.

Required packages

It's pretty simple as only a couple of packages need to be installed, and they are already in the repositories. For readability, I'm putting each of them on a different line, but they should all go on the same.

sudo apt-get install transmission-cli
                     transmission-common
                     transmission-daemon

Create folders for Transmission

Even if you could always use the default folders, I like keeping track of everything, the way I want it. So here's what I've done. I think the folder names talk by themselves.

sudo mkdir ~/transmission
sudo mkdir ~/transmission/complete
sudo mkdir ~/transmission/downloading
sudo mkdir ~/transmission/torrents

Permissions

This step isn't crucial, but it will save you lots of "sudo" commands in the future. By default, Transmission always gives downloaded files permissions to the transmission group (debian-transmission to be more precise). This is why adding your user to this group could be a good idea. Make sure your replace your_user in the following commands:

sudo usermod -a -G debian-transmission your_user

Now you need to set the correct ownership and permissions:

sudo chown -R your_user:debian-transmission ~/transmission
sudo chmod -R 755 ~/transmission

A good configuration file

Now this part is very important. The configuration file must be filled correctly or else you might not be able to access Transmission's web interface. Many other things could also "go wrong". But don't worry, you can edit this file anytime in the future to fix any problem you might encounter.

First thing to do is to stop the daemon. If you don't, the configuration file will be overridden when Transmission closes the next time.

sudo /etc/init.d/transmission-daemon stop

Use any text editor (I use Nano here) to edit the configuration file.

sudo nano /etc/transmission-daemon/settings.json

You will find all possible settings here: official Transmission wiki.

When you're done, restart the daemon.

sudo /etc/init.d/transmission-daemon start

Configuration file example

Here's an example of what I have added or changed from the default configuration file. Don't forget to change your_favorite_list_url and your_user in the following example.

"blocklist-enabled": true,
"blocklist-updates-enabled": true,
"blocklist-url": "your_favorite_list_url",

"download-dir": "/home/your_user/transmission/complete",

"incomplete-dir-enabled": true,
"incomplete-dir": "/home/your_user/transmission/downloading",

"rpc-authentication-required": false,
"rpc-whitelist-enabled": false,

"watch-dir-enabled": true,
"watch-dir": "/home/your_user/transmission/torrents"

Make sure there's a comma at the end of each line, except for the last one. The last entry (watch-dir), means every torrent file your copy in that folder will be automatically added by Transmission. Download should start only seconds after that.

Port forwarding

For optimal performance in both download and upload, it is recommended to open/forward Transmission's default port, 51413. To do that, you will need to access your router's from your favorite Web browser (usually at http://192.168.0.1 or http://192.168.1.1). If you need help passed that point, I suggest googling for something like "your_router_model port forwarding". You should find plenty of information.

Access Transmission WebUI

Now that you have stopped the daemon, edited settings.json, and restarted the daemon, you should be able to access the Web interface. Simply navigate to your server/computer's IP and port 9091 (can be changed in settings.json if it doesn't suit your needs), which should look something like: http://192.168.1.101:9091.

Last step: show your girlfriend how to add new torrents using WebUI. ;-)

15May/127

Playing Diablo 3 on Ubuntu Made Very Easy!

After trying to install Diablo 3 on my Hackintosh from and original DVD an failing (it installed fine but the game won't start), I decided to look for an Ubuntu solution. This is when I learned about PlayOnLinux, a Wine graphic user interface that makes installation of Windows programs very easy. So here's a VERY EASY guide to install Diablo 3 on Ubuntu with online installation files.

  1. Make sure your game is correctly registered in your Battle.net account
  2. Download the Diable 3 Game Client (for Windows) from that same account
  3. Open the Ubuntu Software Center
  4. Search for PlayOnLinux and install it (this might take a while)
  5. Start PlayOnLinux, and complete the basic configuration steps (mostly automatic)
  6. Click on the Install button, and select the Testing category in the menu on the left
  7. Select Diablo 3, click install, and follow the instructions
  8. Complete the download/install process
  9. You're done! Enjoy Diablo 3 on Ubuntu!

Note: I had a little resolution glitch when first started the game. Changing the resolution from the login screen inside the game fixed it.

Other note: the guys at PlayOnLinux say they will support the DVD install method soon.

----EDIT----

If you're using Ubuntu 12.04, and experience the connection error #3007 over and over, here's a solution that seems to work. Before connection, open a terminal and type this command:


echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope

This solution comes from that thread in PlayOnLinux forums. Please let us know if it works for you or not.

13May/120

Installing Dictionaries in LibreOffice – Ubuntu 12.04

You just installed or updated to Ubuntu 12.04 (Precise Pangolin), and now you realize you need correction tools for a language that didn't come by default? Follow these very simple steps, and you'll be ready to go in a matter of minutes.

Make sure you have sudo access

First, you need to make sure you have administrator (sudo) rights on your system (which you most probably have if you installed it yourself). If you are not sure you have sudo access on your system, try the following:

  • Open a terminal (can be done from the Dash Home menu)
  • Type the command written below (it updates APT's local package index and is totally inoffensive)
  • The command will ask for the sudo password, enter your usual password
  • If you have sudo access,  you should see a list of package update URLs go through the terminal window
  • If you don't have access, find who does! (sorry, we can't really help you here)
sudo apt-get update

Install dictionary packages

Two packages must be installed. The first is the dictionary itself, the second will add correct hyphenation patterns to LibreOffice's corrector. Examples here are for French, but you only need to change the last part (fr) for the language of your choice. For example: sp for Spanish, or de for German.

sudo apt-get install myspell-fr
sudo apt-get install hyphen-fr

Thesaurus (synonyms and antonyms) for your language

If you are interested in having thesaurus features for your newly installed language, you only need to install one package:

sudo apt-get install mythes-fr

The shortcut to access thesaurus in LibreOffice is CTRL+F7.

Change the default language for all documents

Now that you have installed a new dictionary (and maybe more correction tools), you probably want to change the default language/dictionary for new documents you will create. Here's how to do that:

  1. Open Writer
  2. From the top menu go to: Tools / Options. A new windows will open
  3. In the left menu of this new window, go to: Language Settings / Languages
  4. Look for Default languages for documents, and just under it, choose your preferred language
  5. Take a look at the other options above if you want to
  6. Close the Options windows
  7. You should see the language you have just selected at the center-left of Writer's bottom toolbar
15Apr/122

Tips to Strong Passwords for Improved Privacy

Many people think the strongest passwords are those made of special/foreign characters such as É, &, * or ¿. A password looking like g&J2!3aQ must be pretty strong right? What about taking a dictionary word, and replacing letters with numbers, for example, 0r4ng3? Well, these two examples aren't THAT strong.

For a human being without automated tools, the first one is kinda hard to break, and the second one is a bit easier. For a specialized bot though, it's almost as easy as breaking 87654321. Many algorithms exist to help dishonest people break into your email, bank Web access, or social media accounts. I'm sure all of you will want to prevent that. Following are my personal advices for safer passwords (or pass phrases). Some are based on computer science facts, and others on real experiences from friends, and myself. They can't be taken as the ultimate truth, but will help you achieve better safety for your multiple on-line accounts.

Don't use the same password twice

Imagine you are on a public computer signing in to some irrelevant website, let's say to leave a comment on a forum, and someone sees what you are typing: your email address (which is often used as username), and your password. He can now access your email account if it is protected by the same password. From there, he can do almost anything because he'll be able to use the "retrieve your password" feature of all other websites you have an account on.

Prefer a long phrase to a complicated short password

As illustrated in this image, the longer the password, the better. More than that, you can choose it so it's easier for you to remember. "I lost my favorite green shoe" (if it means something to you), is much easier to remember than uJ@ggC9K!.

Some miscellaneous tips for short passwords

If a site limits you to a short password (10 or 12 characters for example), here are some easy tips you can follow :

  • Don't use dictionary words or people/place names, even with numbers at the beginning or end, this is the first thing password crackers will try
  • Same thing with replacing letters with "matching" numbers: m4st3r, those are broken easily
  • Find something easy to remember so you don't have to write it down, for example : 1994 with "turtles" (the year you bought your favorite turtles): 1tURt99Les4
  • You might wanna use a more complex combination of uppercase and lowercase letters, and also numbers to make it hard to break for humans

Don't change your password for no reason

If your account hasn't been compromised, and if you don't have a good reason to change your password, don't change it. You risk forgetting it or maybe not choosing a password as strong as your first one. Remember, it hasn't been cracked yet! ;-)

Please, I'm sure some of you readers will have more tips, and maybe discredit mine, who knows. Feel free to leave your comments.

8Mar/120

Free Unity 3 “basic” License

Last year I talked a bit about some of my augmented reality projects. Many of you have sent questions and posted comments so I suppose there is a certain level of interest in that field. One of the conclusions I had back then was that to achieve a certain level of quality (great lighting effects, surface reflection, etc.) when rendering a 3D model in an augmented reality project, you better use a good 3D engine (such as Unity). I still think this is true.

Yesterday I "discovered" that Unity is offering its iOS and Android "basic" license for free until April 8th. Normally, you'd have to pay $400 for each of them. So if you were unsure Unity was a good choice for your project of not, go ahead and buy it for free. ;-) What a great way to finally test it out.

  1. Go to https://store.unity3d.com/index.html
  2. Select Unity FREE
  3. Add features: iOS and Android (both free until April 8th)
  4. Proceed to checkout
  5. Open email upon reception, and follow the instructions

Now enjoy your brand new installed Unity development tools!

3Mar/123

2012: The Year I Stopped Using Microsoft Products

First, this post is about a personal crusade during which I intend to stop using ALL Microsoft products that I am currently using. My reasons to do such a thing are mostly philosophical, and I won't start hating Microsoft fans/lovers, and I truly don't want to start a fight with anyone. But feel free to add your thoughts and ideas to this post.

I work in a company where Microsoft products are too often presented as the only answer to a problem, even if nobody has taken the time to analyze other possible solutions. My team though works very hard to promote open source solutions inside the company, and among our clients. So this whole idea (dropping Microsoft products) came to me at work about 2 weeks ago. I was telling everyone in my team we should stop using MS products just to prove to "the world" that it can be done, and you can still live a happy life. Hehe! To make a long story short, I accepted my own idea/challenge! So here's what I plan to do over the following months.

Close my Hotmail account

I've had a Hotmail account for something like 15 years now, and most accounts I have opened on other websites are linked to it. This is why I'm giving me a couple of months to switch all of them to my Gmail account.

Wipe my home PC... for a Hackintosh!

I have a recent PC at home I use for music recording. My band's first album (available for free here) was partly recorded with it. Our sound engineer works with a software called Cubase, which is sold for Windows and Mac. Because everyone around me works with Cubase, I need to stick to it. This is why I passed the last few days working on building my own Hackintosh. It's been kind of an easy operation with the great help of iBoot and Multibeast found on this website. My new Hackintosh with Snow Leopard is up and running, and Cubase 6 works like a charm on it.

I'm not much of a gamer, but I do enjoy a game of Star Craft 2 once in a while. I believe I can download the Mac version of the game directly from my Battle.net account. That's good news!

Flex development

Currently working on a mobile Flex (iOS and Android) project at work, I use the Flash Builder IDE everyday, and it's Windows only. In the following weeks, I will analyze a couple of possibilities I have in front of me, and I should be able to do all my work with Ubuntu. Those are the possible solutions I have found so far:

  • fb4linux, an unofficial port of Adobe Flash Builder
  • Standard Eclipse IDE with a couple of Ant scripts
  • FlashDevelop, offering a Mac/Linux virtualization, what ever that means

Wine for Adobe Photoshop

For most of my needs, I can live with GIMP instead of Photoshop. But for more complex tasks, I prefer Photoshop. After some short research, it seems that Wine is the answer as WineHQ reports gold rating for Adobe Photoshop CS5.

Use Pidgin instead of MSN Messenger (or whatever the new name is)

Pidgin is a great chat client which works over many protocols, including gTalk. This is where I am heading.

Ubuntu as main OS

For all my computers, including my corporate notebook, I will be using Ubuntu as the only or main OS. I have tried a couple of other distros like Linux Mint, but I keep getting back at Ubuntu. My girlfriend will also switch to Ubuntu. No more Windows in the house! This means no more MS Office which will get replaced by LibreOffice and Google Docs.

Replace MS Outlook for corporate emails and meetings

My employer uses Exchange servers worldwide. My own corporate account is configured/hosted on a Microsoft Exchange Server 2010. I'm anxious to see if Thunderbird 11 will offer some level of connectivity, and if not, I will need to explore different avenues. I haven't thought a lot about this last point yet.

That's it!

After realizing all those steps, I think my "life" will be Microsoft-free. At least, I will feel like it is. OK, I will probably still be using some services that have Microsoft written somewhere under the good, such as self-service grocery checkouts. But I think I will still prove that life without buying or owning Microsoft products is possible. This also means no Ford vehicles for me as long as they'll be equipped with MyFord Touch/Ford Sync, and XBox game nights at friends' are over. Hahaha!

WordPress SEO