desktop icon indicating copy to clipboard operation
desktop copied to clipboard

[Bug]: `--background` not working

Open LDprg opened this issue 2 years ago • 17 comments

⚠️ Before submitting, please verify the following: ⚠️

Bug description

I am autostarting nextcloud on linux with --background, but it still opens the window and does not minimize to tray.

Steps to reproduce

  1. Start nextcloud client with --background

Expected behavior

Well, that the app does not show up on start or when using --background.

Which files are affected by this bug

?

Operating system

Linux

Which version of the operating system you are running.

Arch with Gnome as DE

Package

Distro package manager

Nextcloud Server version

Nextcloud Desktop Client version

2:3.9.0-2

Is this bug present after an update or on a fresh install?

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Enabled

Are you using an external user-backend?

  • [ ] Default internal user-backend
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Nextcloud Server logs

?

Additional info

background_bug.zip

LDprg avatar Jul 23 '23 14:07 LDprg

After a couple of restarts (3-5) it worked again, but I let the issue open just in case.

LDprg avatar Jul 27 '23 06:07 LDprg

Strangely the problem accrued since today again.

LDprg avatar Jul 29 '23 15:07 LDprg

The option "--background" sometimes works, but most of the time main window is shown at startup. It's strange this bug is still alive...

siSSSou avatar Nov 12 '23 20:11 siSSSou

The option "--background" sometimes works, but most of the time main window is shown at startup. It's strange this bug is still alive...

Yeah the issue seems to happen only sometimes and also depending on the system. On my other Laptop it works as expected.

LDprg avatar Nov 13 '23 14:11 LDprg

I am also facing this behavior on my Ubuntu machines with Gnome... quite annoying.

WhoAmI0501 avatar Aug 16 '24 10:08 WhoAmI0501

Related: #5382

joshtrichards avatar Aug 20 '24 20:08 joshtrichards

Related: #5382

In my case, i want to add the information, that the window stays open until I explicitly close it via the task bar. Its not just popping up for a short moment.

WhoAmI0501 avatar Aug 21 '24 15:08 WhoAmI0501

Same here since updating the appimage to 3.14.0 on Debian/XFCE. Start in the middle of the screen after the 1st login and disappear only after a clic on the icon in the notification area. Worked like a charm before the update :/

GUSC68 avatar Sep 16 '24 17:09 GUSC68

This is happening for me constantly now. The window always appears on startup. To reproduce I can restart the PC or exit the NextCloud client and start it with the --background parameter from a terminal and it will always show up with the main window. It's really annoying.

System is XUbuntu 24.04.1, NextCloud desktop client is at 3.14.1

Dravere avatar Oct 06 '24 10:10 Dravere

Same with Linux Mint XFCE 22 and 3.14.1 client.

Jerome-Herbinet avatar Oct 09 '24 13:10 Jerome-Herbinet

Same here: Xubuntu 24.04.1, Xfce 4.18, GTK 3.24.41, Client 3.14.3.

