You are not logged in.

#1 2020-02-11 15:11:54

Spartan117
Member
Registered: 2020-02-11
Posts: 5

Possiblity of having Multiple tty's With Different DE's each

I was wondering if multiple tty's could be intsalled with different DE's each, as in tty1 with Gnome, tty2 with  KDE, tty3 with mate and so on. Sorry if this is a stupid question to ask.

Last edited by Spartan117 (2020-02-11 15:13:16)

Offline

#2 2020-02-11 17:44:00

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Possiblity of having Multiple tty's With Different DE's each

Yes. You don't need to "install" additional TTYs, they are generated on demand by systemd. Siomply swithching to one is sufficient.

Read `man startx` for specifics.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2020-02-11 18:05:38

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,393

Re: Possiblity of having Multiple tty's With Different DE's each

Expect graphical corruption when switching berween them if you use nvidia proprietary graphic driver.


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#4 2020-02-13 18:25:43

Spartan117
Member
Registered: 2020-02-11
Posts: 5

Re: Possiblity of having Multiple tty's With Different DE's each

jasonwryan wrote:

Yes. You don't need to "install" additional TTYs, they are generated on demand by systemd. Siomply swithching to one is sufficient.

Read `man startx` for specifics.

yea, I knew that about the tty's and I even read the "startx" man page as you said (didn't even know about 'startx' until you posted the reply tongue). So to test it out I created a new user and ran "startx mate-session" which crashed after attempting to connect to an already running X server, "exec mate-session" which  crashed and logged me out  & "mate-session" and a "connection refused" messages. I even tried to run startx on my main account which I logged in on tty2 as well which gave me a flickering screen on tty1 which was already running plasma and tty2 wich I tried to run plasma there as well. So is there any way to run multiple instances of an X server on different tty's that are logged on to different or same accounts?

Last edited by Spartan117 (2020-02-13 18:33:07)

Offline

#5 2020-02-13 18:30:22

Spartan117
Member
Registered: 2020-02-11
Posts: 5

Re: Possiblity of having Multiple tty's With Different DE's each

kokoko3k wrote:

Expect graphical corruption when switching berween them if you use nvidia proprietary graphic driver.

I'll keep that in mind smile

Last edited by Spartan117 (2020-02-13 18:34:18)

Offline

#6 2020-02-13 19:13:15

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Possiblity of having Multiple tty's With Different DE's each

As I have already said, yes.

I run a dwm session on TTY1, tmux on TTY2 and my wife has an openbox session on TTY4.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2020-02-13 19:52:46

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Possiblity of having Multiple tty's With Different DE's each

Spartan117 wrote:

So to test it out I created a new user and ran "startx mate-session"

You need to call the full path to the script, like this:

startx /usr/bin/mate-session

So ~/.bash_profile (if you're using bash as your login shell) would look something like this:

case $(tty) in
   /dev/tty1) exec startx /usr/local/bin/start-gnome;;
   /dev/tty2) exec startx /usr/local/bin/start-kde;;
   /dev/tty3) exec startx /usr/bin/mate-session;;
esac

/usr/local/bin/start-{gnome,kde} would be scripts containing the commands needed to start GNOME & Plasma, respectively.

Offline

#8 2020-02-17 14:23:38

Spartan117
Member
Registered: 2020-02-11
Posts: 5

Re: Possiblity of having Multiple tty's With Different DE's each

Head_on_a_Stick wrote:
Spartan117 wrote:

So to test it out I created a new user and ran "startx mate-session"

You need to call the full path to the script, like this:

startx /usr/bin/mate-session

So ~/.bash_profile (if you're using bash as your login shell) would look something like this:

case $(tty) in
   /dev/tty1) exec startx /usr/local/bin/start-gnome;;
   /dev/tty2) exec startx /usr/local/bin/start-kde;;
   /dev/tty3) exec startx /usr/bin/mate-session;;
esac

/usr/local/bin/start-{gnome,kde} would be scripts containing the commands needed to start GNOME & Plasma, respectively.

yep. it works all right, running kde plasma on tty1, mate on tty2 and dwm on tty3. Just that it eats away at my resources. Just kept all those DE's running for just about 5 mins scared that my machine would get stuck. So if I'm guessing it right, running "startx <path_to_DE_session_initiator>" initiates the DE to run on whatever tty1 one is on and "startx <DE_session_initiatior>" initiates the DE on tty1 which is the default tty right?

Last edited by Spartan117 (2020-02-17 14:32:18)

Offline

#9 2020-02-17 14:30:11

Spartan117
Member
Registered: 2020-02-11
Posts: 5

Re: Possiblity of having Multiple tty's With Different DE's each

jasonwryan wrote:

As I have already said, yes.

I run a dwm session on TTY1, tmux on TTY2 and my wife has an openbox session on TTY4.

ran "startx <path_to_DE_initiator>" and it works with plasma on tty1, mate on tty2 and dwm on tty3. Just let them run for about 5 minutes scared that my machine might get stuck as machine's not really strong. it's so weak that gnome doesnt run well. So yea, experiment success.

Offline

#10 2020-02-17 15:37:02

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Possiblity of having Multiple tty's With Different DE's each

Spartan117 wrote:

it works all right

Excellent. I didn't bother testing it big_smile

Spartan117 wrote:

So if I'm guessing it right, running "startx <path_to_DE_session_initiator>" initiates the DE to run on whatever tty1 one is on and "startx <DE_session_initiatior>" initiates the DE on tty1 which is the default tty right?

The graphical desktop is started from whichever TTY the startx command is run but it won't work properly unless you call the full path to the startup script.

Read the startx script to fully understand what is happening.

Offline

Board footer

Powered by FluxBB