The Following User Says Thank You to EmaNymton For This Useful Post: | ||
|
2014-01-10
, 16:58
|
|
Posts: 141 |
Thanked: 267 times |
Joined on May 2010
@ Germany
|
#22
|
dbus-send --session --type=method_call --dest=org.sailfishos.browser / org.sailfishos.browser.openUrl array:string:"talk.maemo.org"
dbus-send --session --type=method_call --dest=com.jolla.email.ui /com/jolla/email/ui com.jolla.email.ui
|
2014-01-26
, 21:52
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#23
|
Ok, now with working pop up notification and using jolla icons placed in /usr/share/themes/jolla-ambient/meegotouch/icons/
https://dl.dropboxusercontent.com/u/...0108112941.jpg
Code:#!/usr/bin/python import dbus bus = dbus.SessionBus() object = bus.get_object('org.freedesktop.Notifications','/org/freedesktop/Notifications') interface = dbus.Interface(object,'org.freedesktop.Notifications') #print(interface.GetCapabilities()) interface.Notify("app_name", 0, "icon-m-notifications", "Here is the title", "and here the body", dbus.Array(["default", ""]), dbus.Dictionary({"x-nemo-preview-body": "preview body", "x-nemo-preview-summary": "preview summary"}, signature='sv'), 0)
[root@localhost ~]# python /usr/share/jolla-mods/test.py Traceback (most recent call last): File "/usr/share/jolla-mods/test.py", line 4, in <module> bus = dbus.SessionBus() File "/usr/lib/python2.7/site-packages/dbus/_dbus.py", line 211, in __new__ mainloop=mainloop) File "/usr/lib/python2.7/site-packages/dbus/_dbus.py", line 100, in __new__ bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop) File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 122, in __new__ bus = cls._new_for_bus(address_or_type, mainloop=mainloop) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
|
2014-01-27
, 03:20
|
|
Posts: 2,355 |
Thanked: 5,249 times |
Joined on Jan 2009
@ Barcelona
|
#24
|
Hi
Why when I try to run your script, I always get this error:
[CODE][root@localhost ~]# python /usr/share/jolla-mods/test.py
The Following User Says Thank You to javispedro For This Useful Post: | ||
|
2014-01-27
, 07:43
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#25
|
As a general rule, try to avoid using root when it is not strictly required.
To use the notifications service, you should connect to the "session bus" -- i.e. the D-Bus instance for the currently logged in user, which is "nemo" on the Jolla. You can't do this as root (not easily, that is).
|
2014-01-27
, 12:25
|
|
Posts: 2,355 |
Thanked: 5,249 times |
Joined on Jan 2009
@ Barcelona
|
#26
|
|
2014-01-27
, 14:00
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#27
|
No, I mean, just don't use devel-su when not necessary, as in this case.
[nemo@localhost ~]$ qdbus -bash: qdbus: command not found [nemo@localhost ~]$
|
2014-01-27
, 14:35
|
|
Posts: 141 |
Thanked: 267 times |
Joined on May 2010
@ Germany
|
#28
|
[nemo@localhost ~]$ /usr/lib/qt5/bin/qdbus --help Usage: qdbus [--system] [--bus busaddress] [--literal] [servicename] [path] [method] [args] servicename the service to connect to (e.g., org.freedesktop.DBus) path the path to the object (e.g., /) method the method to call, with or without the interface args arguments to pass to the call With 0 arguments, qdbus will list the services available on the bus With just the servicename, qdbus will list the object paths available on the service With service name and object path, qdbus will list the methods, signals and properties available on the object Options: --system connect to the system bus --bus busaddress connect to a custom bus --literal print replies literally
The Following 5 Users Say Thank You to EmaNymton For This Useful Post: | ||
|
2014-01-27
, 16:02
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#29
|
|
2014-01-27
, 22:46
|
|
Posts: 126 |
Thanked: 59 times |
Joined on Jan 2011
|
#30
|
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent"
The Following User Says Thank You to solbrit For This Useful Post: | ||
Repository: jolla
Name: dbus-python
Version: 1.0.0-1.1.1
Arch: armv7hl
Hersteller: meego
Installiert: Ja
Status: aktuell
Installierte Größe: 412,6 KiB
Zusammenfassung: D-Bus Python Bindings
Beschreibung:
D-Bus python bindings for use with python programs.