2024-11-21 21:27:56:835 [ info nextcloud.gui.application ./src/gui/application.cpp:727 ]:	################## "Nextcloud" locale: "en_US" ui_lang: QVariant(Invalid) version: "3.14.3-20241107.180900.3cdc27b7e-1.0~noble1" os: "Ubuntu 24.04.1 LTS"
2024-11-21 21:27:56:835 [ info nextcloud.gui.application ./src/gui/application.cpp:732 ]:	Arguments: QList("/usr/bin/nextcloud", "--background", "--logdebug", "--logwindow")
2024-11-21 21:27:56:835 [ debug nextcloud.gui.application ./src/gui/application.cpp:1013 ]	[ OCC::Application::setupTranslations ]:	trying to load "en_US" in "client_en_US" from "/usr/share/nextcloud/i18n/"
2024-11-21 21:27:56:835 [ info nextcloud.gui.application ./src/gui/application.cpp:1020 ]:	Using "en_US" translation
2024-11-21 21:27:56:835 [ debug nextcloud.gui.application ./src/gui/application.cpp:1037 ]	[ OCC::Application::setupTranslations ]:	impossible to load QtKeychain translation catalog "qtkeychain_en_US"
2024-11-21 21:27:56:842 [ info nextcloud.gui.application ./src/gui/application.cpp:382 ]:	VFS suffix plugin is available
2024-11-21 21:27:56:842 [ info nextcloud.gui.socketapi ./src/gui/socketapi/socketapi.cpp:310 ]:	server started, listening at  "/run/user/1000/Nextcloud/socket"
2024-11-21 21:27:56:842 [ info nextcloud.gui.folder.manager ./src/gui/folderman.cpp:67 ]:	setting remote poll timer interval to 30000 msec
2024-11-21 21:27:56:858 [ debug nextcloud.gui.ocsuserstatusconnector ./src/libsync/ocsuserstatusconnector.cpp:226 ]	[ OCC::OcsUserStatusConnector::fetchUserStatus ]:	Try to fetch user status
2024-11-21 21:27:56:858 [ debug nextcloud.gui.ocsuserstatusconnector ./src/libsync/ocsuserstatusconnector.cpp:229 ]	[ OCC::OcsUserStatusConnector::fetchUserStatus ]:	User status not supported
2024-11-21 21:27:56:885 [ info nextcloud.gui.account.manager ./src/gui/accountmanager.cpp:485 ]:	Account for QUrl("") using auth type "webflow"
2024-11-21 21:27:56:885 [ info nextcloud.sync.credentials.webflow ./src/gui/creds/webflowcredentials.cpp:117 ]:	Get QNAM
2024-11-21 21:27:56:885 [ info nextcloud.gui.account.manager ./src/gui/accountmanager.cpp:544 ]:	Restored:  0  unknown certs.
2024-11-21 21:27:56:885 [ debug nextcloud.gui.activity ./src/gui/tray/usermodel.cpp:281 ]	[ OCC::User::setNotificationRefreshInterval ]:	Starting Notification refresh timer with  60  sec interval
2024-11-21 21:27:56:885 [ info nextcloud.gui.folder.manager ./src/gui/folderman.cpp:186 ]:	Setup folders from settings file
2024-11-21 21:27:56:886 [ debug nextcloud.gui.folder ./src/gui/folder.cpp:182 ]	[ OCC::Folder::checkLocalPath ]:	Checked local path ok
2024-11-21 21:27:56:886 [ info nextcloud.sync.configfile ./src/libsync/configfile.cpp:1266 ]:	Adding user defined ignore list to csync: "/home/user/.config/Nextcloud/sync-exclude.lst"
2024-11-21 21:27:57:035 [ info nextcloud.sync.database ./src/common/syncjournaldb.cpp:339 ]:	sqlite3 version "3.45.1"
2024-11-21 21:27:57:035 [ info nextcloud.sync.database ./src/common/syncjournaldb.cpp:351 ]:	sqlite3 locking_mode= "exclusive"
2024-11-21 21:27:57:035 [ info nextcloud.sync.database ./src/common/syncjournaldb.cpp:359 ]:	sqlite3 journal_mode= "wal"
2024-11-21 21:27:57:035 [ info nextcloud.sync.database ./src/common/syncjournaldb.cpp:381 ]:	sqlite3 synchronous= "NORMAL"
2024-11-21 21:27:57:035 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:3062 ]	[ OCC::SyncJournalDb::commitInternal ]:	Transaction commit "checkConnect" and starting new transaction
2024-11-21 21:27:57:035 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:919 ]	[ OCC::SyncJournalDb::tableColumns ]:	Columns in the current journal: QList("phash", "pathlen", "path", "inode", "uid", "gid", "mode", "modtime", "type", "md5", "fileid", "remotePerm", "filesize", "ignoredChildrenRemote", "contentChecksum", "contentChecksumTypeId", "e2eMangledName", "isE2eEncrypted", "isShared", "lastShareStateFetchedTimestmap", "sharedByMe", "lock", "lockType", "lockOwnerDisplayName", "lockOwnerId", "lockOwnerEditor", "lockTime", "lockTimeout", "lockToken")
2024-11-21 21:27:57:036 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:3062 ]	[ OCC::SyncJournalDb::commitInternal ]:	Transaction commit "update database structure: add inode index" and starting new transaction
2024-11-21 21:27:57:036 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:3062 ]	[ OCC::SyncJournalDb::commitInternal ]:	Transaction commit "update database structure: add path index" and starting new transaction
2024-11-21 21:27:57:036 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:3062 ]	[ OCC::SyncJournalDb::commitInternal ]:	Transaction commit "update database structure: add parent index" and starting new transaction
2024-11-21 21:27:57:036 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:919 ]	[ OCC::SyncJournalDb::tableColumns ]:	Columns in the current journal: QList("path", "chunk", "transferid", "errorcount", "size", "modtime", "contentChecksum")
2024-11-21 21:27:57:036 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:919 ]	[ OCC::SyncJournalDb::tableColumns ]:	Columns in the current journal: QList("path", "baseFileId", "baseEtag", "baseModtime", "basePath")
2024-11-21 21:27:57:036 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:3062 ]	[ OCC::SyncJournalDb::commitInternal ]:	Transaction commit "update database structure: add e2eMangledName index" and starting new transaction
2024-11-21 21:27:57:036 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:3062 ]	[ OCC::SyncJournalDb::commitInternal ]:	Transaction commit "update database structure: add basePath index" and starting new transaction
2024-11-21 21:27:57:036 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:919 ]	[ OCC::SyncJournalDb::tableColumns ]:	Columns in the current journal: QList("path", "lastTryEtag", "lastTryModtime", "retrycount", "errorstring", "lastTryTime", "ignoreDuration", "renameTarget", "errorCategory", "requestId")
2024-11-21 21:27:57:036 [ debug nextcloud.sync.database ./src/common/syncjournaldb.cpp:3062 ]	[ OCC::SyncJournalDb::commitInternal ]:	Transaction commit "checkConnect End" 
2024-11-21 21:27:57:037 [ info nextcloud.gui.folder.manager ./src/gui/folderman.cpp:1237 ]:	Adding folder to Folder Map  OCC::Folder(0x654fe364ce50) "1"
2024-11-21 21:27:57:037 [ debug nextcloud.gui.folderwatcher ./src/gui/folderwatcher_linux.cpp:100 ]	[ OCC::FolderWatcherPrivate::slotAddFolderRecursive ]:	(+) Watcher: "/home/user/Nextcloud/"
2024-11-21 21:27:57:299 [ debug nextcloud.gui.folderwatcher ./src/gui/folderwatcher_linux.cpp:126 ]	[ OCC::FolderWatcherPrivate::slotAddFolderRecursive ]:	    `-> and 1979 subdirectories
2024-11-21 21:27:57:299 [ debug nextcloud.gui.folderwatcher ./src/gui/folderwatcher.cpp:122 ]	[ OCC::FolderWatcher::startNotificationTestWhenReady ]:	setModTime "/home/user/Nextcloud/.nextcloudsync.log" 1731942336
2024-11-21 21:27:57:299 [ info nextcloud.gui.folder.manager ./src/gui/folderman.cpp:702 ]:	Schedule folder  "1"  to sync!
2024-11-21 21:27:57:299 [ info nextcloud.gui.folder.manager ./src/gui/folderman.cpp:706 ]:	Folder is not ready to sync, not scheduled!
2024-11-21 21:27:57:299 [ warning nextcloud.gui.application ./src/gui/application.cpp:519 ]:	Migration result AccountManager::AccountsRestoreResult:  OCC::AccountManager::AccountsRestoreSuccess
2024-11-21 21:27:57:299 [ warning nextcloud.gui.application ./src/gui/application.cpp:520 ]:	Folders migrated:  1
2024-11-21 21:27:57:299 [ warning nextcloud.gui.application ./src/gui/application.cpp:521 ]:	No accounts were migrated, prompting user to set up accounts and folders from scratch.
2024-11-21 21:27:57:314 [ warning qt.qml.typeregistration unknown:0 ]:	Invalid QML element name "Activity"; value type names should begin with a lowercase letter
2024-11-21 21:27:57:314 [ warning qt.qml.typeregistration unknown:0 ]:	Invalid QML element name "TalkNotificationData"; value type names should begin with a lowercase letter
2024-11-21 21:27:57:314 [ warning qt.qml.typeregistration unknown:0 ]:	Invalid QML element name "UserStatus"; value type names should begin with a lowercase letter
2024-11-21 21:27:57:314 [ warning qt.qml.typeregistration unknown:0 ]:	Invalid QML element name "Sharee"; value type names should begin with a lowercase letter
2024-11-21 21:27:57:320 [ info nextcloud.sync.clientproxy ./src/libsync/clientproxy.cpp:103 ]:	Set proxy configuration to use the preferred system proxy for http tcp connections
2024-11-21 21:27:57:325 [ warning qt.core.qobject.connect unknown:0 ]:	QObject::connect(QNetworkInformation, OCC::Application): invalid nullptr parameter
2024-11-21 21:27:57:464 [ warning qt.qml.context unknown:0 ]:	qrc:/qml/src/gui/tray/MainWindow.qml:313:29 Parameter "index" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::begin: Paint device returned engine == 0, type: 3
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::save: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::worldTransform: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::worldTransform: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setPen: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setBrush: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setRenderHint: Painter must be active to set rendering hints
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setRenderHint: Painter must be active to set rendering hints
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::opacity: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::brush: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::pen: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setPen: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setOpacity: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::drawPath: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setPen: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setOpacity: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setBrush: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::drawPath: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setBrush: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setOpacity: Painter not active
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::restore: Unbalanced save/restore
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::begin: Paint device returned engine == 0, type: 3
2024-11-21 21:27:57:466 [ warning default unknown:0 ]:	QPainter::setCompositionMode: Painter not active

marukuru avatar Nov 21 '24 20:11 marukuru

3.15.0 do the job for me. It make start the client in the notification area again. Thank you !

GUSC68 avatar Dec 03 '24 19:12 GUSC68

3.15.0 do the job for me. It make start the client in the notification area again. Thank you !

Cannot confirm for 3.15.3 on PopOS 22.04.

Further, the application takes the focus and as a reason of that, if you're already doing this or that in another application, you're getting interrupted, which is VERY annoying. UX horror at its best.

Can anybody recommend an alternative desktop client, which is less shitty?

WhoAmI0501 avatar Jan 30 '25 11:01 WhoAmI0501

3.15.0 do the job for me. It make start the client in the notification area again. Thank you !

With nextcloud client version 3.16.1 on XUbuntu 24.04.2 LTS and Xfce 4.18 it still not work.

magicWF avatar Mar 18 '25 16:03 magicWF

Also happens on Arch Linux for a longer while now, currently with XFCE 4.20 and Nextcloud Client 3.15.3

rotanid avatar Mar 19 '25 02:03 rotanid

Also happens on Linux Mint Xia with XFCE 4.18.4 and Nextcloud Client 3.16.2daily (Linux)

ordilibre avatar Mar 29 '25 16:03 ordilibre

This bug also occurs under Windows 10 since client version 3.14.

csit07 avatar May 30 '25 14:05 csit07

This is intermittent, but happens almost every time. Running under Ubuntu 24.04LTS and XFCE 4.18 using nextcloud-client 3.16. I tried to run strace on it (ran a short script that exec's strace launching nextcloud-client), and it never happens. Either the involvement of the wrapper script or strace prevented the problem. I'm testing now with just the wrapper script and no strace. If that still fails, it will suggest to me that this might be a timing issue that the presence of strace prevents. I'll report back.

bpmartin20 avatar Jul 03 '25 16:07 bpmartin20

Reporting back ... The autolaunch file ("~/.config/autostart/nextcloud.desktop") would normally contain the following line, which causes the problem we're discussing -- the nextcloud client often usually ignores the --background option and appears in the foreground. Exec=/usr/bin/nextcloud --background If I change it to: Exec=/usr/bin/strace -o /tmp/nextcloud.trace -f /usr/bin/nextcloud --background it still fails intermittently, but frequently, just the same as before. If I change it to: Exec=/home/bpmartin20/bin/launch-nextcloud and /home/bpmartin20/bin/launch-nextcloud contains: exec /usr/bin/nextcloud --background it still fails. But if I change /home/bpmartin20/bin/launch-nextcloud to contain: exec strace -o /tmp/nextcloud.trace -f /usr/bin/nextcloud --background it runs for a week without an incident. Running a trace on nextcloud all the time is a thorough waste of system resources, but maybe it suggests areas to investigate.

bpmartin20 avatar Jul 12 '25 17:07 bpmartin20

I have just installed an nvidia card in my computer and since then the same behavior occurs. With intel gpu driver I never encounterd that problem, and with proprietary nvidia drivers it occurs at every startup ! (Debian 13 xfce)

siSSSou avatar Sep 26 '25 14:09 siSSSou