daemon = true in keys.dat doesn't work #1385

Closed
opened 2018-11-03 21:27:29 +01:00 by PeterSurda · 7 comments
PeterSurda commented 2018-11-03 21:27:29 +01:00 (Migrated from github.com)

Probably some of the recent changes broke it. I don't have time to debug, but the symptom is that with daemon = true and pyqt absent in the system, upon launch it will complain that pyqt is missing and refuse to start. When run with -d, it's fine. Latest v0.6. It worked correctly in the past.

I saw reports about this in the chan, but I thought they don't know how to use it because it wasn't described very well. I had to run a daemon on one of my systems, and turned out that after doing a pull, it broke. Now I think that they were describing the problems I encountered.

Probably some of the recent changes broke it. I don't have time to debug, but the symptom is that with `daemon = true` and pyqt absent in the system, upon launch it will complain that pyqt is missing and refuse to start. When run with `-d`, it's fine. Latest `v0.6`. It worked correctly in the past. I saw reports about this in the chan, but I thought they don't know how to use it because it wasn't described very well. I had to run a daemon on one of my systems, and turned out that after doing a pull, it broke. Now I think that they were describing the problems I encountered.
g1itch commented 2018-11-04 13:31:16 +01:00 (Migrated from github.com)

I cannot reproduce it with 58bc170 ):

I cannot reproduce it with 58bc170 ):
PeterSurda commented 2018-11-04 13:53:13 +01:00 (Migrated from github.com)

Is pyqt installed?

Is pyqt installed?
g1itch commented 2018-11-04 13:55:31 +01:00 (Migrated from github.com)

Oh, it was a problem with my portage. I had actually PyQt4 installed (:
problem source - it should be below, under if daemon:

Oh, it was a problem with my portage. I had actually `PyQt4` installed (: [problem source](../blob/v0.6/src/bitmessagemain.py#L184) - it should be below, under `if daemon:`
g1itch commented 2018-11-04 13:55:58 +01:00 (Migrated from github.com)

It's probably very old issue

It's probably very old issue
PeterSurda commented 2018-11-04 13:56:21 +01:00 (Migrated from github.com)

It worked in May

It worked in May
g1itch commented 2018-11-04 14:00:37 +01:00 (Migrated from github.com)
diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py
index 4eefceb0..f05e0874 100755
--- a/src/bitmessagemain.py
+++ b/src/bitmessagemain.py
@@ -181,7 +181,6 @@ class Main:
                 sys.exit()
             elif opt in ("-d", "--daemon"):
                 daemon = True
-                state.enableGUI = False  # run without a UI
             elif opt in ("-c", "--curses"):
                 state.curses = True
             elif opt in ("-t", "--test"):
@@ -205,6 +204,9 @@ class Main:
                     os.path.join(app_dir, 'tests', 'apinotify_handler.py')
                 )
 
+        if daemon:
+            state.enableGUI = False  # run without a UI
+
         # is the application already running?  If yes then exit.
         if state.enableGUI and not state.curses and not depends.check_pyqt():
             sys.exit(
```diff diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 4eefceb0..f05e0874 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -181,7 +181,6 @@ class Main: sys.exit() elif opt in ("-d", "--daemon"): daemon = True - state.enableGUI = False # run without a UI elif opt in ("-c", "--curses"): state.curses = True elif opt in ("-t", "--test"): @@ -205,6 +204,9 @@ class Main: os.path.join(app_dir, 'tests', 'apinotify_handler.py') ) + if daemon: + state.enableGUI = False # run without a UI + # is the application already running? If yes then exit. if state.enableGUI and not state.curses and not depends.check_pyqt(): sys.exit( ```
PeterSurda commented 2018-11-04 14:03:30 +01:00 (Migrated from github.com)

looks ok

looks ok
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-12-18#1385
No description provided.