ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: InboxISi <mailbox030403@mail.ru>
To: "'community@altlinux.ru'" <community@altlinux.ru>
Subject: RE: [Comm] logout script
Date: Wed, 5 Jan 2005 10:41:52 +0300
Message-ID: <11AE4752FB039B458208EAB56626A75F28E80C@ruexch02.rus.wtbts.net> (raw)

> > А существует ли универсальная возможность запуска, скажем, скрипта,
> > при выходе из системы каким бы образом туда пользователь ни вошел,
> > kdm, gdm, login, ssh все что угодно. Как только вышел из системы
> > сразу сработал скрипт, так можно сделать?
> 
> А если в ~/.bashrc записать строку типа
> alias poweroff="ваш_скрипт ; sudo poweroff"
> 
> Правда это будет работать только (наверное) для командной строки, и не
> знаю, будет ли работать с ssh.

>И еще мысль в догонку :-)
>Подвести ваш скрипт под service и закинуть в init 6 на первое место.
>Тогда точно при выключении компа будет выполняться независимо от
>пользователя.

Спасибо! Шикарная мысль.
Проблема правда вот в чем, компьютер сетевой, общего пользования. Человек
пришел, поработал, сделал логоут и ушел, компьютер включен.
А надо бы после пользователя, что-то почистить автоматом, что-то удалить,
привести систему в исходное состояние для других пользователей.
В принципе KDEешные Autostart и Shutdown покроют 95 процентов всех ситуаций,
когда пользователь работет в системе.
А .bashrc еще 4.5, так что думаю на этом можно и остановиться пока.
Спасибо.

             reply	other threads:[~2005-01-05  7:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-05  7:41 InboxISi [this message]
2005-01-05 10:39 ` Re[2]: " php-coder

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=11AE4752FB039B458208EAB56626A75F28E80C@ruexch02.rus.wtbts.net \
    --to=mailbox030403@mail.ru \
    --cc=community@altlinux.ru \
    /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 Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

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


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