Skip to content

ensure client, server and core use correct setting path - #8535

Merged
nbolton merged 1 commit into
masterfrom
fix_8534
Apr 25, 2025
Merged

ensure client, server and core use correct setting path#8535
nbolton merged 1 commit into
masterfrom
fix_8534

Conversation

@sithlord48

@sithlord48 sithlord48 commented Apr 24, 2025

Copy link
Copy Markdown
Member

fixes #8534

deskflow-server, deskflow-core and deskflow-client are not QApplications this causes the qApp used in our settings object to fallback to the default path and make the settings read from different paths (if not using the default one)

To Fix this on windows only we make a QCoreApplication in each of them and delete it after , this is enough to initialize the qApp.

We should consider in the future making these apps use a QCoreApplication in place of the App

@sithlord48
sithlord48 requested a review from nbolton April 24, 2025 01:28
@sithlord48
sithlord48 force-pushed the fix_8534 branch 2 times, most recently from dc42c92 to 830e180 Compare April 24, 2025 01:36
@sithlord48 sithlord48 added the 🩹 fix This PR fixes a reported bug label Apr 24, 2025
@sithlord48

sithlord48 commented Apr 24, 2025

Copy link
Copy Markdown
Member Author

@jonathan-mcewan can you test this when its finished building and report back if it worked. (it did in my local test)
the artifacts will be attached to this action run https://github.com/deskflow/deskflow/actions/runs/14631534694

Direct link to the win artifacts for the job: https://github.com/deskflow/deskflow/actions/runs/14631534694/artifacts/2998593238

@nbolton

nbolton commented Apr 25, 2025

Copy link
Copy Markdown
Member

report back if it worked

Want to wait for this before landing?

@nbolton

nbolton commented Apr 25, 2025

Copy link
Copy Markdown
Member

Wayland server seems borken in this PR.

Edit: Clients connect and I don't see any errors, but weirdly the portal permission dialog doesn't show. I wonder if this happens because we're creating a Qt app instance in server?

  // HACK to make sure settings gets the correct qApp path
  QCoreApplication m(argc, argv);
  m.deleteLater();

Maybe GNOME specific? I'll also test KDE.

Edit: Heh... KDE Wayland client also not working; no portal dialog on KDE Wayland client.

Server:

[2025-04-25T10:12:21] DEBUG: active settings path: /home/nick/.config/Deskflow
	/home/nick/Projects/deskflow/src/lib/gui/MainWindow.cpp:143
[2025-04-25T10:12:21] DEBUG: checking for updates at: https://api.deskflow.org/version
	/home/nick/Projects/deskflow/src/lib/gui/VersionChecker.cpp:27
[2025-04-25T10:12:21] INFO: starting core server process (desktop mode)
	/home/nick/Projects/deskflow/src/lib/gui/core/CoreProcess.cpp:336
[2025-04-25T10:12:21] DEBUG: core process state changed: stopped -> starting
	/home/nick/Projects/deskflow/src/lib/gui/core/CoreProcess.cpp:605
[2025-04-25T10:12:21] DEBUG: committing server config
	/home/nick/Projects/deskflow/src/lib/gui/ServerConfig.cpp:109
[2025-04-25T10:12:21] DEBUG: core connection state changed:  1
	/home/nick/Projects/deskflow/src/lib/gui/MainWindow.cpp:965
[2025-04-25T10:12:21] INFO: core config file: /home/nick/.config/Deskflow/deskflow-server.conf
	/home/nick/Projects/deskflow/src/lib/gui/core/CoreProcess.cpp:510
[2025-04-25T10:12:21] DEBUG: persisting tls certificate
	/home/nick/Projects/deskflow/src/lib/gui/tls/TlsUtility.cpp:47
[2025-04-25T10:12:21] DEBUG: tls certificate already exists
	/home/nick/Projects/deskflow/src/lib/gui/tls/TlsUtility.cpp:50
[2025-04-25T10:12:21] DEBUG: log level: DEBUG
	/home/nick/Projects/deskflow/src/lib/gui/core/CoreProcess.cpp:374
[2025-04-25T10:12:21] INFO: running command: /home/nick/Projects/deskflow/build/bin/deskflow-server -f --debug DEBUG --name spock-tux --enable-crypto --disable-client-cert-check --address :24800 -c /home/nick/.config/Deskflow/deskflow-server.conf --tls-cert /home/nick/.config/Deskflow/tls/deskflow.pem
	/home/nick/Projects/deskflow/src/lib/gui/core/CoreProcess.cpp:244
[2025-04-25T10:12:21] DEBUG: core process state changed: starting -> started
	/home/nick/Projects/deskflow/src/lib/gui/core/CoreProcess.cpp:605
