Re: can I issue commands to X session from a text vt?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Barry,

On 22/7/25 18:16, Barry Scott wrote:

On 22 Jul 2025, at 04:23, fedora@xxxxxxxxxxxxxx wrote:

f42 x86_64 with all updates, i915 built in video

I have a problem where when I disconnect a monitor (e.g. using a KVM) and reconnect, the screen remains blank.

I checked the situation and running 'xrandr --listmonitors' shows the monitor is initially disconnected and then connected.
So Xorg thinks all is well, but I get no video (maybe an intel x11-server issue?).

Does it work if you use Wayland desktop?

I never tried it and would not take the risk right now.

I can switch to text (e.g. tty2) which works fine (is visible), but when switching back to tty1 the screen is blank.

Running 'xrandr --output HDMI1 --mode 3840x2160_24.00' revives the video. However it should run from a graphics session
(an xterm window on :0 on tty1 in my case).

Can I, somehow, issue this command from a text VT? For example start 'xterm' on tty1 (from tty2)?

Try like this:

XAUTHORITY=/run/user/1000/xauth_icQwML DISPLAY=:0.0 xterm

I do not have any (my uid is 500)
	/run/user/500/xauth_*

'locate' knows of none either.

I found that I can issue
	xterm -display :0
to start xterm on tty1.

However, trying
	xterm -display :0 -e xrandr --output HDMI1 --mode 3840x2160
or
	xterm -display :0 -e xrandr --display :0 --output HDMI1 --mode 3840x2160
or even
	xterm -hold -display :0 -e xrandr --display :0 --output HDMI1 --mode 3840x2160
does not restore the video.

What does work is running (from tty2)
	xterm -display :0
then switching to tty1 (blank screen)
then typing (blind) the xrandr command. For ease I created ~/xx.sh to do the xrandr and it works.

So I am half way there...

It seems that unless I have tty1(Xorg) active the xrandr does not do it, but running the same command while on tty1 does work.

Regards,
	Eyal

You will need to figure out what the XAUTHORITY file path is each time Xorg is started.

Barry



TIA

--
Eyal at Home (fedora@xxxxxxxxxxxxxx)

--
Eyal at Home (fedora@xxxxxxxxxxxxxx)
--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux