You are not logged in.

#1 2019-08-19 00:26:45

insidetrip101
Member
Registered: 2019-08-18
Posts: 7

[SOLVED] Xinit starting window manager in a non logged in tty.

Right after installation, my audio was working perfectly fine with pulseaudio. It randomly broke a day or two later. I fiddled around with it, uninstalled pulse, alsa-utils, and pavucontrol, reinstalled them, and then the sound started to work (albeit, not understanding the problem).

Today it broke again. I decided I would read up and figure out why. So I'm getting the dummy output as noted in the PulseAudio/Troubleshoot wiki here. From there I followed the link to see if its a logind problem, and it seems that it is as when I run

$ loginctl show-session $XDG_SESSION_ID

I do get remote=no, but I get active=no as well. So I've found out that when I run xinit at tty1 it then opens up my window manager at tty2, but I can't for the life of me figure out why that's happening, because I'm almost positive that it wasn't working this way when it was working. What's worse, is that the general troubleshooting page here shows how to identify the issue, but not how to fix it (unless I'm extremely retarded and I'm missing something obvious there). How do I run xinit such that it will only up my window manager on the tty that I run xinit on?

In any case, I think the solution to my problem could also be added to the wiki (assuming that the solution isn't there and I've not missed it for whatever reason).

Thanks for anyone who has more experience.

Last edited by insidetrip101 (2019-08-19 00:56:10)

Offline

#2 2019-08-19 00:46:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 27,910
Website

Re: [SOLVED] Xinit starting window manager in a non logged in tty.

Please edit your thread title to actually reflect the core issue: https://wiki.archlinux.org/index.php/Co … ow_to_post

How are you currently autostarting X?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-08-19 00:51:59

insidetrip101
Member
Registered: 2019-08-18
Posts: 7

Re: [SOLVED] Xinit starting window manager in a non logged in tty.

Please let me know if this is a better title.

So I was starting with simply

$ xinit

But, I just randomly decided to try

$ startx

(I've had problems with startx on another installation of arch), and the issue seems to have gone away and X is starting on tty1 (with active=yes for the loginctl command).

Is this intended behavior? I know that I was using xinit earlier today and wasn't having this issue before the audio broke. I haven't seen anything like this in the documentation.

Offline

#4 2019-08-19 00:53:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 27,910
Website

Re: [SOLVED] Xinit starting window manager in a non logged in tty.

startx is the recommended approach https://wiki.archlinux.org/index.php/Xi … X_at_login


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2019-08-19 00:55:33

insidetrip101
Member
Registered: 2019-08-18
Posts: 7

Re: [SOLVED] Xinit starting window manager in a non logged in tty.

Well screw me. Sorry about the post. Guess I was just doing the wrong thing. Thanks for the help. Feel free to delete this or whatever.

Offline

#6 2019-08-19 01:04:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,038
Website

Re: [SOLVED] Xinit starting window manager in a non logged in tty.

xinit will work fine, but you need to pass the vt number to the xserver:

xinit -- vt1 # in tty1 ... or
xinit -- vt$XDG_VTNR

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2019-08-19 01:15:44

insidetrip101
Member
Registered: 2019-08-18
Posts: 7

Re: [SOLVED] Xinit starting window manager in a non logged in tty.

Trilby wrote:

xinit will work fine, but you need to pass the vt number to the xserver:

xinit -- vt1 # in tty1 ... or
xinit -- vt$XDG_VTNR

Any idea why it was working without these arguments before? What's so vexing about this is that it seemed to spontaneously work and not work . . .

One of the major benefits of using Arch is that it forces you to understand what you're using/doing. I kinda feel like I'm not getting this here even after reading the wiki (linked above), XINIT(1), and STARTX(1).

Offline

#8 2019-08-19 01:20:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,038
Website

Re: [SOLVED] Xinit starting window manager in a non logged in tty.

I've never been able to make sense of startx and xinit - reading their code is a good cure for sanity - so I've not used either one for quite a while.

Once upon a time, it was common for X to be started from a low number tty (e.g., tty1) but run on an unitialized tty (e.g., tty7).  That changed when systemd came along, and change again when the Xorg process no longer needed to be run as root.

The requirements for X to run properly haven't actually changed much - but all the other moving pieces are changing.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2019-08-19 01:35:09

insidetrip101
Member
Registered: 2019-08-18
Posts: 7

Re: [SOLVED] Xinit starting window manager in a non logged in tty.

I suppose that at least I'm in good company. Thanks.

Offline

Board footer

Powered by FluxBB