Tagged: FOSS Toggle Comment Threads | Keyboard Shortcuts

  • Akarsh Simha 1:38 am on January 2, 2014 Permalink
    Tags: , , FOSS, , , , , scripting, shell scripting   

    Astro-scripting using KStars' D-Bus interface 

    I was telling Henry about
    an interesting use case of KStars a few days ago, and he
    suggested that I blog about it.

    I encountered this problem while preparing for a Practical Amateur Astronomy workshop that we were organizing. We had made lists of
    various celestial objects for people to observe, along with some
    hand-written descriptions. We edited the lists collaboratively on
    Google Spreadsheets, and at some point I declared the lists final and
    made a CSV export. I wanted the lists to be organized by constellation
    and also have some more vital information about the objects filled in.

    Enter KStars and D-Bus. KStars has D-Bus interface functions that let
    you access many of its features. I use qdbus to access
    them over the shell. (Note that the following is known to work on
    GNU/Linux. I am entirely unsure about Windows and Mac
    platforms). Here’s a brief example of making KStars point towards M
    33:


    qdbus org.kde.kstars /KStars org.kde.kstars.lookTowards "M 33"

    (Note: Due to some bug in KStars at the moment, you need to invoke the
    above multiple times to get the object in the center)

    Then, let’s say we want to query information on NGC 2903. We can do so
    by using:


    $ qdbus org.kde.kstars /KStars org.kde.kstars.getObjectDataXML "NGC 2903"

    and KStars outputs an XML blurb describing the object.

    One can now use tools like xmlstarlet to work with the
    XML on the command line.

    There. That has all the information I need to complete the
    checklists. So I went ahead and wrote a small shell script to order
    the objects by constellation and typeset a table using LaTeX. The
    results look like this:

    Image

    Many more wonderful things are possible because of the D-Bus
    interface. In fact, my Logbook project
    relies heavily on KStars’ D-Bus interface. The Logbook project uses
    KStars to produce amateur astronomers’ logbooks complete with fine and
    coarse finder charts, relevant data and DSS imagery.

    One can use qdbusviewer and qdbus to further
    explore the available D-Bus methods in KStars and profit from
    scripting using KStars.

     
  • Akarsh Simha 3:35 pm on December 9, 2010 Permalink
    Tags: , FOSS, , ,   

    Context I feared that my 2.5-year old De… 

    Context

    I feared that my 2.5-year old Dell Insprion 1525n (yes, it came with no Windows!) was growing weak with "age" (effective age = age * roughness of handling), and therefore, I decided to make use of Thanksgiving deals to get a Lenovo ThinkPad Edge 14".

    My Hell Perspiron (as I nickname it) gets as hot as hell and shuts off with the slightest processor load. Plus, the SATA hard-disk is showing signs of impending gradual failure. So I think it was a good decision anyway.

    First Looks

    From what I hear, this laptop is not really a *ThinkPad* (as in a T-series ThinkPad), but is a ThinkPad nevertheless 😉 — that’s enough.

    So let’s see. I paid $640 + $50 tax + $0 shipping for it instead of the projected price of $1100+ and the "usual" total price of $860. It came via UPS, free shipping.

    Unlike stuff I read online, my laptop doesn’t have a glossy back — no fingerprints etc. I’m not very bothered about the TrackPoint. It kind-of does get into the way, but not much. The keyboard design and feel is extremely good. It feels very nice typing on it.

    However, by default, one needs to hold down the ‘Fn’ key to input F1 thru F12! Without Fn depressed, these correspond by default to mute, change volume, brightness etc. I was really frustrated by this, but a little Googling found me a solution (mentioned later). There’s another thing I do not like: which is that Ctrl and Fn are flipped across from their positions in Dell (and I think most other laptops). But this is a feature of all ThinkPads, it seems. Thankfully, Lenovo has some very nice BIOS options that let you configure these behaviors.

    Installing Debian

    Booting the installer
    During first boot, after randomly answer the Windows configuration questions, it detected my WiFi network and connected. I learned from my friend Kumar Appaiah about UNetBootIn. I had originally planned to follow an article that a couple of us compiled this wiki page. But I gave UNetBootIn a try, and it failed. However, it installed WinGRUB successfully. The kernel refused to load, saying "Invalid file format" or something to that effect. So I got back to Windows and obtained the kernel and initrd.gz for the Debian installer from IITM’s FTP server and booted into the installer as outlined on the wiki page.

    Partitioning
    Kumar recommended that I try LVM. So I created a non-LVM physical /boot partition (required), and an LVM physical volume, that I split into several logical volumes. I also left 5 GB in a non-LVM physical partition, just in case. I deleted ThinkPad’s boot drive, which might have been a bad idea :-S.

    Installing Packages
    I used the default mirror in the US: http://ftp.us.debian.org. It turns out that the U of Texas mirror (ftp.utexas.edu) is much faster even when I’m at home.

    Post Install
    Post install, Debian booted into a command-line. It took me a little work to get basic stuff setup (bash completion etc.) and then I installed KDE (aptitude install kde-standard) and booted into it. It turns out that testing now has KDE 4.4.5.

    Hardware
    Here’s the output of lspci on my Thinkpad:

    00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)
    00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
    00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
    00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
    00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)
    00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)
    00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)
    00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 06)
    00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 06)
    00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5 (rev 06)
    00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)
    00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
    00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)
    00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)
    00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 06)
    00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)
    00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 06)
    03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller (rev 10)
    09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
    ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
    ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
    ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
    ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)
    ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
    ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

    The lines that really matter to me are:

    00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
    03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller (rev 10)

    The graphics card is not a fancy NVidia, and is at least not an immediate concern. It should work out of the box though. At least I see a graphical display 🙂

    WiFi did not work out-of-the-box. I have an RTL8191SEvB controller, as indicated above (AFAIK, not all ThinkPad Edge 14s have the same). A little Googling pointed me to a blogpost, which pointed me to the RTL8191 drivers on RealTek’s page. I like to use wpa_supplicant, because I’m comfortable with that. So I used wpa_passphrase to generate the configuration for wpa_supplicant, and put that into /etc/wpa_supplicant.conf (created the file). Then, got rid of the network-manager service and ran wpa_supplicant:


    wpa_passphrase essid passphrase

    1. copy-paste output into /etc/wpa_supplicant.conf

    /etc/init.d/network-manager stop
    wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf &
    dhclient wlan0

    and my WiFi worked. Of course, this is temporary.

    Changing the behavior of Fn key
    A little more Google told me that I could set the behavior of ‘Fn’ keys and swap the ‘Ctrl’ and ‘Fn’ key positions with the BIOS configuration utility. I rebooted, hit ‘Enter’ to get to the BIOS, (Fn +) F1 to edit the BIOS configuration, and went to ‘Keyboard’ to find these relieving options. Changed the behavior of F1…F12 to ‘Legacy’, and swapped the Ctrl and Fn keys. I’m now comfortable!

    Touchpad

    The touchpad, on Linux, works just the way I want it to by default — no tap to click; vertical scroll by sliding your finger on the right edge of the touchpad (in Windows, you had to use multitouch by default to do this, which I don’t like).

    First Impressions, Summarized

    So far, I think the Lenovo ThinkPad Edge 14" is a very nice laptop. No complaints at all — it looks a lot sturdier than a Dell Inspiron (like the rest of the ThinkPads), has a matte finish, I could work around my complaints with the keyboard, getting WiFi working wasn’t as bothersome as it usually is etc. The only thing I didn’t like, is that it came with Windows 7 installed and an ugly sticker that proclaims the same.

     
    • dickfeynman 4:53 pm on December 9, 2010 Permalink | Log in to Reply

      When you wanted to buy a new laptop, why exactly did you go for a thinkpad ? And btw, why not a netbook ?

      • Akarsh Simha 7:05 am on December 18, 2010 Permalink | Log in to Reply

        I generally don’t like Netbooks. They are too small for my fingers. And ThinkPad, because I here it’s the most durable and reliable line of laptops.

    • Kumar Appaiah 2:32 am on December 10, 2010 Permalink | Log in to Reply

      WiFi: Try wicd.
      Swapping function key behaviour etc.: You’re also getting old! 🙂

      • Kumar Appaiah 2:57 am on December 10, 2010 Permalink | Log in to Reply

        To clarify, I meant “old” in the context of “need to use the legacy operations, old style”. 🙂

  • Akarsh Simha 5:49 am on October 11, 2008 Permalink
    Tags: FOSS, Shaastra 2008   

    FOSS @ Shaastra 2008 – Satisfaction at last. 

    It is really satisfying to see people enthusiastic about developing FOSS, about submitting patches, people who stayed up till the wee hours of morning looking into code, trying to hunt down bugs. We had this satisfaction at Shaastra 2008.

    Although nothing went ideally, the proceedings left us with some sort of satisfaction and joy at the end. Although coordinatorship and participation in other events were clearly mutually exclusive, I am completely content with this Shaastra. We had a whole bunch of folks really really excited about FOSS contribution at the end of the day, and the bunch is still in touch with us. The excitement are sustaining.

    Shreyas’ talk was simply amazing. I appreciate it thoroughly. Truly spoken out of experience. I’m pretty sure everyone agrees with me. I was late for Dr. Kapil’s talk because I was preparing the systems at the lab for the evening’s hackfest. Again, one more excellent talk. Lots of learning.

    The first Hackfest session was a complete demonstration of unplannedness, disorganization and disaster. We were never prepared for that kind of crowd, that too with a good percentage of people with no FOSSy backgrounds. 1 PM, people got bored, walked out. Now, we had a _working_ group. 5 patches to KStars.

    Hackfest session 2 – seemed like a success. All the 1337h4x0rs went to one side of the lab while the non-FOSSy / non-developerish but really enthusiastic folks gathered on the other end. Demonstration on how yours truly added DBus functionality to MCabber with logical reasoning that was feigned out of a 1 hour practice session before the demo. Seemed to be good. 1 Debian package in the meanwhile, but that was a ‘pilot’ package.

    Guido van Rossum’s videoconference (?) ended up being an audioconference. Murphy once again. What worked perfectly well in the dry run did not work in the big show. Guido’s message for the student-dominated gathering was (if I have, as I hope to, interpreted it correctly) that one must try things that he wouldn’t normally do, things that have no reason to be done, because they are learning experiences that enhance the spread of your knowledge. Guido uses EMacs 🙂 🙂 🙂 but recommends that others use vim because EMacs has saturated. We’re going to put up the audio recording of the Q&A session on the net, and I’ll link it in here.

    My talk was a not satisfactory to me, mostly because it was KDE-specific. I think I must’ve done a hack-demo like the one at the Hackfest, but in the KDE Kontext. The audience was most probably not apt. But a lot of people did meet me after the talk, and that was a productive session. Maybe we’re going to see a strong FOSS team from the Vellore Institute of Technology. Sudharshan’s talk was a brief 45 minute one where he demonstrated DFeet, DBus and told us why the FreeSmartPhone.org project was important. Interesting talk. Followed by GSoCcers talking about their projects (Madhusudhan, Arun and I) and subsequently about The GSoC programme.

    At the end, we’ve learnt a LOT. I hope the FOSS events are going to be better next year. We could pass down the wisdom we gathered to the coordinators, so that they could do a better job. Negative feedback here again, which I cannot forget to mention after all those Analog Circuits classes! It’s thanks to a NITTian’s feedback about the FOSS Workshop at Shaastra 2007 that these events could take good shape.

    Lastly, 😛 to all those guys who missed it, Pradeepto being at the top of the stack. I must at this point appreciate Pradeepto’s enthusiasm. He was considering booking his tickets on the day before the event.

    I’d like to ACK a lot of people for the event’s success (as we’d like to project it):

    • Pradeepto, Shreyas, Dr. Kapil, Arun Raghavan, our “mentors”;
    • the NetApp folks, our sponsors;
    • Vikram S V, Sanjeev Sripathi, Arun Chaganty (almost), my co-coordinators;
    • Pranesh, Kirtika, Naveen, Prasanna and Prakash, our organizing volunteers;
    • Rakesh Misra, the guy who enforced our planning and made the event a success, a.k.a the QMS coordinator;
    • Nachiketas, the enthusiastic contributor and also the facilities chap
    • Midhun S and Raghav Iyengar, the guys who brought us the sponsorships;
    • Madhusudhan, Santhosh, Sudharshan, Vaidy, our co-contributors;
    • Avinash, Suvinay, Immanuel, Ajinkya, Kshitiz, Harpreet, Vaibhav, Vineeth, Krishna, Rehman… the list goes on : the budding contributors
     
    • Akarsh Simha 5:52 am on October 11, 2008 Permalink | Log in to Reply

      Oh yes, we did miss KMap, Varun, Ganesh…
      @: It would’ve been so much better with you guys around!

    • Kumar Appaiah 7:29 am on October 11, 2008 Permalink | Log in to Reply

      Great work, and it’s FANTASTIC that you made this Shaastra a FOSSy success. Hope this becomes a yearly affair, and evolves into a big FOSS affair every year in India.

    • Rakesh Misra 9:11 am on October 11, 2008 Permalink | Log in to Reply

      First: I doubt if I have done enough to deserve a place in that list.

      Second: I believe my vol, Srivathsan (a.k.a. Vatsi) deserves a place. He did a lot of figures/feedback collection on-the-spot and helped me in all my documentation tasks pertaining to your event.

      Third: I have figures to support your statement that the talks at the FOSS Conference were quite a hit among the audience. More around 70-80% of them acknowledged in their feedback that the talks were indeed quite entertaining and useful.
      (You can refer the details of audience feedback from me)

      Fourth: In the course of my association with you all, I have developed an interest in FOSS. 🙂 How do I move ahead?

    • Aanjhan 1:08 pm on October 11, 2008 Permalink | Log in to Reply

      Freak! I missed this one and I am missing a lot of sch nice small scale hack fests! great going.

      – tuxmaniac

    • srikanth 1:30 pm on October 11, 2008 Permalink | Log in to Reply

      Last year I had a bowl at IITM FOSS workshop. This year I truly miss that tech fun!

    • Gopala Krishna 8:16 pm on October 11, 2008 Permalink | Log in to Reply

      Too good man.. I really missed it..
      Anyways i repeat my comment to arun’s post, “Awesome work by awesome pancha fossavas!!”

    • Pranesh Srinivasan 7:34 pm on October 12, 2008 Permalink | Log in to Reply

      Er.. I dont think I did enough to be mentioned in that list.

      I sorely miss helping out, because of the (infinite) math modelling work, I had to do. 😦

      But yeah, from the parts I was there for, it looked very succesful. 🙂

      Great going. 🙂

    • Akarsh Simha 9:29 pm on November 14, 2008 Permalink | Log in to Reply

      Thanks for the encouragement, everybody!

      Hope our juniors carry this forth in future.

    • some monk 7:36 pm on November 18, 2008 Permalink | Log in to Reply

      Satisfaction to you guys and ballz to us for working hard for the contests :X
      the prize distro system was too fast to fill pockets of organizers instead of participants.
      its evident from the fact that it used to open for very short intervals… while for hackfest there were dedicated ppl to wake up till morning hrs but sadly not so for distribution of prizes.
      so we went to eat on our last day of stay at shaastra and guess what we missed a prize… and guess what they told us to go, n wait for a mail… and guess what, ppl in d hostel told “forget it dude.. d prizes hardly get mailed in reality”… and guess what.. we haven’t got an iota for the nights we spent developing stuff for the contest.
      ballz to satisfaction…
      ballz to shaastra

    • some monk 7:37 pm on November 18, 2008 Permalink | Log in to Reply

      hope juniors carry this trend in future too… 8x

    • Raghav 5:35 pm on November 22, 2008 Permalink | Log in to Reply

      Well, I’m def grateful for being mentioned in this blogpost although I would rather prefer that our luck be thanked more than us 🙂 And oh, yes – Midhun and BMX got you the sponsor, I was just a facilitator in between ( for want of t-shirts 😛 )

      May the FOSS be with you ! 🙂

      ( I came across this when I was arbitly googling my name to check whether my blogpost was the first site to hit the user or not ! )

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel