LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Ctrl+F2 & Ctrl+F7 won't work (https://www.linuxquestions.org/questions/slackware-14/ctrl-f2-and-ctrl-f7-wont-work-603014/)

alkos333 11-28-2007 11:04 AM

Ctrl+F2 & Ctrl+F7 won't work
 
I was told that Ctrl+F2 and Ctrl+F7 are the standard Linux key combinations that take you to the terminal and back to the windows manager. I was also told they should work by default on any WM. For some reason that's not the case for me.

I tried eliminating a couple things to make sure they weren't causing it.

1. I had an alias for startx defined in ~/.bashrc:
Code:

alias startx="exec startx"
2. There were key bindings defined in ~/.fluxbox/keys:
Code:

! Define send-to keys
Control F1 :SendToWorkspace 1
Control F2 :SendToWorkspace 2
Control F3 :SendToWorkspace 3
Control F4 :SendToWorkspace 4
Control F5 :SendToWorkspace 5
Control F6 :SendToWorkspace 6
Control F7 :SendToWorkspace 7
Control F8 :SendToWorkspace 8
Control F9 :SendToWorkspace 9
Control F10 :SendToWorkspace 10
Control F11 :SendToWorkspace 11
Control F12 :SendToWorkspace 12


I tried to unset both the alias and the key bindings, but that didn't help.

Just to clarify, the startx alias prevents people from exiting out of WM and using the terminal when I'm away from my computer and xlock is on. The key bindings are self-explanatory.

Alien_Hominid 11-28-2007 11:15 AM

Into terminal ctrl+alt+f*, back into wm alt+f*

gnashley 11-28-2007 11:37 AM

In Slackware when you have started X, you can get back to a login terminal by using CTRL+ALT+F6. Then to get back to your X session (0:0) you'd use CTRL+ALT+F2. if you start a second X session on :1 (startx -- :1), you can access that by using CTRL+ALT+F3. The key combinations without CTRL (ALT+F1 to ALT+F6) are for use when X is not running. If you try to change to one of these terminals while X is running you will probably have trouble getting back to your X session.
CTRL+ALT+F6 is the only console terminal that is supposed to be available when your are running with runlevel 4, but YMMV according to which version you are running. But, observe the caution above to avoid getting shut out from your running X session. If you are using KDM or other display manager you may have slightly different behaviour also -again the sane way that is *supposed* to work in Slackware is as above.

Alien_Hominid 11-28-2007 11:53 AM

Quote:

Originally Posted by gnashley (Post 2973513)
. If you try to change to one of these terminals while X is running you will probably have trouble getting back to your X session.

Can you explain that? Never had any problems myself, but still wondering what precautions should I take.

gnashley 11-28-2007 01:20 PM

Perhaps there are no problems with current versions, but in the past I have seen other users who had problems and I had them myself -with cases like this:
You start an x session normally on tty1 using startx. From the running session you can exit okay to a login terminal by using CTL+ALT+F6 and you can return to your running X session by pressing CTRL+ALT+F2. But if you try to exit from your X session by going to some other console terminal other than CTRL+ALT+F6 -and especially by using a CLI terminal switch like ALT+F4, for instance, you are then unable to return to your X session by using CTRL+ALT+F2, nor exit to CTRL+ALT+F6. This means you are hung where you can't login to a terminal even to shut down X and restart. Only by having and using the obscure and hard-to-remember CTRL+SYSRQ method can you exit. this means you have to do a power-off the rude way, by hitting the reset button.

Here's another trick that I've learned about runlevel 4 -if you for some reason want to kill your display manager, you can do so by opening an xterm (as root) and typing 'init 5'. This kills the display manager and takes you to a console login where you can then issue the command 'init 3' -although this last is not really necessary normally. The thing is that if you want to kill the display manager and try the above trick but entering runlevel 3 *first* (without going to 5) you can also get a nasty lockup of X where you can't log in or out or shutdown. FWIW...

Alien_Hominid 11-28-2007 02:14 PM

Tried everything what you told here. Thanks for great ctrl+sysrq tip. I have never known about it. My OS is/was Slackware 10.2 (now smth similar to slackentoo). X is started on tty7 and I can change between terminals and wm without problems using alt. 'init 3' also works without problems - no need for 'init 5'.

indeliblestamp 11-29-2007 12:02 AM

gnashley, thanks for those tips! I always thought something was messed up with my X configs, because Ctrl+Alt+F2 never took me to the console, and switching back to Ctrl+Alt+F1 just showed me X's logs.

Alien_Hominid 11-29-2007 12:27 AM

It's on tty6.

alkos333 12-01-2007 02:54 PM

I'm running init 3 and none of the tips above helped me. I typically login and run startx right away without doing anything else.

dreyfuss 12-01-2007 04:06 PM

No need to type "startx" anytime you login if you open your /etc/inittab and change the runlevel value from 3 to 4.

alkos333 12-01-2007 11:35 PM

But I like to start from the terminal.

IceChant 12-02-2007 03:15 AM

Something weird for me Ctrl+Alt+F7 sends me back to the xserver all the rest are CLI, how so ?

Alien_Hominid 12-02-2007 01:13 PM

Quote:

Originally Posted by IceChant (Post 2977323)
Something weird for me Ctrl+Alt+F7 sends me back to the xserver all the rest are CLI, how so ?

That should be so.

IceChant 12-02-2007 04:13 PM

I understand that but from what I see in this thread for most people it doesn't work.

Alien_Hominid 12-05-2007 04:23 PM

I don't know about most of them, but on my system I get tty6 running runlevel 4 and tty 2-6 running runlevel 3. You can check inittab.


All times are GMT -5. The time now is 08:32 PM.