Solved Need a hint for resetting X-server

After a frustrating morning of seeking out how to do this, I now give up and ask the forum for help with something I think should be obvious to me, but does not seem to be very obvious.

I am running FreeBSD 13.2 with XFCE and that has generally been working fine for me. After a bit of absence for some surgery, I got back to this finally, but now I get an intermittent momentary black screen after which I usually can go on about business. Yesterday I got such a black screen, but when it repainted I had lost the left hand roughly one third of the screen. I tried several things to get it back, but to no avail. Finally I rebooted via a momentary power switch and everything worked again. But I should not have to have resorted to the thermonuclear option to do so. Under Linux when I was running it, I had several occasions to reset the X-server by issuing ctrl-alt-bksp from the keyboard and had to start my session over, but not a full reboot. I tried that to no avail here. The should be some such incantation to do an X reset here as well, but I cannot seem to find it. Does anyone on the forum have a suggestion for such an incantation? If so it would be much appreciated.

Thanks,
QuesoGrande
 
For some reason the Ctrl-Alt-Backspace was disabled in Xorg releases a while back.

It can (and should) be reinstated via setting DontZap to false:

https://kevinlee.io/wiki/DontZap

Note that these days, the xorg.conf is preferred to be split up into random chunks (and just hope they merge correctly). i.e
/usr/local/etc/X11/xorg.conf.d/10-zap.conf
 
Thanks for the pointer kpedersen!! I kinda recall seeing a reference to this some time ago, but it escapes me as to where.

I have tried this as per kevinlee reference above, but it does not seem to work either when I set it in /usr/local/etc/X11... or in /etc/X11/... , so I am still at a loss with it. Are there other options needed as well somewhere?

By the way the kevinlee reference above states that the "three finger salute" was disabled to prevent users from accidentally getting the server reset out from under them. Sure seems to me that this would not be easily done accidentally. I pretty much have to work at it to get it, but then what do I know? :)

QG
 
Hmm. Perhaps the key shortcut has also been disabled. With the xorg.conf in place, try executing this, then try again.

$ setxkbmap -option "terminate:ctrl_alt_bksp"

Sure seems to me that this would not be easily done accidentally. I pretty much have to work at it to get it
Exactly, you simply can't press it by accident. It is one of those things that people with very little practical experience in UX "felt" was important to disable in order to make stuff user-friendly. It was an incorrect decision in my opinion.
 
AHA!!! That made it work Just Fine.

And yes, there were more than a few times that ctrl_alt_bksp saved my tail while was practicing as a Linux System Administrator. Thus it was that I wanted it here so badly I could taste it. I am now retired, but have taken that as a way to graduate upward to using FreeBSD as I had wanted to for a long time while working, but could not. Politics, &c. always got in the way. Much happier now, both for FreeBSD and for this solution!!


Thanks Much!!
QG
 
Bingo! That did it and thank you. I'll put the code here for posterity.
I created /usr/local/etc/X11/xorg.conf.d/10-zap.conf

It reads, copied from the stack exchange thread given by kpedersen
Code:
Section "ServerFlags"
    Option "DontZap" "false"
EndSection

Section "InputClass"
    Identifier      "Keyboard Defaults"
    MatchIsKeyboard "yes"
    Option          "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
 
Just for the record, and to bring this to closure, I submit the following observations ...

I have added the settings suggested by kpedersen to /etc/X11/xorg.conf so as to make them system wide regardless of login and have found that they solve this for me in truly grand style. :)

Also it appears that kpedersen , Phishfry, and I are in quite complete agreement concerning the wisdom of turning this off in the first place. :)

I am now a much happier camper :)

Sincerely,
QG
 
Are you starting X via startx or a session manager? If from startx you should be able to crtl-alt-f?? to get to the console that started and then "ctrl-C".
 
Right you are mer , but I am starting from a session manager, and kinda have to for the sake of some of the "less initiated" in my community. ;)
 
  • Like
