KDE desktop login failure: "Could not start d-bus. Can you call qdbus?"

Bug #1304805 reported by meldroc
164
This bug affects 33 people
Affects Status Importance Assigned to Milestone
kde-workspace (Ubuntu)
Fix Released
Critical
Jonathan Riddell
Trusty
Confirmed
Undecided
Unassigned
Utopic
Fix Released
Critical
Jonathan Riddell

Bug Description

I downloaded a round of updates using Muon in Kubuntu Trusty, on April 8, 2014, with a large number of KDE-related packages. When I logged out, and attempted to log back in, I can no longer get a KDE desktop. Instead, I get a window with the message "Could not start d-bus. Can you call qdbus?", and when I click "OK", I get returned to the login manager.

Tags: kubuntu trusty
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qt4-x11 (Ubuntu):
status: New → Confirmed
Revision history for this message
pieter k (pieterkristensen) wrote :

same here on a amd64 system.
I went into the terminal by pressing Ctrl-Alt-F1. From there I tried
- sudo apt-get -f install
- sudo apt-get install dbus
- sudo apt-get install dbus-qt5 (it actually installed)
- sudo apt-get install qdbus and
- sudo apt-get install dbus:amd4
none of which solved the problem

Revision history for this message
Ben (bshatt1987) wrote :

Ubuntu Trusty Tahr (development branch)
Release: 14.04

qdbus version: 4:4.8.5+git192-g085f851+dfsg-2ubuntu4

What I expected to happen : Install updates, reboot and log in as usual.

What actually happened: Installed updated, rebooted and got this error upon login.

I downloaded the package 'qdbus' and tried to install it with dpkg but that didn't seem to help.
I installed lubuntu-desktop on top of the KDE so that I could log into this system.

Revision history for this message
kenzolo (vincenzo-giovinazzo91) wrote :

