<?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=3598&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / system info practice script]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=3598</link>
		<description><![CDATA[The most recent posts in system info practice script.]]></description>
		<lastBuildDate>Sun, 14 Jun 2020 09:57:53 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22657#p22657</link>
			<description><![CDATA[<p>Thanks fanderal, ive installed xdm display manager and tried that command of fsmithred but only get xdm (i have dwm as wm), must only work for lxdm, lightdm, gdm etc, what display manager are you using?</p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Sun, 14 Jun 2020 09:57:53 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22657#p22657</guid>
		</item>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22634#p22634</link>
			<description><![CDATA[<p>Works here. Installed wmctrl to show fluxbox, then saw fsmithred&#039;s edit and tried it. The difference: wmctrl capitalizes the &#039;F&#039; in fluxbox, default-display-manager doesn&#039;t. <img src="http://dev1galaxy.org/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><div class="quotebox"><blockquote><div><p>-------------------------------------<br />os:&#160; &#160; &#160;Devuan GNU/Linux 4 (chimaera/ceres)<br />kernel: 5.4.0-0.bpo.2-rt-amd64<br />uptime: 10 days, 2 hours, 22 minutes<br />pkgs:&#160; &#160;865<br />memory: 93Mi / 3.7Gi<br />wm:&#160; &#160; &#160;fluxbox<br />shell:&#160; /bin/bash<br />editor: nano</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (fanderal)]]></author>
			<pubDate>Sat, 13 Jun 2020 17:24:56 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22634#p22634</guid>
		</item>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22630#p22630</link>
			<description><![CDATA[<p>Nice, thanks Hoas. I was thinking that cat was not needed.</p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Sat, 13 Jun 2020 16:39:55 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22630#p22630</guid>
		</item>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22627#p22627</link>
			<description><![CDATA[<div class="quotebox"><cite>HevyDevy wrote:</cite><blockquote><div><div class="codebox"><pre><code>printf  $titles &quot;os:&quot; ; cat /etc/os-release | awk &#039;NR==1&#039; | sed &#039;s/............//;s/.//;s/.$//g&#039;</code></pre></div></div></blockquote></div><p>You don&#039;t need cat:</p><div class="codebox"><pre><code>printf  $titles &quot;os:&quot; ; awk &#039;NR==1&#039; /etc/os-release | sed &#039;s/............//;s/.//;s/.$//g&#039;</code></pre></div><p>Or with awk alone:</p><div class="codebox"><pre><code>printf  $titles &quot;os:&quot; ; awk -F&#039;&quot;&#039; &#039;/PRETTY/{print $2}&#039; /etc/os-release</code></pre></div><div class="quotebox"><cite>HevyDevy wrote:</cite><blockquote><div><div class="codebox"><pre><code>printf  $titles &quot;pkgs:&quot; ; dpkg -l | wc -l</code></pre></div></div></blockquote></div><p>That will return a slightly larger number because the dpkg output prints an information section and also lists some non-installed packages, try this instead:</p><div class="codebox"><pre><code>printf  $titles &quot;pkgs:&quot; ; dpkg -l | grep -c &#039;^ii&#039;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sat, 13 Jun 2020 15:44:08 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22627#p22627</guid>
		</item>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22619#p22619</link>
			<description><![CDATA[<div class="quotebox"><cite>fsmithred wrote:</cite><blockquote><div><p>Works here on my beowulf. I didn&#039;t feel like installing wmctrl, so I changed that line to </p><div class="codebox"><pre><code>printf  $titles &quot;wm:&quot; ; basename $(cat /etc/X11/default-display-manager)</code></pre></div></div></blockquote></div><p>Thanks fsmithred, that would work nicely for display managers i will add that in. cheers</p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Sat, 13 Jun 2020 14:45:41 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22619#p22619</guid>
		</item>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22617#p22617</link>
			<description><![CDATA[<p>Works here on my beowulf. I didn&#039;t feel like installing wmctrl, so I changed that line to </p><div class="codebox"><pre><code>printf  $titles &quot;wm:&quot; ; basename $(cat /etc/X11/default-display-manager)</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Sat, 13 Jun 2020 14:22:43 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22617#p22617</guid>
		</item>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22616#p22616</link>
			<description><![CDATA[<p>Thanks Marjorie, ill see if i can get rid of that dependency on wmctrl.</p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Sat, 13 Jun 2020 14:14:21 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22616#p22616</guid>
		</item>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22615#p22615</link>
			<description><![CDATA[<p>Works for me, but I had to install the wmctrl package as it&#039;s not there by default.</p><div class="codebox"><pre><code>user@hostname
-------------------------------------
os:   	Devuan GNU/Linux 3 (beowulf)
kernel:	4.19.0-9-amd64
uptime:	22 hours, 44 minutes
pkgs: 	2102
memory:	3.1Gi / 7.8Gi
wm:   	Mutter
shell:	/bin/bash
editor:	/usr/bin/gedit</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Marjorie)]]></author>
			<pubDate>Sat, 13 Jun 2020 14:09:36 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22615#p22615</guid>
		</item>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22614#p22614</link>
			<description><![CDATA[<p>Thanks nixer,</p><p>yeah if you havent got $EDITOR configured in .bashrc i dont think the script will display editor.</p><p>just put this in your bashrc</p><div class="codebox"><pre><code>export EDITOR=&#039;vim&#039;</code></pre></div><p>replace vim for whatever editor you like.</p><p>cheers</p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Sat, 13 Jun 2020 14:09:10 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22614#p22614</guid>
		</item>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22613#p22613</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>just want to know if this would work on your devuan system</p></div></blockquote></div><p>It works pretty good here.&#160; I noticed the editor line at the bottom was empty though.&#160; Is that because I do not have a default editor configured?</p><div class="quotebox"><blockquote><div><p>-------------------------------------<br />os:&#160; &#160;&#160; &#160; Devuan GNU/Linux 4 (chimaera/ceres)<br />kernel:&#160; &#160; 5.6.0-2-amd64<br />uptime:&#160; &#160; 4 hours, 15 minutes<br />pkgs: &#160; &#160; 2028<br />memory:&#160; &#160; 4.0Gi / 15Gi<br />wm:&#160; &#160;&#160; &#160; Xfwm4<br />shell:&#160; &#160; /bin/bash<br />editor:</p></div></blockquote></div><p>I did have to install wmctl as it was not installed.</p>]]></description>
			<author><![CDATA[dummy@example.com (nixer)]]></author>
			<pubDate>Sat, 13 Jun 2020 13:37:40 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22613#p22613</guid>
		</item>
		<item>
			<title><![CDATA[Re: system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22612#p22612</link>
			<description><![CDATA[<p>also trying to work on incorporating the devuan logo in ascii somehow and also display manager and de for those who use them.</p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Sat, 13 Jun 2020 13:06:01 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22612#p22612</guid>
		</item>
		<item>
			<title><![CDATA[system info practice script]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22611#p22611</link>
			<description><![CDATA[<p>Just thought i would share this here and ask a question or two..be mindful im only learning and hope to improve.</p><p>This is just a practice script to show system info but in a very basic way, has nothing on programs like neofetch or screenfetch etc. </p><p>So below is my effort so far and just want to know if this would work on your devuan system ok. Also id like to figure out a better method of displaying the window manager instead of using wmctrl, like something in coreutils.</p><p>Anyhow, needs bash and wmctrl as a dependency and is only work for devuan, i hope <img src="http://dev1galaxy.org/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><div class="codebox"><pre class="vscroll"><code>#!/usr/bin/env bash

titles=(&#039;\e[1;34m%-6s\e[m\t&#039;) # blue titles
line=(&#039;\e[1;31m%-37s\e[m\n&#039;) # red line

printf &quot;\n&quot;

printf &quot;\t&quot; ; echo &quot;$(whoami)@$(hostname)&quot;

printf  $line | tr &#039; &#039; -

printf  $titles &quot;os:&quot; ; cat /etc/os-release | awk &#039;NR==1&#039; | sed &#039;s/............//;s/.//;s/.$//g&#039;

printf  $titles &quot;kernel:&quot; ; uname --kernel-release

printf  $titles &quot;uptime:&quot; ; uptime -p | sed &#039;s/^...//g&#039;

printf  $titles &quot;pkgs:&quot; ; dpkg -l | wc -l

printf  $titles &quot;memory:&quot; ; free -mh | awk &#039;NR==2 {print $3&quot; / &quot;$2}&#039;

printf  $titles &quot;wm:&quot; ; wmctrl -m | awk &#039;NR==1 {print $2}&#039;

printf  $titles &quot;shell:&quot; ;  echo $SHELL

printf  $titles &quot;editor:&quot; ; echo $EDITOR

echo $&#039;\e7\e[2;800H\e[16D\e[7m&#039; $(date +&quot;%Y/%m/%d %H:%M&quot;)$&#039;\e8&#039;

printf &quot;\n&quot;</code></pre></div><p>prints out this with some colors and stuff like so.</p><div class="codebox"><pre><code>        
          user@hostname
-------------------------------------
os:     Devuan GNU/Linux 3 (beowulf)
kernel: 4.19.0-9-amd64
uptime: 1 hour, 59 minutes
pkgs:   813
memory: 721Mi / 7.7Gi
wm:     dwm
shell:  /bin/bash
editor: vim</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Sat, 13 Jun 2020 12:47:37 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22611#p22611</guid>
		</item>
	</channel>
</rss>
