We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2014-12-23 17:09:59 +0200

Python, dbus, fingerterm, opening app/script after last update (1.1.1.27)

Hi to all After last update I ha some problem with my apps (scripts). Maybe someone can help me to fix it...

A. CAN'T get notification... if I'll run this command for example:

python /usr/share/openrepos-wazebton/notifer1.py

I get this output:

[root@Jolla ~]# python /usr/share/openrepos-wazebton/notifer1.py
Traceback (most recent call last):
  File "/usr/share/openrepos-wazebton/notifer1.py", line 2, in <module>
    import dbus
ImportError: No module named dbus
[root@Jolla ~]#

The content of notifer1.py is:

#!/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",
                 "Waze BT APPLIED !",
                 "Waze & BT starter",
                 dbus.Array(["default", ""]),
                 dbus.Dictionary({"x-nemo-preview-body": "Waze & BT starter",
                                  "x-nemo-preview-summary": "Waze BT APPLIED !"},
                                  signature='sv'),
                 0)

What wrong here ? Why it stopped to work after update ?

B. Strange way to open script via fingerterm. When I press on the .desktop file, it should open fingerterm and start my script inside. All worked perfectly before update, but now it work in different way, see picture: screenshot image

  1. Start window
  2. Open fingerterm window with my script

BUT #2 CAN'T came to foreground, like it was before update. It just stay in this mode like you can see on the image. If you will press on the #2 it came to foreground, and when you close this window it also will close the #1 window. Maybe problem came from python/dbus problem from the first question ?

Can someone help me with this ?

Thanks

Python, dbus, fingerterm, opening app/script after last update (1.1.1.27)

Hi to all all

After last update I ha have some problem with my apps (scripts). Maybe someone can help me to fix it...

A. CAN'T get notification... if I'll run this command for example:

python /usr/share/openrepos-wazebton/notifer1.py

I get this output:

[root@Jolla ~]# python /usr/share/openrepos-wazebton/notifer1.py
Traceback (most recent call last):
  File "/usr/share/openrepos-wazebton/notifer1.py", line 2, in <module>
    import dbus
ImportError: No module named dbus
[root@Jolla ~]#

The content of notifer1.py is:

#!/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",
                 "Waze BT APPLIED !",
                 "Waze & BT starter",
                 dbus.Array(["default", ""]),
                 dbus.Dictionary({"x-nemo-preview-body": "Waze & BT starter",
                                  "x-nemo-preview-summary": "Waze BT APPLIED !"},
                                  signature='sv'),
                 0)

What wrong here ? Why it stopped to work after update ?

B. Strange way to open script via fingerterm. When I press on the .desktop file, it should open fingerterm and start my script inside. All worked perfectly before update, but now it work in different way, see picture: screenshot image

  1. Start window
  2. Open fingerterm window with my script

BUT #2 CAN'T came to foreground, like it was before update. It just stay in this mode like you can see on the image. If you will press on the #2 it came to foreground, and when you close this window it also will close the #1 window. Maybe problem came from python/dbus problem from the first question ?

Can someone help me with this ?

Thanks

Python, dbus, fingerterm, opening app/script after last update (1.1.1.27)

Hi to all

After last update I have some problem with my apps (scripts). Maybe someone can help me to fix it...

A. CAN'T get notification... if I'll run this command for example:

python /usr/share/openrepos-wazebton/notifer1.py

I get this output:

[root@Jolla ~]# python /usr/share/openrepos-wazebton/notifer1.py
Traceback (most recent call last):
  File "/usr/share/openrepos-wazebton/notifer1.py", line 2, in <module>
    import dbus
ImportError: No module named dbus
[root@Jolla ~]#

The content of notifer1.py is:

#!/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",
                 "Waze BT APPLIED !",
                 "Waze & BT starter",
                 dbus.Array(["default", ""]),
                 dbus.Dictionary({"x-nemo-preview-body": "Waze & BT starter",
                                  "x-nemo-preview-summary": "Waze BT APPLIED !"},
                                  signature='sv'),
                 0)

What wrong here ? Why it stopped to work after update ?

B. Strange way to open script via fingerterm. When I press on the .desktop file, it should open fingerterm and start my script inside. All worked perfectly before update, but now it work in different way, see picture: screenshot image

  1. Start window
  2. Open fingerterm window with my script

BUT #2 CAN'T came to foreground, foreground automatically, like it was before update. It just stay in this mode like you can see on the image. If you will press on the #2 it came to foreground, and when you close this window it also will close the #1 window. Maybe problem came from python/dbus problem from the first question ?

