Tagged: PlanetKDE Toggle Comment Threads | Keyboard Shortcuts

  • Akarsh Simha 1:38 am on January 2, 2014 Permalink
    Tags: , , , , , , PlanetKDE, 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.

    Advertisements
     
  • Akarsh Simha 5:12 am on January 5, 2011 Permalink
    Tags: PlanetKDE   

    Building KDE and OpenHatch’s buildhelper 


    Photo Credit: “Riding With Despair Prohibitedby Gene Han

    I remember the time when I knew how to write code / fix bugs, but had no clue about build systems, version control or anything like that. And of course I didn’t know how to write clean code. I was trying to make a KStars-like program in MS DOS, “stealing” KStars’ data, but I didn’t know how to do something, so I looked up KStars’ code. It was so much neater than my horrible code. Finally, I gave up on my DOS program and I wrote a mail to Jason Harris, the author of KStars, to say I wanted to help. He pointed me to the docs on building KDE4 on techbase.

    I got stuck a couple of times while building some of the dependencies. I sent a couple of emails to Jason Harris, showing the output from the failed build, but of course, Jason couldn’t keep helping me all the time. The lack of a working build, in fact, caused me to give up for a while. It took attending a KDE Project Day at FOSS.IN 2007 to bring me back.

    Today, I saw a mockup of a “buildhelper” tool that the OpenHatch project is working on making. (If you haven’t heard of OpenHatch, here’s a sentence from the about page: “We believe that our community loses tons of prospective members because learning how and where you can fit in is difficult.”)

    Karen of OpenHatch drew the mockup, and wrote about the buildhelper at the OpenHatch blog. The part about IRC caught my attention.

    Each step has the basic name/description of a step, a more detailed explanation (if necessary), a link (if necessary, e.g. to the relevant git repository), an estimate of how long the step should take, a help button that links to either a relevant OpenHatch mission or other background-info tutorial that a project favors (optional), and a “crap, it didn’t work and I don’t understand why” button that takes the user to the project’s IRC channel (the dev channel specifically, if the project has more than one), where they can solicit help from more experienced project volunteers and point to the specific step where things went wrong.

    I think in my context, the IRC link would’ve saved me.

    The good thing about KDE is that there is a lot of build documentation already. But it would be awesome to make it interactive, and made clear, step-by-step.

    OpenHatch is an open source project, so it’ll be ready when it’s ready. But Asheesh said on IRC that they’re expecting to release this feature by end April, and they’re going to have templates which various projects can fill, to make the tool specific to their buildsystem.

    It would be awesome if KDE participated. I can see that it would benefit the several potential contributors who know some C / C++ from high school etc, but have never worked with a large project that requires a build system.

     
  • Akarsh Simha 4:45 pm on January 2, 2011 Permalink
    Tags: , , OpenGL, PlanetKDE   

    KStars with experimental OpenGL support in RC2 

    Well, this was a little hurried and late, but I introduced some largish changes into what’s going to become RC2 just a few minutes back. No new strings, to the best of my knowledge. Let me explain what they are.

    Harry de Valence worked with KStars this summer and his (GSoC) project involved writing code that would render the sky map with OpenGL, while still keeping the native QPainter drawing, to ensure that KStars doesn’t crawl on older hardware without hardware acceleration. Well, Harry’s task was rather tough, because he had to deal with badly structured code, but he was able to give us a working OpenGL sky map with a few regressions at the end of his project. The most important unsolved problem, however, was that there was no way to switch between the two paint engines at run time.

    We decided not to leave the code in Harry’s branch, and merged it into trunk, so that the code would be more accessible, and we might arrive at a solution at least before release. When 4.6 was branched out from trunk, we had a version of KStars that would throw up a black screen with some text at the corners upon launching! This was one of the regressions with OpenGL — you couldn’t use infoboxes (those boxes that tell you what KStars is looking at, what the time of the simulation is etc.) with GL, so you had to manually disable them to see the sky map. And to add to that, we had a couple of other problems with GL. And you couldn’t switch out of GL without rebuilding KStars.

    Of course, one of the solutions was to just disable GL and fallback to QPainter, without adding any new functionality, but lots of new code. I didn’t want to subscribe to this — it gives me this feeling that I’m doing what some proprietary software companies do to enforce DRM.

    Our solution to this problem involved breaking up a class that’s very central to KStars — the SkyMap class, which took care of the sky map in totality — painting, projection, events. Not good. Harry had already broken away projection, and in the process of cleaning the code, solved several really strange bugs in KStars. What was left was to break up painting and event handling, so that we could change our canvas at run time.

    This time of the year being the winter break at UT Austin, I thought I should finish this. My implementation of this (warning: physics student trying to write code) is now merged into the 4.6 branch. I should’ve probably done it before, but yeah, it stretched to fit the time before RC2.

    The only regression I observe with this change over the usual native painting functionality, is that infoboxes flicker when you drag them around. I’m sure that’s a very small thing to trade for the awesome speed and smoothness that GL gives you, when you need it.

    So you can now switch backends at runtime:

    Screenshot explaining how to switch to OpenGL in KStars 2.0.0

    Switching to OpenGL backends at runtime!

    Testing

    We most certainly need a whole lot of testing. Please help the KStars team by seeing if it builds, renders fine, switches backends with no issues, and file any bugs you may have on bugs.kde.org. We will try to fix them before the final tag.

    Thanks for reading.

    Time for me to get back to physics now!

     
    • Martin Gräßlin 7:17 pm on January 2, 2011 Permalink | Log in to Reply

      I just built kstars from trunk and gave it a try with fglrx driver. I am sorry to say that it does not work at all 😦 I only see a white screen and when I start to move the scene I get lot’s of flickering with visible stars in between.

      Btw: which OpenGL version are you targeting?

      • Martin Gräßlin 8:01 pm on January 2, 2011 Permalink | Log in to Reply

        Just tried on my other system with nouveau driver (which renders KWin GLES correctly) and I see some rendering artefacts in the milky way.

        See: http://wstaw.org/m/2011/01/02/plasma-desktoprL2578.jpg

        It does not mean that there is a problem in the rendering, it could as well be a bug in nouveau. Nevertheless it might be worth to look at it 😉

        • Med 8:54 pm on January 2, 2011 Permalink

          If i remember it was reported that it worked fined with mesa’s software rendering. I have no way of testing that easily before the final version is out. Wouldn’t it indicate that the problem is in nouveau? As for the fglrx driver, do you have any clue where the problem might be?

        • Martin Gräßlin 9:13 pm on January 2, 2011 Permalink

          If i remember it was reported that it worked fined with mesa’s software rendering.

          The mesa software rasterizer has nothing to do with the Gallium3D state tracker used in nouveau

          Wouldn’t it indicate that the problem is in nouveau?

          Maybe? Maybe not? Difficult to say. As I have problems with other drivers as well I would not bet on driver bugs.

          As for the fglrx driver, do you have any clue where the problem might be?

          No sorry, I do not know the KStars code at all. So I cannot comment on it.

        • Akarsh Simha 2:56 am on January 3, 2011 Permalink

          Hi

          I want to ask if the QPainter backend works properly on these systems. If that is not the case, this would be release critical, and we may need to revert the entire OGL stuff.

          Can you see the Sky map in QPainter mode with no regressions?

          Regards
          Akarsh

    • Manuel Mommertz 8:24 pm on January 2, 2011 Permalink | Log in to Reply

      With intel graphics, it works very well. I couldn’t see any rendering glitsches. Works quite fast. Though I had to deactivate the rendering of the milky way while moving as this was very slow.

      • Akarsh Simha 2:58 am on January 3, 2011 Permalink | Log in to Reply

        Oh. I haven’t had Milky Way trouble. But when running at 2 minutes / frame speed, I got 16 fps with OpenGL and ~ 6 fps with native painting.

        • Manuel Mommertz 3:12 am on January 3, 2011 Permalink

          milky way is deactivated on move per default. so if you don’t explicitly activated them, you don’t see it 😉
          how do you get the fps numbers?

        • Akarsh Simha 3:22 am on January 3, 2011 Permalink

          Oh, didn’t realize that. I hardly twiddle with the hidden objects settings 🙂
          If you built with debugging, then you’ll see the FPS numbers being written to the console. Maybe we should do something more elegant.

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

    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 12:34 pm on November 21, 2008 Permalink
    Tags: , , PlanetKDE   

    KDE @ FOSS.IN/2008 – I’m Missing it. :-( 

    Last year, I was at FOSS.IN and this played a major factor in increasing my enthusiasm for FOSS contribution. I saw and met a whole bunch of FOSS Developers, primarily KDE and Debian contributors, particularly Till Adam (KDE), Kartik Mistry (KDE.IN, Debian) and Christian Perrier (Debian) and that really drove me to contribute. The same night, I went back and built KDE 4.x on my desktop, which I had ‘given up’ after some stage earlier. Thereafter, I produced patches more frequently than earlier.

    This year, I really wanted to go to FOSS.IN – It’d have been a ‘debut’ as a “developer” – but the schedule of end-semester examinations at my college matches perfectly with that of FOSS.IN, preventing every FOSS enthusiast / developer here from attending the event.

    That the KDE.IN team has done a lot more this year than the last is very obvious. This time we had a significant number of people helping with the planning. I have been out of the loop this semester, unfortunately, due to academic work (or so I claim. Anyway, it was a general observation amongst my friends that I was more ‘serious’ when it comes to academics this semester), and didn’t help much with the planning. But the signs are very clear that it is going to be bigger and better than last time.

    Recently, there were these ‘Pillars of KDE’ posters that the KDE.IN team made for FOSS.IN and they’re put up here in Pradeepto’s blog. Like the transition from KDE 3.x to KDE 4.x, at first sight, the posters seem to have gathered a significant amount of ‘visual appeal’ from FOSS.IN/2007 to FOSS.IN/2008. Kudos to Kamaleshwar Morjal for such brilliant posters!

    Waiting for FOSS.IN to start. There’ll be a lot of live blogging, as usual, I presume.

     
  • Akarsh Simha 11:20 pm on October 28, 2008 Permalink
    Tags: , PlanetKDE   

    Hello (KDE) World 

    This is (hopefully) my first post on Planet KDE! I didn’t know that we could have ourselves aggregated on Planet KDE with an svn commit until I “accidentally” stumbled upon the “Add your blog” link while adding Planet KDE to the RSSNOW plasmoid. I wish to introduce myself to Planet KDE through this post.

    Yes, I hadn’t been in touch with the KDE world for long and only lurked in #kdeedu or posted on kstars-devel@kde.org, until I made it to the last 2 days of aKademy 2008 (thank you Bart, Kenny, Wendy, Pradeepto!), which I thoroughly enjoyed!

    So who am I? Not getting philosophical, I’m called Akarsh Simha in the real world, kstar on IRC, and asimha on the SVN, and am a student pursuing the BTech programme in Engineering Physics at the Indian Institute of Technology Madras (“IITM”), India. I have currently finished two out of four years of my course and am running on the third. I plan to pursue a career in Theoretical Physics. Programming / Software Development is one of my “primary” hobbies, the other being Amateur Astronomy.

    I develop for KStars and was a Google Summer of Code (2008) student under KDE, mentored by Jason Harris. I’m a not-so-active member of the KDE India community.

     
    • Socceroos 3:37 am on October 29, 2008 Permalink | Log in to Reply

      Hey mate,

      You guys are giving us a good thrashing at the moment in the cricket….. =(

      Nice to hear from you!

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