You are not logged in.
Is it possible to have user foo have an X session on tty7 and to have user bar have an X session on tty8? One can run gdm or lightdm and then 'switch users' but I'd rather not have a greeter at all and just rely on Clt+Alt+F7 or Clt+Alt+F8.
Thanks.
Offline
Yes.
You just have a line in each users' .profile depending on which TTY they log in from: foo can startx on :0 and bar on :1
Offline
Or even with the same user. While running X on tty7, launched from tty1, I went to tty2 and ran
xinit -- :1and I had a new x session on tty8. I could switch between the two just as expected.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Nice. Thanks. I will try it.
Last edited by graysky (2012-05-28 18:50:43)
Offline
I do what you describe by using XDM...
From my notes:
Effective 1/25/2012 gdm is replaced with xdm. gdm was not willing to cooperate with user list not being shown and user switching started too many X sessions. With xdm configure two servers in /etc/X11/xdm/Xservers:
:0 local /usr/bin/X :0
:1 local /usr/bin/X :1
This will give X servers on tty7 and tty8
xdm-archlinux package is added. This provides a nicer look. Then tty8 and tty7 can be configured to show different messages.
/etc/X11/xdm/archlinux/xdm-config is configured currently like such:
these lines are added:
DisplayManager._1.setup: /etc/X11/xdm/archlinux/Xsetup
DisplayManager._1.startup: /etc/X11/xdm/archlinux/Xstartup
DisplayManager._1.reset: /etc/X11/xdm/TakeConsole
DisplayManager._1.resources: /etc/X11/xdm/archlinux/Xresources1
and copy the Xresources file and make changes accordingly.
For Xresources I have Xlogin*greeting:User1
For Xresources1 I have Xlogin*greeting:User2
Offline
@bnb - you lose me here:
/etc/X11/xdm/archlinux/xdm-config is configured currently like such:
these lines are added:
DisplayManager._1.setup: /etc/X11/xdm/archlinux/Xsetup
DisplayManager._1.startup: /etc/X11/xdm/archlinux/Xstartup
DisplayManager._1.reset: /etc/X11/xdm/TakeConsole
DisplayManager._1.resources: /etc/X11/xdm/archlinux/Xresources1
and copy the Xresources file and make changes accordingly.
For Xresources I have Xlogin*greeting:User1
For Xresources1 I have Xlogin*greeting:User2
I added the lines you mentioned to the files you mentioned but found that xdm only ran on tty3 and wouldn't differentiate between users.
EDIT: I started a new thread here since I'd like to have lxdm place user foo in tty7 and user bar in tty8.
https://bbs.archlinux.org/viewtopic.php?pid=1107708
Last edited by graysky (2012-05-28 22:42:46)
Offline
I think, given what you are trying to achieve, you are overengineering this.
On my home desktop, my .profile allows me to log into TTY1-3 and my wife logs into TTY4: my display is :0 and her's is :1
My .profile:
# startx if on tty1 and tmux on tty2
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
exec xinit -- :0 -novtswitch &>/dev/null &
logout
elif [[ $(tty) = /dev/tty2 ]]; then
tmux -f $HOME/.tmux/conf new -s secured
fiThe missus:
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty4 ]]; then
exec xinit -- :1 -novtswitch &>/dev/null &
sleep 10
logout
fiNo need for bloated login manager...
Offline
Okie doke... Let me try again.
I have xdm-archlinux installed.
in /etc/inittab, I am starting xdm
id:5:initdefault:
x:5:respawn:/usr/bin/xdm -nodaemon -config /etc/X11/xdm/archlinux/xdm-config
Normally in /etc/X11/xdm/archlinux you have a file called Xresources. I copy that and call the copied file Xresources1
Inside /etc/X11/xdm/archlinux/xdm-config I have added the lines shown
DisplayManager._1.setup: /etc/X11/xdm/archlinux/Xsetup
DisplayManager._1.startup: /etc/X11/xdm/archlinux/Xstartup
DisplayManager._1.reset: /etc/X11/xdm/TakeConsole
DisplayManager._1.resources: /etc/X11/xdm/archlinux/Xresources1
Inside the Xresource file there is a line in which I change the greeting
Xlogin*greeting:User1 Normally the greeting shows the computer name, but I want it to show the username of the user (not really the actual username, but an identifier. I substitute my last name where I stated previoulsy "User1" Inside the file Xresources1, I change the greeting to the last name of User2
Did that make sense? What you describe in your new thread is exactly what I am doing with xdm on tty7 and tty8 So for me xdm is starting twice. Once in tty7 and again in tty8. So User1 can login to tty7 and tty8 is still showing a login screen on tty8. Of course it doesn't mater who logs in first, but because User1 is used to tty7 and User2 is used to tty8 I put the names at each login greeting.
Make sure you have the extra server in /etc/X11/xdm/Xservers
:0 local /usr/bin/X :0
:1 local /usr/bin/X :1
Last edited by bnb2235 (2012-05-28 23:43:32)
Offline
@jasonwryan - do you have shutdown/restart available when starting in this fashion? I do not.
@bnb2235 - OK, that makes more sense. I modified the files as you recommended, and now have two xdms running, one on tty7 and one on tty8! Same question for you about shutdown/restart.
Last edited by graysky (2012-05-28 23:47:35)
Offline
We are writing (and editing) at the same time...
Make sure you have the extra server in /etc/X11/xdm/Xservers
:0 local /usr/bin/X :0
:1 local /usr/bin/X :1
I don't understand the question about shutdown and restart. I am running gnome (note xdm handles console kit) so I have shutdown and resart in gnome. Also, because the xdm-archlinux adds halt and reboot at the xdm screen, I have those functions their too. Becasue xdm is running as root, anyone can halt and reboot (even passers by).
Offline
@bnb - Ah, I'm in xfce4. I do see the restart and halt buttons on the xdm screen, but they are grayed-out in my 'actions' buttons in xfce4. Users can only logout ![]()
Offline
Perhaps you are initiating console kit twice. In your .xsession file you can not exec console kit.
You want:
exec xfce4 (or whatever command starts xfce)
not
exec ck-launch-session xfce4
Offline
To supplement...
exec ck-launch-session gnome-session
will remove ability to shutdown from gnome
exec gnome-session
is what I need becasue xdm handles console kit. (so many threads about this recently with Slim, but xdm was way ahead of Slim in this regard :-)
Offline
@bnb-
I have tried both of these, each with the same result:
~/.xinit
#!/bin/sh
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
exec startxfce4or
#!/bin/sh
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
exec ck-launch-session startxfce4EDIT: wait, you said ~/.xsession
I have no such file. Should that be the sole line?
Last edited by graysky (2012-05-29 00:04:51)
Offline
@jasonwryan - do you have shutdown/restart available when starting in this fashion? I do not.
Yes. But I don't use consolekit: I am happy with an entry in sudoers...
Offline
.xsession is run from xdm, not .xinit
I have no .xinit...
My .xsession is:
#!/bin/sh
exec gnome-session
I have no ~/.Xresources I am also not sure how a ~/.Xresources can be of any benefit
Offline
@graysky,
Were you able to get this working with xdm?
Offline
Yes, thanks for posting the detailed instructions. I have only to solve this and I think the xdm solution will work out. I do still love lxdm though and would love to do this type of setup with it...
Offline
Great and you're welcome. Feel free to wiki that if you want. (I'm a reader not so much a writer.)
From what I have read, it is (or was) possible to do this same thing with gdm. Look up multiseat. That is a good reference for this type of thing. Maybe the login manager that K12 linux uses could work for you. (I really like the LTSP idea...)
PS, how are you starting xdm now if you uses systemd and not inittab? Are you just foregoing systemd for test purposes?
Offline
Does the following work for you with gdm? For sure it is old and it is not lxdm, but you already have many gnome deps and I think gdm is systemd ready...
http://www.justlinux.com/nhf/X_Window/C … ation.html
Also googling for:
"1=/usr/bin/X11/X" will get you other pages with the like.
Offline
@bnb - OK! It's working now with systemd. One question for you: what dictates on which tty gdm will spawn? Configured as you suggested, :0 is on tty2 and :1 is on tty3. The other ttys, 1, 4, 5, and 6 are free for text based logins.
Offline
You mean gdm is working with systemd, not that xdm is working with systemd... correct?
Honestly I would have expected that
0=/usr/bin/X11/X vt7
1=/usr/bin/X11/X vt8
would have put gdm on tty 7 and tty8
What is on tty7 and tty8?
Edit, upon further review (I don't use gdm), I should be asking the questions :-)
How did you do it? I don't see any of the options on gdm that are listed on the page I linked to.
I guess you are running the old gdm from aur?
Last edited by bnb2235 (2012-05-30 21:23:02)
Offline
Nope, xdm
. I actually do not like gdm; too many deps.
Offline
OK then... Post #21 shows gdm instead of xdm, hence the confusion. To answer your question, I don't know. Maybe it is the difference between inittab and systemd starting xdm. For me xdm is on both tty7 and tty8
The greeting I suggested to change in the Xresources files... Just curious, did you do that?
I change:
xlogin*greeting: Welcome to CLIENTHOST
to
Xlogin*greeting:MyLastName
I guess this thread is nearly solved. Not the login manager you wanted, but a decent solution in my opinion. In fact I am surprised no one else wants such a method.
Offline
Agreed. Might just have to update the xdm wiki with your instructions.
Offline