Reply to topic

After logging in via KDM, KDE refuses to start programs

Shining Arcanine
Registered Member
Posts
73
Karma
0
OS
bcooksley wrote:This issue is related to something unset'ing $DISPLAY likely.
Check your login scripts.

Do Plasma and KRunner ( Alt + F2 ) work?


They do not work when I have this issue. Relogging works around it. In the terminal, which I managed to open before programs stopped launching, it seems that display is not being reset:

richard@localhost ~ $ firefox
No protocol specified
No protocol specified
Error: cannot open display: :0.0
richard@localhost ~ $ echo $DISPLAY
:0.0


What scripts should I check, as this issue only appears on the first login via KDM I make and relogging via KDM resolves it. :/
User avatar bcooksley
Administrator
Posts
18586
Karma
83
OS
That is extremely unusual.

Can you please check that the files ~/.X* are owned by your user and primary group?


System Settings and Device Actions KCM maintainer
Image
Shining Arcanine
Registered Member
Posts
73
Karma
0
OS
Shining Arcanine wrote:
bcooksley wrote:This issue is related to something unset'ing $DISPLAY likely.
Check your login scripts.

Do Plasma and KRunner ( Alt + F2 ) work?


They do not work when I have this issue. Relogging works around it. In the terminal, which I managed to open before programs stopped launching, it seems that display is not being reset:

richard@localhost ~ $ firefox
No protocol specified
No protocol specified
Error: cannot open display: :0.0
richard@localhost ~ $ echo $DISPLAY
:0.0


What scripts should I check, as this issue only appears on the first login via KDM I make and relogging via KDM resolves it. :/
bcooksley wrote:That is extremely unusual.

Can you please check that the files ~/.X* are owned by your user and primary group?


Code: Select all
richard@new-host-3 ~ $ ls -l ~/.X*
-rw------- 1 richard richard 317 Feb  9 21:47 /home/richard/.Xauthority


I have been doing more troubleshooting with some help from the Gentoo forums, where I asked for advice on the scripts. Here is .xsession-errors from a first login, where things fail:

Code: Select all
richard@localhost ~ $ cat ./.xsession-errors                               
startkde: Starting up...                                                   
kdeinit4: preparing to launch /usr/lib/libkdeinit4_klauncher.so           
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)                                                                                       
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kded4.so                                   
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kbuildsycoca4.so                           
kbuildsycoca4 running...                                                                       
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kconf_update.so                             
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)                                                                                       
Invalid D-BUS member name 'idle-hint' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                                     
Invalid D-BUS member name 'is-local' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                                     
Invalid D-BUS member name 'x11-display-device' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                           
Invalid D-BUS member name 'x11-display' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                                   
Invalid D-BUS member name 'display-device' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                               
Invalid D-BUS member name 'remote-host-name' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                             
Invalid D-BUS member name 'session-type' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                                 
Invalid D-BUS member name 'unix-user' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                                     
X Error: XSyncBadAlarm 168                                                                     
  Extension:    145 (Uknown extension)                                                         
  Minor opcode: 11 (Unknown request)                                                           
  Resource id:  0x1aa                                                                         
X Error: XSyncBadAlarm 168                                                                     
  Extension:    145 (Uknown extension)                                                         
  Minor opcode: 11 (Unknown request)                                                           
  Resource id:  0x1aa                                                                         
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kcminit_startup.so                         
kdeinit4: preparing to launch /usr/lib/libkdeinit4_ksmserver.so                               
<unknown program name>(1906)/ KStartupInfo::createNewStartupId: creating:  "localhost;1265769784;834822;1906_TIME0" : "unnamed app"                                                           
kephald starting up                                                                           
XRANDR error base:  176                                                                       
RRInput mask is set!!                                                                         
RandRScreen::loadSettings - adding mode:  438 1920 x 1200                                     
RandRScreen::loadSettings - adding mode:  439 1600 x 1200                                     
RandRScreen::loadSettings - adding mode:  440 1400 x 1050                                     
RandRScreen::loadSettings - adding mode:  441 1280 x 1024                                     
RandRScreen::loadSettings - adding mode:  442 1280 x 960                                       
RandRScreen::loadSettings - adding mode:  443 1024 x 768                                       
RandRScreen::loadSettings - adding mode:  444 800 x 600                                       
RandRScreen::loadSettings - adding mode:  445 800 x 600                                       
RandRScreen::loadSettings - adding mode:  446 640 x 512                                       
RandRScreen::loadSettings - adding mode:  447 640 x 480                                       
RandRScreen::loadSettings - adding mode:  448 640 x 480                                       
RandRScreen::loadSettings - adding mode:  449 512 x 384                                       
RandRScreen::loadSettings - adding mode:  450 400 x 300                                       
RandRScreen::loadSettings - adding mode:  451 320 x 240                                       
RandRScreen::loadSettings - adding crtc:  436                                                 
RandRScreen::loadSettings - adding output:  437                                               
Setting CRTC 436 on output "default" (previous 0 )                                             
CRTC outputs: (437)                                                                           
Output name: "default"                                                                         
Output refresh rate: 50                                                                       
Output rect: QRect(0,0 1920x1200)                                                             
Output rotation: 1                                                                             
XRandROutputs::init                                                                           
  added output  437                                                                           
