if the file is being changed, you could maybe use inotify-tools http://linux.die.net/man/1/inotifywatch
I think I checked that before, the file isn't being modified. It's a good idea neverthereless, I'll try it.
I'm sorry I don't think I can help you. Is reinstalling maybe an option?
Not even that -- I tried re-installing the core system already, the problem persisted.
What I'll try too is just setting the hostname to "localhost.localdomain" at boot, it's stupid but it might work
Cheers,
Sven
#!/bin/sh
while inotifywait -e modify /etc/hostname; do
kdialog --msgbox "hostname has changed :("
done
I'm sorry I don't think I can help you. Is reinstalling maybe an option?
]]>Did you set your hostname? https://wiki.archlinux.org/index.php/Ne … e_hostname
Yes. Re-running that command fixes it for the moment, but after a while the wrong hostname gets activated again.
Any ideas how I could search for the application causing it?
]]>QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Fedora shuts up that tedious error, with qt-everywhere-opensource-src-4.8.3-qdbusconnection_no_debug.patch for qt:
+#ifndef QT_NO_DEBUG
qWarning("QDBusConnection: %s D-Bus connection created before QCore Application. Application may misbehave.",
type == SessionBus ? "session" : type == SystemBus ? "system" : "generic");
+#endif
After startup, the hostname is "localhost", and the full hostname ("hotname -f") ist "localhost.localdomain". When the error occurs, the full hostname is still "localhost.localdomain", but the hostname is also "localhost.localdomain". Invoking "hostname localhost" fixes the problem. So, apparently, some program does "hostname localhost.localdomain" which causes the problem. I have no idea which program this is, but at least I can resolve the problem now without restarting my whole environment...
Cheers,
Sven
Additionally to that problem, I now start getting freezes when it occured and I restart X.
If I can't solve this issue soon-ish I fear I'll have to switch to another distribution, since it's really unbearable.
Cheers,
Sven
Here's an extract of a strace log when starting xterm:
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_FILE, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0
getpeername(3, {sa_family=AF_FILE, sun_path=@"/tmp/.X11-unix/X0"}, [20]) = 0
uname({sys="Linux", node="localhost.localdomain", ...}) = 0
access("/home/sven/.Xauthority", R_OK) = 0
open("/home/sven/.Xauthority", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0600, st_size=54, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc4f604b000
read(4, "\1\0\0\tlocalhost\0\0010\0\22MIT-MAGIC-COOK"..., 4096) = 54
read(4, "", 4096) = 0
close(4) = 0
munmap(0x7fc4f604b000, 4096) = 0
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"l\0\v\0\0\0\0\0\0\0\0\0", 12}, {"", 0}], 2) = 12
recvfrom(3, 0x15c8950, 8, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN|POLLHUP}])
recvfrom(3, "\0\26\v\0\0\0\6\0", 8, 0, NULL, NULL) = 8
recvfrom(3, "No protocol specified\n\0\0", 24, 0, NULL, NULL) = 24
write(2, "No protocol specified\n", 22No protocol specified
) = 22
shutdown(3, SHUT_RDWR) = 0
close(3) = 0
open("/usr/lib/X11/XtErrorDB", O_RDONLY) = -1 ENOENT (No such file or directory)
getuid() = 1000
geteuid() = 1000
getuid() = 1000
write(2, "xterm: ", 7xterm: ) = 7
write(2, "Xt error: Can't open display: :0"..., 33Xt error: Can't open display: :0
) = 33
exit_group(1) = ?
+++ exited with 1 +++
(I played around with xauthority a bit already so that might be off)
The error message is read from the socket which it uses to connect to X... I think it's probably a permission problem, some program revoked my permissions to access X, and I can't even put it back, because I have no user which is allowed to talk to X (xhost + always fails with the same error). But which program that is or how to track it down... no idea
Cheers,
Sven
So, since reinstalling the system itself doesn't help, and removing user configuration doesn't help either, what might cause this problem? I think the most likely thing is a regression in some software... but which one? Most likely candidates are of course dbus-daemon and X11, both beasts to debug.
I'll try to do further debugging and I'll let you know if I find out anything.
Cheers,
Sven
xxxxx@localhost ~ :( $ firefox
No protocol specified
No protocol specified
Error: cannot open display: :0
xxxxx@localhost ~ :( $ rekonq
QDBusConnection: session D-Bus connection created before
QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before
QCoreApplication. Application may misbehave.
No protocol specified
rekonq: cannot connect to X server :0
unnamed app(27810): Communication problem with "rekonq" , it probably
crashed.
Error message was: "org.freedesktop.DBus.Error.NoReply" : " "Message
did not receive a reply (timeout by message bus)" "
I was able to make this repeat as often as I wantd by starting vpn connection.
After I open vpn I can not open any applications.
I tried deleting all files and folders in my home directory that started with a "." but nothing helps.
I'm really clueless...
]]>At first, my system works okay, but after a while I start getting this error message from every GUI application I try to start:
No protocol specified
Cannot connect to X server :0.0
and application startup fails. I was unable to find a specific action which causes the behavior, but it is pretty reproducable after the system has been running for about an hour.
The "no protocol specified" is generated by dbus-launch. I checked that the dbus server is running... apparently it is (according to systemd and top). I tried to restart it... no luck. I tried "xhost +" -- nothing.
The error occurs for all applications which try to communicate with X, but also stuff that needs dbus, like qdbus -- so I guess it's a problem with dbus. But, what kind of problem? What could I try to find the reason for this behaviour? Also, what does the error message even mean, "no protocol specified"?
Greetings,
Sven
Edit: The error always occurs after the system has been put in standby mode (with pm-suspend).
]]>