<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=5559&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Is there a point to the default ~/.bash_logout file?]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=5559</link>
		<description><![CDATA[The most recent posts in Is there a point to the default ~/.bash_logout file?.]]></description>
		<lastBuildDate>Tue, 14 Feb 2023 19:09:20 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Is there a point to the default ~/.bash_logout file?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41102#p41102</link>
			<description><![CDATA[<p>So it seems the reason it exists in user dir is &quot;because someone asked for it and at that time nobody objected&quot;, and the reason it doesn&#039;t exist in root dir (or system-wide) is &quot;because when others asked for that, there was disagreement on which program should do it&quot;.</p><p>I would have expected &quot;login&quot; do it, but since &quot;man login&quot; relinquishes responsibility for session clean up to getty, it seems sensible that that&#039;s where clearing the screen should be done.</p><p>The bug resolution has a note that console_clear acts on scrollback buffer, which has since been removed from the kernel, so I wonder if that was the reason it was originally needed, and thus appears to be redundant.</p><p>There&#039;s a comment in the <a href="https://sources.debian.org/src/util-linux/2.38.1-4/term-utils/agetty.c/#L1237" rel="nofollow">relevant function for agetty</a> suggesting this might be the case:</p><div class="codebox"><pre><code>static void termio_clear(int fd)
{
	/*
	 * Do not write a full reset (ESC c) because this destroys
	 * the unicode mode again if the terminal was in unicode
	 * mode.  Also it clears the CONSOLE_MAGIC features which
	 * are required for some languages/console-fonts.
	 * Just put the cursor to the home position (ESC [ H),
	 * erase everything below the cursor (ESC [ J), and set the
	 * scrolling region to the full window (ESC [ r)
	 */
	write_all(fd, &quot;\033[r\033[H\033[J&quot;, 9);
}</code></pre></div><p>Reads like excuses for not fixing bugs. :/</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Tue, 14 Feb 2023 19:09:20 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41102#p41102</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is there a point to the default ~/.bash_logout file?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41097#p41097</link>
			<description><![CDATA[<p><a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%23331504" rel="nofollow">https://bugs.debian.org/cgi-bin/bugrepo … =%23331504</a></p><p>EDIT: <a href="https://manpages.debian.org/bullseye/util-linux/agetty.8.en.html" rel="nofollow">agetty(8)</a> clears the screen itself by default so presumably /etc/skel/.bash_logout was added when it didn&#039;t do that.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Tue, 14 Feb 2023 17:47:42 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41097#p41097</guid>
		</item>
		<item>
			<title><![CDATA[Is there a point to the default ~/.bash_logout file?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41095#p41095</link>
			<description><![CDATA[<p>When setting up Devuan, Bash created <span class="bbc">/home/user/.bash_logout</span> from <span class="bbc">/etc/skel/.bash_logout</span> which ultimately seems to come from <a href="https://bazaar.launchpad.net/~doko/+junk/pkg-bash-debian/view/head:/skel.bash_logout" rel="nofollow">//bazaar.launchpad.net/~doko/+junk/pkg-bash-debian/view/head:/skel.bash_logout</a>:</p><div class="codebox"><pre><code># ~/.bash_logout: executed by bash(1) when login shell exits.

# when leaving the console clear the screen to increase privacy

if [ &quot;$SHLVL&quot; = 1 ]; then
    [ -x /usr/bin/clear_console ] &amp;&amp; /usr/bin/clear_console -q
fi</code></pre></div><p>It only created this file for regular user (uid=1000), not the root user - I presume that&#039;s because root user existed before /etc/skel was populated, whilst regular user was added afterwards.</p><p>Seems to me that - if there&#039;s a privacy issue - it would apply to all users, so the logic belongs in a system-wide <span class="bbc">/etc/bash.bash.logout</span> (mentioned in man bash, but doesn&#039;t exist on my system.)</p><p>However, when logging out of a TTY the screen clears for both root and regular user, even after renaming .bash_logout to disable it.</p><p>Anyhow know if there is some situation where this file is relevant, or is it a relic of ancient times that no longer applies?</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Tue, 14 Feb 2023 16:34:19 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41095#p41095</guid>
		</item>
	</channel>
</rss>
