image ResEx Logo
ResExcellence www : Powered by Google
Cell Phone Themes Icons Mighty Mouse Cursors Software Reviews Widgets & Widgets


Files are in Stuffit 5 or greater format.
Free download.

Tell us about a bad link.

Thank You!


Running
without a restart.

Creating a MacOS panel button for Gnome or KDE

Rui Campos put together a little hack that lets you add a button in a panel that will allow you to reboot into the MacOS, or stay in Linux. It's sort of a "BootX" for Linux but in reverse.

First we'll need to create a tcl/tk script that will do the actual work.

Create the file in the /usr/bin directory. I called mine /usr/bin/reboot-macos.tcl, We can create it in any text editor (emacs in this example).

    [root@localhost root]# emacs /usr/local/bin/reboot-macos.tcl&

This will create the file, and bring it up in emacs. Now type the following into the editor.

    #!/usr/bin/wish
    proc reboot {} {
    exec /sbin/shutdown -r now
    }

    label .1 -text "Choose your OS"
    pack .1
    button .macos -text "MacOS" -command { reboot }
    pack .macos -side left
    button .linux -text "LinuxPPC" -command { exit }
    pack .linux -side left -padx 1m -pady 1m

That's it. Type ctrl-x, ctrl-s to save the file, then ctrl-x, ctrl-c to quit emacs.

Now we need to make this an executable script, so at the terminal type:

    [root@localhost root]# chmod +x /usr/local/bin/reboot-macos.tcl

It's all ready to run. Try it out by typing:

    /usr/local/bin/reboot-macos.tcl.

You should get a little window with two buttons in it similar to the one above. Press the LinuxPPC button to cancel the reboot.

We're almost finished. We just need to make a panel button now.

In gnome, left click on a panel (somewhere in the collapse arrows will be fine). You'll get a pop-up menu. Choose "Add New Launcher" from the menu. You will then get a dialog window that asks for some info. Fill it in as follows:

    Name: MacOS
    Comment: Reboot into the MacOS
    Command: /usr/local/bin/reboot-macos.tcl
    type: application (choose this from the pop-up menu)

Click on the icon box, and pick a nice icon for your panel button. I've provided one with these instructions. To use it move it to the /usr/share/pixmaps directory then you can click on the icon box. Now click on "OK", and you're all done.

Place the icon anywhere you like in the panel.

**Note: Whatever you type in the "Comment" field will be displayed in the help balloon.

In KDE, you can add your tcl/tk script to the KDE menu by launching the Menu Editor and creating a new application. You will then get a dialog window that asks for some info. Fill it in as follows:

    Name: MacOS
    Comment: Reboot into the MacOS
    Command: /usr/local/bin/reboot-macos.tcl
    type: application (choose this from the pop-up menu)

Click on the icon box, and pick a nice icon for your panel button. Now click on "OK", and you're all done.

Next, select the KDE Menu item to add an item to the panel, and select your new MacOS entry.

Selecting the button in either Gnome or KDE and choosing MacOS will immediately kill the Xserver and start the shutdown of the machine. After reboot, you will be in the MacOS.

Cell Phone Themes Icons Mighty Mouse Cursors Software Reviews Widgets & Widgets

Maintained by the Staff of ResExcellence. This entire site ©1997-2006 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement. [an error occurred while processing this directive]