Tag Archive for 'Linux'

User-friendly way of contributing to Ubuntu

Bug trackers, mailing lists, IRC too involved for mere mortals? Visit Ubuntu brainstorm and vote up or down on countless wishlist items for Ubuntu. It’s as simple as using Digg, and only takes you a few minutes. Go do your part!

If you liked this post, please subscribe to my feed. Thanks for visiting!

Fixing a broken xorg.conf in Ubuntu is a cinch

In the old days, I used to be very afraid of breaking my xorg.conf. Ubuntu Gutsy has done away with this fear, as repairing a broken xorg.conf is dead simple!

Option 1:
Allow Ubuntu to boot into Bullet-Proof-X mode (which is a failsafe mode like Windows Safe Mode). Using the familiar graphical user interface, run this command and follow the simple instructions:

sudo dpkg-reconfigure xserver-xorg

Option 2:
Choose “Rescue Mode” on boot up. When you get to the command prompt, run the same command and following the instructions:

sudo dpkg-reconfigure xserver-xorg

Now reboot and enjoy a working X again.

P.S. Since Ubuntu aims to never throw people to the command line with the implementation of Bullet-Proof-X, there should be GUI interfaces/wizards for repairing xorg.conf. Just a GUI button/menu entry for launching dpkg-reconfigure would be great. Then again, newbies shouldn’t ever break their xorg.conf. :P

Gentoo: setarch blocking util-linux upon emerge -uD world?

You might have noticed that setarch blocks util-linux on a recent “emerge -uD world” update.

[blocks B ] sys-apps/setarch (is blocking sys-apps/util-linux-2.13-r2)

!!! Error: The above package list contains packages which cannot be installed
!!! at the same time on the same system.

util-linux-2.13 now includes setarch, so setarch is redundant and can be safely unmerged.

emerge -Cav setarch
emerge -uDav world

See this forum thread and this bug for more information.

The Gentoo Foundation is no more, but Gentoo Linux will live on

I, and many Gentoo users and fans, have just found out that the Gentoo Foundation ceased to exist a few weeks ago because the current trustees failed to renew and file mundane NPO paperwork in New Mexico. See this discussion on the Gentoo mailing lists and this blog post by Gentoo Founder and ex-Chief Architect Daniel Robbins (drobbins). Even more shocking is the fact that no hint of this monumental bungle is mentioned on gentoo.org.

And so, the non-profit foundation behind one of the most innovative and well-respected Linux distributions is dead because the leadership went MIA and neglected to file a few pieces of paper.

Fortunately, Gentoo Linux will outlive the Gentoo Foundation as long as the developers and users will it so. Many have cited the fact that Gentoo only made one official release in 2007 as a sign of impending doom. Some do not realize that Gentoo uses a rolling update system. Updates and improvements were made to Gentoo without pause throughout 2007. One “emerge -u world” updates a Gentoo installation to the most current version. Whereas most distributions like Ubuntu need new releases to implement drastic improvements, and encourage users to perform clean installs of new releases, Gentoo users never need an official release aside from saving time on fresh installations on new computers. Gentoo Linux might have slowed down and made mistakes that prevented a flashy 2007.1 release, but it is far from dead.

Gentoo Founder Daniel Robbins has offered to return and serve as President, a part-time leader of the Gentoo Foundation. There is no question that Gentoo Linux has suffered in terms of popularity and public opinion since Daniel Robbin’s resignation as Chief Architect. Perhaps Gentoo would be in better shape now if Daniel Robbins had remained the leader of the project. Perhaps Robbins’ strong guiding hand is just what Gentoo needs now. However, I’m worried:

  • drobbins left Gentoo voluntarily; he obviously did not have the desire and/or ability to continue leading Gentoo. Is that different now?
  • drobbins is only offering to return in a part-time capacity. Since the project has suffered from leaders and developers with different priorities going MIA, do we need yet another part-time leader?
  • drobbins returned to Gentoo a few months ago as a regular developer. He left a day or two later over an argument on the mailing lists (satirical account here). Can he do any better this time around in managing a community in turmoil, with tensions running higher than ever?
  • Some Gentoo developers and leaders seem to be very much against drobbins’ return. See Tsunam’s take on drobbins’ offer for example.

Nevertheless, I do hope drobbins’ offer is accepted. Call me a fanboy, but I believe drastic measures are needed to rescue the project quickly, and drobbins is best suited to serve as Gentoo Dictator (temporarily?).

Whether drobbins returns or not, reports of Gentoo’s demise are very much premature.

