Ctrl+ALT+F2 to start separate X session

Using applications, configuring, problems
Post Reply
Message
Author
Dry Falls
Posts: 616
Joined: Tue 16 Dec 2014, 23:37
Location: Upper Columbia

Ctrl+ALT+F2 to start separate X session

#1 Post by Dry Falls »

Any version of lighthouse or older puppy: Should I assume I've put this together wrong or is there a special method to start a separate X session with Ctrl+ALT+F2 and then typing "xwin" or "startx" or "xinit" in the console? It gets me nowhere. Or is that not what changing TTY is for? I can manage cli there but no X. Thankyou,

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

Re: Ctrl+ALT+F2 to start separate X session

#2 Post by s243a »

Dry Falls wrote:Any version of lighthouse or older puppy: Should I assume I've put this together wrong or is there a special method to start a separate X session with Ctrl+ALT+F2 and then typing "xwin" or "startx" or "xinit" in the console? It gets me nowhere. Or is that not what changing TTY is for? I can manage cli there but no X. Thankyou,
It's a separate console. My guess is that to start a new Xorg session you'll need to specify a new display. However, you don't need a new console to do this if you use xephyr. Have a look at what rufwoof is doing:

http://murga-linux.com/puppy/viewtopic. ... 16#1025216

Some related posts about switching terminals/consoles:
https://www.ostechnix.com/how-to-switch ... -in-linux/
https://www.linuxquestions.org/question ... f2-156561/

Some threads about starting a new session of Xorg in a new conle:
https://unix.stackexchange.com/question ... -x-session

Misc. Xorg stuff that might be useful:
https://en.wikibooks.org/wiki/Guide_to_ ... g_Sessions

Here's an example command to start an Xserver in a new console:

Code: Select all

xinit session -- :1 -xf86config config.conf
https://askubuntu.com/questions/154973/ ... s-in-12-04

:1 is the new display. You have to modify puppies xwin scripts to use a new display other than :0.

Dry Falls
Posts: 616
Joined: Tue 16 Dec 2014, 23:37
Location: Upper Columbia

#3 Post by Dry Falls »

Thanks s243a. Those links answered the first part of my question: apparently, tty1-6 are for cli only. For running x from a console, looks like I'll have to wrapp my head a bit more around RufRuf's additions. So far it's a bit over my head, but will plod on nevertheless. I've gotten a xephyr window open a few times but that's about it. Further research is required.

df

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#4 Post by tallboy »

Hi Dry Falls.
I am ignorant enough to ask: Why do you want an extra X-session running?
True freedom is a live Puppy on a multisession CD/DVD.

Dry Falls
Posts: 616
Joined: Tue 16 Dec 2014, 23:37
Location: Upper Columbia

#5 Post by Dry Falls »

Hi tallboy
Actually, I don't want to run a separate x-session. Logout-log in as a different user works for me if that's what I wanted. Also, there's qemu. It's a matter of my own ignorance - trying to figure this stuff out is all.
df

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#6 Post by rufwoof »

Xephyr :1 &

run from a terminal (urxvt) ... you must put it into the background (&), will start a new X server

Once that's activated you can send commands to that by prefixing the command with DISPLAY=:1

So for instance DISPLAY=:1 galculator ... will open up a galculator in that Xephyr window. But more ideally you need a window manager running in that Xephyr (as otherwise the galculator program will be without a title bar, can't easily move it ...etc), so DISPLAY=:1 jwm & ... will do the trick as that adds a window manager and the jwm tray into that Xephyr window.

Instead of prefixing each command with a DISPLAY=:1 you can run
DISPLAY=:1 export DISPLAY ... so that all subsequent commands in that urxvt session will automatically have that already set.

Doesn't have to be :1 either. Any other non used display number is OK (your main session will already be using :0).

This all assumes you have xserver-xephyr installed from ppm (which obviously you already have). Xephyr can't be run by itself (from a ctrl-alt-Fn) ... it needs a main X session to already be running.

You can pass -fullscreen .. or -screen and a screen size to Xephyr
Xephyr -fullscreen :1 & .. for instance.

That's the basic fundamentals. What Barry (and my follow-ups) do is to take that Xephyr arrangement and add to it. Run a chroot within that Xephyr session, where capabilities/permissions are dropped, so that its even more separate/isolated from the main session (security). Basically we look to (re)mount the main Puppy sfs to a folder ... as the folder to chroot into. But that needs a write area as the sfs is read only, so instead we aufs mount the sfs with a cow (write area) to create a top level folder (that reflects the sfs and cow folders/mount points) and we chroot into that top folder.

I tend to call my folders sfs, changes and top. Where the main Puppy sfs is mounted to the sfs folder, the changes folder records all changes (.wh whiteout files etc.) and 'top' is the top layer where you see the 'merged' sfs and changes folder contents - and that 'top' folder is the one used to chroot into. The neat thing is that its very low overhead to set up, takes near zero space initially.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#7 Post by tallboy »

Dry Falls wrote:It's a matter of my own ignorance - trying to figure this stuff out is all.
Good to know there are two of us here! :lol:
True freedom is a live Puppy on a multisession CD/DVD.

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#8 Post by s243a »

If you try to do this without using Xephyr you might find the following input argument useful:
vtXX
XX specifies the Virtual Terminal device number which Xorg will use. Without this option, Xorg will pick the first available Virtual Terminal that it can locate. This option applies only to platforms that have virtual terminal support, such as Linux, BSD, OpenSolaris, SVR3, and SVR4.
https://linux.die.net/man/1/xorg

Post Reply