Tuesday, January 10, 2012

The ATI Radeon install blues


YACLM - Yet another cheep linux machine equals picking up another machine with the exciting missing proprietary drivers for ATI Radeon graphics cards.

Graphics Card

What this means in a practical sense, is geting vertical lines instead of an install screen when installing Linux. Here are the steps for (specifically Acer X1470 towers) installing using vesa aka "safe mode" in Ubuntu 11.10

When the CD loads you will get 3 options. Try without installing, Install, and check the CD.
Get your cursor on the Install line, push e to go into edit mode.

Remove quiet splash, in their place add: xdriver=vesa nomodeset

The result will be the ability to install Ubuntu on 800x600 resolution, but at least it installs.

Once you have installed, you can follow online instructions for setting up the drivers you need to get an enjoyable resolution.

If you have Graphics/ X windows/some colors and menus:

1. Go to System Settings and search for "Additional Drivers."

2. Observe "ATI/AMD proprietary FGLRX graphics driver" is not activated.

3. Hit the activate button.

If you have nothing but a command prompt (no Graphics no X windows)

$ sudo nano /etc/apt/sources.list
Uncomment the lines that add "Partner" sources by removing the '#':
$ sudo get-apt update
$ sudo apt-get install fglrx fglrx-amdcccle


Booting alongside Windows 7

In my case it auto-booted to windows without any possibility of choosing. To get access to grub I put the install CD back in and pushed c when it offered me a menu. In my case, my linux was at (hd0,msdos5).

configfile (hd0,msdos5)/boot/grub/grub.cfg



That was informative, and how I got access to my install, but not what worked in the end.

  1. Boot the LiveCD Desktop.
  2. Open a terminal by selecting Applications, Accessories, Terminal from the menu bar.
  3. Determine the partition with the Ubuntu installation. The fdisk option "-l" is a lowercase "L".
    1. sudo fdisk -l
      If the user isn't sure of the partition, look for one of the appropriate size or formatting.
      Running sudo blkid may provide more information to help locate the proper partition, especially if the partitions are labeled. The device/drive is designated by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. For most users the MBR will be installed to sda, the first drive on their system. The partition is designated by the Y. The first partition is 1, the second is 2. Note the devices and partitions are counted differently.
  4. Mount the partition containing the Ubuntu installation.
    sudo mount /dev/sdXY /mnt
    Example: sudo mount /dev/sda1 Note: If the user has a separate /boot partition, this must be mounted to /mnt/boot Note: If the user has a separate /home partition, this must be mounted to /mnt/home. Encrypted home partitions should work.
  5. Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.
    sudo grub-install --root-directory=/mnt /dev/sdX
    Example: sudo grub-install --root-directory=/mnt /dev/sda
Wifi

The machine I got also didn't have wifi, so I had to take it to an eithernet enabled location to install my wifi usb key which I had kicking around from previous towers. 

One stop shop for Belkin FD7050 
http://wiki.debian.org/rt2500usb


References:
https://help.ubuntu.com/community/Grub2#Reinstalling_GRUB2
http://ubuntuforums.org/showthread.php?t=1760872
http://askubuntu.com/questions/84811/installed-ubuntu-11-10-alongside-windows-7-getting-grub-menu-on-boot
https://bugzilla.redhat.com/show_bug.cgi?id=521322
http://mrrichard.hubpages.com/hub/2-Ways-to-Install-FGLRX-in-Ubuntu-1110-Oneric
http://askubuntu.com/questions/79416/black-screen-after-installing-ubuntu-11-10-amd-64-altenate-radeon-graphics-card


Sunday, December 25, 2011

Redmine on Ubuntu 10.10

Most tutorials for setting up Redmine on Ubuntu end with using Webbrick to test, but I wanted a production setup. This is a reconstruction of what finally worked (assuming no prior installs of ruby or rails, but a fully set up LAMP stack):

$ sudo apt-get install ruby-dev redmine
$ sudo gem install passenger
$ sudo apt-get install apache2-dev libapr1-dev libaprutil1-dev 
$ echo "export PATH=/var/lib/gems/1.8/bin:$PATH" >> ~/.bashrc
$ sudo /var/lib/gems/1.8/bin/passenger-install-apache2-module 
$ sudo a2enmod rewrite

$ sudo vim /etc/apache2/sites-enabled/000-default
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.11
PassengerRuby /usr/bin/ruby1.8
...snip...
<VirtualHost *:80>
  ServerName redmine.yourdomain.ca
  DocumentRoot /usr/share/redmine/public
  <Directory /usr/share/redmine/public>
    AllowOverride all
    Options -MultiViews
  </Directory>
</VirtualHost>


And some bind, if you are running your own DNS...

$sudo vim /etc/bind/named.conf.local

...snip...
zone "yourdomain.ca" {
      type master;
      file "/var/lib/bind/yourdomain.ca.hosts";
};

$sudo vim /var/lib/bind/yourdomain.ca.hosts

$ttl 38400
yourdomain.ca.    IN    SOA    tower110103. yourdomain.gmail.com. (
            1287417087
            10800
            3600
            604800
            38400 )
