LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-13-2010, 08:19 PM   #16
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721

Quote:
Originally Posted by PTrenholme View Post
For example, I often run KDE on tty7, GNOME on tty8, and XFCE on tty9. That lets me jump between different window managers for different purposes.
I never thought that's possible! How do you do it?
 
Old 12-13-2010, 08:59 PM   #17
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,205

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
you would edit your init scripts to run multiple instances of X
 
Old 12-14-2010, 01:36 AM   #18
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Another nice trick in my book now .
Isnt plain text just great when it comes to configurations.
 
Old 12-14-2010, 03:10 AM   #19
noony123
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: 0
Guys

Really thanks a lot for providing such useful info and taking interest in a post by a newbie like me :-).

Can someone pls point me to some article or book or website that discuss these consoles in detail ?
 
Old 12-14-2010, 04:04 AM   #20
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by noony123 View Post
Can someone pls point me to some article or book or website that discuss these consoles in detail ?
Wikipedia
 
Old 12-14-2010, 12:03 PM   #21
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by MTK358 View Post
I never thought that's possible! How do you do it?
Change (or create) files in your home directory with names in the form .Xclients-{domain}:{n} where "domain" is the host-name of your system (i.e., the second word in the uname -a output, or just run the hostname command), and {n} is the X server number. Each file should be a bash script telling the X-server how to start the window manager for the GUI you want on screen {n}. The just open a terminal and run the command startx -- :{n} &>/dev/null &;disown to start a X server on tty{((n+6))}. Note that you need some server flag options set in xorg.conf or xorg.conf.d/for this to work.

Here's what my .Xclients scripts look like:
Code:
$ ls .X*
.Xauthority  .Xclients-default     .Xclients-dv9810us:1  .Xclients-dv9810us:3
.Xclients    .Xclients-dv9810us:0  .Xclients-dv9810us:2
$ cat .Xclients-dv9810us\:*
#! /bin/bash
WM="startkde"
WMPATH="/usr/bin /usr/X11R6/bin /usr/local/bin"
for p in $WMPATH 
do
        [ -x $p/$WM ] && exec $p/$WM
done
exit 1
#-----------------------------------------------
#! /bin/bash
WM="gnome-session"
WMPATH="/usr/bin /usr/X11R6/bin /usr/local/bin"
for p in $WMPATH 
do
        [ -x $p/$WM ] && exec $p/$WM
done
exit 1
#-------------------------------------
#! /bin/bash
WM="startxfce4"
WMPATH="/usr/bin /usr/X11R6/bin /usr/local/bin"
for p in $WMPATH
do
        [ -x $p/$WM ] && exec $p/$WM
done
exit 1
#------------------------------------
#! /bin/bash
WM="karmen"
WMPATH="/usr/bin /usr/X11R6/bin /usr/local/bin"
for p in $WMPATH
do
        [ -x $p/$WM ] && exec $p/$WM
done
exit 1
Alternatively, you could set a default .Xclients file like this:
Code:
$ cat .Xclients-default 
#!/bin/bash
#
# Set the default display manager to KDE
#
DefaultManager=KDE
#
# Read the preferred display manager name from /etc/sysconfig/desktop if possible
# otherwise use the default
#
if [ -x /etc/sysconfig/desktop ];
then
  . /etc/sysconfig/desktop
else
  DISPLAYMANAGER=$DefaultManager
fi
[ -z $DISPLAYMANAGER ] && DISPLAYMANAGER=$DefaultManager
#
# Get the window manager executable name for the specified DISPLAYMANAGER value
#
case $DISPLAYMANAGER in
  KDE)
    WM="startkde";;
  GNOME)
    WM="gnome-session";;
  XFCE)
    WM="startxfce4";;
  KARMEN)
    WM="karmen";;
  ICE)
    WM="icewm";;
  OPEN*)
    case $DESKTOP in
      GNOME)
        WM="openbox-gnome-session";;
      KDE)
        WM="openbox-kde-session";;
      *)
        WM="openbox";;
    esac;;
  METACITY)
    WM="metacity";;
  TWM)
    WM="twm";;
  WMAKER)
    WM="wmaker";;
  FLUXBOX)
    WM="fuxbox";;
  FVWM)
    WM="fvwm";;
  *)
    WM=$DefaultManager;;
esac
#
# Locate the window manager and start it
#
manager=$(whereis -b $WM | cut -d' ' -f2)
[ -x "$manager" ] && exec $manager
#
# If we get here the specified window manager could not be found
#
exit 1
And here's the server flag section you'll need in xorg.conf or xorg.conf.d/
Code:
Section "ServerFlags"
        Option      "DontZap" "off"
        Option      "DontVTSwitch" "off"
EndSection
(See man xorg.conf for details.)
 
1 members found this post helpful.
  


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
Why does linux start 6 virtual consoles/terminals? pantherlehr Linux - General 3 07-17-2008 12:25 AM
Linux freezes and locks all consoles... but SSH works tornado419 Linux - General 5 09-02-2004 03:02 PM
Linux consoles palanisaravanan Linux - General 1 01-24-2004 09:01 AM
free remote linux consoles bobster666 Linux - General 7 02-16-2003 05:33 PM


All times are GMT -5. The time now is 09:08 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration