Re: How to start dead plasmashell on a set tty

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

 



On Tuesday, 2021-05-25 15:23:59 CEST, Robin Laing wrote
> I am logged in on tty2 and can get a shell on tty3.  No need to kill
> plasmashell since it is already dead though.
>
> Didn't work from a different tty.  No way to open a terminal in the
> present session.

All you need is to set up the environment in your shell on tty3 to reflect how
it's set up in the affected Plasma session. Just pick a random process from
from the affected session and inspect its /proc/PID/environ:

tr '\0' '\n' < /proc/PID/environ | less

Then just "export" all the relevant variables in your tty3 shell. With some
luck, just DISPLAY and DBUS_SESSION_BUS_ADDRESS will do, if not, you'll have
to add some of the XDG_ or KDE_ ones as well.

Then just run "plasmashell" and that should be it.

If all you need is to log off the running session cleanly, you don't even have
to bother spawning Plasma again. Instead, just ask the session manager to log
off (which is exactly what the button in the Plasma menu would have done for
you):

qdbus-qt5 org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 2 0

The three integers are arguments to KWorkSpace::requestShutDown(). The first
one "0" means "Don't ask for confirmation", the second "2" means "Force
shutdown immediately" (doesn't really matter here) and the last "0" means
"only log out". A value of "1" for the last parameter would have meant "reboot
machine", "2" means power off.

2T

_______________________________________________
kde mailing list -- kde@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kde-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/kde@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [KDE Users]     [Fedora General Discussion]     [Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Triage]     [Coolkey]     [Yum Users]     [Yosemite Forum]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

  Powered by Linux