<?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=2412&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [Solved] Huge .xsession-errors file]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=2412</link>
		<description><![CDATA[The most recent posts in [Solved] Huge .xsession-errors file.]]></description>
		<lastBuildDate>Mon, 15 Oct 2018 16:49:29 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [Solved] Huge .xsession-errors file]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12265#p12265</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Ogis1975 wrote:</cite><blockquote><div><p>The simpler solution<a href="http://www.daniloaz.com/en/how-to-prevent-the-xsession-errors-file-from-growing-to-huge-size/" rel="nofollow">http://www.daniloaz.com/en/how-to-preve … huge-size/</a></p></div></blockquote></div><p>Hmm ...<br />Please check the thread, specifically my second post:</p><div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>WRT the .xsession-errors file, I found a solution to keep it in check here:</p><p><a href="http://www.daniloaz.com/en/how-to-preve" rel="nofollow">http://www.daniloaz.com/en/how-to-preve</a> … huge-size/</p><p>It sets up a line in crontab to check every 15 minutes if the file size is greater than 5 GB and if so either empty it or keep the last 10,000 lines.<br />I set it for every 30 minutes and 1000 lines.</p></div></blockquote></div><p>chris2be8&#039;s suggestion to <span class="bbc">chmod 755 /var/log/lost+found</span> could not be easier to implement as it <span class="bbu">stops</span> the error messages generated by conky by allowing it to access the file.<br />These error messages were the sole cause of the huge <span class="bbc">.xsession.errors</span> bloat, so it seems to me that it is the simplest solution. (as always, YMMV)</p><p>The crontab solution you suggest controls the size of the <span class="bbc">.xsession.errors</span> file but generates <span class="bbu">another</span> set of logfile entries (three lines in <span class="bbc">auth.log</span> instead of the single line in <span class="bbc">.xsession.errors</span> we had before) every time conky tries to read the file (every 2 sec.), so it actually <span class="bbu">makes things worse</span>.</p><p>The alternative to stop logging <span class="bbc">sudo</span> access to auth.log (would not know how to do it) does not seem healthy.</p><p>In any case, I set it up because it is a good idea to keep the <span class="bbc">.xsession.errors</span> file at bay, in my case at 30 minute intervals, a max of 2Gb and min of 1000 lines which would seem to be more than adequate. </p><p>Thanks for your input.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Mon, 15 Oct 2018 16:49:29 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12265#p12265</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] Huge .xsession-errors file]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12262#p12262</link>
			<description><![CDATA[<p>The simpler solution<br /><a href="http://www.daniloaz.com/en/how-to-prevent-the-xsession-errors-file-from-growing-to-huge-size/" rel="nofollow">http://www.daniloaz.com/en/how-to-preve … huge-size/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Ogis1975)]]></author>
			<pubDate>Mon, 15 Oct 2018 13:56:40 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12262#p12262</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] Huge .xsession-errors file]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12249#p12249</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>chris2be8 wrote:</cite><blockquote><div><p>Running <span class="bbc">chmod 755 /var/log/lost+found</span> as root will allow all users to read /var/log/lost+found but not put anything in it.</p></div></blockquote></div><p>Ahh ...<br />Interesting.</p><p>I thought it was a system file and as such belonged to root and root only.<br />Good to know.</p><p>Doing <span class="bbc">chmod 755 /var/log/lost+found</span> would allow conky to read it without needing admin credentials ie: being included in a sudoers file.<br />And as such, it won&#039;t get logged in auth.log.<br />Neat.</p><div class="quotebox"><cite>chris2be8 wrote:</cite><blockquote><div><p>... lost+found is where fsck puts files it has recovered from a damaged filesystem so there is usually nothing in there.<br />... not worry about allowing read access to it unless I have sensitive data on the system that not all users should be able to read.</p></div></blockquote></div><p>Nothing there that I should worry about.</p><p>I think it may also be worthwhile for the system to generate a separate /var/log/sudo.log file (editing /etc/sudoers).</p><p>Thanks you both (chris2be8 + fsmithred) for your input - learned new things today.</p><p>Best,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sat, 13 Oct 2018 16:13:20 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12249#p12249</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] Huge .xsession-errors file]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12248#p12248</link>
			<description><![CDATA[<p>Running <span class="bbc">chmod 755 /var/log/lost+found</span> as root will allow all users to read /var/log/lost+found but not put anything in it. lost+found is where fsck puts files it has recovered from a damaged filesystem so there is usually nothing in there. I would not worry about allowing read access to it unless I have sensitive data on the system that not all users should be able to read.</p><p>Chris</p>]]></description>
			<author><![CDATA[dummy@example.com (chris2be8)]]></author>
			<pubDate>Sat, 13 Oct 2018 15:55:57 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12248#p12248</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] Huge .xsession-errors file]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12247#p12247</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>fsmithred wrote:</cite><blockquote><div><p>Conky runs as your user ...</p></div></blockquote></div><p>I see ...</p><div class="quotebox"><cite>fsmithred wrote:</cite><blockquote><div><p>... so give your user sudo nopasswd for du ...</p></div></blockquote></div><p>OK</p><div class="quotebox"><cite>fsmithred wrote:</cite><blockquote><div><p>... and change the command in conkyrc to </p><div class="codebox"><pre><code>exec sudo du -sch /var/log</code></pre></div><p>Make a file in /etc/sudoers.d/ with the following.</p><div class="codebox"><pre><code>groucho ALL= NOPASSWD: /usr/bin/du</code></pre></div></div></blockquote></div><p>Fortunately I recently learned (here) how to properly generate a sudoers file.<br />Done.</p><p>Just to check:</p><div class="codebox"><pre><code>groucho@devuan:~$ conky
conky: desktop window (1800003) is subwindow of root window (728)
conky: drawing to desktop window
conky: No compatible double buffer extension found
conky: drawing to single buffer</code></pre></div><p>Now my .xsession-errors file will not get filled up with 18Gb of <span class="bbc">&#039;/var/log/lost+found&#039;: Permission denied</span> errors.</p><p>Edit:<br />This solution, neat and efficient, has nevertheless spawned another log overpopulation problem:</p><p>Every time </p><div class="codebox"><pre><code>exec sudo du -sch /var/log</code></pre></div><p> is run (every 2s), <span class="bbu">three</span> lines get written to auth.log.&#160; &#160;<br />This makes absolutely perfect sense as it&#039;s exactly what auth.log is for but it also means that auth.log will grow three times fraster than .xsession-errors grew. (!)</p><div class="codebox"><pre><code>Oct 13 12:17:49 devuan sudo:  groucho : TTY=unknown ; PWD=/home/groucho ; USER=root ; COMMAND=/usr/bin/du -sch /var/log
Oct 13 12:17:49 devuan sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 13 12:17:49 devuan sudo: pam_unix(sudo:session): session closed for user root
--- snip ---</code></pre></div><p>I <em>think</em> I may have seen a fix for this but I&#039;ll have to look and get back.</p><p>In the meanwhile, do you have any ideas as to how to cope with this?<br />I will temporarily go back to where I was before the fix to conky to keep log growth at bay.</p><p>Thanks in advance.</p><p>Best,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sat, 13 Oct 2018 15:13:18 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12247#p12247</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] Huge .xsession-errors file]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12237#p12237</link>
			<description><![CDATA[<p>Conky runs as your user, so give your user sudo nopasswd for du and change the command in conkyrc to </p><div class="codebox"><pre><code>exec sudo du -sch /var/log</code></pre></div><p>Make a file in /etc/sudoers.d/ with the following.</p><div class="codebox"><pre><code>groucho ALL= NOPASSWD: /usr/bin/du</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Sat, 13 Oct 2018 01:53:52 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12237#p12237</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] Huge .xsession-errors file]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12236#p12236</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>golinux wrote:</cite><blockquote><div><p>... .xsession-errors files much larger ...<br />... stuffed with ~250 GB so that file isn&#039;t a noticeable blip.</p></div></blockquote></div><p>Indeed.&#160; =-) </p><div class="quotebox"><cite>golinux wrote:</cite><blockquote><div><p>It is possible to open those logs.&#160; Just change the encoding.</p></div></blockquote></div><p>Don&#039;t know how to do that, it is a problem when I wanted to open some (not all) log files with mousepad.<br />But I can read them with the Log Viewer.</p><p>I have had problems opening up huge files (very slow) even though my rig holds 8Gb. RAM.</p><p>WRT the .xsession-errors file, I found a solution to keep it in check here:</p><p><a href="http://www.daniloaz.com/en/how-to-prevent-the-xsession-errors-file-from-growing-to-huge-size/" rel="nofollow">http://www.daniloaz.com/en/how-to-preve … huge-size/</a> </p><p>It sets up a line in crontab to check every 15 minutes if the file size is greater than 5 GB and if so either empty it or keep the last 10,000 lines.<br />I set it for every 30 minutes and 1000 lines.</p><p>Once I emptied the .xsession-errors file, I found that it was getting a Gtx error every so often about not being able to load the ATK bridge, which I fixed by installing <span class="bbc">libatk-adaptor</span>.<br />Found that solution here: <a href="https://dev1galaxy.org/viewtopic.php?id=1815" rel="nofollow">https://dev1galaxy.org/viewtopic.php?id=1815</a> --&gt;&#160; =-)</p><p>But what really eats up room in the .xsession-errors file is <span class="bbu">this</span> line, constantly written up:</p><div class="codebox"><pre><code>du: cannot read directory &#039;/var/log/lost+found&#039;: Permission denied
du: cannot read directory &#039;/var/log/lost+found&#039;: Permission denied
du: cannot read directory &#039;/var/log/lost+found&#039;: Permission denied
--- snip ---</code></pre></div><p>But I know where it comes from:</p><div class="codebox"><pre><code>groucho@devuan:~$ conky
conky: desktop window (1600003) is subwindow of root window (728)
conky: drawing to desktop window
conky: No compatible double buffer extension found
conky: drawing to single buffer
du: cannot read directory &#039;/var/log/lost+found&#039;: Permission denied
du: cannot read directory &#039;/var/log/lost+found&#039;: Permission denied
du: cannot read directory &#039;/var/log/lost+found&#039;: Permission denied
du: cannot read directory &#039;/var/log/lost+found&#039;: Permission denied
du: cannot read directory &#039;/var/log/lost+found&#039;: Permission denied
du: cannot read directory &#039;/var/log/lost+found&#039;: Permission denied
--- snip ---</code></pre></div><p>My conky.conf file is set up so I can see the evolution of my disk usage (/, /home and /var/log), and /var/log usage is checked with this line ...</p><div class="codebox"><pre><code>/var/log ${exec du -sch /var/log | head -n1 | awk &#039;{print $1}&#039;}
${fs_bar /var/log}</code></pre></div><p>... so every time that conky takes a reading, it generates an error message that gets logged in the .xsession-errors file.<br />No wonder it was huge, conky reads every 2s.&#160; &#160;</p><p>So the question would be:</p><p>How can I get conky to be able to read lost+found?<br />This would need admin credentials for conky, which does not sound healthy.<br />And conky is not really a user, so I don&#039;t think it could be added to sudoers.</p><p>Maybe get the Xserver to not log this specific error?</p><p>Any ideas?</p><p>Thanks in advance.</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Fri, 12 Oct 2018 22:58:19 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12236#p12236</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] Huge .xsession-errors file]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12235#p12235</link>
			<description><![CDATA[<p>I have had .xsession-errors files much larger than that because I forget to check.&#160; My home&#160; stuffed with ~250 GB so that file isn&#039;t a noticeable blip.&#160; It is possible to open those logs.&#160; Just change the encoding.</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Fri, 12 Oct 2018 22:07:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12235#p12235</guid>
		</item>
		<item>
			<title><![CDATA[[Solved] Huge .xsession-errors file]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12234#p12234</link>
			<description><![CDATA[<p>Hello:</p><p>Some time ago I took notice that my /home folder usage had grown to over 75%.<br />It seemed too much but then I realised that I had not done any cleaning in my /home/Downloads folder, so I did a thorough cleaning and sent what I (suppose) will/may need to another drive.</p><p>My cleaning got me to around 53% but it still seemed too much as the whole /home partition is 45Gb.</p><p>I went looking for a disk usage app and remembered Baobab from my days playing with Mint but saw that the beast wants to drag in all its relatives and friends into my rig so I skipped that one.</p><p>Then I remembered <span class="bbc">du</span>, which I ran as root so it would look everywhere:</p><div class="codebox"><pre><code>[root@devuan groucho]# du -a /home | sort -n -r | head -n 100
24834420	/home
24834400	/home/groucho
16401024	/home/groucho/.xsession-errors
6549156	/home/groucho/VirtualBox VMs
6549152	/home/groucho/VirtualBox VMs/groucho xp
6548676	/home/groucho/VirtualBox VMs/groucho xp/groucho xp-disk1.vmdk
842040	/home/groucho/vmshared
482676	/home/groucho/.wine
480524	/home/groucho/.wine/drive_c
439036	/home/groucho/.wine/drive_c/PMAIL
[root@devuan groucho]# </code></pre></div><p>And this is when I came upon the <strong>16.4Gb</strong> <span class="bbc">.xsession-errors</span> file.</p><p>So I got emptied it completely, no way I could open it with Log Viewer to see what was up.</p><div class="codebox"><pre><code>groucho@devuan:~$ &gt;~/.xsession-errors
groucho@devuan:~$ </code></pre></div><p>Now my /home folder just takes up 18%.</p><p>But I wonder: shouldn&#039;t this be getting rotated, zipped and eventually deleted past a certain time?</p><p>Thanks in advance.</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Fri, 12 Oct 2018 21:46:15 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12234#p12234</guid>
		</item>
	</channel>
</rss>
