You are not logged in.
Pages: 1
I have a laptop with multiple users.
Is it possible to have a different setup for each user, stored in their /home/ folder? So, when I log in, all I see is the terminal, but when another user, say a guest user, logs in, LXDE starts up.
Right now, I put this in my .xinitrc file (startlxde in guest, xmonad in my own), but is it possible to set start different programs for different users after login? I would prefer start x on my own from my own user, but my brother who frequently use my laptop don't want to type startx each time he logs in.
Last edited by Herover (2012-06-27 18:41:33)
Offline
Assuming you set up the right .xinitrc in each users ~/ this (from the wiki) will startx automatically for each user you decide to bless with the additions to their .bash_profile
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then startx fi
Edit: Here is the article.
Last edited by Psykorgasm (2012-06-27 18:00:35)
Offline
https://wiki.archlinux.org/index.php/Start_X_at_boot
The first section "bash_profile" is most likely what you are looking for.
Offline
Thank you, that was exactly what I needed
As a addition, I added exit to my script after startx, so it logs completely out.
But it seems like it only works from tty1?
Offline
That's the way the script is designed. If you want different functionality, then just alter it. Specifically this part:
[[ $(tty) = /dev/tty1 ]]
Offline
I hope it isn't a bad thing to make tty1 to tty*
Thank you both of you.
Offline
If you do that, you may as well just remove that part of the conditional all together, so it would look like
if [[ -z $DISPLAY ]]; then
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
^^ That's the best thing to do, assuming your brother wont want to login to a tty hassle free at some point to do something, which I'm guessing he wont
Also, don't forget to [SOLVED] if you're happy its's sorted!
Offline
Cool, just wanted to make sure I won't have problems logging in using ssh, but I guess the $DISPLAY part takes care of that. Thanks again
Offline
Pages: 1