Thu, 25 Oct 2007

Shiny new Security LiveCD

The Fedora-based security livecd that I created a little while back is coming along quite nicely. I have yet to submit it to become an officially blessed Fedora spin, mainly because I didn't want it to be Yet Another gnome-based livecd with a bunch of extra packages shoved into it. If we're going to try and even remotely compare to existing livecds such as backtrack, we're going to have to try a little bit harder :)

I've gotten multiple requests from people asking for a minimal security livecd, with something a bit slimmer than GNOME, preferably *box. Being a proud openbox user for the past 6 years -- I gladly complied. So, the other day on the bus ride home from work, I re-based the spin against the minimal configuration, and tweaked out the openbox configuration quite a bit.

The default openbox menu contains a few boilerplate entries, most of which are for applications that don't even exist in a default Fedora install. I went ahead and threw together a menu that is categorized by the type of security tool in the spin. I also wanted the ability for users to have access to the same menu entries as our default GNOME menu. To accomplish this, I hacked up a dynamic openbox pipe menu, which generates the same menu hierarchy as the GNOME application menu, on-the-fly :)

#!/usr/bin/python -tt

import gmenu

def walk_menu(entry):
    if entry.get_type() == gmenu.TYPE_DIRECTORY:
        print '<menu id="%s" label="%s">' % (entry.menu_id, entry.get_name())
        map(walk_menu, entry.get_contents())
        print '</menu>'
    elif entry.get_type() == gmenu.TYPE_ENTRY and not entry.is_excluded:
        print """
            <item label="%s">
              <action name="Execute">
                <command>%s</command>
              </action>
            </item>
        """ % (entry.get_name(), entry.get_exec())

print "<openbox_pipe_menu>"
map(walk_menu, gmenu.lookup_tree('applications.menu').root.get_contents())
print "</openbox_pipe_menu>"

Patches/comments/suggestions/criticism welcome! See the SecurityLiveCD wiki for more details on how to spin your own and get involved.


posted at: 05:00 | link | Tags: , , , | 8 comments

Posted by Rahul Sundaram at Thu Oct 25 17:09:24 2007

This is brilliant. Thanks for doing this. Can you post the package wishlist and information about this spin to fedora-devel list and call for participation. A lot of people don't watch blogs and it is good to reach the widest audience possible.

Posted by Rahul Sundaram at Thu Oct 25 17:32:04 2007

This is brilliant. Thanks for doing this. Can you post the package wishlist and information about this spin to fedora-devel list and call for participation. A lot of people don't watch blogs and it is good to reach the widest audience possible.

Posted by Wok at Sat Jan 5 23:40:06 2008

Can’t believe it takes less than twenty lines. Under which license do you publish it? Thank you so much. Regards, Wok

Posted by Kingdon Barrett at Tue Jan 8 15:31:03 2008

Thanks very much!  I expect this will come in handy in my work.  Have you heard any news on the writer's strike lately?

Posted by lewk at Wed Jan 16 04:09:27 2008

Wok, GPLv2+

Posted by jeff moe at Sun Sep 7 06:26:02 2008

Cool script. It doesn't generate valid XML though as it causes openbox to barf on the character "&" for example in "Sound & Video". Would be best to make sure it only outputs characters openbox will accept.

That said, its rad thanks. :)

-Jeff

Posted by lewk at Thu Sep 25 04:19:28 2008

You're absolutely correct, Jeff.  My script above has since been included within Fedora's openbox package, and has been updated to fix that issue:

http://cvs.fedoraproject.org/viewvc/devel/openbox/xdg-menu?view=markup

Posted by R3nCi at Tue Oct 23 15:34:38 2012

Lewk,

Any chance of revealing what Openbox theme is seen in the screenshot?

Regards,

/L


Name:


E-mail:


URL:


Comment: