The problem is not limited to Dolphin. I was using kdesudo to run some programs with a separate account. Try creating another user, then do kdesudo -u OTHER_USER konsole. While konsole starts, opening X programs from that console will fail:
test@doppelholz:~$ konsole
<unknown program name>(8518)/: KUniqueApplication: Cannot find the D-Bus session server
<unknown program name>(8517)/: KUniqueApplication: Pipe closed unexpectedly.
test@doppelholz:~$ konqueror
No protocol specified
konqueror: cannot connect to X server :0.0
test@doppelholz:~$ dolphin
<unknown program name>(8679)/: KUniqueApplication: Cannot find the D-Bus session server
<unknown program name>(8678)/: KUniqueApplication: Pipe closed unexpectedly.
As you can see, Dolphin and Konsole complain about a missing D-Bus server, while Konqueror does not.
kdesudo -u OTHER_USER Konqueror works and Konqueror can start other programs, including Dolphin and konsole.
Here's ps aux | grep test for kdesudo -u test dolphin:
test 9137 4.4 1.0 75704 21456 pts/1 Sl 11:44 0:00 dolphin
test 9141 0.0 0.0 3124 712 pts/1 S 11:44 0:00 dbus-launch --autolaunch 3e2e1f278702bf5637da71e94989a957 --binary-syntax --close-stderr
test 9142 0.0 0.0 2640 812 ? Ss 11:44 0:00 //bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
And here for kdesudo -u test konqueror:
test 9171 2.7 1.6 112180 33372 pts/1 Sl+ 11:45 0:00 konqueror
test 9175 0.0 0.0 2640 848 ? Ss 11:45 0:00 //bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
test 9176 0.0 0.0 3124 716 pts/1 S+ 11:45 0:00 dbus-launch --autolaunch 3e2e1f278702bf5637da71e94989a957 --binary-syntax --close-stderr
test 9179 0.1 0.2 33340 4868 ? Ss 11:45 0:00 kdeinit4: kdeinit4 Running...
test 9180 0.1 0.4 35836 8892 ? S 11:45 0:00 klauncher
test 9183 0.8 0.5 58412 10544 ? S 11:45 0:00 kded4
test 9191 0.0 0.3 36096 7052 ? S 11:45 0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-test/klauncherMT9180.slave-socket local:/tmp/ksocket-test/konquerorbw9171.slave-socket
test 9193 0.0 0.3 35868 6836 ? S 11:45 0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-test/klauncherMT9180.slave-socket local:/tmp/ksocket-test/konquerorcF9171.slave-socket
test 9194 0.0 0.3 35868 6832 ? S 11:45 0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-test/klauncherMT9180.slave-socket local:/tmp/ksocket-test/konquerorbh9171.slave-socket
test 9195 0.0 0.3 36096 7024 ? S 11:45 0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-test/klauncherMT9180.slave-socket local:/tmp/ksocket-test/konquerortQ9171.slave-socket
As you can see, in both cases D-Bus has been started with the same arguments (BTW: The D-Bus processes do not terminate when the sudo session ends and accumulate. Argh!). However, there are no kded, klauncher and kdeinit processes when starting Dolphin or Konsole.
The problem is not limited to Dolphin. I was using kdesudo to run some programs with a separate account. Try creating another user, then do kdesudo -u OTHER_USER konsole. While konsole starts, opening X programs from that console will fail:
test@doppelholz:~$ konsole
<unknown program name>(8518)/: KUniqueApplication: Cannot find the D-Bus session server
<unknown program name>(8517)/: KUniqueApplication: Pipe closed unexpectedly.
test@doppelholz:~$ konqueror
No protocol specified
konqueror: cannot connect to X server :0.0
test@doppelholz:~$ dolphin
<unknown program name>(8679)/: KUniqueApplication: Cannot find the D-Bus session server
<unknown program name>(8678)/: KUniqueApplication: Pipe closed unexpectedly.
As you can see, Dolphin and Konsole complain about a missing D-Bus server, while Konqueror does not.
kdesudo -u OTHER_USER Konqueror works and Konqueror can start other programs, including Dolphin and konsole.
Here's ps aux | grep test for kdesudo -u test dolphin: 637da71e94989a9 57 --binary-syntax --close-stderr
test 9137 4.4 1.0 75704 21456 pts/1 Sl 11:44 0:00 dolphin
test 9141 0.0 0.0 3124 712 pts/1 S 11:44 0:00 dbus-launch --autolaunch 3e2e1f278702bf5
test 9142 0.0 0.0 2640 812 ? Ss 11:44 0:00 //bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
And here for kdesudo -u test konqueror: 637da71e94989a9 57 --binary-syntax --close-stderr tmp/ksocket- test/klauncherM T9180.slave- socket local:/ tmp/ksocket- test/konquerorb w9171.slave- socket tmp/ksocket- test/klauncherM T9180.slave- socket local:/ tmp/ksocket- test/konquerorc F9171.slave- socket tmp/ksocket- test/klauncherM T9180.slave- socket local:/ tmp/ksocket- test/konquerorb h9171.slave- socket tmp/ksocket- test/klauncherM T9180.slave- socket local:/ tmp/ksocket- test/konquerort Q9171.slave- socket
test 9171 2.7 1.6 112180 33372 pts/1 Sl+ 11:45 0:00 konqueror
test 9175 0.0 0.0 2640 848 ? Ss 11:45 0:00 //bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
test 9176 0.0 0.0 3124 716 pts/1 S+ 11:45 0:00 dbus-launch --autolaunch 3e2e1f278702bf5
test 9179 0.1 0.2 33340 4868 ? Ss 11:45 0:00 kdeinit4: kdeinit4 Running...
test 9180 0.1 0.4 35836 8892 ? S 11:45 0:00 klauncher
test 9183 0.8 0.5 58412 10544 ? S 11:45 0:00 kded4
test 9191 0.0 0.3 36096 7052 ? S 11:45 0:00 kdeinit4: kio_file [kdeinit] file local:/
test 9193 0.0 0.3 35868 6836 ? S 11:45 0:00 kdeinit4: kio_file [kdeinit] file local:/
test 9194 0.0 0.3 35868 6832 ? S 11:45 0:00 kdeinit4: kio_file [kdeinit] file local:/
test 9195 0.0 0.3 36096 7024 ? S 11:45 0:00 kdeinit4: kio_file [kdeinit] file local:/
As you can see, in both cases D-Bus has been started with the same arguments (BTW: The D-Bus processes do not terminate when the sudo session ends and accumulate. Argh!). However, there are no kded, klauncher and kdeinit processes when starting Dolphin or Konsole.
I'm running KDE 4.2.00 under Kubuntu Intrepid.