<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="https://tanguy.ortolo.eu/blog/feed/rss/commentaires/" />
	<link>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor</link>
	<language>en</language>
	<description>a blog about Debian and self-hosting</description>
	<lastBuildDate>Mon, 02 Jun 2014 16:09:00 +0000</lastBuildDate>
	<generator>PluXml</generator>
	<item>
		<title>GNU/Linux graphic sessions: allowing computer suspend and disabling a monitor - Written by Tanguy @ monday 02 june 2014, 16:09</title> 
		<link>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401725340-1</link>
		<guid>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401725340-1</guid>
		<description>@noname : But that way, with a command instead of real configuration, is not as satisfying. Also, it is for a single user, and I prefer all my static configuration to be done globally, and it will not apply to a desktop manager but only to the user session.</description>
		<pubDate>Mon, 02 Jun 2014 16:09:00 +0000</pubDate>
		<dc:creator>Tanguy</dc:creator>
	</item>
	<item>
		<title>GNU/Linux graphic sessions: allowing computer suspend and disabling a monitor - Written by noname @ monday 02 june 2014, 15:56</title> 
		<link>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401724580-1</link>
		<guid>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401724580-1</guid>
		<description>You can turn off monitor with xrandr, I put in ~/.xsession

$ xrandr --output VGA1 --off

check your projector name with xrandr, mine is VGA1</description>
		<pubDate>Mon, 02 Jun 2014 15:56:00 +0000</pubDate>
		<dc:creator>noname</dc:creator>
	</item>
	<item>
		<title>GNU/Linux graphic sessions: allowing computer suspend and disabling a monitor - Written by ManuelPG @ thursday 29 may 2014, 23:44</title> 
		<link>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401407051-1</link>
		<guid>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401407051-1</guid>
		<description>Thanks for the info on consolekit! I recently ran into an issue with that, and couldn&amp;#039;t find out by myself that on can explicitly invoke ck-launch-session to solve it. I certainly agree that this kind of things are painfully underdocumented.</description>
		<pubDate>Thu, 29 May 2014 23:44:00 +0000</pubDate>
		<dc:creator>ManuelPG</dc:creator>
	</item>
	<item>
		<title>GNU/Linux graphic sessions: allowing computer suspend and disabling a monitor - Written by Tanguy @ wednesday 28 may 2014, 14:26</title> 
		<link>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401287201-1</link>
		<guid>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401287201-1</guid>
		<description>@hugo : Thanks! It would be more appropriate to allow it only to users members of the powerdev group though, so I would have to add this I guess:

polkit.addRule(function(action, subject) {
    if (action.id == &quot;org.freedesktop.upower.suspend&quot;
        &amp;&amp; subject.isInGroup(&quot;powerdev&quot;))
    return polkit.Result.YES;
});</description>
		<pubDate>Wed, 28 May 2014 14:26:00 +0000</pubDate>
		<dc:creator>Tanguy</dc:creator>
	</item>
	<item>
		<title>GNU/Linux graphic sessions: allowing computer suspend and disabling a monitor - Written by hugo @ wednesday 28 may 2014, 14:16</title> 
		<link>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401286568-1</link>
		<guid>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401286568-1</guid>
		<description>Create /etc/polkit-1/rules.d/suspend.rules with content

polkit.addRule(function(action, subject) {
    if (action.id == &amp;quot;org.freedesktop.upower.suspend&amp;quot;)
        return polkit.Result.YES;
});


Then every user can suspend the system with the dbus-call you mentioned. The polkit-manpage http://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html contains more information on how to write these rules (e.g. to restrict it to certain users or groups). If you don&amp;#039;t want a login manager like ConsoleKit or logind, that&amp;#039;s probably the best way to go.</description>
		<pubDate>Wed, 28 May 2014 14:16:00 +0000</pubDate>
		<dc:creator>hugo</dc:creator>
	</item>
	<item>
		<title>GNU/Linux graphic sessions: allowing computer suspend and disabling a monitor - Written by Tanguy @ wednesday 28 may 2014, 12:15</title> 
		<link>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401279325-1</link>
		<guid>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401279325-1</guid>
		<description>@hugo : Great, one piece of complex crap replaced by another one. systemd being persona non-grata on systems I manage, I guess I will turn to using sudo, which has the advantage of being understandable (although it has a really lousy man page).</description>
		<pubDate>Wed, 28 May 2014 12:15:00 +0000</pubDate>
		<dc:creator>Tanguy</dc:creator>
	</item>
	<item>
		<title>GNU/Linux graphic sessions: allowing computer suspend and disabling a monitor - Written by hugo @ wednesday 28 may 2014, 12:04</title> 
		<link>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401278643-1</link>
		<guid>https://tanguy.ortolo.eu/blog/article128/ck-allow-suspend-xorg-disable-monitor/#c1401278643-1</guid>
		<description>ConsoleKit is not longer maintained and many people consider it deprecated. It is (or will be) replaced by logind, at least on systems using systemd.</description>
		<pubDate>Wed, 28 May 2014 12:04:00 +0000</pubDate>
		<dc:creator>hugo</dc:creator>
	</item>
		<title>Tanguy Ortolo - GNU/Linux graphic sessions: allowing computer suspend and disabling a monitor - Comments</title> 
</channel>
</rss>