Harry Seldon's blog

Psychohistory on Rails

Read

Wifi on Intrepid

Posted by Harry Seldon on December 18, 2008

For one year, I have got plenty of troubles with the wifi under Ubuntu. I even got some troubles when I migrated to Intrepid Ibex. But I am pleased to say that finally the wifi management seems much better under Intrepid than under the previous versions.
To solve my troubles I just needed to clean the interfaces file, to reinstall the packages network-manager and network-manager-kde. Recently, I switched of wifi network and it worked smoothly. Amazing !
However, I still do not know how to freeze the IP address. If you have an idea please leave a comment !

Posted in | no comments |

Migration to KDE4, nvidia, show desktop, quicklaunch, and multiline taskbar

Posted by Harry Seldon on November 19, 2008

With the migration to Intrepid, I got KDE4. The first impression is ‘wow it is shiny’ ! The second impression is ‘does it work’ (it was not) ? The third impression, once it works, is ‘how does it work’?

I got this second impression because everything was very slow. So I was strongly doubting everything was nominal. Indeed, I was having troubles with the nvidia configuration for KDE4. The one line answer to solve the problem is:

nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1

The full solution can be found here. Thanks to him.

Then it was finally working but I quickly understood that I did not know how it was supposed to work. I was lost. I did not know how to get new ‘plasmoids’. I did not understand why I had lost my ‘show desktop’ icon or why I had lost my quicklaunch icons. So first I wanted to have these back. Here is how.

First you need to know that all these features are now “plasmoids”. KDE4 seems to be powered by a soft called Plasma. Therefore, the widgets for plasma are called plasmoids. OK that is logical. To install a new plasmoid you click the taskbar and you click ‘add plasmoid’, simple enough. Then you need to know which plasmoid you are looking for and where to look for, it is a little harder.

The show desktop feature can be activated using the plasmoid ‘show desktop’. It is simple if you have it in the options which was not my cause. So for info, make a sudo apt-get install plasmoid* or sudo apt-get install kubuntu-desktop and then you will have it in your menu.

For the quicklaunch feature you need the plamoid quicklauncher available on kde-look at this place.

I am still missing a few things :

Overall, I really like KDE4 but I am looking forward to having it more practical and professional. Currently, it reminds me when I played around with OS/2 Warp some 15 years ago. It was shiny and full of good ideas but some basic things were missing (like a practical file manager).

What do you think of KDE4? What are your preferred plasmoids?

Posted in | 5 comments |

Kubuntu migration from Hardy to Intrepid : a piece of cake (or not)

Posted by Harry Seldon on November 19, 2008

In life there are things that change and things that do not change. Linux is an always changing and evolving thing. However, the fact that after each migration I lose my wifi connection is something that does not change. But now I am used to it, so before the migration I pulled my ethernet wire to be ready and happy! Let us see how this migration from Ubuntu 8.04 (Hardy Heron) to Ubuntu 8.10 (Intrepid Ibex) went.

I told you about the wifi but it was not exactly the most surprising thing. First when I wanted to migrate using adept manager it appeared that adept did not want to propose me the migration. So after updating, I forced it:

sudo adept_manager --dist-upgrade

But then after a few seconds, I got an error message saying the following:

  
Could not calculate the upgrade
A unresolvable problem occurred while calculating the upgrade.
This can be caused by:
* Upgrading to a pre-release version of Ubuntu
* Running the current pre-release version of Ubuntu
* Unofficial software packages not provided by Ubuntu
If none of this applies, then please report this bug against the 'update-manager' package and include the files in /var/log/dist-upgrade/ in the bugreport.

I learnt that way I was running the development version of Hardy. This was due to the fact I had activated the backports at some point to get a file that could help solving my wifi troubles. In fact, I did not only get this file but probably updated all my distro to the dev level. Since then I had desactivated the backports but too late.

Finally, I chose to persist in the mistake (diabolicum est). I activated back the backports and launched again the migration and this time it worked. Bonus is I was glad to solve an “unresolvable problem”!

Hum, it almost worked to be accurate. Indeed after the reboot I got the infamous black screen with the white cursor at the top left corner. Thing is I was not that surprised because I had already got plenty of troubles with my nvidia video drivers. So I thought about an xorg problem. It was not only that.