Reactions: mer
I use startX, but ctl-alt+FN and then having to ctl-C is a pain. Plus, I have a 66% keyboard where I have to hit a Fn key plus a number to get to a console.

I agree with all those who think it was a stupid idea to get rid of what people had used for years, violating POLA among other things (Principle of Least Astonishment, which FreeBSD used to adhere to more closely than Linux did).

I suspect it was some RedHat employee who thought it was a good idea, as they always seem to enable various bad things. Heh, and cursory web search shows a post from 2009, mentioning Fedora notes as where the poster first saw it. (Though that doesn't prove anything but my confirmation bias).

Here's that person's 2009 post.
While that post had several who agreed, it was treated with all the respect of an Apple or Windows user making a request--i.e., ignored.
 
I tend to use OpenBSD for my graphical workstations and lo and behold, they have correct ctrl-alt-backspace operation by default. The Xenocara fork of Xorg is so much cleaner.

Linux communities have been trying to break Xorg and make it less user friendly for years. Can't wait for them to fsck off to Wayland and leave the good stuff alone. I am hoping that the FreeBSD community will use this as an opportunity to clean up Xorg, dust off Gnome 2 and ultimately render Linux obsolete on the workstation. It won't even be that much work.

... but this is possibly derailing the thread ;)
 
Here's that person's 2009 post.
While that post had several who agreed, it was treated with all the respect of an Apple or Windows user making a request--i.e., ignored.
Wow, apparently Emacs users wanted this. They would hit ctrl-alt-backspace by mistake. I have never, ever, done that, but then again, I don't use Emacs regularly. Seems like a pretty unlikely accident to me.

Yeah, I very rarely use ctrl-alt-backspace, but when I do, it's cause things have gone seriously sideways and I'm looking at a black screen or worse. What a crazy decision.
 
Wow, apparently Emacs users wanted this. They would hit ctrl-alt-backspace by mistake. I have never, ever, done that, but then again, I don't use Emacs regularly. Seems like a pretty unlikely accident to me.
It's not an accident. Ctrl-Alt-Backspace is actually a valid Emacs key binding that runs the Emacs Lisp command
backward-kill-sexp. It's used to remove an S-expression (sexp) backwards i.e. remove an S-expression that is located before the cursor.
 
It's not an accident. Ctrl-Alt-Backspace is actually a valid Emacs key binding that runs the Emacs Lisp command
backward-kill-sexp. It's used to remove an S-expression (sexp) backwards i.e. remove an S-expression that is located before the cursor.
Indeed. But as the mailing list thread eluded to, there are many more Xorg users than there are Emacs+X11 users.

If every bit of software had to appeal to the highest common denominator of users, they would have to be extremely basic. Almost any key combination would be reserved! :p

Obligatory XKCD (also involving those pesky emacs users)

(I wonder if backward-kill-sexp came in before or after Xfree86 added ctrl-alt-backspace?)
 
Stallman began work on GNU Emacs in 1984. The initial release of XFree86 seems to have been in 1991.
True, but I imagine it took some amount of time for Emacs to gain the critical mass of feature creep required to implement that key combo. Likewise I don't think(?) ctrl-alt-backspace was implemented immediately in early Xservers.

Basically I am unsure as to which of our ancient forefathers to blame for this collision XD
 
True, but I imagine it took some amount of time for Emacs to gain the critical mass of feature creep required to implement that key combo.
I originally had that thought as well. However, 7 years is quite a long time between the two applications. And that S-expression command is quite fundamental if you're editing Emacs Lisp structurally. And the keybinding of Ctrl-Alt-Backspace is a very good fit for what the command is trying to achieve i.e. remove an S-expression backwards. So, my bet is on Emacs having that keystroke first, but that having a smaller user base (as you mentioned) meant that there were probably not too many issues between Emacs users and XFree86 users.
 
Back
Top