Saturday, October 10, 2009

#! Crunchbang - Enable Suspend Button on Exit

If you use Crunchbang you will notice that is not possible on exit to suspend, since there is no button for that.

Crunchbang boots fast, but a suspended computer is instant on.... So here is the recepeit...

Just "sudo gedit /usr/bin/openbox-logout"

and make other button.....

On bold is new stuff for new button


#!/usr/bin/env python

import pygtk
import gtk
import os

class DoTheLogOut:

    # Cancel/exit
    def delete_event(self, widget, event, data=None):
        return False

    # Logout
    def logout(self, widget):
        os.system("openbox --exit")

    # Reboot
    def reboot(self, widget):
        os.system("gdm-control --reboot && openbox --exit")

    # Shutdown
    def shutdown(self, widget):
        os.system("gdm-control --shutdown && openbox --exit")

    # Suspend
    def suspend(self, widget):
        os.system("gnome-power-cmd suspend")
        return false

    def __init__(self):
        # Create a new window
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.set_title("Exit? Choose an option:")
        self.window.connect("delete_event", self.delete_event)

        # Create a box to pack widgets into
        self.box1 = gtk.HBox(False, 0)

        # Create cancel button
        self.button1 = gtk.Button("_Cancel")
        self.button1.connect("clicked", self.delete_event, "Changed me mind :)")
        self.box1.pack_start(self.button1, True, True, 0)

        # Create logout button
        self.button2 = gtk.Button("_Log out")
        self.button2.connect("clicked", self.logout)
        self.box1.pack_start(self.button2, True, True, 0)

        # Create reboot button
        self.button3 = gtk.Button("_Reboot")
        self.button3.connect("clicked", self.reboot)
        self.box1.pack_start(self.button3, True, True, 0)

        # Create shutdown button
        self.button4 = gtk.Button("_Shutdown")
        self.button4.connect("clicked", self.shutdown)
        self.box1.pack_start(self.button4, True, True, 0)
        # Create suspend button
        self.button5 = gtk.Button("_Suspend")
        self.button5.connect("clicked", self.suspend)
        self.box1.pack_start(self.button5, True, True, 0)

def main():

if __name__ == "__main__":
    gogogo = DoTheLogOut()


Crunchbang is really easy to personalize.... Hope this is usefull for you

Friday, October 9, 2009

Bricscad - Dwg for Linux - News

From Bricsys website....

Download Bricscad Looking for Bricscad™ on Linux?

The Linux world is desperately looking for a strong, affordable DWG-based CAD solution. Bricsys is fully committed to serve the growing Linux community. A native Linux version of the Bricscad V10 technology is in its final stage of development.

This look like good news.... the version 10 of Bricscad is allready out for windows...... Site total redesigned.... It must be close..... Can't wait for it...

Sure my life will be much easier after release.... No more Virtualbox for cad.....

Thursday, October 8, 2009

Openbox - A Nice and Lightweight Windows Manager

Linux has a lot of windows managers, most common are Gnome and Kde. But for low spec computers, those can be a lot of heavy.

You have several alternatives, but today I'll speak about Openbox.

Openbox is the WM of several Linux distros, in my case it came with Crunchbang, but you can use in any distro.

Without further talks, mine looks something like this, after some tweaks and tricks

what do you see?

- Openbox menu to the left - it appears by right clicking the desktop, and in my config by right click on panel
- Conky to the right - conky is a small system monitor. it comes with crunchbang, but it was tweaked....
- Tint2 - A nice and very lightweight panel. It was tweaked from crunchbang original.

In openbox the window manager it is not able to handle icons, however severeal file managers are capable of doing this. In gnome nautilus is the chosen. In open box, since all is lightweight i recomend pcmanfm. In the pcmanfm config you just have to make it able to handle desktop.

Some apps that go very nice with Openbox:

- Mail - claws
- Office - abiword / gnumeric
- Sound and Video - vlc
- Text Editor - leafpad

if you want to try Openbox in Ubuntu, just run this command in terminal, or search for openbox in synaptics:

sudo apt-get install openbox

After install you will have to logout, you will now be presented with GDM. Now choose session, and go for Openbox.

After enter openbox, dont be scared, just right click your desktop to enter menu.

The menu appears without icons, and it is not possible to place icons there.

To get the other bars and tools on openbox in Ubuntu, you have to install those by hand and configure them wich for a novice could be tricky....

So if you wanna try a openbox WM, just install Crunchbang Linux....

Just remember that crunchbang on boot look like this:

But if you like my desktop, i can pack and send all my config files to make it look like first screenshot.

Anything you need to know more just contact me or post a comment
Made in Portugal