Linux disable x server

How do I kill the x-server?

That sounds mysterious 😉 my best guess is that lightdm is not runnig at all and you are using some other Display manger. With cat /etc/X11/default-display-manager, you can find out which Display Manager you are currently using, with sudo service —status-all you can find out which services are currently running. Maybe that helps to find out why there is no lightdm instance and what Diplay manager runs instead..

For me it was gdm3 rather than lightdm . Also my desktop environment in recent ubuntu was running on the F1 terminal, not F7, so I did the sudo service gdm3 stop on some other free terminal — the F3 one.

I did a little more digging around and found that I could just use pgrep to find its PID and then kill it.

pgrep dm -l

sudo kill (insert PID here)

You will need the help of htop or top . Write down the PID number of the process you want to kill (in this case, Xorg ). Once you have the PID, run the below command in a root shell ( sudo -s ):

You should then be able to install the NVidia drivers.

Do you have nvidia-card with CUDA ? — for this case there is special driver — you can read all this at my post here : askubuntu.com/questions/311151/…

Try running sudo service gdm stop .

The reason your command may be resulting in that output is because lightdm isn’t your Display Manager.

In addition to gdm , also try xdm and kdm .

/etc/init.d/lightdm stop maybe? And why you can’t install nvidia drivers from software center?

Ok had the GTX 970 installation Problem under Ubuntu 14.04 too. Sometime i was able to start Ubuntu with the standart drivers and sometime not.

However, this should hopefully fix the Problem: After switching from IGP (I7 4770 with HD4600) to GTX970 in Biosi got an error with some Xorg Gui.

Читайте также:  Ставим linux на телефон

However you can not install the Nvidia-Driver while X is running: -> sudo killall Xorg solves the problem

Then -> sudo ./NVIDIA-x68xxx.run

After the first Driver Install (orig. Nvidia 352.xx) i had a blank screen. Then i run the Nvidia Driver Installer again -> sudo ./NVIDIA-x68xxx.run This second install told me some kind of noveu driver is running and should be disabled. The driver asked me if it should disable noveu -> Yes disable noveu

After restart: Et Voila lighdm is running again 🙂

Источник

Как отключить X сервер Ubuntu

Есть много причин, по которым может понадобиться отключить X сервер – к примеру, если нужно сделать свой рабочий компьютер сервером (хотя бы и временно), или решить какие-либо проблемы с видеокартой… К примеру, я предпочитаю запускать X с помощью команды “startx” в тот момент, когда я полностью готов к его запуску. Мало приятного наблюдать пустой черный экран, когда новый драйвер для встроенной видеокарточки Intel не хочет работать – в старые времена, я бы нажал комбинацию Ctrl+Alt+Backspace и починил бы его. В Ubuntu это происходит немного иначе.

В Ubuntu используется система инициализации под названием “Upstart”. Если вы пробовали связываться с update-rc и замечали, что выключение /etc/init.d/gdm не работает, то теперь вы поймете почему. Конечно, можно выполнить:

/etc/init.d/gdm stop

Однако это лишь временное решение, тем более которое работает когда у вас и так все работает. К примеру, у меня если видеодрайвер не заработал, то моя консоль не восстанавливается, а я просто получаю пустой экран.

Чтобы X сервер полностью перестал запускаться, нужно правильно работать с upstart. Upstart-определения хранятся в каталоге /etc/init (не-не, только не /etc/init.d). В них описан процесс запуска компьютера в стиле init.d скриптов Gentoo – вы можете определять зависимости, события, фазы и т.п. Итак, заглянем в /etc/init/gdm.conf:

