Though in my setup I launch freevo from X, perhaps this may help you. I've
resolved the problem with a modified version of the firebird plugin. In
fact, I use several modified versions of this plugin to include commands in
the main menu for launching Firefox, tvtime or a new X-Session.
For example, here is my "tvtime.py":
#if 0 /*
#endif
#python modules
import os, popen2, fcntl, select, time
import pygame
import osd
#freevo modules
import config, menu, rc, plugin, skin, util
import event as em
from item import Item
from gui.AlertBox import AlertBox
from gui.RegionScroller import RegionScroller
from gui.ListBox import ListBox
from gui.AlertBox import PopupBox
from gui.GUIObject import Align
#get the singletons so we can add our menu and get skin info
skin = skin.get_singleton()
#menuwidget = menu.get_singleton()
osd = osd.get_singleton()
class CommandMainMenuItem(Item):
def actions(self):
"""
return a list of actions for this item
"""
items = [ ( self.RunCmd , 'tvtime' ) ]
return items
def RunCmd(self, arg=None, menuw=None):
popup_string=_("Iniciando tvtime")
pop = PopupBox(text=popup_string)
pop.show()
osd.stopdisplay()
os.system('/usr/bin/tvtime')
osd.restartdisplay()
osd.update()
pop.destroy()
osd.update()
class PluginInterface(plugin.MainMenuPlugin):
"""
A quick plugin to spawn tvtime from the main menu.
To activate, put the following in local_conf.py
plugin.activate('tvtime', level=45)
"""
def items(self, parent):
menu_items = skin.settings.mainmenu.items
item = CommandMainMenuItem()
item.name = _('Ver la televisión analógica')
item.parent = parent
return [ item ]
You should copy the file in [freevo-dir]/src/plugins, and activate it with
plugin.activate('tvtime', level=45)
If you would rather launch a new X-Session in parallel with freevo, you can
change line 38:
os.system('startx
/usr/local/freevo/config/scripts/firefox/firefox.cmd -- :1 &')
With this line, you start a second session and can switch between both of
them with CTRL+ALT+F? (as I have only 2 tty, in my box freevo is ctrl+alt+f3
and firefox ctrl+alt+f4). Of course, you can start X without any script, and
then you will have your desktop.
The main disadvantage is that you need to include a new "plugin.py" file in
plugins dir for each command you want to add to the main menu.
Hope this help.
Eduardo
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users