adding an output 0 with geom:  QRect(0,0 1920x1200)                                           
output: "SCREEN-0" QRect(0,0 1920x1200) 0 true true                                           
load xml                                                                                       
connected: 1                                                                                   
looking for current "SCREEN-0"                                                                 
known "*" has score: 0.125                                                                     
screen: 0 QRect(0,0 1920x1200)                                                                 
looking for a matching configuration...                                                       
connected: 1                                                                                   
looking for current "SCREEN-0"                                                                 
known "*" has score: 0.125                                                                     
found outputs, known: false                                                                   
activate external configuration!!
registered the service: true
screens registered on the bus: true
outputs registered on the bus: true
configurations registered on the bus: true
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kglobalaccel.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
kdeinit4: preparing to launch /usr/lib/libkdeinit4_plasma-desktop.so
kdeinit4: preparing to launch /usr/bin/knotify4
QDBusObjectPath: invalid path ""
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
QGraphicsLinearLayout::removeAt: invalid index 0
QGraphicsLinearLayout::removeAt: invalid index 0
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
Invalid D-BUS interface name 'org.kde.plasma-desktop.PlasmaApp' found while parsing introspection
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kaccess.so
<unknown program name>(1971)/ kdemain: Xlib XKB extension major= 1  minor= 0
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kmixctrl.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_krunner.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kmix.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit4: preparing to launch /usr/bin/wicd-gtk
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kmix.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit4: preparing to launch /usr/lib/libkdeinit4_klipper.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_konsole.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_konsole.so
kdeinit4: preparing to launch /usr/bin/firefox
kdeinit4: preparing to launch /usr/lib/kde4/libexec/kdontchangethehostname
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
kdeinit4: preparing to launch /usr/bin/systemsettings
No protocol specified
systemsettings: cannot connect to X server :0.0


Here is .xessions-errors from a relogin, where things work:

Code: Select all
richard@new-host-3 ~ $ cat ./.xsession-errors
startkde: Starting up...                     
kdeinit4: preparing to launch /usr/lib/libkdeinit4_klauncher.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)                                                                                       
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kded4.so                                   
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kbuildsycoca4.so                           
kbuildsycoca4 running...                                                                       
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kconf_update.so                             
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)                                                                                       
Invalid D-BUS member name 'idle-hint' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                                     
Invalid D-BUS member name 'is-local' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                                     
Invalid D-BUS member name 'x11-display-device' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                           
Invalid D-BUS member name 'x11-display' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                                   
Invalid D-BUS member name 'display-device' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                               
Invalid D-BUS member name 'remote-host-name' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                             
Invalid D-BUS member name 'session-type' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                                 
Invalid D-BUS member name 'unix-user' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection                                                                     
X Error: XSyncBadAlarm 168                                                                     
  Extension:    145 (Uknown extension)                                                         
  Minor opcode: 11 (Unknown request)                                                           
  Resource id:  0x1aa                                                                         
X Error: XSyncBadAlarm 168                                                                     
  Extension:    145 (Uknown extension)                                                         
  Minor opcode: 11 (Unknown request)                                                           
  Resource id:  0x1aa                                                                         
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kcminit_startup.so                         
kdeinit4: preparing to launch /usr/lib/libkdeinit4_ksmserver.so                               
<unknown program name>(2392)/ KStartupInfo::createNewStartupId: creating:  "new-host-3;1265770061;974396;2392_TIME0" : "unnamed app"                                                         
kephald starting up                                                                           
XRANDR error base:  176                                                                       
RRInput mask is set!!                                                                         
RandRScreen::loadSettings - adding mode:  438 1920 x 1200                                     
RandRScreen::loadSettings - adding mode:  439 1600 x 1200                                     
RandRScreen::loadSettings - adding mode:  440 1400 x 1050                                     
RandRScreen::loadSettings - adding mode:  441 1280 x 1024                                     
RandRScreen::loadSettings - adding mode:  442 1280 x 960                                       
RandRScreen::loadSettings - adding mode:  443 1024 x 768                                       
RandRScreen::loadSettings - adding mode:  444 800 x 600                                       
RandRScreen::loadSettings - adding mode:  445 800 x 600                                       
RandRScreen::loadSettings - adding mode:  446 640 x 512                                       
RandRScreen::loadSettings - adding mode:  447 640 x 480                                       
RandRScreen::loadSettings - adding mode:  448 640 x 480                                       
RandRScreen::loadSettings - adding mode:  449 512 x 384                                       
RandRScreen::loadSettings - adding mode:  450 400 x 300                                       
RandRScreen::loadSettings - adding mode:  451 320 x 240                                       
RandRScreen::loadSettings - adding crtc:  436
RandRScreen::loadSettings - adding output:  437
Setting CRTC 436 on output "default" (previous 0 )
CRTC outputs: (437)
Output name: "default"
Output refresh rate: 50
Output rect: QRect(0,0 1920x1200)
Output rotation: 1
XRandROutputs::init
  added output  437
