<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Запуск скрипта по событию в incron]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=32609&amp;type=atom" />
	<updated>2013-12-16T14:39:00Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=32609</id>
		<entry>
			<title type="html"><![CDATA[Re: Запуск скрипта по событию в incron]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=382452#p382452" />
			<content type="html"><![CDATA[<p>Решил проблему допиливанием скрипта, может быть кому понадобится:<br /></p><div class="codebox"><pre><code>#!/bin/sh
export &quot;DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$(ps -au admin | grep -i &quot;startkde&quot; | awk &#039;{ print $1 }&#039;)/environ | sed -e &#039;s/DBUS_SESSION_BUS_ADDRESS=//&#039;)&quot;
export DISPLAY=:0.0
notify-send &#039;Update&#039; &#039;New Update&#039;</code></pre></div><p>P.S: Для Gnome, startkde заменяем на gnome-session.</p>]]></content>
			<author>
				<name><![CDATA[researcher]]></name>
				<uri>https://linuxforum.ru/profile.php?id=32843</uri>
			</author>
			<updated>2013-12-16T14:39:00Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=382452#p382452</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Запуск скрипта по событию в incron]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=382420#p382420" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>-=Serj=- пишет:</cite><blockquote><p><strong>researcher</strong>, попробуйте изменить <em>upd.sh</em> так:<br /></p><div class="codebox"><pre><code>#!/bin/sh
export DISPLAY=:0.0
notify-send &#039;update&#039; &#039;new update&#039;</code></pre></div></blockquote></div><p>К сожалению, не помогло. Пробовал напрямую в incrontab указывать содержимое скрипта, без результата.</p>]]></content>
			<author>
				<name><![CDATA[researcher]]></name>
				<uri>https://linuxforum.ru/profile.php?id=32843</uri>
			</author>
			<updated>2013-12-16T08:14:23Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=382420#p382420</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Запуск скрипта по событию в incron]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=382416#p382416" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>-=Serj=- пишет:</cite><blockquote><p><strong>researcher</strong>, в качестве разделителя в правиле incron везде 1 пробел?</p></blockquote></div><p>Конечно.</p>]]></content>
			<author>
				<name><![CDATA[researcher]]></name>
				<uri>https://linuxforum.ru/profile.php?id=32843</uri>
			</author>
			<updated>2013-12-16T08:09:37Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=382416#p382416</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Запуск скрипта по событию в incron]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=381929#p381929" />
			<content type="html"><![CDATA[<p><strong>researcher</strong>, попробуйте изменить <em>upd.sh</em> так:<br /></p><div class="codebox"><pre><code>#!/bin/sh
export DISPLAY=:0.0
notify-send &#039;update&#039; &#039;new update&#039;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[-=Serj=-]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16175</uri>
			</author>
			<updated>2013-12-13T16:56:54Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=381929#p381929</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Запуск скрипта по событию в incron]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=381926#p381926" />
			<content type="html"><![CDATA[<p><strong>researcher</strong>, в качестве разделителя в правиле incron везде 1 пробел?</p>]]></content>
			<author>
				<name><![CDATA[-=Serj=-]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16175</uri>
			</author>
			<updated>2013-12-13T16:35:34Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=381926#p381926</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Запуск скрипта по событию в incron]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=381921#p381921" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>-=Serj=- пишет:</cite><blockquote><div class="quotebox"><cite>researcher пишет:</cite><blockquote><p>Содержимое upd.sh:<br />notify-send &#039;update&#039; &#039;new update&#039;</p></blockquote></div><div class="codebox"><pre><code>#!/bin/bash</code></pre></div><p>в начале присутствует?</p></blockquote></div><p>Было </p><div class="codebox"><pre><code>#!/bin/sh</code></pre></div><p>Но тем не менее, это ничего не меняет.</p>]]></content>
			<author>
				<name><![CDATA[researcher]]></name>
				<uri>https://linuxforum.ru/profile.php?id=32843</uri>
			</author>
			<updated>2013-12-13T16:23:48Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=381921#p381921</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Запуск скрипта по событию в incron]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=381916#p381916" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>researcher пишет:</cite><blockquote><p>Содержимое upd.sh:<br />notify-send &#039;update&#039; &#039;new update&#039;</p></blockquote></div><div class="codebox"><pre><code>#!/bin/bash</code></pre></div><p>в начале присутствует?</p>]]></content>
			<author>
				<name><![CDATA[-=Serj=-]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16175</uri>
			</author>
			<updated>2013-12-13T15:54:48Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=381916#p381916</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Запуск скрипта по событию в incron]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=381903#p381903" />
			<content type="html"><![CDATA[<p>Здравствуйте. В общем надо выводить сообщение при изменении текстового файла, но дело в том что скрипт при запуске ничего не показывает, а если запускать его из терминала вручную - работает. <br />Конфиг incrontab:<br /></p><div class="codebox"><pre><code>/home/admin/Documents/1.txt IN_MODIFY,IN_NO_LOOP /home/admin/Documents/scripts/upd.sh</code></pre></div><p>Содержимое upd.sh:<br /></p><div class="codebox"><pre><code>notify-send &#039;update&#039; &#039;new update&#039;</code></pre></div><p>Пробовал и </p><div class="codebox"><pre><code>kdialog --msgbox &quot;update&quot;</code></pre></div><p>, аналогично.<br />Что я делаю не так?<br />Содержимое лога:<br /></p><div class="codebox"><pre><code>Dec 13 15:59:12 localhost incrond[8767]: (admin) CMD (/home/admin/Documents/scripts/upd.sh)</code></pre></div><p>P.S. Fedora 19 x86_64</p>]]></content>
			<author>
				<name><![CDATA[researcher]]></name>
				<uri>https://linuxforum.ru/profile.php?id=32843</uri>
			</author>
			<updated>2013-12-13T14:57:09Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=381903#p381903</id>
		</entry>
</feed>