yourdomain.ca.    IN    NS    ns1.yourdomain.ca.
yourdomain.ca.        IN     A       192.168.1.5
redmine.yourdomain.ca.    IN    A    192.168.1.5
ns1.yourdomain.ca.    IN    A    192.168.1.5    

Restart apache and bind

$ sudo /etc/init.d/apache2 restart
$ sudo /etc/init.d/bind9 restart



References

  • https://help.ubuntu.com/community/RubyOnRails
  • http://finiteline.homeip.net/index.php/programming/70-ruby/100-redmine-on-ubuntu-11-10
  • http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_Ubuntu
  • http://www.redmine.org/projects/redmine/wiki/HowTo_have_both_development_and_production_environment_available_from_Apache_with_VirtualHost

Monday, November 7, 2011

Bare Singulars and Bare Plurals

Since my final paper for our Advanced Semantics Seminar on Plurality, generics and bare singulars (including incorporated nouns) and bare plurals have been near and dear to my heart.

Naturally a post on generic comparisons on the Language Log quickly got my attention. Liberman argues using generic plurals toys with the gap between statistically significant generalizations and the grammatical genericity/generalizations
 that the results are presented in a way that misleads the public — and in some cases, the use of generic plurals seems to mislead the scientists themselves.
He sites a number of examples from by Sarah-Jane Leslie  about "Generics and Generalization"
 "Ticks carry Lyme Disease", although only a minority of ticks do so (14% in one study). 
"Mosquitoes carry West Nile Virus", though the highest infection rate found in the epicenter of a recent epidemic was estimated at 3.55 per thousand (and the rate was essentially zero outside of the epicenter).
"Ducks lay eggs" and "Lions have manes", though in each case the prevalence is at most 50%. (Female Ducks lay eggs, and only Male Lions have manes). 

Sunday, November 6, 2011

Fighting the Unicode Fight

Almost anytime I have to build a new corpus the Unicode Fight returns. I lived many Unicode Fight free years when Linux became 100% Unicode, but now I'm using Mac OSX.

The default file.encoding for Mac is MacRoman. I've tried a whole variety of Googling to find the keywords to find out the proper way (using the System Preferences) to set the default to UTF-8 to no avail. I really hate Google's new (~6mos ago) search algorithm that tries to guess what we mean to ask, and doesn't include all keywords we query. It makes it near impossible to find anything long-tail-ish.

This is when it started working in Java/Groovy:

  • created a file /etc/launchd.conf and put this into it:

 setenv JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
For general purposes:
  • added this to my ~/.vimrc
set encoding=utf-8
set fileencoding=utf-8
  • added this to my /etc/bashrc
export LC_CTYPE=en_CA.UTF-8
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
  • Changed my Terminal > Preferences > Encodings to only UTF-8, and Terminal > Preferences > Settings > Advanced > International to UTF-8 (I also put the Font to Menlo)
  • For good measure I changed all my text input to Inuktitut (that ought to force Unicode for good :)

I'm pretty sure this will have dastardly side-effects for any of my Java programs (I'm most curious about Eclipse and GATE)... we'll see.


Now groovy picks up the flag and sets the encoding to UTF-8
$ groovy -e "println System.properties.'file.encoding'"Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UTF-8
And Inuktitut now prints out on in the GroovyConsole, instead of ????? My groovy code which contains Inuktitut isn't getting saved as MacRoman  replacing all Inuktitut with ? anymore by GroovyConsole, ah... finally.

Tuesday, November 1, 2011

Bootstrapping Android Best Practices

Today I'll be giving a talk at Android Montreal:

Bootstrapping Android Best Practices



Like human language, programming languages are
  • One part syntax, 
  • One part vocabulary, and 
  • One part culture/socio-linguistics. 
Too often when learning a new language we focus on syntax and vocabulary, but not enough on culture/best practices. Sure in our courses we might learn that the French like wine and baguettes, and wear berets, but on the ground its not really that simple (n'est pas?). In this tutorial we "immerse" ourselves in the culture of two projects to simultaneously learn syntax, vocab and best practices for getting things done in Android Development.

We have selected a few repositories, 2 which show best practices, and 2 pairs of pidgins vs best practices which show not fully formed Android development.


Beginner-Friendly Best Practice Learning Grounds

MyTracks

Replica Island

Pidgins vs. Best Practices Pairs

Two page-curl repos

Three Blogger clients

Google IO Sched 2011
  • Advanced: using fragments for phones and tablets (warning: this creates many layers of abstraction so its hard to navigate as a beginner) 
If you want to use MyTracks you will need to follow their steps to set up your Eclipse environment, and update your AVD manager.

Monday, October 31, 2011

One busy month

I have been really busy with my other app and conferences so I didn't push out any new releases of AuBlog, and it shows in my active installs. The active installs are staying pretty constant.

I have a couple of projects to work on before I can release version 2 of AuBlog which I would like to make GUI-free and really focus down on a couple of core features. I'm targeting January...



Total active installs