adding an output 0 with geom:  QRect(0,0 1920x1200)
output: "SCREEN-0" QRect(0,0 1920x1200) 0 true true
load xml
connected: 1
looking for current "SCREEN-0"
known "*" has score: 0.125
screen: 0 QRect(0,0 1920x1200)
looking for a matching configuration...
connected: 1
looking for current "SCREEN-0"
known "*" has score: 0.125
found outputs, known: false
activate external configuration!!
registered the service: true
screens registered on the bus: true
outputs registered on the bus: true
configurations registered on the bus: true
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kglobalaccel.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
kdeinit4: preparing to launch /usr/lib/libkdeinit4_plasma-desktop.so
kdeinit4: preparing to launch /usr/bin/knotify4
QDBusObjectPath: invalid path ""
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
QGraphicsLinearLayout::removeAt: invalid index 0
QGraphicsLinearLayout::removeAt: invalid index 0
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
Invalid D-BUS interface name 'org.kde.plasma-desktop.PlasmaApp' found while parsing introspection
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kaccess.so
<unknown program name>(2435)/ kdemain: Xlib XKB extension major= 1  minor= 0
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kmixctrl.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_krunner.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kmix.so
kdeinit4: preparing to launch /usr/bin/wicd-gtk
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kmix.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_klipper.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_konsole.so


In the login where things did not work, I was able to load firefox and konsole before KDE would stop launching applications. Between those points in time, there is a single line:

Code: Select all
kdeinit4: preparing to launch /usr/lib/kde4/libexec/kdontchangethehostname


It is not present in the .xsession-errors log for the session that I obtained after relogging, so I suspect it is the culprit, but I have no idea how to proceed based on that assumption. I cannot find out both how it is being launched and how its launch differs on my system from a system where KDE just works.
Shining Arcanine
Registered Member
Posts
73
Karma
0
OS
I just upgraded to KDE 4.4.0 and this problem still remains. :/
User avatar bcooksley
Administrator
Posts
18586
Karma
83
OS
It appears that your computers hostname is being changed either by DHCP, or is being set after KDM is started.


System Settings and Device Actions KCM maintainer
Image
Shining Arcanine
Registered Member
Posts
73
Karma
0
OS
bcooksley wrote:It appears that your computers hostname is being changed either by DHCP, or is being set after KDM is started.


It is being changed by DHCP from localhost to new-host-3. My router has a tendency to assign hostnames to my Linux machines; I have always hated that. Is there any way to stop that from happening?
Shining Arcanine
Registered Member
Posts
73
Karma
0
OS
bcooksley wrote:It appears that your computers hostname is being changed either by DHCP, or is being set after KDM is started.


Okay, I have confirmed that the hostname change is indeed the cause of the problem. When logging into Gentoo, I immediately open konsole and see a command prompt with richard@localhost. Then soon after opening it, I cannot open windows. Opening a new tab in the console shows richard@new-host-3. Su-ing into root and doing /bin/hostname localhost allows me to start launching programs again.

I will ask over at the Gentoo forums for help regarding this. Thankyou for all of your assistance.
Shining Arcanine
Registered Member
Posts
73
Karma
0
OS
I changed my system's hostname in /etc/config.d/hostname from "localhost" to something else and it resolved this issue. I am super happy as this has been annoying the heck out of me since I installed Linux on my laptop a month ago. :D

 
Reply to topic

Bookmarks



Who is online

Registered users: AGB, anli, Baidu [Spider], bilbo, Bing [Bot], bshah, Exabot [Bot], garthecho, Google [Bot], google01103, Hans, jensreuterberg, jsirek, jstaniek, koriun, metzman, MiceAreVeryNice, MSNbot Media, paulus3005, pedrorodriguez, Sentynel, vascobasque, Yahoo [Bot]