LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-05-2009, 06:49 PM   #1
baldurpet
Member
 
Registered: Dec 2008
Location: Iceland
Distribution: Ubuntu, freeBSD
Posts: 110

Rep: Reputation: 15
Using two window systems at the same time? Displaying each on a seperate monitor?


I wanted to know and do three things things basically
  • First of all, what are the tty[1:6] monitors called? The ones where you press Ctrl + Alt + F[1:6] to reach?
  • I want to use two window managers, each in a separate tty thingie and I want to understand why it's done the way it is.
  • I want to try using two windows managers on two monitors at the same time (just to see whether it's possible and how it's done)

I know a little about number two, but the problem is I don't know why it works (on second thought, I did use it such a long time ago that I can't really recall how it was verbatim):
Code:
xinit --:0
When you did something like this, some (what I still find random) screen appears, and there you can type something like gnome-start, xfce4.. etc. and that window manager appears in that tty.

As for part three I'm baffled. Could anyone give a helping hand to a newbie?
 
Old 01-05-2009, 06:56 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,341

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by baldurpet View Post
what are the tty[1:6] monitors called? The ones where you press Ctrl + Alt + F[1:6] to reach?
They are called alternate consoles.



Quote:
Originally Posted by baldurpet View Post
[*]I want to use two window managers, each in a separate tty thingie and I want to understand why it's done the way it is.
Set up two users to use different window managers and then log in to each alternate console as a different user.


Quote:
Originally Posted by baldurpet View Post

I want to try using two windows managers on two monitors at the same time (just to see whether it's possible and how it's done)
Set up two users to use different window managers and then log in to each monitor as a different user.

-------------------
Steve Stites
 
Old 01-05-2009, 07:15 PM   #3
baldurpet
Member
 
Registered: Dec 2008
Location: Iceland
Distribution: Ubuntu, freeBSD
Posts: 110

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jailbait View Post
They are called alternate consoles.

Set up two users to use different window managers and then log in to each alternate console as a different user.

Set up two users to use different window managers and then log in to each monitor as a different user.
Finally someone tells me what they're called. Are you sure though, because Wikipedia doesn't mention anything about alternate consoles and Google doesn't find a hell'uva lot either.

Yes of course it's possible to simply log in as a different user each with a different window manager. It would be great if someone could explain what the pros and cons of running another manager using xinit; whether it's faster/slower, too complicated etc, and how to do it properly with xinit. Like you can see by my original post I probably didn't write it correctly, and I also don't know how to assign the other monitor to a specific "alternate console" via xinit.

Also, I don't know how to log into each monitor using a different user could anyone elaborate?
 
Old 01-05-2009, 09:25 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I just tried this on Fedora 10, and it worked there so I could have a KDE session on tty7 and a GNOME session on tty8 for me (i.e., a single user).

First, I looked at /etc/X11/Xclients to see how the startx command decided which type of session to start.

Seeing that, on Fedora, it read /etc/sysconfig/desktop to set the $SESSION variable, I changed that file to look like this (well, sort of - this was my default):
Code:
$ cat /etc/sysconfig/desktop
#!/bin/bash
DISPLAYMANAGER=KDE
DESKTOP=KDE
#DESKTOP=GNOME
Then I edited the file to comment out the DESKTOP=KDE and uncomment the GNOME one.

Finally, I did a startx -- :1 to start a new X session on tty8.

Voila! One KDE session, one GNOME session with a <ctrl>-<alt>-<F[78]> to switch between them.

(By the way, KDE has a "Switch User" menu item that did this in KDE 3.5, but it does not work (on Fedora) under KDE 4.1.)

Since I find it sometimes useful to have both types of sessions open, I think I'll write a script to "automate" the editing of the desktop file. (Probably just a simple sudo mv from a KDE and GNOME version.)

Note: A simple startx -- :1 opens (again, on Fedora 10) a simple xterm window with no decorations, etc. Similar, I believe, to what the OP was discussing.

<edit>
If you have two monitors, the startx syntax would be, I believe, startx -- 1:0 for the first screen on the second monitor. It might be -- 1:1 to get tty8 to connect to the second screen. Since I have only one monitor, I can't check the syntax for different tty's on different screens. What I described before this edit was different screens on the same monitor.
</edit>

Last edited by PTrenholme; 01-05-2009 at 09:35 PM.
 
Old 01-19-2009, 02:51 AM   #5
baldurpet
Member
 
Registered: Dec 2008
Location: Iceland
Distribution: Ubuntu, freeBSD
Posts: 110

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by PTrenholme View Post
I just tried this on Fedora 10, and it worked there so I could have a KDE session on tty7 and a GNOME session on tty8 for me (i.e., a single user).
Thanks!
I don't have a second screen atm, but the first part worked perfectly.
Do you know of any way to choose in what virtual shell (tty[7:12]) the new X environment starts in?
 
Old 01-19-2009, 08:50 AM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
The :x specified the tty. On most system, the tty is tty$((x+7)).

By the way, I discovered that there's a utility script (switchdesktop) on Fedora that changes the .XClients* script(s) which determine the default session started on a per-user basis.

You might also find the sample xinirc script towards the end of the man xinit interesting since it discusses creating a simple xterm only session.

Last edited by PTrenholme; 01-19-2009 at 09:03 AM.
 
  


Reply

Tags
tty, windowmanager, xinit



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
Need some detail information on Hard Real-Time Systems and Soft real-Time Systems. LinuxInfo General 3 09-22-2008 03:25 AM
Monitor Not displaying OK agikabia Linux - Newbie 1 11-28-2007 10:09 AM
Can't get a monitor and tv to work as seperate x screens with GF6800 toology Linux - Hardware 4 03-13-2007 05:54 AM
1 tv and 1 monitor, both displaying the same rbirmann Linux - Hardware 2 08-12-2004 04:38 PM
samba - window computers not displaying gsr_kashyap Linux - Networking 6 08-09-2004 04:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:20 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
Open Source Consulting | Domain Registration