Search This Blog

Wednesday, 28 December 2011

Firefox & Gmail problem

Gmail says "Upgrade to a modern browser, such as Google Chrome" but I am using Firefox 8.0.1!
First I was angry at Google, but finally I discovered the cause of this problem:
  1. Type in the address bar: about:config
  2. Filter the results with: general.useragent
  3. Reset all the entries which are bold: Right click and then choose reset.


Sunday, 18 December 2011

Upgrade Ubuntu 10.10 to 11.10

I have done an upgrade from Ubuntu 10.10 (Maverick Meerkat) to 11.10 (Oneiric Ocelot) using the "Update Manager".

First I had to upgrade to 11.04 (Natty Narwhal). This worked fine and after reboot I launched directly the second upgrade to 11.10.

Here I report the problems and solutions I discovered after the upgrade:

  1. Booting did not work: "Failed to load the Nvidia kernel module"
    The reason for this was that the GRUB bootloader was loading the wrong kernel 2.6.35 instead of 3.0.0. Therefore I had to change manually the entry in the grub.conf file:
    kernel /vmlinuz-3.0.0-14 ro root=UUID=932dad41-f43a-4a60-9257-198f026da80e

    To find the UUID use:
    df -h
    sudo blkid
  2.  Replace the very annoying "Ubuntu One" standard desktop:
    Install gnome shell: sudo apt-get install gnome-shell

    Logout and login to the Gnome (no effects) desktop.
  3. phpmyadmin did not work right away. This problem was discussed previously on this blogg.

Friday, 7 October 2011

Install MySQL with PhpMyadmin in Ubuntu



  1. sudo apt-get install mysql-client mysql-server
    Specify the root password for the mysql server when prompted.
  2. sudo apt-get install apache2 
  3. Try http://localhost in your browser.
  4. sudo apt-get install phpmyadmin
  5. Add the following line in /etc/apach2/apache2.conf:
    Include /etc/phpmyadmin/apache.conf
  6. Now restart Apache:
    sudo /etc/init.d/apache2 restart
  7. Access phpMyAdmin under http://localhost/phpmyadmin

    Sunday, 19 June 2011

    Ubuntu basics

    Enable the root account:
    sudo passwd

    Sunday, 6 March 2011

    Basic plots using octave

    Save a figure into a file:
    1.  print -deps Speedup.eps
    2. use epstopdf

    Friday, 4 March 2011

    Linux Networking

    Set proxy from command line:
    Add a new file called 01proxy to your /etc/apt/apt.conf.d/ directory with the following line:


    Acquire::http::proxy "http://[user]:[password]@[server_ip_or_name]:[port#]";
    


     
    Cntlm authentication proxy:
     create new authentication:
    1. sudo usr/bin/cntlm -c /etc/cntlm.conf -I -M http://test.com
    2. enter root password
    3. copy the output into the file /etc/cntlm.conf
    4. restart cntlm
    Create a hot spot with the GNOME network manager:
    By using "Create New Wireless Network ..." only an  ad-hoc network is created. These kind of networks are not detected by my htc desire hd phone. See this blog for a discussion.

      Sunday, 27 February 2011

      Linux basics:

      Cache
      • How can I know my cache sizes? dmesg | grep cache
         
      • My CPU is the Intel Core 2 Quad Q6600 @ 2.4GHz:
        L1 I cache: 32K, L1 D cache: 32K
        L2 cache: 4096K
      • for each core
      Secure Copy (scp)
      Copy the file "foo" from local host to a remote host :
      scp foobar.txt your_username@remotehost.edu:/some/remote/directory

      Finding files
      find / -name license.dat

      Counting files
      ls -laR | wc -l

        Monday, 10 January 2011

        C++

        Converts an integer into a string:
        (This works also with other data types float ...) 

        #include <sstream>
        int i = someNumber;
        std::string s;
        std::stringstream out;
        
        out << i;
        s = out.str();
        
        Output to files:
        #include <iostream>
        #include <fstream>
        
        std::ofstream myfile;
        myfile.open("example.txt);
        myfile << "Writing to my file ...\n";
        myfile.close;
        

        Saturday, 8 January 2011

        Peripherials

        Serial Ports (RS232)
        • Displaying all the configuration information of a serial port: setserial -a /dev/ttyS1
          Alternatively: stty -a /dev/ttyS1
        • Setting the Baud rate: stty -F /dev/ttyS1 115200
        • Write to the port: echo blaba > /dev/ttyS1
        • Listen to the port: cat /dev/ttyS1
        • Serial programming guide
        • termios
        • The linux hyper terminal: gtkterm

         Installation of the Printer Brother DCP-7030 in Fedora 10
        1. Get the linux driver from the brother solution center (lpr + Cups)
        2. Access to Cups at http://127.0.0.1:631/.
        3. Go to ->Printers ->Modify Printer
        4. Choose the device DCP 7030 at USB #1.
        5. Load the PPD-file from /etc/share/PPD. 

        Installation of the Printer Brother DCP-7030 in Ubuntu 11.10
        1. Get the linux driver from the brother solution center (lpr + Cups wrapper)
        2.  Install both of them with the Ubuntu Software Center.
        3. Access to Cups at http://127.0.0.1:631/.
        4. Go to -> Administration ->add Printer. Use the usual login for authentication.
        5. Choose the device DCP 7030 at USB #1.
        6. Load the PPD-file from /usr/share/cups/model.

        What video card am I using?

        The command lspci lists al pci (peripherial component interconnect) devices:
        Vidia GeForce 8800GT.

          SVN

          The main resource of information for subversion is the red book. Here I list a few important commands for fast reference.

          Create a new repository:
          1. On the server: svnadmin create /svndir/reposname
          2. From the client: svn co svn://ip_address/reposname
          3. cd reposname
            mkdir trunk
            mkdir tags
            mkdir branch
            svn add *
            svn ci
          Save and restore a repository:
          1. Create a dump: svnadmin dump /svndir/repos/gwt > /backupDir/svn_gwt.dump
          2. Create the repository: svnadmin create /svndir/repos/gwt
          3. Load the repository: svnadmin load /svndir/repos/gwt < /backupDir/svn_gwt.dump
          Examining the history of a repository:
          •  Shows revisions 5 to 19 of a file or directory: svn log -r 5:19 file/directory_name
          •  "svn diff" with no options compares the working directory with the version from the last check out.