DISPLAY is not set or connot connect to the X server ;(

GendoIkari

GendoIkari

Routinier
Code:
$DISPLAY is not set or connot connect to the X server

Früher konnte ich das Problem um gehn da ich immer "startx" genommen habe was auf die rc.conf zurück gegriffen hatte. Das ging auch immer, aber die ist ja jetzt komplet umgeschrieben worden.
vorher:
Code:
# /etc/rc.conf: Global startup script configuration settings

UNICODE="yes"
EDITOR="/bin/nano"
# Defaults depending on what you install currently include:
#
# Gnome - will start gnome-session
# kde-<version> - will start startkde (look in /etc/X11/Sessions/)
# Xfce4 - will start a XFCE4 session
# Xsession - will start a terminal and a few other nice apps

#XSESSION="xfce4"
XSESSION="kde-4.1"
nach her
Code:
# Global OpenRC configuration settings

# Set to "YES" if you want the rc system to try and start services
# in parallel for a slight speed improvement. When running in parallel we
# prefix the service output with it's name as the output will get
# jumbled up.
rc_parallel="NO"

# Set rc_interactive to "YES" and you'll be able to press the I key during
# boot so you can choose to start specific services. Set to "NO" to disable
# this feature.
rc_interactive="YES"

# Do we allow any started service in the runlevel to satisfy the depedency
# or do we want all of them regardless of state? For example, if net.eth0
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
# both will be started, but services that depend on 'net' will work if either
# one comes up. With rc_depend_strict="YES" we would require them both to
# come up.
rc_depend_strict="YES"

# Do we allow services to be hotplugged? If not, set to rc_hotplug="NO"
# NOTE: This does not affect anything hotplug/udev/devd related, just the
# starting/stopping of the init.d service triggered by it.
rc_hotplug="YES"

# Dynamic /dev managers can trigger coldplug events which cause services to
# start before we are ready for them. If this happens, we can defer these
# services to start in the boot runlevel. Set rc_coldplug="NO" if you don't
# want this.
# NOTE: This also affects module coldplugging in udev-096 and higher
# If you want module coldplugging but not coldplugging of services then you
# can set rc_coldplug="YES" and rc_plug_services="!*"
rc_coldplug="YES"

# Some people want a finer grain over hotplug/coldplug. rc_plug_services is a
# list of services that are matched in order, either allowing or not. By
# default we allow services through as rc_coldplug/rc_hotplug has to be YES
# anyway.
# Example - rc_plug_services="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.
rc_plug_services=""

# rc_logger launches a logging daemon to log the entire rc process to
# /var/log/rc.log
rc_logger="NO"

# By default we filter the environment for our running scripts. To allow other
# variables through, add them here. Use a * to allow all variables through.
# rc_env_allow="VAR1 VAR2"

##############################################################################
# MISC CONFIGURATION VARIABLES
# There variables are shared between many init scripts

# Set unicode to YES to turn on unicode support for keyboards and screens.
unicode="YES"

# Network fstypes. Below is the default.
net_fs_list="afs cifs coda davfs fuse gfs ncpfs nfs nfs4 ocfs2 shfs smbfs"

##############################################################################
# SERVICE CONFIGURATION VARIABLES
# These variables are documented here, but should be configured in
# /etc/conf.d/foo for service foo and NOT enabled here unless you
# really want them to work on a global basis.

# Some daemons are started and stopped via start-stop-daemon.
# We can set some things on a per service basis, like the nicelevel.
#export SSD_NICELEVEL="-19"

# Pass ulimit parameters 
#rc_ulimit="-u 30"

# It's possible to define extra dependencies for services like so
#rc_config="/etc/foo"
#rc_need="openvpn"
#rc_use="net.eth0"
#rc_after="clock"
#rc_before="local"
#rc_provide="!net"

# You can also enable the above commands here for each service. Below is an
# example for service foo.
#rc_foo_config="/etc/foo"
#rc_foo_need="openvpn"
#rc_foo_after="clock"

# You can also remove dependencies.
# This is mainly used for saying which servies do NOT provide net.
#rc_net_tap0_provide="!net"

##############################################################################
# LINUX SPECIFIC OPTIONS

# This is the number of tty's used in most of the rc-scripts (like
# consolefont, numlock, etc ...)
rc_tty_number=12

# Use this variable to control the /dev management behavior.
#  devfs  - use devfs (requires sys-fs/devfsd)
#  mdev   - use mdev (requires sys-apps/busybox)
#  udev   - use udev (requires sys-fs/udev)
#  static - let the user manage /dev (YOU need to create ALL device nodes)
# Leave it blank to let rc work it out (udev, mdev, devfs, static)
rc_devices="udev"

# UDEV OPTION:
# Set to "yes" if you want to save /dev to a tarball on shutdown
# and restore it on startup.  This is useful if you have a lot of
# custom device nodes that udev does not handle/know about.
rc_device_tarball="NO"

# Sets the level at which logging of messages is done to the
# console.  See dmesg(8) for more info.
dmesg_level="1"

startxfce4 geht ja auch aber startkde gibt mir diese Fehler meldung aus. Ich kann kde nur über ein terminal in fce4 starten und nicht aus runlevel 3
:hilfe2:
 
Schau dir vllt mal "/etc/X11/xinit/xinitrc" an.

Du kannst entweder die anpassen, oder dir eine eigene "~/.xinitrc" anlegen.

Hth
 
der inhalt der alten rc.conf wurde bei OpenRC nach /etc/env.d/90xsession verschoben
Code:
# /etc/env.d/90xsession

# XSESSION is a new variable to control what window manager to start
# default with X if run with xdm, startx or xinit.  The default behavior
# is to look in /etc/X11/Sessions/ and run the script in matching the
# value that XSESSION is set to.  The support scripts are smart enough to
# look in all bin directories if it cant find a match in /etc/X11/Sessions/,
# so setting it to "enlightenment" can also work.  This is basically used
# as a way for the system admin to configure a default system wide WM,
# allthough it will work if the user export XSESSION in his .bash_profile, etc.
#
# NOTE:  1) this behaviour is overridden when a ~/.xinitrc exists, and startx
#           is called.
#        2) even if ~/.xsession exists, if XSESSION can be resolved, it will
#           be executed rather than ~/.xsession, else KDM breaks ...
#
# Defaults depending on what you install currently include:
#
# Gnome - will start gnome-session
# kde-<version> - will start startkde (look in /etc/X11/Sessions/)
# Xfce4 - will start a XFCE4 session
# Xsession - will start a terminal and a few other nice apps

XSESSION="kde-4.1"
.
.
.
EDIT (autom. Beitragszusammenführung) :
.

Irgend wie muss ich doch kde mitteilen können das es DISPLAY 0 nehmen soll.
 
Zuletzt bearbeitet:
Machmal echo $DISPLAY in der Console.
Da sollte normalerweise :0.0 stehen.
Wenn nicht setze mal den wert mit export DISPLAY=:0.0 neu.
Danach sollte startx wieder funktionieren.
Du kannst dann den Wert auch mit vi /etc/profile an Ende der Datei schreiben,
damit sollte es auch dann auch dem Runlevel funktionieren.
 
Das habe ich vorher schon gemacht, dass stimmt auch alles. Was mich nun wundert ist, dass mein xfce ja auch mit startxfce4 ohne probleme startet. ev. fehl die verbindung zum xserver?
.
.
.
EDIT (autom. Beitragszusammenführung) :
.

Das Problem ist das startx die änderungen in /etc/env.d/90xsession scheinbar voll ignoriert. Früher hab ich XSESSION="kde-4" geschrieben oder etwas ähnliches und dann gings. Jetzt startet es immer nur die reine Xsession, was standart ist, wenn keine anderen einträge gefunden wurden. Dort kann ich dann mit startkde starten.
.
.
.
EDIT (autom. Beitragszusammenführung) :
.

Hab es jetzt doch hin bekommen, jetzt muss man immer erst env-update und dann einen neustart machen. War von her problemloser zu machen.
 
Zuletzt bearbeitet:
Und startkde kannst du in "/etc/X11/xinit/xinitrc" eintragen dann funktioniert alles wieder wie früher.
 
Jup, die seite hab ich schon studiert, sonnst hätte das mit dem startx nie funktioniert. :D

Ich melde mich immer noch ganz old school über console an um dann mit "startx" mein kde zu starten. kdm ist natürlich die elegantere lösung.
Wenn ich kdm direkt beim start ausführen will müsste ich eigenlich nur runlevel 5 einstellen, dammit ich nicht erst über konsole einlogen muss?
 
Du hast das init script /etc/init.d/xdm das verwaltet [kgx]dm in /etc/conf.d/xdm stellst du ein welchen du haben willst.

Ich glaub der rest ist als langjähriger gentoo user mehr als klar
 

Ähnliche Themen

Nginx als Reverse Proxy für Nextcloud und Emby

Zugriff Ubuntu 16.04. auf Freigabe 18.04. LTS nicht möglich

Email via script via Exchange Server (SASL)

Senior System & Network Admin in Berlin

X startet nichtmehr

Zurück
Oben