Canonical will develop an environment wich will allow Andoid applications to run on Ubuntu. Source. Also, HP considers dropping Windows for Android in netbooks. Source. |
Monthly Archives: May 2009
Android applications running on Ubuntu
Random crash of the X server in Jaunty
I experienced a lot of random X server crashes using the proprietary driver for the NVIDIA graphic card on my Thinkpad T61 running Ubuntu 9.04 x86 with Compiz activated.
I managed to fix the problem by installing the lastest NVIDIA driver. I wrote a little script to automate the process and save time. I recommend you to run this in command line mode. Here it is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
#!/bin/bash # Check if the X server is running pid_of_X=`ps aux | grep X | grep -v 'grep' | grep root | awk '{ print $2 }'` if [ -z "$pid_of_X" ]; then echo -e '\n\n\n\n\n\n\n\n\n' echo -e 'X is not running! - Good!\n' # Stop the xserver (GDM) sudo /etc/init.d/gdm stop cd $HOME/Desktop if [ -e latest.txt ]; # Check for 'latest.txt' file then rm -f latest.txt fi if [ -e NVIDIA-Linux-x86-* ]; # Check for 'NVIDIA-Linux-x86-*' file then rm -f NVIDIA-Linux-x86-* fi # Get the latest driver from NVIDIA's ftp nvidia_ftp='ftp://download.nvidia.com/XFree86/Linux-x86' wget -c -T 10 $nvidia_ftp/latest.txt new_driver_version=`cat latest.txt | awk '{ print $1 }'` new_driver_filename=`cat latest.txt | awk '{ print $2 }'` wget -c -T 10 $nvidia_ftp/$new_driver_filename chmod +x $HOME/Desktop/NVIDIA-Linux-x86-* # Remove all nvidia* packages in the system sudo dpkg -l | grep nvidia | awk '{ print $2 }' | xargs sudo aptitude -y purge # Remove all the nvidia kernel objects currently installed export kernel_version=`uname -r` sudo rm -f `find /lib/modules/$kernel_version -iname nvidia.ko` # Install the new driver sudo sh $HOME/Desktop/NVIDIA-Linux-x86-*.run rm -f NVIDIA-Linux-x86-* rm -f latest.txt echo -e '\n\n\n\n\n\n\n\n\n' echo -e '---------\n' echo -e 'All done!\n' echo -e 'Starting GDM in 5 seconds...\n' sleep 5 # Start GDM sudo /etc/init.d/gdm start else echo -e '\n\n\n\n\n\n\n\n\n' echo -e 'X is running!\n' echo -e 'You should run this script in console mode!\n' echo -e 'Press CTRL+ALT+F1 to go to console mode, then run this script again!\n' echo -e '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n' echo -e 'Aborting in 5 seconds!' echo -e '\n\n\n\n\n\n\n\n\n' sleep 5 exit 0 fi |
Custom usplash resolution in Ubuntu
Recently I made a clean install of Ubuntu 9.04 on my Thinkpad T61.
I configured the figerprint, the accelerometer is reporting correct values.
I did not like the default resolution at boot. So I created a custom usplash.conf file:
1 |
sudo joe /etc/usplash.conf |
I should contain these lines:
1 2 |
xres=1680 yres=1050 |
The next step was to update the “initial RAM disk”, that is used when the system boots up:
1 |
sudo update-initramfs -u |
Next, I modified my /boot/grub/menu.lst file.
I added as a parameter for the current kernel the value vga=872:
1 |
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=7281a5b5-6dd5-4011-beff-27339b4b9693 ro splash vga=872 |
Nice and clean!
Auto update for Debian/Ubuntu
I use the following script to automatically update my Ubuntu box.
I don’t recommend using this on your production servers!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#!/bin/bash ################################################# ## ## ## auto-update.sh v1.0 ## ## Use this script to set up automatic updates ## ## on your debian/ubuntu box. ## ## ## ################################################# ## Creating /usr/bin/auto-update.sh file sudo touch /usr/bin/auto-update.sh sudo chmod 700 /usr/bin/auto-update.sh sudo chown root:root /usr/bin/auto-update.sh echo '#!/bin/bash' | sudo tee -a /usr/bin/auto-update.sh echo 'touch /var/log/auto-update.log' | sudo tee -a /usr/bin/auto-update.sh echo 'echo '------------------' >> /var/log/auto-update.log' | sudo tee -a /usr/bin/auto-update.sh echo 'echo `date` >> /var/log/auto-update.log' | sudo tee -a /usr/bin/auto-update.sh echo 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin' | sudo tee -a /usr/bin/auto-update.sh echo 'export PATH' | sudo tee -a /usr/bin/auto-update.sh echo '/usr/bin/aptitude update >> /var/log/auto-update.log' | sudo tee -a /usr/bin/auto-update.sh echo '/usr/bin/aptitude -y safe-upgrade >> /var/log/auto-update.log' | sudo tee -a /usr/bin/auto-update.sh echo 'exit' | sudo tee -a /usr/bin/auto-update.sh # Creating a cron job for root user (it will run /usr/bin/auto-update.sh every day at 14:30) echo '30 14 * * * /usr/bin/auto-update.sh > /dev/null' > cron_file.txt && sudo crontab -u root cron_file.txt && rm -f cron_file.txt |
Note that there are some dangers regarding automatic updates. You can read more about it here.