Good luck, Gentoo! You truly stand out in the crowded field of copycat Linux distributions. You captured my heart and that of countless others.
Long live Gentoo!

Flash has been broken in Ubuntu Gutsy for a month?!

There are things I dislike about Ubuntu Linux, like the inability to customize during installation and the silly orange theme, but I had always thought that Ubuntu was the very best representative from the Linux world for mere mortals. Alas, Ubuntu has failed to live up to this expectation of “everything just works” in a big way. Ever since Adobe’s release of Flash 9.0 update 3 (9.0.115.0) codename “Moviestar” on December 4th, it has been impossible to install Flash through conventional means like the Add/Remove panel, Firefox’s plugin installer, or Synaptic.

Flash is one of the essential applications that every normal computer user must have nowadays. For a typical computer user to be unable to install Flash for a month (and counting) on a major operating system is frankly ludicrous. I’ve always scoffed at those who claim that “every Linux distribution sucks; *insert my favorite distro* just sucks less.” But this time, I can’t help but agree. (For the record, Ubuntu is not my favorite, but it is the easiest to install and use and my distro of choice at the office.)

Read more about this Flash bug here.

P.S. In my eyes, Mozilla Firefox is still the lone shining jewel in the arena of open-source software for end-users. Everything really “just works” and when problems arise, like the recent regressions, they get fixed in a hurry and pushed out with a fool-proof automatic update mechanism. All hail the Mozilla wizards.

Setting up multiple hosts for Nginx (on a Gentoo VPS)

These are the steps I took to setup multiple hosts for Nginx on a 256MB Slicehost VPS running Gentoo Linux. They should work in other similar Linux environments. YMMV.

I followed this multiple hosts layout intended for a single admin/user, and adapted for Nginx this virtual host permissions setup written for Apache.

Place your user account in the web server (Nginx) group:

sudo usermod -a -G nginx myuser

Logout, login again, check if you are in the “nginx” group by typing:

groups

Create the “public_html” or “htdocs” or whatever directory that will hold all your websites:

mkdir /home/myuser/public_html

Create a directory for your “default” or “catch-all” website:

mkdir /home/myuser/public_html/default

Make sure the “public_html” directory is owned by your user and belongs to the web server group:

sudo chgrp -R nginx /home/myuser/public_html

Make any files and directories created in the future under “public_html” inherit the same ownership and permissions, so you don’t have to set these permissions again:

sudo chmod -R 2750 /home/myuser/public_html

Edit Nginx’s config file:

sudo nano /etc/nginx/nginx.conf

Modify the “server” section to look something like this: (source)

        server {
                listen          80 default;
                server_name     _ *;
 
                access_log      /var/log/nginx/localhost.access_log main;
                error_log       /var/log/nginx/localhost.error_log info;
 
                location / {
                        index   index.html,index.htm,index.php;
                        root    /home/myuser/public_html/default;
                }
                location ~ .*.php$ {
                        include /etc/nginx/fastcgi_params;
                        fastcgi_pass    127.0.0.1:1026;
                        fastcgi_index   index.php;
                        fastcgi_param   SCRIPT_FILENAME  /home/myuser/public_html/default/$fastcgi_script_name;
                }
        }

Start Nginx:

sudo /etc/init.d/nginx start

Set Nginx to automatically start on bootup:

sudo rc-config add nginx

And you’re done! If you need to add another website in the future, simply add another “server” section to nginx.conf.

Optimize hard disk performance in Linux; benchmarks on Slicehost

A three-pronged attack on performance” is a good read on improving performance in Linux. One performance enhancing setting is the hard disk’s readahead value. Unfortunately, there is no magical readahead value that will optimize your hard disk’s performance; you must run your own benchmarks. I used the following code to benchmark disk performance (12 times) at each readahead value on my 256MB Slicehost VPS.

for ((i=0;i<12;i++)); do sudo hdparm -t /dev/sda1; done

The average disk read speeds at each readahead value are as follows:

“hdparm -a128 /dev/sda1″ - 65.69 mb/sec
“hdparm -a256 /dev/sda1″ - 104.44 mb/sec
“hdparm -a512 /dev/sda1″ - 114.54 mb/sec
“hdparm -a1024 /dev/sda1″ - 119.39 mb/sec
“hdparm -a2048 /dev/sda1″ - 122.82 mb/sec

It appears that on my Slicehost VPS, “hdparm -a2048” yields the best performance. To ensure that this readahead value is used at all times, I instruct hdparm to set it on every bootup by adding the following line to /etc/conf.d/local.start

hdparm -a2048 /dev/sda1

More details and documentation on Slicehost’s Wiki.