Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #180751 > unrolled thread
| Started by | Charles Kroeger <ckrogrr@frankensteinface.com> |
|---|---|
| First post | 2017-05-06 01:20 +0200 |
| Last post | 2017-05-08 14:20 +0200 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.debian.user
/tmp/.X0-lock Charles Kroeger <ckrogrr@frankensteinface.com> - 2017-05-06 01:20 +0200
Re: /tmp/.X0-lock Ben Caradoc-Davies <ben@transient.nz> - 2017-05-06 01:30 +0200
Re: /tmp/.X0-lock Charles Kroeger <ckrogrr@frankensteinface.com> - 2017-05-06 02:30 +0200
Re: /tmp/.X0-lock Ben Caradoc-Davies <ben@transient.nz> - 2017-05-06 03:00 +0200
Re: /tmp/.X0-lock Charles Kroeger <ckrogrr@frankensteinface.com> - 2017-05-06 04:20 +0200
Re: /tmp/.X0-lock Greg Wooledge <wooledg@eeg.ccf.org> - 2017-05-08 14:20 +0200
| From | Charles Kroeger <ckrogrr@frankensteinface.com> |
|---|---|
| Date | 2017-05-06 01:20 +0200 |
| Subject | /tmp/.X0-lock |
| Message-ID | <tDUFX-8qC-1@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
running freshly upgraded kernel image 4.9.0.3 on normal boot with startx command but getting the following error message from (X server) xorg: could not create lock file in /tmp/.X0-lock (the contents of, are the numbers 2994) unable to connect to the X server: connection refused there's a lot about this problem on the Internet but the information is quite old and nothing applies to my present problem, it would seem. happily and also the reason I'm writing this letter (et.al) is that I can still use the sysvinit boot option that presents a graphical login and after that starts the X server. (I then have to run 'service network restart' to connect to the Internet and there is complaining about that being deprecated but good thing something works. there's more error messages I've decided to keep as separate post, in the spirit of helping others down the line. -- CK
[toc] | [next] | [standalone]
| From | Ben Caradoc-Davies <ben@transient.nz> |
|---|---|
| Date | 2017-05-06 01:30 +0200 |
| Message-ID | <tDUPD-8u1-13@gated-at.bofh.it> |
| In reply to | #180751 |
On 06/05/17 11:06, Charles Kroeger wrote: > running freshly upgraded kernel image 4.9.0.3 on normal boot with startx > command but getting the following error message from (X server) xorg: could not > create lock file in /tmp/.X0-lock (the contents of, are the numbers 2994) > unable to connect to the X server: connection refused Check permissions and free space: ls -ld /tmp ls -l /tmp/.X0-lock df /tmp If /tmp/.X0-lock already exists, is there another instance of the X server running (with that PID? Or did a previous instance crash without removing it? Kind regards, -- Ben Caradoc-Davies <ben@transient.nz> Director Transient Software Limited <http://transient.nz/> New Zealand
[toc] | [prev] | [next] | [standalone]
| From | Charles Kroeger <ckrogrr@frankensteinface.com> |
|---|---|
| Date | 2017-05-06 02:30 +0200 |
| Message-ID | <tDVLH-BI-3@gated-at.bofh.it> |
| In reply to | #180752 |
[Multipart message — attachments visible in raw view] — view raw
>ls -ld /tmp drwxrwxrwt 10 root root 20480 May 5 18:58 /tmp (looks good) >ls -l /tmp/.S0-lock -r--r--r-- 1 root root 11 May 5 17:36 /tmp/.X0-lock >df /tmp Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdc1 245996848 42724396 203256068 18% / > If /tmp/.X0-lock already exists, is there another instance of the X > server running (with that PID? Or did a previous instance crash without > removing it?> not that I know of how do you tell if there's another X server running. I mean there is after I do a sysvinit boot (from the grub advanced menu) but on a reboot of course the X server obviously shuts down (or does it?) -- CK
[toc] | [prev] | [next] | [standalone]
| From | Ben Caradoc-Davies <ben@transient.nz> |
|---|---|
| Date | 2017-05-06 03:00 +0200 |
| Message-ID | <tDWeJ-MR-1@gated-at.bofh.it> |
| In reply to | #180757 |
On 06/05/17 12:09, Charles Kroeger wrote: > not that I know of how do you tell if there's another X server running. I mean > there is after I do a sysvinit boot (from the grub advanced menu) but on a > reboot of course the X server obviously shuts down (or does it?) Does the PID in the lock file correspond to a running process? ps -f `cat /tmp/.X0-lock` Are there any running instances of an X server? ps -fC Xorg Kind regards, -- Ben Caradoc-Davies <ben@transient.nz> Director Transient Software Limited <http://transient.nz/> New Zealand
[toc] | [prev] | [next] | [standalone]
| From | Charles Kroeger <ckrogrr@frankensteinface.com> |
|---|---|
| Date | 2017-05-06 04:20 +0200 |
| Message-ID | <tDXu9-1X9-1@gated-at.bofh.it> |
| In reply to | #180760 |
[Multipart message — attachments visible in raw view] — view raw
> Does the PID in the lock file correspond to a running process? > > ps -f `cat /tmp/.X0-lock` I get nothing from that command > Are there any running instances of an X server? > > ps -fC Xorg UID PID PPID C STIME TTY TIME CMD root 2994 2812 0 17:36 tty7 00:01:23 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolist that would be the one I'm using. I will try that command after stopping the X-server after stopping the X-server I ran: ps --fC Xorg UID PID PPID C STIME TTY TIME CMD on running startx (as user) the X server failed to start with these error messages: (EE) could not create lock file in /tmp/.tX0-lock Xinit: unable to connect to X server: connection refused Xauth: error in locking authority file /home/charles/.Xauthority the contents of this file is some machine language symbols and some english -MIT-MAGIC-COOKIE-1 (and) mundo 0 -MIT-MAGIC-COOKIE-1 (and that is all) thanks for being patient, -- CK
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2017-05-08 14:20 +0200 |
| Message-ID | <tEPNU-3OI-11@gated-at.bofh.it> |
| In reply to | #180761 |
On Fri, May 05, 2017 at 06:06:30PM -0500, Charles Kroeger wrote: > I can still > use the sysvinit boot option that presents a graphical login and after that > starts the X server. (I then have to run 'service network restart' to connect > to the Internet and there is complaining about that being deprecated but good > thing something works. On Fri, May 05, 2017 at 09:04:02PM -0500, Charles Kroeger wrote: > UID PID PPID C STIME TTY TIME CMD > root 2994 2812 0 17:36 tty7 00:01:23 /usr/lib/xorg/Xorg :0 -seat > seat0 -auth /var/run/lightdm/root/:0 -nolist > > that would be the one I'm using. I will try that command after stopping the > X-server > > after stopping the X-server I ran: ps --fC Xorg > UID PID PPID C STIME TTY TIME CMD > > on running startx (as user) the X server failed to start with these error > messages: > > (EE) could not create lock file in /tmp/.tX0-lock I'm assuming you are on stretch. So, when you allow lightdm to run at boot, everything is fine, but if you run "startx" as a non-root user from a text console, you get the error. lightdm is running the X server as root (verified by your ps output), and this is presumably creating the /tmp/.X0-lock (and/or .tX0-lock) file(s) as root. Then, when you try to run startx as a non-root user, it tries to create the same file(s), but they already exist under a different owner (root), and so it fails. (And this would have worked under jessie, because the X server ran setuid root in jessie. Not so in stretch.) The obvious temporary fix would be to remove those files (as root, after verifying that the X server is indeed terminated). I do not know how a permanent fix would be achieved. My first guess would be that either lightdm or Xorg should be removing those files from /tmp upon termination, but I don't know which one.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web