Qt: Session management error: Could not open network socket

Hello I’m new to this place and I get the following error when running the app KtimeTracker
“Qt: Session management error: Could not open network socket”.

The KtimeTracker app only runs once and when closed it doesn’t relaunch I had to use the command “flatpak run org.kde.ktimetracker” to see this error
also I tried this command “sudo -i flatpak run org.kde.ktimetracker” because I thought that maybe the error has something to do with admin privileges.
and got the following: “kf.dbusaddons: DBus session bus not found. To circumvent this problem try the following command (with bash): export $(dbus-launch)”
I executed that command and it didn’t do anything.

I have no idea what to do and there are no solutions on the internet that’s why I came to ask for help I usually don’t do this. I don’t know if this is a bug or not I wanted to report it as a bug but I came here first because it was suggested to me by the kde bug tracking website.

Operating System: Arch Linux
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.1
Kernel-Version: 6.9.4-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6750 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C84
System Version: 1.0

  1. Note that when you close the KTimeTracker window, it does not close the application - it will minimize itself to the system notifications area (at the bottom right of the default panel) and will likely go into the overflow menu. It may look like this:
    image
    (please ignore the numbers on the right side - I had a spreadsheet open on that screen, behind the overflow menu).

    If you try to launch the application again, it will detect that it is already running and do nothing - ideally it should force the existing application to show its window, but it doesn’t do that. Maybe there should be a bug report about that.

  2. I’m not sure why you get the “Could not open network socket” error - to the best of my knowledge the KTimeTracker application does not use network communications. It could be part of the D-Bus setup for the app, but unless you see a problematic behavior - I would ignore that message. When you run applications through the terminal, they often spew a lot of debug messages - some of which sound scary but are often of little consequence to the day to day use of the application. For example, when I run KTimeTracker from the terminal I get a lot of messages like “kf.solid.backends.udisks2: Failed enumerating UDisks2 objects”, but that is not actually a real problem.

  3. In general it is not a good idea to run things with sudo if you don’t know exactly what you are doing, as it is very easy to use sudo to make your system unusable by mistake. Specifically you are not supposed to run graphical applications under sudo, and doing so will likely cause more problems than solve any (this is a modern consideration - up until a few years ago running gui applications as sudo was something that you had to do from time to time). Specifically the D-Bus warning was that KTimeTracker uses the user’s session bus to communicates with other system facilities, and when you ran it with sudo it tried to access the root’s session bus - but since the root user is not logged in, it had no session bus - and there’s no reason to run a root session bus (it should actually never happen) so there’s no point in trying to make it work.

Summary - unless you have a real problem with the behavior of the application, don’t bother with that warning message. And also point 1.

hello, thanks so much for the response.
I just checked and it shows up in the status and notifications area I did not know that thanks for the help.
Also thanks for the advice I will make sure not to run apps with sudo.