I ran the safe mode and ran the dpkg option. First time, it made some things then I got an error. OK, I rebooted and did it again, same thing, it did some new things and then crashed. OK, I am patient, I do it again. This time it worked. I was finally able to boot my PC and I met KDE4. I knew KDE4 was around. However, I had thought I would have the choice between KDE3.5 and KDE4. I did not. OK, let’s go for this long awaited KDE4. Let me tell you straight I should have waited for longer, it is promising but not ready yet.

Let’s finish the migration before speaking about KDE4. After finally getting to the desktop, I quickly realized the internet connection was not working, not only the wireless connection which I expected but also the ethernet connection. The weird thing is the wifi connection seemed to work because all the usual parameters were green (access point, IP adress etc.) but I had no internet. Anyway, I finally got the ethernet connection working when I shut down the wireless connection.

With the internet connection I could at last fight the other [problems I had due to KDE4] (See next post).
Before going to the next post, I’d like to thank the guys at ubuntu-fr who answered my questions during this migration.

How was your migration?

PS Here is the error message in French for guys who would like to google it.

Impossible d'évaluer les mises à jour nécessaires   
Un problème insoluble est survenu lors de la préparation de la mise à niveau.   
 Ceci peut être dû à :  
 *la mise à niveau vers une version de développement d'Ubuntu ;   
 * la version de développement d'Ubuntu est actuellement utilisée;   
 * des paquets logiciels non officiels, non fournis par Ubuntu.  
 Si rien de ceci fonctionne veuillez signaler ceci comme un bogue du paquet "update-manager" et inclure les fichiers présents dans /var/log/dist-upgrade dans votre rapport de bogue.     

Posted in | no comments |

Some useful commands in Linux administration when making a website.

Posted by Harry Seldon on September 27, 2008

This is a cheatsheet of useful commands in Linux administration when making a website in Rails. I am using these commands over and over again so I thought it might help someone.

Linux 
—–
Detailed list of files 
    ls -l 
List the running processes 
    ps -e  
Create a directory 
    mkdir demo 
Kill the use of a specific port (I use it when Aptana/RadRails crashes and do not close the port) 
    fuser -k 3005/tcp  
Delete a directory and subdirectories, without confirmation, verbose mode. (BE CAUTIOUS !) 
    rm 20080120165422/ -r -f -v  
Add a cron jon 
    crontab cron_job.txt 
List cron jobs  
    crontab -l 
Create cron job 
    crontab -e 
Mount a local virtual directory for an actual remote directory 
    sshfs ‘-oworkaround-rename’ username@ssh.domain.com: /home/username/remote/ 
 
MySQL 
—–
Connect to mysql local server: 
    mysql -u username -p 
Connect to mysql remote server: 
    mysql -u username -h mysql.domain.com -p 

Create databases (Rails style) 
    CREATE DATABASE demo_development; 
    CREATE DATABASE demo_test; 
    CREATE DATABASE demo_production; 

Rails 
—–
Create a rails app 
    rails demo  
Install a plugin 
    script/plugin install git://github.com/pullmonkey/open_flash_chart.git 
Install a plugin, force reinstall 
    script/plugin install git://github.com/pullmonkey/open_flash_chart.git –force 
Launch server on a specified port 
    script/server -p 3005  
Open a console where you can send ruby commands to your app (Extremely useful!) in dev mode
    script/console development
Open a console where you can send ruby commands to your app (Extremely useful!) in prod mode (BE CAUTIOUS !)
    script/console production
Migrate the database 
    rake db:migrate 
Migrate the database to a given version  
    rake db:migrate VERSION-22 
Migrate the production database 
    rake db:migrate RAILS_ENV-production 
Install gem  
    gem install RedCloth 
Install a given version of Rails 
    gem install -v-2.0.2 rails  

Git  

Checkout a repo 
    git clone git://github.com/pullmonkey/open_flash_chart.git   
Get the differences 
    git diff 
Fetch from and merge with another repository or a local branch 
    git pull 
Checkout  
    git checkout 
Configure the user settings 
    git config –global user.name "toto" 
    git config –global user.email "toto@example.com" 

H

Posted in | no comments |

Tile windows on Linux

Posted by Harry Seldon on August 09, 2008

