Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
How to create a new X display?
How to create a new X display?
I'm pretty sure this is not the best place to have this conversation, but I can't find a specific forum for this kind of things, so if you know a place to make questions about X11 and xlib development, please let me know.
I'm trying to find a way to create a a new X display, all the solutions I found so far lead to nowhere, I'm able to start a independent GUI session but they all keep reusing the same X display:0
Yes, I'm changing TTY.
Yes, I'm using the correct -- :1 argument.
Yes, I tried creating a different user to login at the other TTY.
I tried all the solutions on my working computer running Cinnamon and on my Raspberry, so it's not a problem of environment or GUI flavor.
It would be GREAT to be able to star a virtual display session like some some VNC solutions do, but I also can't find out how they do it.
It would also be great to do it programmatically using Xlib, but as far as I can tell it only provide methods for interacting with an existing display.
Any help would be appreciated, even if just pointing me in the right direction, thanks o/
I'm trying to find a way to create a a new X display, all the solutions I found so far lead to nowhere, I'm able to start a independent GUI session but they all keep reusing the same X display:0
Yes, I'm changing TTY.
Yes, I'm using the correct -- :1 argument.
Yes, I tried creating a different user to login at the other TTY.
I tried all the solutions on my working computer running Cinnamon and on my Raspberry, so it's not a problem of environment or GUI flavor.
It would be GREAT to be able to star a virtual display session like some some VNC solutions do, but I also can't find out how they do it.
It would also be great to do it programmatically using Xlib, but as far as I can tell it only provide methods for interacting with an existing display.
Any help would be appreciated, even if just pointing me in the right direction, thanks o/
- fabien
- Forum Helper
- Posts: 676
- Joined: 2019-12-03 12:51
- Location: Anarres (Toulouse, France actually)
- Has thanked: 61 times
- Been thanked: 159 times
Re: How to create a new X display?
This is what I get:
And I can start any display number that I want:
man 7 X
Code: Select all
$> ps aux | grep "startx"
user1 25601 0.0 0.0 2420 1556 tty2 S+ 21:53 0:00 /bin/sh /usr/bin/startx -- :0
user2 25875 0.0 0.0 2420 1580 tty3 S+ 21:54 0:00 /bin/sh /usr/bin/startx -- :1
$> echo "$DISPLAY"
:1.0
Code: Select all
$> ps aux | grep "startx"
user2 36061 0.0 0.0 2420 1576 tty3 S+ 22:29 0:00 /bin/sh /usr/bin/startx -- :3
$> echo "$DISPLAY"
:3.0
And of course reusing the same display number triggers an error and X doesn't start. I believe I didn't understand the question?DISPLAY NAMES
From the user's perspective, every X server has a display name of the form:
hostname:displaynumber.screennumber
[...]
displaynumber
The phrase "display" is usually used to refer to a collection of monitors that share a common set of input devices (keyboard, mouse, tablet, etc.). Most workstations tend to only have one display. Larger, multi-user systems, however, frequently have several displays so that more than one person can be doing graphics work at once. To avoid confusion, each display on a machine is assigned a display number (beginning at 0) when the X server for that display is started.
Re: How to create a new X display?
Yes, I think you understood my problem exactly.
What are you doing exactly?
Just changing TTY and calling startx after login???
The problem I have with your answer is that I can't test that solution on my work computer since Cinnamon doesn't use the startx command (WHAT does it use anyway???) and, I must assume, Raspberry OS is doing something different since I did just that for two days and it didn't work (it just broke xauthority eventually).
I tried installing xinit on my work computer, it's similar to startx, but it just broke when I forced a different display.
What are you doing exactly?
Just changing TTY and calling startx after login???
The problem I have with your answer is that I can't test that solution on my work computer since Cinnamon doesn't use the startx command (WHAT does it use anyway???) and, I must assume, Raspberry OS is doing something different since I did just that for two days and it didn't work (it just broke xauthority eventually).
I tried installing xinit on my work computer, it's similar to startx, but it just broke when I forced a different display.
- fabien
- Forum Helper
- Posts: 676
- Joined: 2019-12-03 12:51
- Location: Anarres (Toulouse, France actually)
- Has thanked: 61 times
- Been thanked: 159 times
Re: How to create a new X display?
Yes
Cinnamon recommends cinnamon-core that depends on lightdm|gdm3|x-display-manager
x-display-manager can be provided by gdm3 lightdm lxdm nodm sddm slim wdm xdm (lightdm being cinnamon-core first choice)
startx command is from xinit package. xorg package depends on xinit. Maybe try installing xorg? If that doesn't work, I think some people here know xserver problems better than I do.
- oswaldkelso
- df -h | grep > 20TiB
- Posts: 1497
- Joined: 2005-07-26 23:20
- Location: UK
- Has thanked: 1 time
- Been thanked: 60 times
Re: How to create a new X display?
I hesitate to answer because I don't run Debian on the desktop but both Gnome and therefore Cinnamon are heavy on the debends and focus on Wayland and systemd. Are the required packages installed? xwayland springs to mind as a package they may not deem required. What happens when you try and install say TWM
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
My oldest used PC: 1999 imac 333Mhz 256MB PPC abandoned by Debian
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
My oldest used PC: 1999 imac 333Mhz 256MB PPC abandoned by Debian
- sunrat
- Administrator
- Posts: 6497
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 476 times
Re: How to create a new X display?
Moved to Offtopic as it concerns RaspberryOS, not Debian. Did you try RaspberryOS forum?
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: How to create a new X display?
It does in Debian
https://forums.raspberrypi.com/frazatto wrote:Any help would be appreciated, even if just pointing me in the right direction
deadbang
Re: How to create a new X display?
No man, I said I'm ALSO trying to make it work on the Raspberry and explained the results as a comparison, that is not an issue with the environment, I just don't understand the procedure since other people can easily reproduce it.
My computer runs Debian with Cinnamon, it would be nice to make it work on both since it's much easier to test graphical things on my computer than on a board hanging on my wall (yes, hanging on a string, next to the 3D printer ).
Re: How to create a new X display?
Ok, found a ArchLinux guide showing how to start Cinnamon from the terminal and it uses the command cinnamon-session, a quick look over --help and it accepts an argument to use a different display.
Code: Select all
cinnamon-session --display=:1
Ok.....maybe cinnamon can't create a new display by it's own?
Re: How to create a new X display?
Hummm....
https://unix.stackexchange.com/question ... g-cinnamon
Ok, makes sense, Cinnamon is not the display manager.
The comments suggests to install xinit and xterm.
Now with:
Everything blinks, it seams to be working (even my second monitor lights up ), but it fails saying "connection to X server lost".
No errors showing on the log.
What next?
I'm still annoyed that there is no startx command on my system.
https://unix.stackexchange.com/question ... g-cinnamon
Ok, makes sense, Cinnamon is not the display manager.
The comments suggests to install xinit and xterm.
Now with:
Code: Select all
xinit cinnamon-session -- :1
No errors showing on the log.
What next?
I'm still annoyed that there is no startx command on my system.
- sunrat
- Administrator
- Posts: 6497
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 476 times
Re: How to create a new X display?
OK, that was unclear from your post. I'll move it back to Desktop & Multimedia seeing as it is about Cinnamon. You still get the same people reading it no matter which subforum it is in.frazatto wrote: ↑2022-06-03 13:12No man, I said I'm ALSO trying to make it work on the Raspberry and explained the results as a comparison, that is not an issue with the environment, I just don't understand the procedure since other people can easily reproduce it.
My computer runs Debian with Cinnamon...
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
- fabien
- Forum Helper
- Posts: 676
- Joined: 2019-12-03 12:51
- Location: Anarres (Toulouse, France actually)
- Has thanked: 61 times
- Been thanked: 159 times
Re: How to create a new X display?
I don't use Cinnamon so I can't help on that part. But this
So if you have xinit you also have startx. Could you please paste the output of
Xserver is convoluted, so using startx is probably the best method unless you're motivated to delve into a mass of documentation.
As a test, you can run in a tty:
This should launch X (just a black screen). Close it by pressing Ctrl-Alt-Backspace.
You can even choose an arbitrary display:
is normally not possible. As I said above, startx command is provided by xinit package:
Code: Select all
$> apt-file show xinit
xinit: /etc/X11/xinit/xinitrc
xinit: /etc/X11/xinit/xserverrc
xinit: /usr/bin/startx
xinit: /usr/bin/xinit
xinit: /usr/share/doc/xinit/NEWS.Debian.gz
xinit: /usr/share/doc/xinit/changelog.Debian.gz
xinit: /usr/share/doc/xinit/changelog.gz
xinit: /usr/share/doc/xinit/copyright
xinit: /usr/share/man/man1/startx.1.gz
xinit: /usr/share/man/man1/xinit.1.gz
Code: Select all
apt policy xinit
As a test, you can run in a tty:
Code: Select all
X vt2 ### if you are in tty2 (type 'tty' to find out which tty you are in)
You can even choose an arbitrary display:
Code: Select all
X vt2 :5.0
Re: How to create a new X display?
Sure, but as I said, I had to install xinit myself.fabien wrote: ↑2022-06-03 22:48 So if you have xinit you also have startx. Could you please paste the output ofCode: Select all
apt policy xinit
Code: Select all
apt policy xinit
xinit:
Installed: 1.4.0-1
Candidate: 1.4.0-1
Version table:
*** 1.4.0-1 500
500 https://deb.debian.org/debian bullseye/main amd64 Packages
100 /var/lib/dpkg/status
Yes, that is the way I started testing since I couldn't find startx anywhere, it works as expected, everything black and both displays active. The recommendation than is to call cinnamon-session with the new display as parameter (from my normal session) and it almost works. Screen blinks but everything stays black and:fabien wrote: ↑2022-06-03 22:48 As a test, you can run in a tty:This should launch X (just a black screen). Close it by pressing Ctrl-Alt-Backspace.Code: Select all
X vt2 ### if you are in tty2 (type 'tty' to find out which tty you are in)
You can even choose an arbitrary display:Code: Select all
X vt2 :5.0
Code: Select all
$ cinnamon-session --display=:1
cinnamon-session[4354]: WARNING: t+0,00576s: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
I'm starting to think, there seams to be a strange problem with my installation, doesn't it?
How exactly is it working if none of the usual startup hooks are in place????
Re: How to create a new X display?
frazatto wrote:
As mentioned, startx is in the xinit package, so if xinit is installed, so is startx unless there's something very unexpected and odd:I had to install xinit myself.
....
There is no startx
Code: Select all
[tom@owl ~]$ apt-file show xinit
xinit: /etc/X11/xinit/xinitrc
xinit: /etc/X11/xinit/xserverrc
xinit: /usr/bin/startx
xinit: /usr/bin/xinit
xinit: /usr/share/doc/xinit/NEWS.Debian.gz
xinit: /usr/share/doc/xinit/changelog.Debian.gz
xinit: /usr/share/doc/xinit/changelog.gz
xinit: /usr/share/doc/xinit/copyright
xinit: /usr/share/man/man1/startx.1.gz
xinit: /usr/share/man/man1/xinit.1.gz
- fabien
- Forum Helper
- Posts: 676
- Joined: 2019-12-03 12:51
- Location: Anarres (Toulouse, France actually)
- Has thanked: 61 times
- Been thanked: 159 times
Re: How to create a new X display?
Quite possible.
Could you please paste the output of:
Code: Select all
#> dpkg --audit xinit
Code: Select all
#> dpkg --audit
Re: How to create a new X display?
lol this just keep getting worse and worse
Ok, the commands you asked me to run all returned nothing.
I used every mean I know to try and find startx and it's not there, like at all.....
So I went nuclear, installed LXDE (being the most light weight GUI) alongside Cinnamon and NOWWWW I have startx at /user/bin/
Used the same procedure as before, change TTY and:
Now it does start a new GUI session at a new X display (in this case :1), but now I have 3 different terminal emulators and it only shows in my second monitor.....which means only the Nvidia driver is active.......****.......
Anyway, I have no idea why Cinnamon don't play along with startx in my system since everybody else uses it with no issue, but it's kind of working now, thank you fabien o/
Ok, the commands you asked me to run all returned nothing.
I used every mean I know to try and find startx and it's not there, like at all.....
So I went nuclear, installed LXDE (being the most light weight GUI) alongside Cinnamon and NOWWWW I have startx at /user/bin/
Used the same procedure as before, change TTY and:
Code: Select all
startx startlxde -- :1
Anyway, I have no idea why Cinnamon don't play along with startx in my system since everybody else uses it with no issue, but it's kind of working now, thank you fabien o/
- fabien
- Forum Helper
- Posts: 676
- Joined: 2019-12-03 12:51
- Location: Anarres (Toulouse, France actually)
- Has thanked: 61 times
- Been thanked: 159 times
Re: How to create a new X display?
It's a shame I made a mistake, the command I meant was
Code: Select all
dpkg --verify xinit
Code: Select all
#> dpkg --verify
That's utterly weird
This is also weird, xinit is not a recursive dependency of lxde.
Re: How to create a new X display?
What can I say? It wasn't there before, it's there now and it "works" with the procedure I try before for three days with no results.
May I abuse of your hospitality a little longer?
I saw some examples of running programs on a different TTY just with X (like you asked me to try).
I'm trying to run a OpenGL window in a way that is independent from the default display :0.0, most posts say to use DISPLAY=:1 [program call] from my default session, it seams to work, it shows the new process ID and all, but the other TTY is still just black.
This would be an acceptable, and may be cleaner, solution.
But don't worry, you already helped me a lot and I could just create new thread.
- fabien
- Forum Helper
- Posts: 676
- Joined: 2019-12-03 12:51
- Location: Anarres (Toulouse, France actually)
- Has thanked: 61 times
- Been thanked: 159 times
Re: How to create a new X display?
I've made some tests and this is what I get.
In user1 terminal:
on tty2:
I personally would stick to startx as it handles security issues.
HTH, good luck
In user1 terminal:
Code: Select all
user1 $> echo "$DISPLAY"
:0.0
user1 $> su - user2
user2 $> export DISPLAY=':1.0'
user2 $> echo "$DISPLAY"
:1.0
### tests being made each time (X, twm, openbox, lxde)
user2 $> xterm
user2 $> glxgears
user2 $> xterm -e glxgears
Code: Select all
user2 $> X vt2 :1.0 ### xterm and glxgears processes are present but don't show up
Code: Select all
user2 $> cat ~/.xsessionrc
export STARTUP=/usr/bin/twm
user2 $> startx ### xterm shows up, glxgears don't. xterm from 'xterm -e glxgears' shows glxgears frame rate.
Code: Select all
user2 $> cat ~/.xsessionrc
export STARTUP=/usr/bin/openbox-session
user2 $> startx ### xterm and glxgears show up
Code: Select all
user2 $> cat ~/.xsessionrc
export STARTUP=/usr/bin/startlxde
user2 $> startx ### xterm and glxgears show up
HTH, good luck