LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-28-2007, 11:04 AM   #1
alkos333
Member
 
Registered: Dec 2006
Posts: 271

Rep: Reputation: 31
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.
 
Old 11-28-2007, 11:15 AM   #2
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Into terminal ctrl+alt+f*, back into wm alt+f*
 
Old 11-28-2007, 11:37 AM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,768

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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.
 
Old 11-28-2007, 11:53 AM   #4
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Quote:
Originally Posted by gnashley View Post
. 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.
 
Old 11-28-2007, 01:20 PM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,768

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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...
 
Old 11-28-2007, 02:14 PM   #6
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
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'.
 
Old 11-29-2007, 12:02 AM   #7
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 38
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.
 
Old 11-29-2007, 12:27 AM   #8
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
It's on tty6.
 
Old 12-01-2007, 02:54 PM   #9
alkos333
Member
 
Registered: Dec 2006
Posts: 271

Original Poster
Rep: Reputation: 31
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.
 
Old 12-01-2007, 04:06 PM   #10
dreyfuss
Member
 
Registered: Jun 2007
Location: Italy
Distribution: Slackware current
Posts: 39

Rep: Reputation: 15
No need to type "startx" anytime you login if you open your /etc/inittab and change the runlevel value from 3 to 4.
 
Old 12-01-2007, 11:35 PM   #11
alkos333
Member
 
Registered: Dec 2006
Posts: 271

Original Poster
Rep: Reputation: 31
But I like to start from the terminal.
 
Old 12-02-2007, 03:15 AM   #12
IceChant
Member
 
Registered: Jan 2006
Location: Israel
Distribution: Windows Xp, Slackware
Posts: 316
Blog Entries: 3

Rep: Reputation: 30
Something weird for me Ctrl+Alt+F7 sends me back to the xserver all the rest are CLI, how so ?
 
Old 12-02-2007, 01:13 PM   #13
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Quote:
Originally Posted by IceChant View Post
Something weird for me Ctrl+Alt+F7 sends me back to the xserver all the rest are CLI, how so ?
That should be so.
 
Old 12-02-2007, 04:13 PM   #14
IceChant
Member
 
Registered: Jan 2006
Location: Israel
Distribution: Windows Xp, Slackware
Posts: 316
Blog Entries: 3

Rep: Reputation: 30
I understand that but from what I see in this thread for most people it doesn't work.
 
Old 12-05-2007, 04:23 PM   #15
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to create bash short cuts (like CTRL+l for clear and Ctrl+D for exit) supersubu123 Linux - General 5 05-30-2007 03:02 AM
ctrl+c & ctrl+v equivalent for Gnome terminal window? halfpower Linux - General 2 11-29-2005 02:57 AM
dark screen when pressing Ctrl + Alt + Backspace or Ctrl + Alt F1-F6 in Gnome or KDE trinoo Slackware 5 01-28-2005 08:13 AM
no ctrl-a or ctrl-z in emacs or on command line? ashlock Fedora 5 12-30-2003 08:00 PM
ctrl+ c ctrl +v not working in windows xp Astro General 3 10-20-2003 08:42 PM


All times are GMT -5. The time now is 10:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration