ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Igor Chudov <nir@altlinux.org>
To: devel@lists.altlinux.org
Subject: [devel] Решение проблемы с блокировкой запуска приложений X Window при смене hostname
Date: Fri, 23 Aug 2019 09:38:47 -0000
Message-ID: <8602831566553124@iva7-eef8fd3c993e.qloud-c.yandex.net> (raw)

Добрый день.

Насколько мне известно, стандартные политики безопасности в ALT Linux предполагают использование .XAuthority и авторизацию приложений по hostname. При смене hostname, например, с помощью hostnamectl, возникает проблема с тем, что запуск новых графических приложений не может быть осуществлён (так как в MIT-печеньках, лежащих в файле .XAuthority у пользователя, не совпадает hostname).

Я рассмотрел (и попробовал обкатать) два варианта решения проблемы, один из которых мне предложили в списке рассылки systemd-devel@lists.freedesktop.org:

1) Добавить в скрипт запуска DE после авторизации в DM команду типа:

xhost si:localuser:$USER

что позволит Xorg принимать все подключения на основе UID владельца процесса.

2) Навесить на systemd-hostnamed.service пару костылей, один из которых (перед запуском systemd-hostnamed) будет сохранять оригинальный hostname, а другой (стартующий после systemd-hostnamed) будет проверять - изменилось ли имя машины и при необходимости патчить печенюхи с помощью утилиты xauth, заменяя старый hostname на новый.

Я не очень хорошо представляю отличия в механизмах работы различных DE и DM у нас, потому предлагаю выбрать вариант решения проблемы, который создаст меньше всего проблем. Лично я предпочитаю первый вариант, так как он прост и не зависит от наличия или отсутствия systemd-hostnamed.

-- 
С наилучшими пожеланиями, Чудов Игорь.



             reply	other threads:[~2019-08-23  9:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23  9:38 Igor Chudov [this message]
2019-10-08 14:36 ` Michael Shigorin
2019-10-08 17:27 ` Dmitry V. Levin
2019-10-11 21:30   ` Evgeny Sinelnikov
2019-10-11 22:21     ` Dmitry V. Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8602831566553124@iva7-eef8fd3c993e.qloud-c.yandex.net \
    --to=nir@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git