Freevo

- User Documentation

# CommandsFxd

## Commands

This is to support commands run directly in freevo. I.E. run your favortie web browser, email application, or other application. In order to run XBased apps you must have an X based setup. This command does not allow framebuffer setups to run X applications. Likewise if your application is framebuffer based, it won't allow it to run in X11.

a simple example:

    <?xml version="1.0" ?>
    <freevo>
        <command title="Mozilla">
            <cmd>/usr/bin/MozillaFirebird</cmd>
            <stoposd />
            <spawnwm />
            <info>
                <content>It is just a test</content>
            </info>
        </command>
    </freevo>

The title attribute of the command element is what shows in the Main Menu if using A Command Main Menu Item or it is the name of the entry if you have the fxd in your COMMANDS_DIR. THe cmd element is the actual command to run in full, including arguments if there are any. Please do not use '&' to background a task, and should you need a '&' as a character in an argument then you should escape it as &amp; because this is required for xml to work properly. If you want this to fork something into the background then i reccomend a shell script that starts a subshell and puts that command into the background. The stoposd element is optional and tells freevo to the stop the freevo environment and let the application take over the whole screen. Typically you want this only for apps that are UI based like a web browser or email app. The spawnwm element is optional and tells freevo start a window manager for the duration of this command. It uses the COMMAND_SPAWN_WM and COMMAND_KILL_WM to start and stop the window manager. The best window manager i have found that fits with freevo for this limited purpose is ratpoison.

To run a command in the commands dir, just simply put the FXD file in the directory. You can then select it by its title in the menu.

To run a command as a mainmenu item. then do the following in your local_conf.py:

    plugin.activate('command.CommandMainMenuItem', args=('/usr/local/freevo_data/Commands/Mozilla.fxd', ), level=45)

where level influences the ordering of the menu. and you give the full path to the fxd file as the first arg. You may have as many of these lines in your local_conf.py as you like but it will enlarge your main menu. I have two myself, one for the web browser and another for displaying nasatv in real player.

last edited 2004-12-11 00:39:13 by TanjaStriepling
current version: http://freevo.sourceforge.net/cgi-bin/doc/CommandsFxd