[2025-04-25T10:12:21] DEBUG: opening configuration "/home/nick/.config/Deskflow/deskflow-server.conf"
	/home/nick/Projects/deskflow/src/lib/deskflow/ServerApp.cpp:239
[2025-04-25T10:12:21] DEBUG: configuration read successfully
	/home/nick/Projects/deskflow/src/lib/deskflow/ServerApp.cpp:249
[2025-04-25T10:12:21] INFO: using ei screen for wayland
	/home/nick/Projects/deskflow/src/lib/deskflow/ServerApp.cpp:570
[2025-04-25T10:12:21] DEBUG: adopting new buffer
	/home/nick/Projects/deskflow/src/lib/base/EventQueue.cpp:154
[2025-04-25T10:12:21] DEBUG: adopting new buffer
	/home/nick/Projects/deskflow/src/lib/base/EventQueue.cpp:154
[2025-04-25T10:12:21] DEBUG: opened display
	/home/nick/Projects/deskflow/src/lib/deskflow/Screen.cpp:37
[2025-04-25T10:12:21] DEBUG: glib thread running
	/home/nick/Projects/deskflow/src/lib/platform/PortalInputCapture.cpp:373
[2025-04-25T10:12:21] DEBUG: core connection state changed:  3
	/home/nick/Projects/deskflow/src/lib/gui/MainWindow.cpp:965
[2025-04-25T10:12:21] NOTE: started server, waiting for clients
	/home/nick/Projects/deskflow/src/lib/deskflow/ServerApp.cpp:529
[2025-04-25T10:12:21] DEBUG: event queue is ready
	/home/nick/Projects/deskflow/src/lib/base/EventQueue.cpp:96
[2025-04-25T10:12:21] DEBUG: add pending events to buffer
	/home/nick/Projects/deskflow/src/lib/base/EventQueue.cpp:98
[2025-04-25T10:12:21] DEBUG: screen "spock-tux" shape changed
	/home/nick/Projects/deskflow/src/lib/server/Server.cpp:1165
[2025-04-25T10:12:22] DEBUG: version check server success, http status: 200
	/home/nick/Projects/deskflow/src/lib/gui/VersionChecker.cpp:45
[2025-04-25T10:12:22] DEBUG: version check response: 1.21.2
	/home/nick/Projects/deskflow/src/lib/gui/VersionChecker.cpp:49
[2025-04-25T10:12:22] DEBUG: current version 1.21.2.30 is upto date
	/home/nick/Projects/deskflow/src/lib/gui/VersionChecker.cpp:61
[2025-04-25T10:12:22] DEBUG: opening new socket: 00B2DDB0
	/home/nick/Projects/deskflow/src/lib/net/TCPSocket.cpp:59
[2025-04-25T10:12:22] DEBUG: openssl version: OpenSSL 3.2.4 11 Feb 2025
	/home/nick/Projects/deskflow/src/lib/net/SslLogger.cpp:70
[2025-04-25T10:12:22] INFO: accepted secure socket
	/home/nick/Projects/deskflow/src/lib/net/SecureSocket.cpp:459
[2025-04-25T10:12:22] DEBUG: openssl cipher: TLS_AES_256_GCM_SHA384         TLSv1.3 Kx=any      Au=any   Enc=AESGCM(256)            Mac=AEAD
	/home/nick/Projects/deskflow/src/lib/net/SslLogger.cpp:94
[2025-04-25T10:12:22] INFO: network encryption protocol: TLSv1.3
	/home/nick/Projects/deskflow/src/lib/net/SslLogger.cpp:110
[2025-04-25T10:12:22] NOTE: accepted client connection
	/home/nick/Projects/deskflow/src/lib/server/ClientListener.cpp:150
[2025-04-25T10:12:22] DEBUG: saying hello as Synergy, protocol v1.8
	/home/nick/Projects/deskflow/src/lib/server/ClientProxyUnknown.cpp:55
[2025-04-25T10:12:22] DEBUG: opening new socket: 00B2DD90
	/home/nick/Projects/deskflow/src/lib/net/TCPSocket.cpp:59
[2025-04-25T10:12:22] DEBUG: openssl version: OpenSSL 3.2.4 11 Feb 2025
	/home/nick/Projects/deskflow/src/lib/net/SslLogger.cpp:70
[2025-04-25T10:12:22] INFO: accepted secure socket
	/home/nick/Projects/deskflow/src/lib/net/SecureSocket.cpp:459
[2025-04-25T10:12:22] DEBUG: openssl cipher: TLS_AES_256_GCM_SHA384         TLSv1.3 Kx=any      Au=any   Enc=AESGCM(256)            Mac=AEAD
	/home/nick/Projects/deskflow/src/lib/net/SslLogger.cpp:94
