Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-08-2007, 03:12 PM   #1
LQ Newbie
Registered: Feb 2007
Posts: 8

Rep: Reputation: 0
How: Start X without changing to its VT automatically? (-novtswitch seem not to work)


I want to start X without changing to the VT the X server is started on (e.g. vt8), but I can't get it to work. X -help gives this:
martin@martin-laptop:~$ Xorg -help
use: X [:<display>] [option]
-a #                   mouse acceleration (pixels)
-ac                    disable access control restrictions
-novtswitch            don't immediately switch to new VT
-sharevts              share VTs with another X server
And -novtswitch obviously looks good for this, but it only appears to work when I kill the started X server. Without the flag, it automatically switches back to the primary X server (vt7) when it is killed, whereas with that option, I have to switch back to vt7 manually.

X -version
martin@martin-laptop:~$ X -version

X Window System Version 7.1.1
Release Date: 12 May 2006
X Protocol Version 11, Revision 0, Release 7.1.1
Build Operating System: Linux i686 
Current Operating System: Linux martin-laptop 2.6.17-11-generic #2 SMP Thu Feb 1 19:52:28 UTC 2007 i686
Build Date: 07 July 2006
        Before reporting problems, check
        to make sure that you have the latest version.
Module Loader present
Anyone know what I can do/if this is possible?
Old 03-11-2007, 04:58 AM   #3
LQ Newbie
Registered: Feb 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Originally Posted by teckk
Googled these

Well thank you, but I wasn't asking how to switch between vt:s...

I am asking how to start an X server without automatically being moved to the VT it starts on.
Old 03-11-2007, 09:44 AM   #4
Senior Member
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 3,077

Rep: Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861
Ok, I see,
You want to startx from shell, you want x to start in the background from another shell, and you remain in the shell that you are in. I've never had a need to do that. Maybe someone else knows.

You could startx then Ctrl+Alt+F1 or F2 F3 etc into the shell that you want. Linux uses F7 for X I think so you could use ctrl+alt+F2 and F7 to go back and forth between the two.
Old 10-14-2011, 12:37 PM   #5
LQ Newbie
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
I need this too


Edit: This is a pretty common question, apparently -

Last edited by KBAegis; 10-14-2011 at 12:43 PM.
Old 10-20-2011, 08:14 PM   #6
LQ Newbie
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
Best fit

Looks like xorg doesn't accommodate this functionality natively. There is a workaround, however:

edit startx:

+ export PRE_X_VTS=$(fgconsole)
- xinit "$client" . . .
+ nohup xinit "$client" . . . >/dev/null 2>/dev/null

edit .xinitrc:

+sudo chvt $PRE_X_VTS

It will flicker, but these two modifications will retain a usable vty without closing your shell.


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
How do I automatically start a program at start up? victordh Linux - General 7 10-27-2013 07:02 AM
Changing the defaut setting for which os will start automatically in a dual boot sy royeo Linux - Newbie 2 06-25-2006 03:33 PM
start apps automatically on start up? chunlee Linux - Newbie 3 09-04-2004 01:58 PM
XMMS 1.2.8-2 on Debian 2.4.22 not changing songs automatically odie015 Linux - Software 1 02-08-2004 10:13 AM
Changing automatically IP JMike Linux - Networking 1 05-22-2003 05:30 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:32 AM.

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