LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-30-2018, 09:44 PM   #1
Xsane
Member
 
Registered: Jan 2014
Posts: 186

Rep: Reputation: 134Reputation: 134
[PATCH] rc.M: startx now checks /tmp/.X11-unix/X*


Code:
startx now checks /tmp/.X11-unix/X* when choosing a display number.

/usr/bin/startx:35
    [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break

Previously it only checked /tmp/.X*-lock and rc.M cleaned those files.

If a system hard crash happens while X is running the socket
/tmp/.X11-unix/X* is not cleaned up, then that display will
be skipped on the next X startup. This can lead to unexpected results.

Add /tmp/.X11-unix/* to the rc.M file cleanup.

---
 rc.M | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rc.M b/rc.M
index 30c8529..5f16d26 100755
--- a/rc.M
+++ b/rc.M
@@ -150,7 +150,7 @@ if [ -x /etc/rc.d/rc.ntpd ]; then
 fi
 
 # Remove stale locks and junk files (must be done after mount -a!)
-/bin/rm -f /var/lock/* /var/spool/uucp/LCK..* /tmp/.X*lock /tmp/core /core 2> /dev/null
+/bin/rm -f /var/lock/* /var/spool/uucp/LCK..* /tmp/.X*lock /tmp/.X11-unix/* /tmp/core /core 2> /dev/null
 
 # Remove stale hunt sockets so the game can start.
 if [ -r /tmp/hunt -o -r /tmp/hunt.stats ]; then
-- 
2.18.0
Note that I haven't had a recent hard crash to test this, but I am running the patch on my system.
 
Old 07-01-2018, 03:28 PM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,503

Rep: Reputation: 8459Reputation: 8459Reputation: 8459Reputation: 8459Reputation: 8459Reputation: 8459Reputation: 8459Reputation: 8459Reputation: 8459Reputation: 8459Reputation: 8459
Fixed in -current, thanks.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
patch management solution - Ivanti patch management for Linux, Unix and Mac pranesh.annamalai Linux - Enterprise 5 02-29-2020 03:50 PM
connect /tmp/.X11-unix/X0: Connection refused kwatts59 Linux - Newbie 1 07-30-2015 07:25 PM
[SOLVED] X11 Forwarding-X11 Applications Works but startx Not Works gonny95 Linux - Newbie 4 07-27-2014 08:00 PM
[SOLVED] Cron Error: Cron <EMAIL> /tmp/.X11-unix/.bash/update >/dev/null 2>&1 (failed) willrocks Linux - Server 8 01-20-2012 12:08 AM
SuSE /tmp/.X11-unix has X99 petersk Linux - Software 0 12-28-2005 07:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration