<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=2031&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / when X is killed, lightdm restarts it [SOLVED]]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=2031</link>
		<description><![CDATA[The most recent posts in when X is killed, lightdm restarts it [SOLVED].]]></description>
		<lastBuildDate>Wed, 02 May 2018 18:56:04 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8762#p8762</link>
			<description><![CDATA[<p>Yes, it works. Wow, that is much simpler. Thank you for that!</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Wed, 02 May 2018 18:56:04 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8762#p8762</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8758#p8758</link>
			<description><![CDATA[<p>It might not work well given that the <span class="bbc">C-A-Del</span> handler command processing is terminated together with <span class="bbc">lightdm</span>. You will almost certainly need to spawn a separate script for the actions, and perhaps that it also needs to escape the user <span class="bbc">cgroups</span>, as it might otherwise be killed together with <span class="bbc">lightdm</span> anyhow. Apart from that, it&#039;s easy <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Though, the return to X might then also need attention; or does X start happily on tty7 while it&#039;s in use by a running <span class="bbc">getty</span>?</p><p>I&#039;d rather suggest that utilizing runlevels (and <span class="bbc">init</span>) is the &quot;simple&quot; approach.</p><p>EDIT: or, it might be possible to shift to, say, <span class="bbc">tty1</span> instead, and then not start <span class="bbc">getty</span> for <span class="bbc">tty7</span> at all. The &quot;simpler&quot; line would then be:</p><div class="codebox"><pre><code>sudo chvt 1 ; sudo lightdm stop</code></pre></div><p>I.e., first shift to <span class="bbc">tty1</span>, then kill <span class="bbc">lightdm</span> (and the <span class="bbc">C-A-Del</span> handling). The return to X would be the command </p><div class="codebox"><pre><code>$ sudo lightdm start</code></pre></div><p>If that works, I would call it simpler <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Wed, 02 May 2018 13:19:31 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8758#p8758</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8757#p8757</link>
			<description><![CDATA[<p>ralph.ronnquist: The above works, but I was wondering if we could make it a lot simpler.</p><p>Maybe we could simply write a one-liner that does everything we need? I was thinking something like this, but it doesn&#039;t work:</p><p><span class="bbc">sudo service lightdm stop; sudo /sbin/getty 38400 tty7</span></p><p>No luck with this either:</p><p><span class="bbc">sudo chvt 1; sudo service lightdm stop; sudo /sbin/getty 38400 tty7; sudo chvt 7</span></p><p>Any ideas how to tweak the above so that it works?</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Wed, 02 May 2018 12:51:36 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8757#p8757</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8756#p8756</link>
			<description><![CDATA[<p>BEAUTIFUL, ralph.ronnquist! Yes, that does it.</p><p>So to summarize:<br />1. Do the steps in post #9<br />2. Add the line to <span class="bbc">/etc/inittab</span> as shown in post #10<br />3. Bind Control+Alt+Backspace to run the command <span class="bbc">sudo init 3</span> (e.g., via xbindkeys) <br />4. Disable* the system&#039;s Control+Alt+Backspace keybinding to kill X server (if your system has that binding)</p><p>Now the behavior is exactly what one would expect: Logging out causes LightDM to show a graphical login screen, while Control+Alt+Backspace kills X and lightdm, and the user gets a CLI login prompt in tty7. To return to a graphical session in tty7, user types <span class="bbc">sudo init 2</span> (if xinit package is installed, <span class="bbc">startx</span> also works).</p><p>* I don&#039;t know a CLI or DE-agnostic way to do this. In MATE: System &gt; Preferences &gt; Keyboard &gt; Layouts &gt; Options &gt; Key sequence to kill the X server &gt; uncheck the Control+Alt+Backspace box</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Wed, 02 May 2018 12:26:12 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8756#p8756</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8755#p8755</link>
			<description><![CDATA[<p>I suppose you&#039;ll then need to arrange for running <span class="bbc">/sbin/getty 38400 tty7</span> in runlevel 3. For example, you add a line for this to <span class="bbc">/etc/inittab</span>, to let <span class="bbc">init</span> manage it:. E.g., the following as a line after the <span class="bbc">tty6</span> line might do the job:</p><div class="codebox"><pre><code>7:3:respawn:/sbin/getty 38400 tty7</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Wed, 02 May 2018 12:05:25 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8755#p8755</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8753#p8753</link>
			<description><![CDATA[<p>fsmithred, here is a variation on your idea that is getting me closer to what I want:</p><p>In <span class="bbc">/etc/init.d/lightdm</span>, change this</p><div class="codebox"><pre><code># Default-Start:     2 3 4 5
# Default-Stop:      0 1 6</code></pre></div><p>To this</p><div class="codebox"><pre><code># Default-Start:     2 4 5
# Default-Stop:      0 1 3 6</code></pre></div><p>Then run these commands:</p><div class="codebox"><pre><code>sudo update-rc.d lightdm remove
sudo update-rc.d lightdm defaults</code></pre></div><p>Now switching from runlevel 2 to 3 with <span class="bbc">sudo init 3</span> does stop lightdm and X. The only problem with this is that, as in my approach in #7, lightdm quits to a black screen with blinking cursor and not to a prompt.</p><p>Isn&#039;t there any way for tty7 to be usable after lightdm stops?</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Wed, 02 May 2018 11:44:25 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8753#p8753</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8751#p8751</link>
			<description><![CDATA[<p>fsmithred, the runlevel approach is pretty clever.</p><p>Normally when I want to remove a symlink for a runlevel, I just go with the absolute easiest way and prepend the link&#039;s name with an underscore.</p><p>Here&#039;s what I tried:</p><div class="quotebox"><blockquote><div><p>$ sudo mv /etc/rc3.d/{,_}S04lightdm<br />$ sudo init 3</p></div></blockquote></div><p>But the above is not working: Switching runlevels has no discernible effect--I still find myself in my MATE session with both X and lightdm still running. I can confirm that the change in runlevel did occur:</p><div class="quotebox"><blockquote><div><p>bruno@thinkpad:~$ runlevel<br />2 3</p></div></blockquote></div><p>Any ideas?</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Wed, 02 May 2018 11:33:13 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8751#p8751</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8750#p8750</link>
			<description><![CDATA[<p>Making progress: If I bind Control+Alt+Delete to this command, it does more or less what I want: <span class="bbc">sudo chvt 1; sudo service lightdm stop</span></p><p>The problem with this is that when lightdm stops, it leaves behind nothing but a black screen with a blinking cursor in tty7, thus rendering tty7 unusable. Doesn&#039;t lightdm know how to stop gracefully (e.g., to a command prompt or CLI login prompt)?</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Wed, 02 May 2018 11:19:15 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8750#p8750</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8749#p8749</link>
			<description><![CDATA[<div class="codebox"><pre><code>/etc/init.d/lightdm start|stop|restart</code></pre></div><p>or</p><div class="codebox"><pre><code>service lightdm start|stop|restart</code></pre></div><p>An alternate solution would be to remove the lightdm symlinks for one runlevel. Easy way: install sysv-rc-conf, run it and remove the check mark from lightdm for runlevel 3. (arrows, space bar and q to quit). Then in a root terminal, just run</p><div class="codebox"><pre><code>init 3</code></pre></div><p> to get to multi-user without graphical environment.&#160; </p><p>To restart lightdm: </p><div class="codebox"><pre><code>init 2</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Wed, 02 May 2018 11:18:03 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8749#p8749</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8746#p8746</link>
			<description><![CDATA[<p>Back in my Arch Linux days, I was able to get lightdm to behave itself by creating <span class="bbc">/etc/systemd/system/lightdm.service.d/norestart.conf</span> with this in it:</p><div class="codebox"><pre><code>[Service]
Restart=no</code></pre></div><p>What would be the Devuan/SysVinit equivalent?</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Wed, 02 May 2018 10:38:28 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8746#p8746</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8745#p8745</link>
			<description><![CDATA[<p>Thank you, Geoff42. Those shortcuts are exactly what I use when I want a console.</p><p>I appreciate lightdm presenting a new graphical login screen when I <strong>log off</strong>. IMHO <em>that</em> is expected behavior.</p><p>When I kill X what I would like is, well, for X to be killed in tty7, stay dead (e.g., so that I can install/uninstall X-related packages), and for the system to present me with a non-GUI login or command prompt in tty7.</p><p>Lightdm&#039;s current (default) behavior &quot;resurrects&quot; X as soon as I kill it, which is annoying.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Wed, 02 May 2018 10:26:34 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8745#p8745</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8742#p8742</link>
			<description><![CDATA[<p>Er... that is what lightdm is for. When you have closed down a session, it lets you log in again ;-)</p><p>If you want a console &lt;CTRL&gt;&lt;ALT&gt;&lt;F1&gt; will connect you through to tty1: and you can log in. If/when you want to get back to X you can type &lt;CTRL&gt;&lt;ALT&gt;&lt;F7&gt; as X runs on tty7:</p><p>Is that what you want?</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Wed, 02 May 2018 09:03:33 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8742#p8742</guid>
		</item>
		<item>
			<title><![CDATA[Re: when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8721#p8721</link>
			<description><![CDATA[<p>Not much experience there but i fear it&#039;ll be tricky to archive that. I <em>guess</em> <span class="bbc">/etc/init.d/lightdm</span> contains some kind of loop that simply restarts X and lightdm when X is being killed. If thats the case the problem would be that script runs as root and has no idea what user was logged in at the moment X got killed so it wouldn&#039;t know how to spawn a matching shell.</p><p>If you have some way to figure out if a session started by startx was killed or if the user simply logged out i think you could hack something together with a script wrapping around /bin/login but i wouldn&#039;t know how to do that in a generic non DE dependant way.</p>]]></description>
			<author><![CDATA[dummy@example.com (devuser)]]></author>
			<pubDate>Tue, 01 May 2018 22:46:05 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8721#p8721</guid>
		</item>
		<item>
			<title><![CDATA[when X is killed, lightdm restarts it [SOLVED]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=8716#p8716</link>
			<description><![CDATA[<p>I use Ctrl+Alt+Backspace to kill my X session. Please, how do I prevent lightdm from immediately restarting X and showing a graphical login screen when the X session is killed? </p><p>When I kill the X session, it is because I want to work in a virtual console without X running.</p><p>I perused <span class="bbc">/etc/lightdm/lightdm.conf</span> and <span class="bbc">/etc/init.d/lightdm</span> but didn&#039;t find anything promising.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Tue, 01 May 2018 21:51:31 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=8716#p8716</guid>
		</item>
	</channel>
</rss>