Same here :(

Revision history for this message
Vincent Ouwehand (4e0a8aa4) wrote :

Same here.

Tried installint qt4-default
Tried installing qt5-dbus
Tried updating kde-workspace-bin (was already up to date)

No change.

Working with KUbuntu 14.04 btw

Revision history for this message
Steve (steven-bell) wrote :

Ubuntu Trusty Tahr (development branch)
Release: 14.04

sudo apt-get -f install
sudo apt-get install qttools5-dev-tools
sudo apt-get install dbus
sudo apt-get install dbus-qt5 <==== Installed
sudo apt-get install qdbus
sudo apt-get install dbus:amd64
sudo apt-get install qdbus:amd64
sudo apt-get remove qdbus:i386
sudo apt-get install qt4-default
sudo apt-get install qt5-default

Lol, nothing so far...

Revision history for this message
sibe39 (sibe39) wrote :

Its a big bug !

Revision history for this message
scontin (stecontin) wrote :

I cominfirm this bug.
Please sove quickly!

Revision history for this message
[Po]lentino (polentino911) wrote :

I made a bugreport like this one at about same time ( #1304856 ) anyway ,since this one is the original one, I put here some additional info that could be useful for the devs: I logged in TTY1, run qdbus, and I got this output:

"Could not connect to D-Bus server: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11"

Revision history for this message
Kyrylo Bohdanenko (kyrboh) wrote :

[Po]lentino,

That informaion isn't actually helpful. You tried to run qdbus from a tty without X11 server?

If so, the essage just tells you that X11 should be started and $DISPLAY env variable should be set in order to call qdbus.

Revision history for this message
Jonathan Riddell (jr) wrote :

FIx uploaded in kde-workspace_4.11.8-0ubuntu5

Edit /usr/bin/startkde, change:

  qdbus="QT_SELECT=qt4 qdbus"

to remove the quotes

  qdbus=QT_SELECT=qt4 qdbus

sorry for the breakage

Revision history for this message
Harald Sitter (apachelogger) wrote :

qdbus variable in startkde is a string, should be a command sequence.

affects: qt4-x11 (Ubuntu) → kde-workspace (Ubuntu)
Changed in kde-workspace (Ubuntu):
assignee: nobody → Jonathan Riddell (jr)
importance: Undecided → Critical
milestone: none → ubuntu-14.04
status: Confirmed → Triaged
tags: added: kubuntu
Changed in kde-workspace (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Ben (bshatt1987) wrote :

Worked like a charm. Thank you!

Revision history for this message
NetBit73 (mmach) wrote :

THX Jonathan #12

Revision history for this message
Bob Treat (rptreat) wrote :

Worked here too.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kde-workspace - 4:4.11.8-0ubuntu5

---------------
kde-workspace (4:4.11.8-0ubuntu5) trusty; urgency=medium

  * Fix patch kubuntu_dont-force-on-path.patch, previous change
    broke log, sorry, LP: #1304805
 -- Jonathan Riddell <email address hidden> Wed, 09 Apr 2014 09:33:32 +0100

Changed in kde-workspace (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
David (daharper) wrote :

Thankyou, works here too.

Revision history for this message
Steve (steven-bell) wrote :

Thank you Jonathan!

Revision history for this message
meldroc (meldroc-gmail) wrote :

Thank you, Jonathan! The fix did the trick for me!

MrLider (dva-lider)
no longer affects: kdebase-workspace
Revision history for this message
anavarre (aurelien.navarre) wrote :

I can confirm that it works too. Thanks so much for the quick fix!

Revision history for this message
Matteo Croce (teknoraver) wrote :

it seems to me the following syntax:

A=B=C D

in dash will execute "D" with the environment variable "A" set to "B=C", so the line:

qdbus=QT_SELECT=qt4 qdbus

would run "qdbus" once, and set "qdbus" to "QT_SELECT=qt4 qdbus":

$ qdbus=QT_SELECT=qt4 qdbus
:1.0
com.ubuntu.Upstart
...
org.freedesktop.DBus
$

I'm not sure that qdbus is started properly with this fix, and I guess that startkde works now only because $qdbus now returns true, as any assignment.

Maybe I'm wrong but this patch is definitely better

Revision history for this message
Andy St.Martin (andystmartin) wrote :

It is true that removing the quotes in the line
   qdbus=QT_SELECT=qt4 qdbus

Gets around "Could not start" issue. However, a better fix would be to leave the quotes in place and further down start up qdbus with an eval statment:
    qdbus="QT_SELECT=qtr qdbus"
...
    if eval $qdbus >/dev/null 2>/dev/null; then
...
Plus the other places where "$qdbus" is invoked.

Revision history for this message
Harald Sitter (apachelogger) wrote :

Nah, that would bring back another issue which was to be originally resolved by tempering with the qdbus code to begin with.

I am going to prepare a proper qdbus invocation tomorrow.

Revision history for this message
Matteo Croce (teknoraver) wrote :

what about just unsetting the variable before starting X?

Revision history for this message
Matteo Croce (teknoraver) wrote :

The fix in #12 is utterly wrong.

You can't absolutely use an unquoted space in an assignment: http://www.tldp.org/LDP/abs/html/varsubn.html#EX9

The reason because it *seems* to fix is luck, the line:

qdbus=QT_SELECT=qt4 qdbus

Would start "qdbus" anyway, but without the "QT_SELECT" variable and with a wrong "qdbus" variable with "QT_SELECT=qt4" as content

Revision history for this message
Harald Sitter (apachelogger) wrote :

I think we have already established that. The issue presented by this bug report "cannot login" is resolved, any further discussion on the way it was resolved should be done elsewhere as it just pointlessly spams people's inbox. Thanks.

Revision history for this message
Sam Azer (samazer) wrote :

FYI I had this problem today (installed some updates recently) and my system refused to login after rebooting today. Removed the double-quotes as mentioned above and it's working now. Thanks.

Revision history for this message
Carniolian (martin-raic) wrote :

Some details may have changed since April, but the problem remained. After upgrading to Trusty yesterday, I got the same unpleasant message with qdbus. In my /usr/bin/startkde file, the crucial line reads:

alias qdbus="QT_SELECT=qt4 qdbus"

After removing the quotes, KDE launched successfully, but this simply means that it actually works WITHOUT qdbus! Removing the quotes makes a substantial difference! Without quotes, the command alias:
 * sets qdbus to be expanded to QT_SELECT=qt4
 * lists the alias for qdbus
Thus, the program qdbus is no longer called. With quotes, however, the command qdbus first sets $QT_SELECT to qt4 and then calls the qdbus program. It would be probably more acceptable to write:

alias qdbus="QT_SELECT=qt4; qdbus"

Though I do not exactly know the role of qdbus, I suppose that KDE may once crash when it really needs it. It may be a good idea to have it anyway. After entering qdbus in the command line, I got the following message:

qdbus: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qdbus': No such file or directory

This all happened on my 64-bit computer. On the other hand, I have another 32-bit computer, where there were no problems with qdbus. Thus, I concluded that the qdbus library has been only written for the 32-bit architecture. As a result, my solution is:

sudo mkdir /usr/lib/x86_64-linux-gnu/qt4/bin
sudo chmod a+rx /usr/lib/x86_64-linux-gnu/qt4/bin
sudo ln -s /usr/lib/i386-linux-gnu/qt4/bin/qdbus /usr/lib/x86_64-linux-gnu/qt4/bin/qdbus

At least in my case, it works!

Revision history for this message
Albert_Hartl (albert-hartl) wrote :

A week before I upgraded my Desktop (64bit) to Kubuntu 14.04. When I restarted, I could and can no longer get a KDE desktop - wether my desktop with Password nor the guest-desktop. Instead, I get a window with the message "Could not start B-bus, Can you call qdbus?", and when I click "OK", I get returned to the login manager.

Jonathan Riddell (jr) wrote on 2014-04-09 (and got a few Thanks for the tip):
FIx uploaded in kde-workspace_4.11.8-0ubuntu5 (What does it mean?)
Edit /usr/bin/startkde, change:
  qdbus="QT_SELECT=qt4 qdbus"
to remove the quotes
  qdbus=QT_SELECT=qt4 qdbus
sorry for the breakage

But how can I edit?
With ctrl-alt-del I dont get the Terminal mode.

Revision history for this message
Michal Illich (a-list-l) wrote :

Hi,
just upgraded Kubuntu 12.04 to 14.04.

- I confirm that the bug IS STILL THERE. ("could not start d-bus" message shows when you try to launch KDE, after clicking Okay it goes back to log in screen)

- also confirming than Jonathan's tip to edit /usr/bin/startkde works great

I believe it should be fixed, otherwise lots of other people will run into this bug again.

Revision history for this message
Helmut A. Bender (ubuntu-helmut-bender) wrote :

Hi,
I can confirm the bug is there upgrading Kubuntu 12.04 to 14.04 on a 64bit system.

I could work around with (as #29):

sudo ln -s /usr/lib/i386-linux-gnu/qt4/bin/qdbus /usr/lib/x86_64-linux-gnu/qt4/bin/qdbus

The directory existed already.

It seems there is no qdbus for x86_64-linux-gnu available.

This bug is a absolute show stopper for anyone who isn't able to debug this problem himself! You are not able to log in, you are not able to ask the internet!

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kde-workspace (Ubuntu Trusty):
status: New → Confirmed
Revision history for this message
MagnusPI (ipesando) wrote :

Hi,

Just upgraded from kubuntu 1204 amd64 to 1404 and immediately got stuck in this bug.
Removing the parenthesis as suggested above in #12 solved the login problem.

Revision history for this message
Andrew Johnson (anj) wrote :

Solution in #32 worked for me after an upgrade like #34 and seems to explain the problem, but it's obviously a workaround.

Revision history for this message
mb74 (mrb74) wrote :

I do not understand why this bug is still present!!! I upgraded from 12.04 to 14.01.1 right after the point release. After the upgrade I couldn't start KDE because of a buggy startkde script. Yesterday I upgraded again this package and startkde is still buggy!
In line 'alias qdbus="QT_SELECT=qt4 qdbus"' the double quotes have to be removed.
My question to the package maintainer: Do you read the bug reports and do you test your changes?
14.04 is an LTS release and such a grave bug must not happen.

Revision history for this message
sboyce (sboyce) wrote :

This is a big puzzle. I am fully updated on 14.04 and none of the workarounds fixes the problem.

root@sdrbox:~# ls -l /usr/lib/i386-linux-gnu/qt4/bin/qdbus
ls: cannot access /usr/lib/i386-linux-gnu/qt4/bin/qdbus: No such file or directory
root@sdrbox:~# ls -l /usr/lib/x86_64-linux-gnu/qt4/bin/qdbus
-rwxr-xr-x 1 root root 64920 Mar 12 2014 /usr/lib/x86_64-linux-gnu/qt4/bin/qdbus
root@sdrbox:~#

root@sdrbox:~# dpkg -S /usr/lib/i386-linux-gnu/qt4
libqtcore4:i386: /usr/lib/i386-linux-gnu/qt4
root@sdrbox:~#

There is no /usr/lib/i386-linux-gnu/qt4/bin directory

ii qdbus 4:4.8.5+git192-g085f851+dfsg-2ubunt amd64 Qt 4 D-Bus tool

root@sdrbox:~# dpkg -S /usr/lib/i386-linux-gnu/qt4
libqtcore4:i386: /usr/lib/i386-linux-gnu/qt4

ii libqtcore4:i386 4:4.8.5+git192-g085f851+dfsg-2ubunt i386 Qt 4 core module

Revision history for this message
sboyce (sboyce) wrote :

Just selected "KDE Plasma Workspace" at the login prompt and that fixed it.

mg (kuchinius)
affects: kde-workspace (Ubuntu Utopic) → compiz (Ubuntu Utopic)
Stephen M. Webb (bregma)
affects: compiz (Ubuntu) → kde-workspace (Ubuntu)
Changed in kde-workspace (Ubuntu):
milestone: ubuntu-14.04 → none
Revision history for this message
amichair (amichai2) wrote :

Just upgraded from 12.04 to 14.04. Same bug. Workaround in comment #12 works. This should really be fixed... upgrading between LTS versions is still broken!

Revision history for this message
dmilli8 (dmilli80) wrote :

Upgraded from 14.04 to 15.10: #12 is not working for me. This is the output of /usr/bin/qdbus:
/usr/lib/x86_64-linux-gnu/qt5/bin/qdbus: symbol lookup error: /usr/lib/x86_64-linux-gnu/qt5/bin/qdbus: undefined symbol: _ZN7QString18toLocal8Bit_helperEPK5QChari

Any suggestions?

tags: added: trusty
Revision history for this message
tttttttttttttttt (eeeeeeennnnnnnnn-deactivatedaccount) wrote :

A better fix is to run:
sudo apt-get install qdbus

This will remove an existing 32-bit package and replace it with 64-bit. After running this, it worked fine for me without needing to change the quotes in startkde.

I saw this here: https://liquidat.wordpress.com/2013/04/29/short-tip-fix-qdbus-problems-during-a-kubuntu-upgrade-to-13-04/

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

I have this bug with a recently updated Kubuntu. None of the proposed solutions seems to work: I do not have the funny quoting in /usr/bin/startkde, and I am not missing the qdbus executables. I have both qdbus and qdbus-qt5 installed, both x86_64.

Revision history for this message
Nate (thedarkwolf123) wrote :
Download full text (4.0 KiB)

I also have this bug, I'm using kde on my samsung chromebook with crouton. Here is the command lines when starting.
Entering /mnt/stateful_partition/crouton/chroots/precise...
Failed to start message bus: Failed to open "/etc/selinux/targeted/contexts/dbus_contexts": No such file or directory
WARNING: starting chroot system dbus daemon failed with code 1

_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

X.Org X Server 1.15.1
Release Date: 2014-04-13
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.42-75-generic x86_64 Ubuntu
Current Operating System: Linux localhost 3.18.0-13434-gc3678fb #1 SMP PREEMPT Wed Dec 7 23:31:40 PST 2016 x86_64
Kernel command line: cros_secure console= loglevel=7 init=/sbin/init cros_secure oops=panic panic=-1 root=/dev/dm-0 rootwait ro dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 dm="1 vroot none ro 1,0 3584000 verity payload=PARTUUID=f37d1afa-50b8-c048-8794-67cbdb7bcd9b/PARTNROFF=1 hashtree=PARTUUID=f37d1afa-50b8-c048-8794-67cbdb7bcd9b/PARTNROFF=1 hashstart=3584000 alg=sha1 root_hexdigest=c950d2f1a9c79368c512343fe96625c90c9fd1c5 salt=7dcbba4eddb8e698a428f6a3debed767485f61702155d3a4cf7148c945a5f135" noinitrd vt.global_cursor_default=0 kern_guid=f37d1afa-50b8-c048-8794-67cbdb7bcd9b add_efi_memmap boot=local noresume noswap i915.modeset=1 tpm_tis.force=1 tpm_tis.interrupts=0 nmi_watchdog=panic,lapic
Build Date: 12 February 2015 03:37:52PM
xorg-server 2:1.15.1-0ubuntu2~precise5 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.30.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/Xorg.crouton.1.log", Time: Tue Dec 13 02:12:09 2016
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
setversion 1.4 failed: Permission denied
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension SECURITY
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension XFree86-VidModeExtension
Initializing built-in extension XFree86-DGA
Initializing built-in extension XFree86-DRI...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.