[Bug 513808] New: dbus-send command works from terminal, not within a hook
http://bugzilla.novell.com/show_bug.cgi?id=513808 Summary: dbus-send command works from terminal, not within a hook Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: i586 OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: mehl@freunde.tu-darmstadt.de QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.11) Gecko/2009060200 SUSE/3.0.11-0.1.1 Firefox/3.0.11 When closing a computer session by suspend-to-disk I might be working in different desktops, sometimes I end the session from desktop 2, sometimes from no.4 etc. After the awakening the new session should always start within desktop 2 regardless of the one I had suspended the computer from. To this end with opensuse 11.0 I had the following hook: -------------------------------------------------- #!/bin/bash case $1 in thaw) /opt/kde3/bin/dcop --all-users --all-sessions kwin KWinInterface setCurrentDesktop 2 ;; esac ------------------------------------- This has worked perfectly. With opensuse 11.1 this doesn't function any more. I was given the advice to replace dcop by dbus-send because dcop would not work correctly with kde 4 - I work with kde 4.1.3. So a new hook with the following line was installed: --------------------------------------- dbus-send --type=method_call --dest=org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop int32:2 ------------------------------- This line works from the terminal, i.e. when started from a terminal on desktop4 the desktop2 is correctly switched to. But ... when this line is used in a hook like the one above nothing visible to me happens. Reproducible: Always Steps to Reproduce: 1. suspend the computer to disk 2. awake it by turning on the power 3. Actual Results: The computer starts from the last desktop before the suspend-to-disk, not from desktop no. 2 as desired Expected Results: The computer should start from desktop no. 2 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=513808
User meissner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=513808#c1
Marcus Meissner
http://bugzilla.novell.com/show_bug.cgi?id=513808
Lubos Lunak
http://bugzilla.novell.com/show_bug.cgi?id=513808
User mehl@freunde.tu-darmstadt.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=513808#c2
Albrecht Mehl
you probably do not have the right permissions in the hook.
Thank you for your comment. I guess _your_ guess is not applicable. 1. As of now the hook /etc/pm/sleep.d/1arbeitsflaechumsch reads: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #!/bin/bash case $1 in hibernate) # /opt/kde3/bin/dcop --all-users --all-sessions kwin KWinInterface setCurrentDesktop 2 # su am -c "dbus-send --type=method_call --dest=org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop int32:2" su -c "dbus-send --type=method_call --dest=org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop int32:2" am echo "99arbeitsflaech_umsch" > /home/am/zarbeitsfl_umsch ;; esac XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX This file is executable and belongs to am:users 2. That it has been executed the file /home/am/zarbeitsfl_umsch is proof of: this file has been changed this very morning. 3. But helas ... the change of desktop has not occured. 4. I have now changed in the script the case from 'hibernate' to 'thaw', suspended the computer, and awakened it again. No change of desktop here again. 5. In addition the main line from the script, i.e. XXXXXXXXXXXXXXXXXXXXXXXX su -c "dbus-send --type=method_call --dest=org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop int32:2" am XXXXXXXXXXXXXXXXXXXXXXXXXXXXX has been executed from my users terminal. After the password request the script was successfully executed, that means the desktop no. 2 appeared. 6. Then the line from 5. above was executed from the root terminal. Here it worked fine as well. Being not very much of an expert I guess that all this shows that there is no permission problem. But ... I do hope sincerely that I am mistaken and you are right so that you can show me how I can fix the problem. In closing let me thank you again for your work. A. Mehl PS After the login to Bugzilla I clicked 'My requests' in order to find a list of all my various troubles submitted to you. 'No requests' was the answer and I had the key in the no. 513808. Please let me know how I can get this list looked for. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=513808
https://bugzilla.novell.com/show_bug.cgi?id=513808#c3
Timo Hoenig
participants (1)
-
bugzilla_noreply@novell.com