[SOLVED] EXIT_WITH_CHOICE Broken in Lubuntu 11.10

A nice (keyboard based) front end for Arcade / Console game emulators.

Moderator: battlecat

[SOLVED] EXIT_WITH_CHOICE Broken in Lubuntu 11.10

Postby codefenix » Mon Dec 12, 2011 3:11 am

I recently did a clean Lubuntu 11.10 install on my cab. In Wah!Cade Setup, I have ESC set to EXIT_WITH_CHOICE, as I always have. For some reason I'm getting the following error when I choose to shutdown or reboot from this menu:

Code: Select all
Traceback (most recent call last):
  File "/usr/local/share/games/wahcade/win_main.py", line 643, in on_winMain_key_press
    self.options.menu_selected()
  File "/usr/local/share/games/wahcade/win_options.py", line 437, in menu_selected
    self.WinMain.exit_wahcade('reboot')
  File "/usr/local/share/games/wahcade/win_main.py", line 378, in exit_wahcade
    hal_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 246, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files


Choosing "Exit to Desktop" from this prompt works just fine. I had Xubuntu 11.04 prior to the new install, and all three options on the prompt worked then.

Anyone have any ideas?
Last edited by codefenix on Mon Jan 30, 2012 1:35 pm, edited 1 time in total.
User avatar
codefenix
 
Posts: 219
Joined: Fri Sep 25, 2009 3:45 pm
Location: USA

Re: EXIT_WITH_CHOICE Broken in Lubuntu 11.10

Postby sairuk » Mon Dec 12, 2011 1:08 pm

Install the hal package, haven't tested that on 11.10

http://wahki.mameau.com/index.php?title ... l_Packages
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: EXIT_WITH_CHOICE Broken in Lubuntu 11.10

Postby codefenix » Mon Dec 12, 2011 5:02 pm

Ah, ok. I should have searched harder... I would have found this thread: Topic: unable to shut down. I'll give this a shot when I get home.

Looks like hal is in the process of being deprecated. Maybe Wah!Cade should be updated to use another method of shutting down and rebooting?

UPDATE: It worked. Thanks for the tip.
User avatar
codefenix
 
Posts: 219
Joined: Fri Sep 25, 2009 3:45 pm
Location: USA

Re: EXIT_WITH_CHOICE Broken in Lubuntu 11.10

Postby sairuk » Tue Dec 13, 2011 2:48 am

codefenix wrote:Ah, ok. I should have searched harder... I would have found this thread: Topic: unable to shut down. I'll give this a shot when I get home.

Looks like hal is in the process of being deprecated. Maybe Wah!Cade should be updated to use another method of shutting down and rebooting?

UPDATE: It worked. Thanks for the tip.


I had looked briefly at this when the hal issue first arose (in the topic you linked); didn't take it much further. Thanks for the link, it may point me in a better direction for when/if i do modify the shutdown methods.
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: [SOLVED] EXIT_WITH_CHOICE Broken in Lubuntu 11.10

Postby processor » Mon Apr 02, 2012 3:26 pm

I have exactly the same error on a gentoo:

I tried this but it did not helped:
Hi all,

The problem was due to the deprecation of org.freedesktop.Hal starting from Ubuntu 10.10.
I've fixed this bug by replacing the exit_wahcade method in win_main.py:

def exit_wahcade(self, exit_mode='default'):
"""quit"""
self.stop_video()
if exit_mode == 'default':
if gst_media_imported and os.path.isfile(self.wahcade_ini.get('exit_movie_file')):
#start exit movie
self.scrsaver.play_movie(
self.wahcade_ini.get('exit_movie_file'),
'exit')
else:
self.on_winMain_destroy()
elif exit_mode == 'reboot':
#reboot
if dbus_imported:
bus = dbus.SystemBus()
try:
#Hal (now deprecated on GNU/Linux) is replaced by ConsoleKit
ck_obj = bus.get_object('org.freedesktop.ConsoleKit', '/org/freedesktop/ConsoleKit/Manager')
ck = dbus.Interface(ck_obj, 'org.freedesktop.ConsoleKit.Manager')
rv = ck.Restart()
except:
#previous code (for retro-compatibility)
hal_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')
hal = dbus.Interface(hal_obj, 'org.freedesktop.Hal.Device.SystemPowerManagement')
rv = hal.Reboot()
self.on_winMain_destroy()
elif exit_mode == 'shutdown':
#turn off
if dbus_imported:
bus = dbus.SystemBus()
try:
#Hal (now deprecated on GNU/Linux) is replaced by ConsoleKit
ck_obj = bus.get_object('org.freedesktop.ConsoleKit', '/org/freedesktop/ConsoleKit/Manager')
ck = dbus.Interface(ck_obj, 'org.freedesktop.ConsoleKit.Manager')
rv = ck.Stop()
except:
#previous code (for retro-compatibility)
hal_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')
hal = dbus.Interface(hal_obj, 'org.freedesktop.Hal.Device.SystemPowerManagement')
rv = hal.Shutdown()
self.on_winMain_destroy()


please heeeeeeelp
processor
 
Posts: 4
Joined: Mon Apr 02, 2012 3:19 pm

Re: [SOLVED] EXIT_WITH_CHOICE Broken in Lubuntu 11.10

Postby processor » Mon Apr 02, 2012 4:32 pm

is there any way to simply link to a sh with inside " shutdown -h now? "
processor
 
Posts: 4
Joined: Mon Apr 02, 2012 3:19 pm

Re: [SOLVED] EXIT_WITH_CHOICE Broken in Lubuntu 11.10

Postby sairuk » Mon Apr 02, 2012 10:56 pm

processor wrote:is there any way to simply link to a sh with inside " shutdown -h now? "


currently no, try installing the HAL package instead.

http://wahki.mameau.com/index.php?title ... l_Packages
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: [SOLVED] EXIT_WITH_CHOICE Broken in Lubuntu 11.10

Postby processor » Tue Apr 03, 2012 6:32 am

It's the first thing that I did, but it did not helped.

I also installed console kit and udev, but nothing more. :(
processor
 
Posts: 4
Joined: Mon Apr 02, 2012 3:19 pm

Re: [SOLVED] EXIT_WITH_CHOICE Broken in Lubuntu 11.10

Postby processor » Thu Apr 05, 2012 6:21 pm

Found a solution.

Work only if sudo is used is with password disabled (like in Groovy arcade linux for instance)

This is my win_main.py that should be placed in /usr/local/share/wahcade (or in the folder where the other .py are)

bye
You do not have the required permissions to view the files attached to this post.
processor
 
Posts: 4
Joined: Mon Apr 02, 2012 3:19 pm


Return to Wah!Cade

Who is online

Users browsing this forum: No registered users and 3 guests

cron