<?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=6129&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Strategies to deal with .xsession-errors]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=6129</link>
		<description><![CDATA[The most recent posts in Strategies to deal with .xsession-errors.]]></description>
		<lastBuildDate>Mon, 04 Dec 2023 19:48:34 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45936#p45936</link>
			<description><![CDATA[<p>Think I finally found the right way to rotate .xsession-errors and save a copy too.<br />It is to use this script:</p><div class="codebox"><pre><code>#!/bin/bash
for i in {9..1}; do
    if [[ -f /home/$USER/.xsession-errors.${i} ]]; then
        mv -f /home/$USER/.xsession-errors.${i} /home/svensson/.xsession-errors.$((i+1))
    fi
done</code></pre></div><p>And in Xfce autostart run it as script at shutdown. At boot doesn&#039;t work since the file won&#039;t be written to. For some reason.</p>]]></description>
			<author><![CDATA[dummy@example.com (swanson)]]></author>
			<pubDate>Mon, 04 Dec 2023 19:48:34 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45936#p45936</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45560#p45560</link>
			<description><![CDATA[<p>Heh, localepurge sounds interesting...</p><div class="quotebox"><cite>https://manpages.debian.org/bullseye/localepurge/localepurge.8.en.html wrote:</cite><blockquote><div><p>localepurge is a small script to recover disk space wasted for unneeded locale files and localized man pages. It will be automagically invoked by dpkg upon completion of any apt installation run.<br />...<br />this tool is a hack which is not integrated with Debian&#039;s package management system</p></div></blockquote></div><p><em>*sigh*</em> It should not need to be a post-install hack!</p><p>The package manager should know which locale(s) are relevant and not even waste bandwidth on those files to begin with.</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Wed, 22 Nov 2023 15:03:42 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45560#p45560</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45558#p45558</link>
			<description><![CDATA[<p>@steve_v</p><div class="quotebox"><blockquote><div><p>I disagree, ..,</p></div></blockquote></div><p>Of course, we each have our own opinion, undeniable, since it is subjective.</p><p> Regards.</p>]]></description>
			<author><![CDATA[dummy@example.com (aluma)]]></author>
			<pubDate>Wed, 22 Nov 2023 14:09:12 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45558#p45558</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45556#p45556</link>
			<description><![CDATA[<div class="quotebox"><cite>aluma wrote:</cite><blockquote><div><p>Logs should be disabled by default, and the user should be able to enable a specific one when setting up.</p></div></blockquote></div><p>I disagree, logs are extremely useful and shouldn&#039;t use much disk space... So long as they&#039;re not full of almost-always-irrelevant warning and debug spam, which release builds of well written software shouldn&#039;t be generating to begin with.</p><p>IME most of that comes from GUI toolkits and DE related components, because for some reason leaving debug messages on and not actually fixing warnings that appear on pretty much every system is what you do when writing GUI applications. Out of sight, out of mind. <img src="https://dev1galaxy.org/img/smilies/roll.png" width="15" height="15" alt="roll" /> </p><p>The session manager / .xsession-errors is really just doing what it&#039;s supposed to do, catching stdout/stderr that would otherwise go into the void. Not X&#039;s fault if your apps won&#039;t STFU. <img src="https://dev1galaxy.org/img/smilies/tongue.png" width="15" height="15" alt="tongue" /><br />Imagine if CLI apps barfed all over stderr like that, you&#039;d never get anything done.</p><div class="quotebox"><cite>aluma wrote:</cite><blockquote><div><p>why do I need the default &quot;man&quot; pages in 37 languages?</p></div></blockquote></div><p>You don&#039;t, which is why localepurge has been a thing for decades.</p><div class="quotebox"><cite>stopAI wrote:</cite><blockquote><div><div class="quotebox"><cite>aluma wrote:</cite><blockquote><div><p>This is Trinity&#039;s log management tool, a legacy of KDE.</p></div></blockquote></div><p>Very nice tool.</p></div></blockquote></div><p>FWIW, kdebugsettings still exists in current KDE/Plasma, and has a bunch of new features to boot (custom rules &amp; groups, load/save settings etc.).<br />IIRC there&#039;s no obvious menu entry for it though, so you need to call it from a terminal or krunner.</p>]]></description>
			<author><![CDATA[dummy@example.com (steve_v)]]></author>
			<pubDate>Wed, 22 Nov 2023 12:36:34 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45556#p45556</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45555#p45555</link>
			<description><![CDATA[<div class="quotebox"><cite>aluma wrote:</cite><blockquote><div><p>This is Trinity&#039;s log management tool, a legacy of KDE.<br /><a href="https://postimages.org/" rel="nofollow">https://i.postimg.cc/T1M4mvKf/14.jpg</a></p></div></blockquote></div><p> Very nice tool.</p>]]></description>
			<author><![CDATA[dummy@example.com (stopAI)]]></author>
			<pubDate>Wed, 22 Nov 2023 12:15:56 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45555#p45555</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45552#p45552</link>
			<description><![CDATA[<p>Made the above posted script as an init.d script instead. But beware, this init script runs the actual script as normal user - which is NOT recommended. Tested this and it works. The reason is that sometimes when an x session is running and the .xsession-errors file gets rotated, it won&#039;t be written to again. So running it at shutdown or reboot should work better.<br />Script:</p><div class="codebox"><pre><code>#!/bin/sh

### BEGIN INIT INFO
# Provides: /home/$USER/bin/logrotator for .xsession-errors
# Required-Start: $syslog
# Required-Stop:  $syslog
# Default-Start:  0 6
# Default-Stop:   3 4 5
# Description: Rotate .xsession-errors as user $USER, creates backups. Should run at shutdown only without X
### END INIT INFO

#. /lib/lsb/init-functions

case &quot;$1&quot; in
  start)
	touch /run/logrotator.pid
	chmod 600 /run/logrotator.pid
	chown $USER:65534 /run/logrotator.pid
	sudo -u $USER /home/$USER/bin/logrotator
	;;
 stop)
	killall logrotator
        ;;
  *)
        echo &quot;Usage: $SCRIPTNAME start&quot; &gt;&amp;2
        exit 3
        ;;
esac</code></pre></div><p>Actual script (home/$USER/bin/logrotator):</p><div class="codebox"><pre><code>#!/bin/bash
for i in {9..1}; do
    if [[ -f /home/$USER/.xsession-errors.${i} ]]; then
        mv -f /home/$USER/.xsession-errors.${i} /home/$USER/.xsession-errors.$((i+1))
    fi
done
mv -f /home/$USER/.xsession-errors /home/$USER/.xsession-errors.1
touch /home/$USER/.xsession-errors
##Might not be needed:
chown $USER:$GROUP /home/$USER/.xsession-errors</code></pre></div><p>Edit $USER and $GROUP to taste.</p><p>PS. As you can see, I do not know what I&#039;m doing, so don&#039;t try this at home.</p>]]></description>
			<author><![CDATA[dummy@example.com (swanson)]]></author>
			<pubDate>Wed, 22 Nov 2023 09:11:36 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45552#p45552</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45518#p45518</link>
			<description><![CDATA[<p>This is Trinity&#039;s log management tool, a legacy of KDE.<br /><a href="https://postimages.org/" rel="nofollow"><span class="postimg"><img src="https://i.postimg.cc/T1M4mvKf/14.jpg" alt="14.jpg" /></span></a></p>]]></description>
			<author><![CDATA[dummy@example.com (aluma)]]></author>
			<pubDate>Mon, 20 Nov 2023 14:02:58 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45518#p45518</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45516#p45516</link>
			<description><![CDATA[<div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>Hello:</p><p>In my opinion, there&#039;s no need to keep <span class="bbc">.xsession.errors</span> files.</p><p>They are generated <span class="bbu">every time</span> the <span class="bbc">xserver</span> is started and the last one is appended to the previous one, which is why it can grow to huge sizes.</p><p>....<br />That said, even with that setup, much if not all of the information shown is of no value to the average desktop user.<br />ie: not a maintainer/developer.</p><p>In my case, practically <em>all</em> of it is made up of (endessly repeating) <span class="bbc">Gtk-WARNING</span> entries for which the only solution would seem to be some fix in a future version of <span class="bbc">Gtk</span> (?).</p></div></blockquote></div><p>Agree, but scripting is fun for an amateur. And once in a while the xsession-errors might be a saviuor. (every Blue Moon maybe) <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (swanson)]]></author>
			<pubDate>Mon, 20 Nov 2023 13:14:01 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45516#p45516</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45515#p45515</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>...much if not all of the information shown is of no value to the average desktop user...</p></div></blockquote></div><p>Who would convey this idea to the developers! <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />All these logs that are useless to users waste hardware resources and, ultimately, electricity.<br />Logs should be disabled by default, and the user should be able to enable a specific one when setting up.<br />In my experience, a correctly assembled distribution works out of the box without any fuss.</p><p>Linux is full of such things. <br />Try to look at the size occupied on your computer by the word “copyright” or a bunch of identical license files.<br />Or another example, why do I need the default &quot;man&quot; pages in 37 languages?</p>]]></description>
			<author><![CDATA[dummy@example.com (aluma)]]></author>
			<pubDate>Mon, 20 Nov 2023 12:48:54 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45515#p45515</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45514#p45514</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>swanson wrote:</cite><blockquote><div><p>... a file like this in /etc/logrotate.d ...<br />... rotate the file weekly and keep ...</p></div></blockquote></div><p>In my opinion, there&#039;s no need to keep <span class="bbc">.xsession.errors</span> files.</p><p>They are generated <span class="bbu">every time</span> the <span class="bbc">xserver</span> is started and the last one is appended to the previous one, which is why it can grow to huge sizes.</p><p>Limiting the <span class="bbc">.xsession-errors</span> file to any size you deem suitable while keeping the last NNN lines will get you all the information you may need/want to see if you are up to doing some serious debugging.</p><p>That said, even with that setup, much if not all of the information shown is of no value to the average desktop user.<br />ie: not a maintainer/developer.</p><p>In my case, practically <em>all</em> of it is made up of (endessly repeating) <span class="bbc">Gtk-WARNING</span> entries for which the only solution would seem to be some fix in a future version of <span class="bbc">Gtk</span> (?).</p><p>eg:</p><div class="codebox"><pre><code>(wrapper-2.0:2996): Gtk-WARNING **: 06:29:35.182: Theme parsing error: &lt;data&gt;:1:49: The style property GtkWidget:focus-padding is deprecated and shouldn&#039;t be used anymore. It will be removed in a future version
--- snip ---
(volumeicon:2859): Gtk-WARNING **: 06:29:34.463: Theme parsing error: gtk-widgets.css:1344:25: The style property GtkRange:slider-width is deprecated and shouldn&#039;t be used anymore. It will be removed in a future version
--- snip ---
(Firefox-esr:3339): Gtk-WARNING **: 06:30:12.326: Theme parsing error: gtk-widgets.css:1347:28: The style property GtkRange:stepper-spacing is deprecated and shouldn&#039;t be used anymore. It will be removed in a future version</code></pre></div><p>In the five or so years I have dealt with the <span class="bbc">.xsession-errors</span> file, I&#039;ve only found <em>one</em> warning I was able to fix.<br />It was related to a double-buffer setting in the <span class="bbc">conky.conf</span> file, a mistake on <em>my</em> part when editing/adding some modifications.</p><p>As always, YMMV.</p><p>Best,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Mon, 20 Nov 2023 11:49:26 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45514#p45514</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45511#p45511</link>
			<description><![CDATA[<div class="quotebox"><cite>stopAI wrote:</cite><blockquote><div><p>... By the way, I&#039;ve noticed that when using lightdm, it automatically clears .xsession-errors after a session ends, a new file is created when a new session is started, and the old one is renamed to ..xsession-errors.old</p></div></blockquote></div><p>KDE3 and Trinity previously also left one old file. Now with Trinity there is only one .xsession-errors in the home folder.</p>]]></description>
			<author><![CDATA[dummy@example.com (aluma)]]></author>
			<pubDate>Mon, 20 Nov 2023 08:58:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45511#p45511</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45509#p45509</link>
			<description><![CDATA[<p>Oops! On my other Devuan machine .xsession-errors was 830MB!!! But I thought I share my findings for a solution of the growing file size (not the errors <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /> )</p><p>Create a file like this in /etc/logrotate.d/my-xsession-errors</p><div class="codebox"><pre><code>$HOME/.xsession-errors {
missingok 
notifempty 
copytruncate
compress  
weekly  
rotate 5
}</code></pre></div><p>This will rotate the file weekly and keep 5 old files. Edit to your needs.</p><p>EDIT: added copytruncate because sometimes when the .xsession-errors file get renewed, it is not written to anymore (in that session).</p>]]></description>
			<author><![CDATA[dummy@example.com (swanson)]]></author>
			<pubDate>Mon, 20 Nov 2023 08:26:26 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45509#p45509</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45378#p45378</link>
			<description><![CDATA[<div class="quotebox"><cite>steve_v wrote:</cite><blockquote><div><p>OTOH, if you don&#039;t want anything written to it, why not just &#039;chattr +i .xsession-errors&#039;? That&#039;s kind of what the immutable attribute is for.</p></div></blockquote></div><p>Thanks for the advice. By the way, I&#039;ve noticed that when using lightdm, it automatically clears .xsession-errors after a session ends, a new file is created when a new session is started, and the old one is renamed to ..xsession-errors.old</p>]]></description>
			<author><![CDATA[dummy@example.com (stopAI)]]></author>
			<pubDate>Mon, 13 Nov 2023 12:17:15 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45378#p45378</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45355#p45355</link>
			<description><![CDATA[<p>Thanks for this thread! My .xsession-errors was 26 Mb. Big! Mostly BS, some GTK errors, the weather applet complaining, xdotool missing for some old script.</p><p>I chose ralph.ronnquist&#039;s no 2 script and running it manually for now.</p>]]></description>
			<author><![CDATA[dummy@example.com (swanson)]]></author>
			<pubDate>Sat, 11 Nov 2023 18:52:39 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45355#p45355</guid>
		</item>
		<item>
			<title><![CDATA[Re: Strategies to deal with .xsession-errors]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45351#p45351</link>
			<description><![CDATA[<p>Yes, of course, we each have our own tasks, problems and ways to solve them.<br />My .xsession-errors is approx. 40Kb and most of this is in</p><div class="codebox"><pre><code>[FIXME] UNCLASSIFIED DEVICE name: wakeup11 type: (null) subsystem: wakeup driver:...</code></pre></div><p>Advice from the admin of the Pclinuxos forum -&quot;is information for developers, ignore it.&quot;</p>]]></description>
			<author><![CDATA[dummy@example.com (aluma)]]></author>
			<pubDate>Sat, 11 Nov 2023 17:35:16 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45351#p45351</guid>
		</item>
	</channel>
</rss>