In the same kind of ideas as my post on 2 monitors, it would be great to be able to tile windows under Gnome or KDE. Some people thought about it as some softs do it : whaw or a compiz plugin (but using compiz to do that is really an overkill).

Morover it is a common subject on forums : ubuntuformums or unbuntu-fr.

So Finally if you like getting well organized windows, vote for the idea on brainstrom :

H

PS I love brainstorm which is much like what I wanna do for Thinkosphere. First time I learnt about brainstorm I was searching on vote not on ubuntu !

Posted in | no comments |

Ubuntu Global Bug Jam in Toulouse

Posted by Harry Seldon on August 09, 2008

I went yesterday night to the Ubuntu Global Bug Jam. The session in Toulouse was organized by Christophe Sauthier, Ubuntu-Fr association president and toulibre association. Many thanks to them !

For most of us it was an opportunity to learn more about launchpad and its bug tracking system. Those like me who did not have an account on Launchpad created one. Then we helped sorting bugs for instance adding the package related to the bug. Christophe gave us this link to directly go to the bugs needing packaging. He also showed us how to forward a bug to the original developpers of the package (upstream process) and finally we learnt about the translation process on launchpad.

This was a cool party and an opportunity to meet the ubuntu community in toulouse. Thanks Christophe.

Posted in | no comments |

Wifi on Linux

Posted by Harry Seldon on August 08, 2008

I installed Kubuntu Feisty about one year ago. That was my first Linux installation. Since then I got plenty of troubles with my (pci) wifi card a WMP54G with a ralink rt61 chipset. But the most surprising is that each time you update the ubuntu version you need to setup again but differently your wifi network. My first advice is use a wirewith connection as much as you can. My second advice is if you have a rt61 chipset just change it. A wireless card is not that expensive. I should have done that one year ago, I would have avoided many troubles. Under Feisty Fawn after some work the wifi was perfectly working in wpa. With Gutsy Gibbon it was working ok but only in wep. And with Hardy Heron, it is working in wep but I still have some weird problems. The wifi card does not wake up from suspend ot hibernate and if my router is rebooted I cannot connect. In all cases I need to reboot. Here is my configuration.

In my current configuration I have uninstalled networkmanager or wicd. My /etc/network/interfaces file has :

    auto ra0
    iface ra0 inet static
    address 192.168.0.1
    netmask 255.255.255.0
    gateway 192.168.0.254
    wireless-essid myssid
    wireless-key 0000000000

To solve the wifi loss on hibernate problem I tried to add “rt61pci” to the MODULES_WHITELIST in /etc/default/acpi-support file :

    # Note that network cards and USB controllers will automatically be unloaded
    # unless they're listed in MODULES_WHITELIST
    MODULES=""

    # Add modules to this list to leave them in the kernel over suspend/resume
    MODULES_WHITELIST="rt61pci"

It had some effect. Now the wifi card is alive (connected to the local network, ip ok) after standby however internet connection still does not work. In case you need to know the name of your wifi module you can use the command :

    sudo lshw # lists your hardware and the drivers used.

From this bug report it seems that installing the linux-backports-modules-hardy-generic package should help. That will be my next step.

By the way here is a list of useful commands to configure your wifi on Linux :

    lsusb # USB hardware list
    lspci # PCI hardware list
    sudo lshw -C # network network hardware list
    lsmod # loaded modules list
    iwconfig # wifi interfaces list
    ifconfig # network interfaces list
    iwlist # list of the networks that can be scanned by the wifi hardware
    cat  /etc/network/interfaces # gives you the content of the interfaces file
    cat /etc/lsb-release # gives the Linux version you are using
    uname -r -m # gives the Linux kernel you are using
    sudo ifdown ra0 # stops the ra0 interface 
    sudo ifup ra0 # starts the ra0 interface
    sudo /etc/init.d/networking restart # restarts your network interface

This list can also be found in French here .

Here is a short list of wifi managers.
network-manager, knetworkmanager, wicd, rutilt, kwifimanager, wifi-radar.
I tried all of them. Wicd proved to be useful in my case even if I am not currently using it. I am still using kwifimanager only to display the state of the connection, it does not configure anything.

I hope you got less troubles with your wifi setup.

Posted in | no comments |

Search