# gdm - GNOME Display Manager # # The display manager service manages the X servers running on the # system, providing login and auto-login services description "GNOME Display Manager" author "William Jon McCann " # Нужно закомментировать следующее: #start on (filesystem # and started hal # and tty-device-added KERNEL=tty7 # and (graphics-device-added or stopped udevtrigger)) #stop on runlevel [016] emits starting-dm respawn script [ ! -f /etc/X11/default-display-manager -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/gdm" ] # Check kernel command-line for inhibitors for ARG in $(cat /proc/cmdline) do case "$" in text|-s|s|S|single) exit 0 ;; esac done if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE elif [ -r /etc/environment ]; then . /etc/environment export LANG LANGUAGE fi initctl emit starting-dm DM=gdm exec gdm-binary $CONFIG_FILE end script

Обратите внимание, что я закомментировал строки start on и stop on. Теперь вы сможете запускать X-сервер и графический менеджер с помощью /etc/init.d/gdm start (даже более правильно – initctl start gdm), но автоматически при запуске компьютера он стартовать не будет.

Читайте также:  Принципиальное отличие linux от windows открытость кода операционной системы

Похожие статьи

Источник

stop/restart X server

I want to generate xorg.conf but for that X needs to not be running. How do I stop X or start without it? I tried ctrl + alt + F2 but the X server is still running. I’m running Lubuntu 14.10.

You can make changes to xorg.conf while X is running. You just need to restart X in order for the changes to take effect: killall X will restart it for you.

@drs X: no process found is what I got. I made minimal ubuntu installation. I’ve installed X11 and then openbox and fbpanel .

2 Answers 2

I ended up doing the following:

sudo service lightdm stop 

Then I had to run ctrl + alt + F2 and log in the second terminal, otherwise it would just sit there with dark screen. To start it back up:

sudo service lightdm start 

lxdm starts/stops the X server.

The default installation of lubuntu since 12.04 uses lightdm rather than lxdm as its display manager, I think — in which case it would more likely be sudo service lightdm stop

You must log in to answer this question.

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.14.43533

Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group.
This site is not affiliated with Linus Torvalds or The Open Group in any way.

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

How do I disable X at boot time so that the system boots in text mode?

Is it possible to disable X at boot time? I’m setting up a server so it would be nice if it wouldn’t load the graphical interface every time I boot.

Читайте также:  Получить права на папку linux

On the GDM login screen of 11.04 and earlier, I think there was an xterm session option that would just give you a command line. Alternatively, you may be able to reach something from a recovery option in GRUB, though you probably wouldn’t be able to set it as a default that way.

16 Answers 16

Edit /etc/default/grub with your favourite editor, e.g. nano :

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 
GRUB_CMDLINE_LINUX_DEFAULT="text" 

For systems that use systemd

This is an additional step for systemd releases, e.g. Ubuntu 15.04, the steps above for grub are still necessary.

You need to tell systemd to not load the graphical login manager:

sudo systemctl enable multi-user.target --force sudo systemctl set-default multi-user.target 

You will still be able to use X by typing startx after you logged in.

That works for lightdm, this works for any graphical login manager? This is the proper way of loading a Linux system without loading a X server? Just seems more logical? Choose one. 🙂

Since the question is made for Ubuntu and not the mobile platform (can you even change anything in the mobile version of Ubuntu? Why would that be a good thing? I am guessing you would be locked to a prompt that knows nothing about keyboard input and accepts fancy finger touches and gestures :P) I am assuming we are talking about Ubuntu, the desktop Linux based operative system that I love and can modify to my needs. 🙂 But you are right, there is a semantics issue with the title of the post, feel free to edit it to something more proper! Thanks for the comments.

@Joyce first run systemctl get-default to find out what is the current run-level name and remember its name then use systemctl set-default multi-user.target to change it to «multi-user.target» or run these equals commands instead and see the changes. rm ‘/etc/systemd/system/default.target’ then ln -s ‘/usr/lib/systemd/system/multi-user.target’ ‘/etc/systemd/system/default.target’ . If the issue is still exist redo the default run-level that you remember it via systemctl set-default RunLevelName .

Источник

Оцените статью
Adblock
detector