LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Are you sure you want to log out? (https://www.linuxquestions.org/questions/linux-desktop-74/are-you-sure-you-want-to-log-out-897133/)

rayandrews 08-13-2011 01:10 PM

Are you sure you want to log out?
 
Hi all,

Using Debian5/Gnome. I have the machine configured to boot to CLI, not GUI, and as a result, when I CTRL+ALT+DEL, I can return to the CLI, just as I want. However, that little dialog "Are you sure you want to log out" pops up every time, and since the answer is always 'yes' and 'remember open application' (or however that goes) I'm wondering if I can make the answer automatic and avoid the dialog.

Thanks in advance. I googled this, but couldn't find anything.

PTrenholme 08-13-2011 02:25 PM

Since Linux/GNU systems allow multiple logon's, once you've started a CLI session, you can always use Ctrl-Alt-F2, F3, ... to log in again as another (or the same) user, leaving the session you're in untouched. So, why use ctr-alt-del to log out preserving the session?

If you're asking about going from a GUI session to CLI, if you have set the options in xorg.conf (See man xorg.conf for option details.), you can use the ctrl-atl-F<n> keys to access a command line tty while leaving your X-server running.

So, bottom line, are you just trying to make life difficult for yourself, or did I not understand what you're trying to accomplish? :scratch:

rayandrews 08-13-2011 03:27 PM

Quote:

Originally Posted by PTrenholme (Post 4442043)
Since Linux/GNU systems allow multiple logon's, once you've started a CLI session, you can always use Ctrl-Alt-F2, F3, ... to log in again as another (or the same) user, leaving the session you're in untouched. So, why use ctr-alt-del to log out preserving the session?

If you're asking about going from a GUI session to CLI, if you have set the options in xorg.conf (See man xorg.conf for option details.), you can use the ctrl-atl-F<n> keys to access a command line tty while leaving your X-server running.

So, bottom line, are you just trying to make life difficult for yourself, or did I not understand what you're trying to accomplish? :scratch:

When I'm fiddling with X -configure, trying to get all my monitors working, it's necessary to shut down X completely before more tests, so that's why I want to do that. Also, I'm a bit of a CLI purist, coming as I am almost directly from DOS. As a matter of principal I don't like having a big fat GUI running when I don't want it to. I like to boot to pure CLI, and also be able to get back to pure CLI when done with the GUI.

PTrenholme 08-13-2011 05:18 PM

By default the newer X-servers set the dontzap flag to true. If you set it to false, a ctrl-atl-backspace will abort the X-server, no questions, no wait. (That, of course, is why they defaulted it to true.)

I just add this to my /etc/X11/xorg.conf.d/:
Code:

$ cat /etc/X11/xorg.conf.d/01-allow_zap.conf
Section "ServerFlags"
  Option    "DontZap" "off"
  Option    "DontVTSwitch" "off"
EndSection

With those settings, when I start an X-server from a tty, all I need to do is hit ctrl-alt-backspace, wait for the server to die (3-4 seconds), and I'm back at the tty from which I started.

Note that the second setting lets me hit, for example, ctrl-alt-F2 to start a new terminal session on tty2, so I can edit the xorg.conf file while the X server is running, and switch between the GUI session and the tty session. This is sometimes useful when you short-term memory is impacted by "excessive experience", and you need to remind yourself where the next step is supposed to go. (Hey, I retired almost a quarter of a century ago.:D)

rayandrews 08-14-2011 01:25 PM

Quote:

Originally Posted by PTrenholme (Post 4442150)
By default the newer X-servers set the dontzap flag to true. If you set it to false, a ctrl-atl-backspace will abort the X-server, no questions, no wait. (That, of course, is why they defaulted it to true.)

I just add this to my /etc/X11/xorg.conf.d/:
Code:

$ cat /etc/X11/xorg.conf.d/01-allow_zap.conf
Section "ServerFlags"
  Option    "DontZap" "off"
  Option    "DontVTSwitch" "off"
EndSection

With those settings, when I start an X-server from a tty, all I need to do is hit ctrl-alt-backspace, wait for the server to die (3-4 seconds), and I'm back at the tty from which I started.

Note that the second setting lets me hit, for example, ctrl-alt-F2 to start a new terminal session on tty2, so I can edit the xorg.conf file while the X server is running, and switch between the GUI session and the tty session. This is sometimes useful when you short-term memory is impacted by "excessive experience", and you need to remind yourself where the next step is supposed to go. (Hey, I retired almost a quarter of a century ago.:D)

I don't have a xorg.conf.d directory under X11. Should I make it? Seems like a whole lot of trouble.
But ... didn't I read somewhere that 'DontZap' can be added to xorg.conf?

PTrenholme 08-15-2011 11:42 AM

Yes, you can. The xorg.conf.d is useful for holding settings you want in any xorg.conf you use. The contents of the files in that directory directory are appended to any xorg.conf file you use or, if you're not using a configuration file, it is appended to the default configuration Xorg generates "on the fly" when you start the server.

But, if you're only using one configuration file, there's not reason not to just add that section into the file. (In your case, you might consider putting most of you xorg.conf file, each section separate, into xorg.conf.d. That way you could work on each part independently of each other, thus avoiding any inadvertent, unintended, changes. Or, perhaps just have each monitor's settings in an individual .conf file in the directory.

By the way, you didn't mention how you were editing your configuration files from the tty, but, if you haven't tried it, the mc (Midnight Commander) package provides a nice, light weight, file manager/editor/... system on the tty. It's not as complete as emacs but is (for me) much easier to use. (And, FYI, I've been using emacs - off and on - ever since I was introduced to it on the MIT Multics system in the seventies, before AT&T pulled out of the project and built a scaled-down version of Multics called Unix.)


All times are GMT -5. The time now is 03:37 PM.