Can someone help me with this ?

Thanks

Python, dbus, fingerterm, opening app/script after last update (1.1.1.27)

Hi to all

After last update I have some problem with my apps (scripts). Maybe someone can help me to fix it...

A. CAN'T get notification... if I'll run this command for example:

python /usr/share/openrepos-wazebton/notifer1.py

I get this output:

[root@Jolla ~]# python /usr/share/openrepos-wazebton/notifer1.py
Traceback (most recent call last):
  File "/usr/share/openrepos-wazebton/notifer1.py", line 2, in <module>
    import dbus
ImportError: No module named dbus
[root@Jolla ~]#

The content of notifer1.py is:

#!/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",
                 "Waze BT APPLIED !",
                 "Waze & BT starter",
                 dbus.Array(["default", ""]),
                 dbus.Dictionary({"x-nemo-preview-body": "Waze & BT starter",
                                  "x-nemo-preview-summary": "Waze BT APPLIED !"},
                                  signature='sv'),
                 0)

What wrong here ? Why it stopped to work after update ?

B. Strange way to open script via fingerterm. When I press on the .desktop file, it should open fingerterm and start my script inside. All worked perfectly before update, but now it work in different way, see picture: screenshot image

  1. Start window
  2. Open fingerterm window with my script

BUT #2 CAN'T came to foreground automatically, like it was before update. It just stay in this mode like you can see on the image. If you will press on the #2 it came to foreground, and when you close this window it also will close the #1 window. Maybe problem came from python/dbus problem from the first question ?

Can someone help me with this ?

Thanks

EDIT (28:12:14): Problem solved: 1. removed from binary "fingerterm -e" before path to script.

  1. added "fingerterm -e" in the .desktop file before path to binary, like this: sh -c "fingerterm -e /path/to/binary"

Python, dbus, fingerterm, opening app/script after last update (1.1.1.27)

Hi to all

After last update I have some problem with my apps (scripts). Maybe someone can help me to fix it...

A. CAN'T get notification... if I'll run this command for example:

python /usr/share/openrepos-wazebton/notifer1.py

I get this output:

[root@Jolla ~]# python /usr/share/openrepos-wazebton/notifer1.py
Traceback (most recent call last):
  File "/usr/share/openrepos-wazebton/notifer1.py", line 2, in <module>
    import dbus
ImportError: No module named dbus
[root@Jolla ~]#

The content of notifer1.py is:

#!/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",
                 "Waze BT APPLIED !",
                 "Waze & BT starter",
                 dbus.Array(["default", ""]),
                 dbus.Dictionary({"x-nemo-preview-body": "Waze & BT starter",
                                  "x-nemo-preview-summary": "Waze BT APPLIED !"},
                                  signature='sv'),
                 0)

What wrong here ? Why it stopped to work after update ?

B. Strange way to open script via fingerterm. When I press on the .desktop file, it should open fingerterm and start my script inside. All worked perfectly before update, but now it work in different way, see picture: screenshot image

  1. Start window
  2. Open fingerterm window with my script

BUT #2 CAN'T came to foreground automatically, like it was before update. It just stay in this mode like you can see on the image. If you will press on the #2 it came to foreground, and when you close this window it also will close the #1 window. Maybe problem came from python/dbus problem from the first question ?

Can someone help me with this ?

Thanks

EDIT (28:12:14):

Problem solved: 1. solved:

  1. removed from binary "fingerterm -e" before path to script.

    1. added "fingerterm -e" in the .desktop file before path to binary, like this: sh -c "fingerterm -e /path/to/binary"

Python, dbus, fingerterm, opening app/script after last update (1.1.1.27)

Hi to all

After last update I have some problem with my apps (scripts). Maybe someone can help me to fix it...

A. CAN'T get notification... if I'll run this command for example:

python /usr/share/openrepos-wazebton/notifer1.py

I get this output:

[root@Jolla ~]# python /usr/share/openrepos-wazebton/notifer1.py
Traceback (most recent call last):
  File "/usr/share/openrepos-wazebton/notifer1.py", line 2, in <module>
    import dbus
ImportError: No module named dbus
[root@Jolla ~]#

The content of notifer1.py is:

#!/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",
                 "Waze BT APPLIED !",
                 "Waze & BT starter",
                 dbus.Array(["default", ""]),
                 dbus.Dictionary({"x-nemo-preview-body": "Waze & BT starter",
                                  "x-nemo-preview-summary": "Waze BT APPLIED !"},
                                  signature='sv'),
                 0)

