a2a0799ba4
- Resolves #806491 #990213 #1006029 - Remove stale ck-xinit-session references from xinitrc-common (#910969) - Make startx pass "-nolisten tcp" by default, use -listen as server option to disable this (#1111684) - Teach Xclients script about lxde (#488602)
74 lines
2.0 KiB
Diff
74 lines
2.0 KiB
Diff
From a750c23c155f889cbb29a3c879b1e19f2707a823 Mon Sep 17 00:00:00 2001
|
|
From: Hans de Goede <hdegoede@redhat.com>
|
|
Date: Thu, 11 Sep 2014 18:02:24 +0200
|
|
Subject: [PATCH xinit] startx: Pass "-nolisten tcp" by default
|
|
|
|
Having servers started by startx listen on tcp by default is not a good idea
|
|
in this time and age. Pass "-nolisten tcp" by default, and add a special
|
|
-listen server option which can be used to disable this new default behavior.
|
|
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
---
|
|
man/startx.man | 7 +++++++
|
|
startx.cpp | 5 +++++
|
|
2 files changed, 12 insertions(+)
|
|
|
|
diff --git a/man/startx.man b/man/startx.man
|
|
index 0405be0..fc2cbc3 100644
|
|
--- a/man/startx.man
|
|
+++ b/man/startx.man
|
|
@@ -39,6 +39,8 @@ startx \- initialize an X session
|
|
.I server
|
|
] [
|
|
.I display
|
|
+] [
|
|
+.I -listen
|
|
]
|
|
.I options
|
|
\&.\|.\|. ]
|
|
@@ -56,6 +58,11 @@ command are used to start a client in the same manner as
|
|
The special argument
|
|
.RB '--'
|
|
marks the end of client arguments and the beginning of server options.
|
|
+By default startx passes
|
|
+.RB '-nolisten\ tcp'
|
|
+to the server, the special server option
|
|
+.RB '-listen'
|
|
+can be used to stop startx from doing this.
|
|
It may be convenient to specify server options with startx to change on a
|
|
per-session basis the
|
|
default color depth, the server's notion of the number of dots-per-inch the
|
|
diff --git a/startx.cpp b/startx.cpp
|
|
index 1c6fce0..8612fa6 100644
|
|
--- a/startx.cpp
|
|
+++ b/startx.cpp
|
|
@@ -60,6 +60,7 @@ defaultdisplay=":0"
|
|
clientargs=""
|
|
serverargs=""
|
|
vtarg=""
|
|
+listenarg="-nolisten tcp"
|
|
|
|
#ifdef __APPLE__
|
|
|
|
@@ -156,6 +157,8 @@ while [ x"$1" != x ]; do
|
|
if [ x"$serverargs" = x ] && @@
|
|
expr "$1" : ':[0-9][0-9]*$' > /dev/null 2>&1; then
|
|
display="$1"
|
|
+ elif [ "$1" = "-listen" ]; then
|
|
+ listenarg=""
|
|
else
|
|
serverargs="$serverargs $1"
|
|
fi
|
|
@@ -225,6 +228,8 @@ if [ "$have_vtarg" = "no" ]; then
|
|
serverargs="$serverargs $vtarg"
|
|
fi
|
|
|
|
+serverargs="$serverargs $listenarg"
|
|
+
|
|
XCOMM if no display, use default
|
|
if [ x"$display" = x ]; then
|
|
display=$defaultdisplay
|
|
--
|
|
2.1.0
|
|
|