How does one exit the X server?

1

The command sudo service gdm stop would successfully disable the X server in Ubuntu 11.04 temporarily.

However, this same command no longer works in Ubuntu 11.10, because "gdm" is an "unrecognized service" according to Terminal. How, then, do I disable the X server in Ubuntu 11.10?

GDM was switched out for LightDM, so:

sudo stop lightdm

Or in your service parlance:

sudo service lightdm stop

For future reference, all these upstart services (that can be run with initctl's service command and shortcuts) are .conf files in /etc/init/

The reason that doesn't work is because Ubuntu 11.10 has switched from GDM to LightDM.

Try this command instead:

sudo service lightdm stop

You can also use the keyboard shortcut:

Alt + PrtScn/SysReq + K

A bit of a long winded keyboard shortcut, maybe too many people were pressing Ctrl+Alt+Backspace so they changed it to this.

I can confirm this as working from 10.04 through to...

0 0
2

by

user26945

Last Updated October 13, 2017 15:02 PM

The command sudo service gdm stop would successfully disable the X server in Ubuntu 11.04 temporarily.

However, this same command no longer works in Ubuntu 11.10, because "gdm" is an "unrecognized service" according to Terminal. How, then, do I disable the X server in Ubuntu 11.10?

Answers 7

GDM was switched out for LightDM, so:

sudo stop lightdm

Or in your service parlance:

sudo service lightdm stop

For future reference, all these upstart services (that can be run with initctl's service command and shortcuts) are .conf files in /etc/init/

Oli
October 13, 2011 22:27 PM

The reason that doesn't work is because Ubuntu 11.10 has switched from GDM to LightDM.

Try this command instead:

sudo service lightdm stop

Nathan Osman
October 15, 2011 03:34 AM

You can also use the keyboard shortcut:

Alt + PrtScn/SysReq + K

A bit of a long...

0 0
3


Question:

The command sudo service gdm stop would successfully disable the X server in Ubuntu 11.04 temporarily.

However, this same command no longer works in Ubuntu 11.10, because "gdm" is an "unrecognized service" according to Terminal. How, then, do I disable the X server in Ubuntu 11.10?


Solution:1

GDM was switched out for LightDM, so:

sudo stop lightdm

Or in your service parlance:

sudo service lightdm stop

For future reference, all these upstart services (that can be run with initctl's service command and shortcuts) are .conf files in /etc/init/


Solution:2

The reason that doesn't work is because Ubuntu 11.10 has switched from GDM to LightDM.

Try this command instead:

sudo service lightdm stop


Solution:3

You can also use the keyboard shortcut:

Alt + PrtScn/SysReq + K

A bit of a long winded keyboard shortcut, maybe too many people were...

0 0
4

I recently upgraded my Ubuntu installation to Oneiric 11.10 x64. I did a clean install and was disappointed to see that my nvidia drivers were not the latest that were available from the nvidia website. My system had 280.13 while the latest 64bit stable drivers available on nvidia’s website was 285.05

I dutifully downloaded the drivers from the website on my computer, but when I wanted to run and install the driver, I was getting a message to “Exit X” before trying to install these graphics drivers. After slapping my forehead once (because I had already encountered this issue last year too!) I promptly pressed

Ctrl + Alt+ F1

to get into Virtual Console (tty1) and logged in. Then I typed the usual

sudo service gdm stop

to disable the X server temporarily, as I’m used to do in 11.04 and earlier. But this gave rise to the error message

gdm is an unrecognized service

Another head slapping moment. I remembered that...

0 0
5

I see the question is adequately answered, but I would like to add that I see you're connecting to this server via ssh on port 5566. I read once on this site that communicating via SSH on unprivileged ports (being everything above 1023) is unsafe.

When you are logged onto a system as a non-root user (anyone not being uid 0), you cannot create a listing TCP or UDP port below 1024. This is because port numbers below 1024 are so-called privileged ports and can only be opened by root or processes that are running as root. So for instance, when your webserver (apache, nginx etc) will start, it will do so as the privileged root user in order to open up a listening connection to port 80 (the port that by default will be used for HTTP traffic). Now, as soon as the port is opened and everything that needs to be done as root is done, the webserver will fall back to a non-privileged user (either the www-data, apache, or nobody user). From that point, when something bad is happening,...

0 0
6

Questions:

Almost every tutorial I find tells me to do this for my event loop:

XEvent event; while (true) { XNextEvent(display, &event); switch (event.type) { case Expose: printf("Expose\n"); break; default: break; } }

However, clicking the X to close the program results in this message.

XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0" after 10 requests (10 known processed) with 0 events remaining.

It is indeed strange to me that the examples suggest using an infinite loop. That doesn’t sound natural, and my other X11 programs don’t do that. So I searched around. I found out how to capture the window close event.

Atom wmDeleteMessage = XInternAtom(mDisplay, "WM_DELETE_WINDOW", False); XSetWMProtocols(display, window, &wmDeleteMessage, 1); XEvent event; bool running = true; while (running) { XNextEvent(display, &event); switch (event.type) { case Expose: printf("Expose\n"); ...
0 0
7

ps e lists processes with their commandline along with ( initial ? ) environment variables . filter processes matching either a -display :0 commandline or a DISPLAY=:0 environment . i believe this find the wm in question whether started manually or by some session script . then we can simply kill it .

i hear there are different ps implementations , the above ( bsd ? ) commandline style works on my machine with debian procps-ng . refer to the manual if necessary .

based on the observation that wm is owner of the root window , this arch wiki page has a minisection with an approach of xprop -root _NET_WM_PID to find the pid , . but this don't work for me , seemingly because it is only voluntary for x windows to provide this property , and my wm happens to not follow that fashion .

regarding other nonworking ideas , xkill can detach clients except the root window , so don't fill our need here...

0 0
8

The problem lays in the communication between X Server and the Window Manager.

When you call XCreateWindow or XCreateSimpleWindow, the X Server creates your window (not showing it until you explicitly map it on the screen by calling XMapWindow), and then the Window Manager is responsible for attaching all the decorations and buttons and system menu around your window.

You can call XDestroyWindow on your own to remove the window, and this usually means it just disappears from the screen, but your program is still running and the connection to the X Server is still open, so you can send it some more requests.

The problem begins when the user clicks that little X button attached to your window by the Window Manager, because it is not created by the X Server and it is not his business to decide what to do then. Now it's all in hands of Window Manager.

If the Window Manager simply called XDestroyWindow on your window, it would cause a problem if your...

0 0
9

Okay, I am using init 3 to do stuff and then init 5 to get the NVIDIA driver installed. I am not ignoring the other message, I will come back to it. I just need to keep moving forward now. The second message sounds like an evening project, not something to do at work.

Anyway, I gave the following commands:

init 3

./Nividia...run

and got the following message:

"ERROR: The Nouveau kernel driver is currently in use by your system. This
driver is incompatible with the NVIDIA driver, and must be disabled
before proceeding. Please consult the NVIDIA driver README and your
Linux distribution's documentation for details on how to correctly
disable the Nouveau kernel driver."

Thus I must disable this Nouvea driver before continuing the install. i think thta this is the way to do it. Am i correct?

$ mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
$ dracut -v /boot/initramfs-$(uname -r).img...

0 0
10

Have also had some problems with the Pi hanging on reboot

So today, I setup 2 different SD cards

First card was a 2GB integral, and I just re-imaged via win32image. Then I did my standard setup as follows:

Boot then reboot to set the card up, get rid of nfs fails etc. BTW using Debian image from download section.

Then I 'sudo apt-get update' twice. First time to update, second to clear errors. If I then 'startx' everything is fine, reboot menu option works ok, as does 'sudo reboot'.

Then I 'sudo apt-get upgrade' and reboot. Now if I 'startx' using the reboot option on menu gets through the shutdown sequence to the 'system halted' ok. Then the composite signal drops and the Pi hangs, all leds lit and doesn't reboot. Same if I 'sudo reboot'. Or doesn't bring composite signal back up. I think the Pi is booting as all the leds do what they normally do. Not sure if this is what others are getting.

Second card, 4GB PNY, I reformatted back to...

0 0
11

Hi, guys. I'm installing Arch Linux alongside Xubuntu once again, and have encountered an issue running my games.

I have a script that runs them in a second X server. So in order to be able to start them, I had to configure /etc/X11/Xwrapper.config with allowed_users = anybody. All fine and good. But I couldn't acquire the virtual console, so I had to retain root rights too. needs_root_rights = yes. So I was able to start my games. But the problem comes when I exit them.

When I exit, and when I'm supposed to go back to my desktop's X, instead the cursor disappears, the screen goes black, and my Ctrl+Alt+F* keys stop working. Ctrl+Alt+Backspace doesn't work either. The system is entirely unusable.

I redirected my script's output to a file and saw these last few lines:

xinit: X server slow to shut down, sending KILL signal waiting for server to die ... xinit: X server refuses to die

How do I make this server die?

Last edited by TiZ (2016-03-06...

0 0
12

I have an ongoing process running in a terminal while I'm using X server. I'd like to both exit the X server and have my process continue its job.

Is this process going to be stopped if I exit the X server via sudo service lightdm stop command?

The answer to your question is yes. If you stop/exit/kill a process, all of its child process going to be stopped.

If you stop the lightdm, you stopped the X, the terminal will be stopped as it's a child of X also the shell and running applications in that shell.

You can use pstree to find out if your desired process is a child of X:

pstree -s $(pidof process-name -s)

or:

pstree $(pidof lightdm)

to see all lightdm childs.

How to keep your process ongoing? run it in an other tty.

Start a process on a different...

0 0
13

I want to add my answer here because I couldn't install the NVidia driver, I couldn't get tty working and I wasn't able to install it in safe mode root shell. What I did was a combination of two answers here:

NOTE: before doing this, be sure that the NVidia driver is already downloaded and in an accessible directory.

For reference, I have NVIDIA GEFORCE GTX 750 TI and the following worked for me: Installing the generic Nvidia driver will get tty working, do this with:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates sudo apt-get update sudo apt-get install nvidia-current

Now you won't be able to get past the login screen in Ubuntu, but that's OK. Restart the computer and once you are brought to the sign in screen go to tty1 [ ctrl + alt + f1 ]. Now do the following commands:

sudo service lightdm stop cd sudo sh ./NVIDIA*

Follow the prompts and viola. After restarting everything should be working fine and...

0 0
14
X Server Configuration for Image Generation

If you have found your way to this chapter, you are probably wondering why certain images seem to be missing from your page, or perhaps you are concerned about some confusing messages in your error log that are related to image generations. As discussed in the Image Generation chapter, the UIX implementation of the Browser Look And Feel uses the UIX Dynamic Images technology to dynamically generate images for components such as buttons and tab bars at runtime. The flexibility provided by dynamic image generation does come at a cost: the deployment environment must be capable of supporting the graphical operations needed for image generation. In Unix environments, this requirement typically means that some special configuration work is necessary.

This chapter describes how to enable dynamic image generation in Unix environments. Most of the work in enabling image generation revolves around the configuration of an X server for...

0 0
15

MobaXterm X server and SSH client

MobaXterm is your ultimate toolbox for remote computing. In a single Windows application, it provides loads of functions that are tailored for programmers, webmasters, IT administrators and pretty much all users who need to handle their remote jobs in a more simple fashion.

MobaXterm provides all the important remote network tools (SSH, X11, RDP, VNC, FTP, MOSH, ...) and Unix commands (bash, ls, cat, sed, grep, awk, rsync, ...) to Windows desktop, in a single portable exe file which works out of the box. More info on supported network protocols

There are many advantages of having an All-In-One network application for your remote tasks, e.g. when you use SSH to connect to a remote server, a graphical SFTP browser will automatically pop up in order to directly edit your remote files. Your remote applications will also display seamlessly on your Windows desktop using the embedded X server. See demo

You can...

0 0
16
...
0 0
17

You're asking two questions:

Question 1: Is calling System.exit() inside a Servlet's destroy() method to forcefully kill any non-daemon threads a good idea?

Calling System.exit() inside ANY servlet-related method is always 100% incorrect. Your code is not the only code running in the JVM - even if you are the only servlet running (the servlet container has resources it will need to cleanup when the JVM really exits.)

The correct way to handle this case is to clean up your threads in the destroy() method. This means starting them in a way that lets you gently stop them in a correct way. Here is an example (where MyThread is one of your threads, and extends ServletManagedThread):

public class MyServlet extends HttpServlet { private List threads = new ArrayList(); // lots of irrelevant stuff left out for brevity public void init() { ServletManagedThread t = new MyThread(); threads.add(t); t.start(); } public void destroy() { ...
0 0
18

11.1.

What is the X Window System?

The X Window System (commonly X11) is the most widely available windowing system capable of running on UNIX® or UNIX® like systems, including FreeBSD. The X.Org Foundation administers the X protocol standards, with the current reference implementation, version 11 release 7.7, so references are often shortened to X11.

Many implementations are available for different architectures and operating systems. An implementation of the server-side code is properly known as an X server.

11.2.

I want to run Xorg, how do I go about it?

To install Xorg do one of the following:

Use the x11/xorg meta-port, which builds and installs every Xorg component.

Use x11/xorg-minimal, which builds and installs only the necessary Xorg components.

Install Xorg from FreeBSD packages:

After the installation of Xorg, follow the instructions from the X11 Configuration...

0 0
19

The raiserror method

raiserror('Oh no a fatal error', 20, -1) with log

This will terminate the connection, thereby stopping the rest of the script from running.

Note that both severity level 20 or higher and the WITH LOG option are necessary for it to work this way.

This even works with GO statements, eg.

print 'hi' go raiserror('Oh no a fatal error', 20, -1) with log go print 'ho'

Will give you the output:

hi Msg 2745, Level 16, State 2, Line 1 Process ID 51 has raised user error 50000, severity 20. SQL Server is terminating this process. Msg 50000, Level 20, State 1, Line 1 Oh no a fatal error Msg 0, Level 20, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded.

Notice that 'ho' is not printed.

CAVEATS:

This only works if you are logged in as admin ('sysadmin' role), and also leaves you with no database connection. If you are NOT logged in as admin, the RAISEERROR() call itself will...
0 0
20

Starting Sessions[edit]

This chapter describes how to start an X11 session.

This chapter will answer the following questions:

What are the different methods for starting X11? How does one start X11 and a window manager? How does one control which window manager and programs will start? Is there a way to make fonts appear nicer?

Methods to start X11[edit]

Recall that X11 consists of an X server and several clients. If you only start the X server, you obtain a blank screen. What one needs is a way to start the X server plus some default clients such as a window manager.

First, some Unix consoles give a text-only login prompt. In this case, first login as normal to obtain your Unix shell, then use a xinit or startx command to start the X server and default clients at your shell.

Second, some Unix consoles have a graphical login prompt! In this case, the system boot scripts have started an X server already; a program called the display...

0 0