What wrong here ? Why it stopped to work after update ?

B. Strange way to open script via fingerterm. When I press on the .desktop file, it should open fingerterm and start my script inside. All worked perfectly before update, but now it work in different way, see picture: screenshot image

  1. Start window
  2. Open fingerterm window with my script

BUT #2 CAN'T came to foreground automatically, like it was before update. It just stay in this mode like you can see on the image. If you will press on the #2 it came to foreground, and when you close this window it also will close the #1 window. Maybe problem came from python/dbus problem from the first question ?

Can someone help me with this ?

Thanks

EDIT (28:12:14):

Problem #1 solved:

  1. By installation of dbus-python package.

Problem #2 solved:

  1. removed from binary "fingerterm -e" before path to script.

  2. added "fingerterm -e" in the .desktop file before path to binary, like this: sh -c "fingerterm -e /path/to/binary"

[SOLVED] Python, dbus, fingerterm, opening app/script after last update (1.1.1.27)

Hi to all

After last update I have some problem with my apps (scripts). Maybe someone can help me to fix it...

A. CAN'T get notification... if I'll run this command for example:

python /usr/share/openrepos-wazebton/notifer1.py

I get this output:

[root@Jolla ~]# python /usr/share/openrepos-wazebton/notifer1.py
Traceback (most recent call last):
  File "/usr/share/openrepos-wazebton/notifer1.py", line 2, in <module>
    import dbus
ImportError: No module named dbus
[root@Jolla ~]#

The content of notifer1.py is:

#!/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",
                 "Waze BT APPLIED !",
                 "Waze & BT starter",
                 dbus.Array(["default", ""]),
                 dbus.Dictionary({"x-nemo-preview-body": "Waze & BT starter",
                                  "x-nemo-preview-summary": "Waze BT APPLIED !"},
                                  signature='sv'),
                 0)

What wrong here ? Why it stopped to work after update ?

B. Strange way to open script via fingerterm. When I press on the .desktop file, it should open fingerterm and start my script inside. All worked perfectly before update, but now it work in different way, see picture: screenshot image

  1. Start window
  2. Open fingerterm window with my script

BUT #2 CAN'T came to foreground automatically, like it was before update. It just stay in this mode like you can see on the image. If you will press on the #2 it came to foreground, and when you close this window it also will close the #1 window. Maybe problem came from python/dbus problem from the first question ?

Can someone help me with this ?

Thanks

EDIT (28:12:14):

Problem #1 solved:

  1. By installation of dbus-python package.

Problem #2 solved:

  1. removed from binary "fingerterm -e" before path to script.

  2. added "fingerterm -e" in the .desktop file before path to binary, like this: sh -c "fingerterm -e /path/to/binary"

[SOLVED] Python, dbus, fingerterm, opening app/script after last update (1.1.1.27)

Hi to all

After last update I have some problem with my apps (scripts). Maybe someone can help me to fix it...

A. CAN'T get notification... if I'll run this command for example:

python /usr/share/openrepos-wazebton/notifer1.py

I get this output:

[root@Jolla ~]# python /usr/share/openrepos-wazebton/notifer1.py
Traceback (most recent call last):
  File "/usr/share/openrepos-wazebton/notifer1.py", line 2, in <module>
    import dbus
ImportError: No module named dbus
[root@Jolla ~]#

The content of notifer1.py is:

#!/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",
                 "Waze BT APPLIED !",
                 "Waze & BT starter",
                 dbus.Array(["default", ""]),
                 dbus.Dictionary({"x-nemo-preview-body": "Waze & BT starter",
                                  "x-nemo-preview-summary": "Waze BT APPLIED !"},
                                  signature='sv'),
                 0)

What wrong here ? Why it stopped to work after update ?

B. Strange way to open script via fingerterm. When I press on the .desktop file, it should open fingerterm and start my script inside. All worked perfectly before update, but now it work in different way, see picture: screenshot image

  1. Start window
  2. Open fingerterm window with my script

BUT #2 CAN'T came to foreground automatically, like it was before update. It just stay in this mode like you can see on the image. If you will press on the #2 it came to foreground, and when you close this window it also will close the #1 window. Maybe problem came from python/dbus problem from the first question ?

Can someone help me with this ?

Thanks

EDIT (28:12:14):

Problem #1 solved:

  1. By installation of dbus-python package.

Problem #2 solved:

  1. removed from binary "fingerterm -e" before path to script.

  2. added "fingerterm -e" in the .desktop file before path to binary, like this: sh -c "fingerterm -e /path/to/binary"