Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 26 May 2019, 05:30
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Ctrl+ALT+F2 to start separate X session
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
Dry Falls

Joined: 16 Dec 2014
Posts: 583
Location: Upper Columbia

PostPosted: Fri 19 Apr 2019, 09:15    Post subject:  Ctrl+ALT+F2 to start separate X session
Subject description: Can't make it work
 

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,
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 1772

PostPosted: Fri 19 Apr 2019, 12:56    Post subject: Re: Ctrl+ALT+F2 to start separate X session
Subject description: Can't make it work
 

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.php?p=1025216#1025216

Some related posts about switching terminals/consoles:
https://www.ostechnix.com/how-to-switch-between-ttys-without-using-function-keys-in-linux/
https://www.linuxquestions.org/questions/slackware-14/switching-to-console-with-ctrl-alt-f2-156561/

Some threads about starting a new session of Xorg in a new conle:
https://unix.stackexchange.com/questions/85383/how-to-start-a-second-x-session

Misc. Xorg stuff that might be useful:
https://en.wikibooks.org/wiki/Guide_to_X11/Starting_Sessions

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

xinit session -- :1 -xf86config config.conf

https://askubuntu.com/questions/154973/is-it-possible-to-start-an-additional-x-server-after-the-system-boots-in-12-04

:1 is the new display. You have to modify puppies xwin scripts to use a new display other than :0.
Back to top
View user's profile Send private message Visit poster's website 
Dry Falls

Joined: 16 Dec 2014
Posts: 583
Location: Upper Columbia

PostPosted: Sun 21 Apr 2019, 16:40    Post subject:  

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
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1341
Location: Oslo, Norway

PostPosted: Sun 21 Apr 2019, 19:23    Post subject:  

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.
Back to top
View user's profile Send private message 
Dry Falls

Joined: 16 Dec 2014
Posts: 583
Location: Upper Columbia

PostPosted: Mon 22 Apr 2019, 07:32    Post subject:  

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
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 3118

PostPosted: Mon 22 Apr 2019, 08:11    Post subject:  

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.

_________________
( ͡° ͜ʖ ͡°) :wq
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1341
Location: Oslo, Norway

PostPosted: Mon 22 Apr 2019, 11:28    Post subject:  

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! Laughing

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 1772

PostPosted: Sun 05 May 2019, 12:40    Post subject:  

If you try to do this without using Xephyr you might find the following input argument useful:

Quote:

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
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0466s ][ Queries: 11 (0.0177s) ][ GZIP on ]