[2025-04-25T10:12:22] INFO: network encryption protocol: TLSv1.3
	/home/nick/Projects/deskflow/src/lib/net/SslLogger.cpp:110
[2025-04-25T10:12:22] INFO: local languages: en
	/home/nick/Projects/deskflow/src/lib/deskflow/languages/LanguageManager.cpp:34
[2025-04-25T10:12:22] DEBUG: received client "tuvok-win" info shape=0,0 1920x1080 at -13108,-13108
	/home/nick/Projects/deskflow/src/lib/server/ClientProxy1_0.cpp:386
[2025-04-25T10:12:22] NOTE: accepted client connection
	/home/nick/Projects/deskflow/src/lib/server/ClientListener.cpp:150
[2025-04-25T10:12:22] DEBUG: saying hello as Synergy, protocol v1.8
	/home/nick/Projects/deskflow/src/lib/server/ClientProxyUnknown.cpp:55
[2025-04-25T10:12:22] DEBUG: core connection state changed:  2
	/home/nick/Projects/deskflow/src/lib/gui/MainWindow.cpp:965
[2025-04-25T10:12:22] NOTE: client "tuvok-win" has connected
	/home/nick/Projects/deskflow/src/lib/server/Server.cpp:308
[2025-04-25T10:12:22] INFO: local languages: en
	/home/nick/Projects/deskflow/src/lib/deskflow/languages/LanguageManager.cpp:34
[2025-04-25T10:12:22] DEBUG: received client "Janeway.lan" info shape=0,0 1080x1920 at 540,960
	/home/nick/Projects/deskflow/src/lib/server/ClientProxy1_0.cpp:386
[2025-04-25T10:12:22] NOTE: client "Janeway.lan" has connected
	/home/nick/Projects/deskflow/src/lib/server/Server.cpp:308
[2025-04-25T10:12:22] DEBUG: opening new socket: 00A99020
	/home/nick/Projects/deskflow/src/lib/net/TCPSocket.cpp:59
[2025-04-25T10:12:22] DEBUG: openssl version: OpenSSL 3.2.4 11 Feb 2025
	/home/nick/Projects/deskflow/src/lib/net/SslLogger.cpp:70
[2025-04-25T10:12:22] INFO: accepted secure socket
	/home/nick/Projects/deskflow/src/lib/net/SecureSocket.cpp:459
[2025-04-25T10:12:22] DEBUG: openssl cipher: TLS_AES_256_GCM_SHA384         TLSv1.3 Kx=any      Au=any   Enc=AESGCM(256)            Mac=AEAD
	/home/nick/Projects/deskflow/src/lib/net/SslLogger.cpp:94
[2025-04-25T10:12:22] INFO: network encryption protocol: TLSv1.3
	/home/nick/Projects/deskflow/src/lib/net/SslLogger.cpp:110
[2025-04-25T10:12:22] NOTE: accepted client connection
	/home/nick/Projects/deskflow/src/lib/server/ClientListener.cpp:150
[2025-04-25T10:12:22] DEBUG: saying hello as Synergy, protocol v1.8
	/home/nick/Projects/deskflow/src/lib/server/ClientProxyUnknown.cpp:55
[2025-04-25T10:12:22] INFO: local languages: en
	/home/nick/Projects/deskflow/src/lib/deskflow/languages/LanguageManager.cpp:34
[2025-04-25T10:12:22] DEBUG: received client "riker" info shape=0,0 1536x864 at 1,606
	/home/nick/Projects/deskflow/src/lib/server/ClientProxy1_0.cpp:386
[2025-04-25T10:12:22] NOTE: client "riker" has connected
	/home/nick/Projects/deskflow/src/lib/server/Server.cpp:308

@sithlord48

Copy link
Copy Markdown
Member Author

Do you think its safe to just guard this on windows only ? (until we make them QCoreApplication)

@sithlord48 sithlord48 added the 🪟 windows This issue affects Windows label Apr 25, 2025
@nbolton

nbolton commented Apr 25, 2025

Copy link
Copy Markdown
Member

Do you think its safe to just guard this on windows only ? (until we make them QCoreApplication)

Ah yeah maybe; I think it only had an adverse effect on Wayland.

Though it doesn't bode well for us wanting to Qt-ize the core :|

@sithlord48

Copy link
Copy Markdown
Member Author

Though it doesn't bode well for us wanting to Qt-ize the core :|

Naw should be fine when we are using them and not the rando app w/ run .

@nbolton nbolton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wayland working again.

@nbolton
nbolton merged commit 793ea5f into master Apr 25, 2025
@nbolton
nbolton deleted the fix_8534 branch April 25, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🩹 fix This PR fixes a reported bug 🪟 windows This issue affects Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows portable mode looks wrong place for TLS info

2 participants