Recent Tweets

Twitter Updates

    follow me on Twitter

    Categories

    July 2009
    S M T W T F S
    « Jun    
     1234
    567891011
    12131415161718
    19202122232425
    262728293031  

    Archives

    GNOME Metacity dual screen issue in OpenSolaris 2009.06

    With the latest OpenSolaris 2009.06, maximizing windows managed by Metacity (GNOME) will maximize the windows across both screens. This is due to an issue that Metacity was trying to use a wrong Xinerama type. This issue is fixed in the mercurial repository. However, the fix was not on time to make it into the final release of OpenSolaris 2009.06. But, there is a quick workaround for this issue. Here is the set of instructions.

    Step 1. Backup your current metacity.

    pfexec cp /usr/bin/metacity /usr/bin/metacity.orig

    Step 2. Download the fixed Metacity binary from developer’s site and replace the original binary.

    wget http://www.gnome.org/~erwannc/bugs/8748/metacity -o /tmp/metacity
    pfexec cp /tmp/metacity /usr/bin/metacity

    Note: Don’t do this in one step using wget -o /usr/bin/metacity. This broke my system.

    Step 3. (Optional) By now, your new Metacity should have already started working. If not, replace the current instance by hand.

    metacity --replace

    Happy dual-screening on your OpenSolaris 2009.06!

    • Share/Save/Bookmark

    Creating OpenSolaris live USB sticks

    OpenSolaris 2009.06 was announced yesterday. You can download the live CD image (ISO) from here. Here is the set of instructions to create a live USB stick from the live CD that you have downloaded.

    Step 1. Install distro-construct.

    pfexec pkg install SUNWdistro-const

    Step 2. Generate the USB image from CD image.

    pfexec usbgen osol-0906-x86.iso osol-0906-x86-usb.img /tmp/osol

    Step 3. Copy the generated USB image on to the USB stick.

    pfexec usbcopy osol-0906-x86-usb.img

    On executing the above command, you will be shown the list of removable media and asked to select the one to use with usbcopy. If you have inserted only one USB media, you will see only one entry to choose from. Please note that you may have to unmount the USB media from your GNOME file manager or command line, before usbcopy starts.

    Once usbcopy completes, your OpenSolaris live USB sticks are ready to boot a live environment and perform installation. I will be in Community One West, Deep Dive sessions today (Jun 2, 2009) at Intercontinental Hotel, San Francisco. If anyone needs to make their USB media an OpenSolaris live media, please contact me.

    • Share/Save/Bookmark

    Setting up FTPS using vsftpd for Wordpress plugins auto upgrade

    One of the handy features in the latest Wordpress is the support to upgrade plugins in one click through the Wordpress administration interface. It needs FTP or FTPS access to the server where you have hosted your Wordpress installation. But turning on FTP for users (non-anonymous) is a bad idea. Using FTP involves transferring user passwords as plain text during authentication. This is a great security concern and the primary reason for why one shouldn’t turn on FTP for user accounts. However, Wordpress also supports FTPS, FTP over SSL. This shouldn’t be confused with SSH FTP or Secure FTP. FTPS uses TLS or SSL for authentication and commands. Let us see how to setup FTPS on a server using vsftpd.

    Step 1: Install vsftpd

    Using the package manager for your distribution, install vsftpd. On Debian and Ubuntu, it can be installed by the following command.

    sudo apt-get install vsftpd

    Step 2: Configure FTPS

    Edit /etc/vsftpd.conf and do the following.

    2a. comment out anonymous_enable line.

    # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
    #anonymous_enable=YES

    2b. Uncomment local_enable and write_enable lines.

    # Uncomment this to allow local users to log in.
    local_enable=YES
    #
    # Uncomment this to enable any form of FTP write command.
    write_enable=YES

    2c. Override the umask for local users to 022 by uncommenting the local_umask line.

    # Default umask for local users is 077. You may wish to change this to 022,
    # if your users expect that (022 is used by most other ftpd's)
    local_umask=022

    Note: Failing to do this, will make the plugin directory unreadable by your webserver and you will start getting PHP include errors. If this happens, you have to disable the plugin and remove the directory or change the permission of the directory to 755.

    2d. Turn on SSL by adding the following lines. This is disable plain FTP and allow only FTPS.

    ssl_enable=YES
    allow_anon_ssl=NO
    force_local_data_ssl=YES
    force_local_logins_ssl=YES
    ssl_tlsv1=YES
    ssl_sslv2=YES
    ssl_sslv3=YES

    It is assumed that the RSA certificate and key are in the standard locations /etc/ssl/certs/ssl-cert-snakeoil.pem and /etc/ssl/private/ssl-cert-snakeoil.key respectively. If not, create these and put them there.

    # This option specifies the location of the RSA certificate to use for SSL
    # encrypted connections.
    rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    # This option specifies the location of the RSA key to use for SSL
    # encrypted connections.
    rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

    Step 3: Restart vsftpd.

    Restart vsftpd by issuing the following command.

    sudo /etc/init.d/vsftpd restart

    Now your vsftpd is ready to serve FTPS connections.

    • Share/Save/Bookmark

    Oracle to buy Sun Microsystems

    This morning there was an official announcement that Oracle has offered to buy Sun Microsystems for $9.50 per stock, and Sun’s board agreed. The market rumors surrounding Sun for the last few weeks suggested that something was looming. But, Oracle was a surprise to me. It looks like closing the deal typically takes from 3 to 9 months. It would be interesting to see how Sun would be integrated into Oracle.

    Also, Oracle’s attitude towards Open Source remains largely unknown at this point. Sun did some extensive Open Sourcing in the past few years. It would be interesting to see how this deal would affect the direction of those products.

    To know more information about the deal, read the Sun’s press release or Oracle’s press release. Oracle has put up an information page and answered some of the frequently asked questions in there.

    • Share/Save/Bookmark

    Turning off loud system beep in OpenSolaris Gnome and GDM

    Since OpenSolaris started using Gnome 2.24, I started getting loud system beeps those were produced on the PC speaker device that by-passes the audio device. Gnome uses kbd to generate this beep. This beep is so loud that it is really annoying. Also it hurts one’s ears when listening to music using a headset. The volume of the beep can’t be controlled by the system volume control. To turn off the beep or control the volume, one must use the xset(1) utility. The beep can be turned off by issuing the command xset -b or xset b off in (Gnome) terminal. One can also control the volume through xset b . However this is not persistent across logins. You will lose this setting once you log off and log on. Theoretically adding this to ~/.xprofile should work to make it persistent. It used to work till snv_101a. However for unknown root cause, it doesn’t work anymore.

    Gnome:
    In order to make this persistent, one should edit the Gconf properties for Metacity. First install the SUNWgnome-config-editor package by issuing the command pfexec pkg install SUNWgnome-config-editor. Then invoke gconf-editor from a terminal. Go to apps -> metacity -> general and uncheck audible_bell property and exit gconf-editor. This should disable the system beep for all applications under Gnome and make the change persistent.

    Turn Gnome sytem beep off

    Turn Gnome sytem beep off

    Continue reading Turning off loud system beep in OpenSolaris Gnome and GDM

    • Share/Save/Bookmark

    Getting (some) Things Done

    Recently I found myself in a situation where I felt that I have more things to do than the time available in hand. The number of unread e-mails and pending tasks were growing in a faster rate day by day. I missed to act upon a few important e-mails. This new situation had increased my stress and caused a sense of unaccomplishment in spite of being reasonably productive. My positive sense of being in control was going down day by day. That is when I started to realize that there is something basically wrong in the way I handled things.

    On the other hand, I see some of my manager’s activities through his Twitter updates and blog posts. The wide range of stuff he does is mind-boggling. He might have ten-folds of things to do than I have. However I saw a sense of completion in most of the things he did. I discussed with him about this in one of the 1-1 meetings we had. From his answers, I realized that instead of trying to manage my time, I should try to manage the things that I do. He recommended to read “Getting Things Done” by David Allen. I promptly bought the book. However due to bad management of things I do, I was not able to start on the book until a couple of months later.

    Continue reading Getting (some) Things Done

    • Share/Save/Bookmark

    Oh No, Not Again

    My employer (Sun Microsystems, Inc.) has announced another round of layoffs, which will eliminate as much as 18% of Sun’s workforce (around 6000 jobs), will save the company $700 million to $800 million. We have also announced the departure of the head of Software Group, Rich Green. With this we are restructuring the Software Group into Application Platform Software, Systems Platforms and Cloud Computing & Developer Platforms. The recession of world wide economy is putting enormous pressure on technology companies like us. We would hope that this downturn would end soon before causing irreversible damage to many companies. However I feel that we have just entered into the difficult stage of the slowdown and we will be seeing more challenges awaiting us.

    Disclaimer: All the views expressed herein are mine. I am not talking for my employer, Sun Microsystems, Inc.

    • Share/Save/Bookmark

    Identifying what is holding up your boot speed in Linux

    For a while now, I was not happy with the speed my Debian GNU/Linux booted. It was taking approximately 1:10 minutes to drop me in the GDM prompt. Today, I decided that I will try to probe into what exactly is happening. I have already heard of bootchart a few years ago. However I never had a chance to use it. So, I installed bootchart. I am not going to talk in detail about the installation. It is available in Debian and Ubuntu repositories. If you are using some other distribution, you can either find it in the repository or compile it from the source.

    After installation, reboot the system and add 'init=/sbin/bootchartd' to the 'kernel' command line arguments in Grub. This will use bootchartd as init and bootstartd will in turn start the original init. If alternative init environment like init-ng is used, there might be additional arguments needed. Please consult the bootchartd man page for more information. Once the systems boots, the data collected is available in /var/log/bootchart.tgz. Run bootchart to generate bootchart.png from /var/log/bootchart.tgz.

    After doing this, I figured out that udevadm is taking almost 30 seconds. I later figured out that the udev rule that tries to rename 'wlan0' to 'eth1' is the culprit (search on Google). Then I commented the 'eth1' line in /etc/udev/rules.d/70-persistent-net.rules, rebooted and did the bootchart thing again. I was happy to see that a portion of around 30 seconds is now removed from my boot time. That’s great!

    Before udev fix After udev fix
    Bootchart before udev fix Bootchart after udev fix

    • Share/Save/Bookmark

    AT&T Store Apple iPhone 3G preorder status checking

    I have pre-ordered Apple iPhone 3G from my neighboring AT&T store last Sunday (Jul 20). I have done this as purchasing from the Apple Store wouldn’t let me to apply my FAN discounts on the plan. Applying it latter would reflect only after a couple of billing cycles. Also I don’t wanna get into the crazy line. I didn’t join the true Apple cult yet. I was just curious about the status of the pre-order and I checked the status online and found that the status query mechanism can be exploited to post automated queries. Here is a small ruby script that I wrote to check bulk statuses. This would also give you a clue on where you are in preorder line.
    Continue reading AT&T Store Apple iPhone 3G preorder status checking

    • Share/Save/Bookmark

    Completely clueless

    On my OpenSolaris. What could be more exciting than this?

    praveen@athena:~$ /opt/sfw/bin/emacs
    Fatal error (11).Segmentation Fault (core dumped)
    
    praveen@athena:~$ file core
    core:           ELF 32-bit LSB core file 80386 Version 1, from 'emacs'
    
    praveen@athena:~$ gdb -c core /opt/sfw/bin/emacs
    GNU gdb 6.3.50_2004-11-23-cvs
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "i386-pc-solaris2.11"...(no debugging symbols found)
    
    Core was generated by `/opt/sfw/bin/emacs'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /opt/sfw/lib/libXaw3d.so.5...(no debugging symbols found)...done.
    Loaded symbols for /opt/sfw/lib/libXaw3d.so.5
    Reading symbols from /usr/lib/libXmu.so...done.
    Loaded symbols for /usr/lib/libXmu.so
    Reading symbols from /usr/lib/libXt.so.4...done.
    Loaded symbols for /usr/lib/libXt.so.4
    Reading symbols from /usr/lib/libSM.so.6...done.
    Loaded symbols for /usr/lib/libSM.so.6
    Reading symbols from /usr/lib/libICE.so.6...done.
    Loaded symbols for /usr/lib/libICE.so.6
    Reading symbols from /usr/lib/libXext.so.0...done.
    Loaded symbols for /usr/lib/libXext.so.0
    Reading symbols from /usr/lib/libtiff.so.3...done.
    Loaded symbols for /usr/lib/libtiff.so.3
    Reading symbols from /usr/lib/libjpeg.so.62...done.
    Loaded symbols for /usr/lib/libjpeg.so.62
    Reading symbols from /usr/lib/libpng12.so.0...done.
    Loaded symbols for /usr/lib/libpng12.so.0
    Reading symbols from /lib/libz.so.1...done.
    Loaded symbols for /lib/libz.so.1
    Reading symbols from /lib/libm.so.2...done.
    Loaded symbols for /lib/libm.so.2
    Reading symbols from /opt/sfw/lib/libungif.so.4...done.
    Loaded symbols for /opt/sfw/lib/libungif.so.4
    Reading symbols from /usr/lib/libXpm.so.4...done.
    Loaded symbols for /usr/lib/libXpm.so.4
    Reading symbols from /usr/lib/libX11.so...Segmentation Fault (core dumped)
    
    praveen@athena:~$ file core
    core:           ELF 32-bit LSB core file 80386 Version 1, from 'gdb'
    
    • Share/Save/Bookmark