You are not logged in.
Hi all.
Supposing I use a marginal ortodox weird window manager (notion - ion3 fork) and a relatively weird keyboard layout. Furthermore, when I'm using my laptop, sometimes I don't launch X, so I start X manually most of the time. What I want is X autostarted in background with gdm and fancy stuff for login (and a qwerty-layout) to allow someone else to use my computer if necessary.
I also would like that when I loggin' in on tty4(or any other concrete virtula terminal) there would be another X server with my .xinitrc (not related to the one already started).
Okay, let's drop that stuff with different keyboard layouts, I figured out I can just dump my scheme in xmodmap and load it in .xinitrc, so that part of the problem is solved. I also can figure out how to start multiple X servers. What I really unable to do is determine what is my current tty (although that looks to be really simple). Is there any other ways aside from grepping who's pipe output?
I stumbled upon this concrete blog post (in russian) http://iportnov.blogspot.com/2007/01/su … ck_31.html that covers the idea of multiuser computer usage. There is a snippet of bash code, that doesn't work for me.
case "$(basename `tty`)@$HOST" in
tty4@portnov) runx
logout ;;
esac
Any ideas?
// also, shouldn't this post will be better placed in "try this" subforum?
Last edited by cra (2011-09-02 12:10:11)
Thou shalt not make a machine in the likeness of a human mind
Offline
// also, shouldn't this post will be better placed in "try this" subforum?
Not really, but it will probably fit better in "Applications & Desktop Environments ".
Moving there.
To know or not to know ...
... the questions remain forever.
Offline
I guess that simple
[[ $(basename `tty`) == "tty4" ]] && startx -- :104 && logout
at the very end of your ~/.bashrc should do the trick.
Edit: ...or better at the end of ~/.bash_profile to affect only login shells.
Last edited by laloch (2011-08-30 17:37:22)
Offline
Yup, thanks.
Little correction:
[[ $(basename `tty`) == "4" ]] && setsid start x -- :1; exit
Thou shalt not make a machine in the likeness of a human mind
Offline
Little correction:
[[ $(basename `tty`) == "4" ]] && setsid start x -- :1; exit
For me tty returns "/dev/tty4", so the $(basename `tty`) = "tty4" is correct.
Offline