<?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=2453&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] How to get these 2 apps to open maximized?]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=2453</link>
		<description><![CDATA[The most recent posts in [SOLVED] How to get these 2 apps to open maximized?.]]></description>
		<lastBuildDate>Thu, 15 Nov 2018 16:21:05 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12820#p12820</link>
			<description><![CDATA[<p>I made small improvements that allow the script to be used without any alteration for any app <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /> </p><p>For any app foo, just create /usr/local/bin/foo with this in it:</p><div class="codebox"><pre><code>#!/bin/sh

# This is a wrapper script that immediately maximizes the target application
# after its window appears. Script should be /usr/local/bin/foo where foo is 
# the name of the target application. 

app_name=&quot;$(basename &quot;$0&quot;)&quot;
app_path=&quot;$(which -a &quot;$app_name&quot; | tail -n 1)&quot;
&quot;$app_path&quot; &quot;$@&quot; &amp;
app_pid=$!

# wait for app to have a window
while true; do
	wmctrl -lp | awk &#039;{print $3}&#039; | grep $app_pid &amp;&amp; break
	sleep 0.1
done

# get windowid of app
app_windowid=$(wmctrl -lp | awk &quot;\$3 == $app_pid { print \$1 }&quot;)

# maximize app&#039;s window
wmctrl -ir $app_windowid -b add,maximized_vert,maximized_horz</code></pre></div><p>Don&#039;t forget to make the script executable. All the script needs to work is its own name.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Thu, 15 Nov 2018 16:21:05 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12820#p12820</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12571#p12571</link>
			<description><![CDATA[<p>Yes, removing the &quot;sleep 0.5&quot; line entirely is the way to make the script work as quickly as possible.</p><p>You&#039;re welcome <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Mon, 29 Oct 2018 13:40:09 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12571#p12571</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12555#p12555</link>
			<description><![CDATA[<p>I totally deleted the line, &quot;sleep 0.5&quot; <strong>and the line itself</strong>. That was the right way to do it, right? It seems to have made the delay a (very) tad bit shorter.</p><p>Thanks GNUser. <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Ron)]]></author>
			<pubDate>Sun, 28 Oct 2018 19:40:30 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12555#p12555</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12548#p12548</link>
			<description><![CDATA[<p>Changing <span class="bbc">sleep 0.5</span> to something smaller--e.g. <span class="bbc">sleep 0.1</span>--will decrease the delay. Or, to really make the maximization take place as fast as possible, you can eliminate the <span class="bbc">sleep 0.5</span> line altogether.</p><p>Glad I could help. Enjoy!</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Sun, 28 Oct 2018 16:19:59 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12548#p12548</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12547#p12547</link>
			<description><![CDATA[<p>Thanks GNUser, <span class="bbc">sudo chmod a+x /usr/local/bin/atril</span> did the trick. There&#039;s just one little annoyance . . . when I open Atril (and AbiWord), it first opens unmaximized for a split second, before going maximized. But I can live with that (I&#039;m guessing there&#039;s nothing that can be done about that).</p>]]></description>
			<author><![CDATA[dummy@example.com (Ron)]]></author>
			<pubDate>Sun, 28 Oct 2018 15:49:28 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12547#p12547</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12539#p12539</link>
			<description><![CDATA[<p>Ron, it works for me from desktop shortcut as well.</p><p>Did you remember to make the script executable? If it isn&#039;t, the first <strong>executable</strong> atril found in your PATH is the real one instead of our wraparound script, causing our fix to fail silently. Please do <span class="bbc">$ sudo chmod a+x /usr/local/bin/atril</span>. Also, did you remember to <span class="bbc">$ sudo apt install wmctrl</span>? Try these two, then give the desktop shortcut another shot.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Sun, 28 Oct 2018 11:35:31 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12539#p12539</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12537#p12537</link>
			<description><![CDATA[<p>If you feel like using the &quot;big stick&quot;, then you simply<br />a) install the <span class="bbc">devilspie</span> package, then<br />b) put</p><div class="codebox"><pre><code>(if (is (application_name) &quot;Atril Document Viewer&quot;) (maximize))</code></pre></div><p>into the file <span class="bbc">$HOME/.devilspie/maximize_atril.ds</span>, then<br />c) run <span class="bbc">devilspie</span> (e.g. via a session application startup thingy).</p><p>Thereafter, supposedly, <span class="bbc">atril</span> will be maximized when started.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Sun, 28 Oct 2018 05:01:18 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12537#p12537</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12536#p12536</link>
			<description><![CDATA[<p>@GNUser, it isn&#039;t working for me. When I open Atril (from the desktop icon) it still doesn&#039;t open maximized.</p>]]></description>
			<author><![CDATA[dummy@example.com (Ron)]]></author>
			<pubDate>Sun, 28 Oct 2018 04:25:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12536#p12536</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12535#p12535</link>
			<description><![CDATA[<div class="quotebox"><cite>GNUser wrote:</cite><blockquote><div><p>For atril, create <span class="bbc">/usr/local/bin/atril</span> with this in it:</p><div class="codebox"><pre><code>#!/bin/sh

/usr/bin/atril &quot;$@&quot; &amp;
child_pid=$!

# wait for child to have a window
while true; do
	wmctrl -lp | awk &#039;{print $3}&#039; | grep $child_pid &amp;&amp; break
	sleep 0.5
done

# get windowid of child
child_windowid=$(wmctrl -lp | awk &quot;\$3 == $child_pid { print \$1 }&quot;)

# maximize child&#039;s window
wmctrl -ir $child_windowid -b add,maximized_vert,maximized_horz</code></pre></div></div></blockquote></div><p>Wow GNUser, thanks for that! <img src="https://dev1galaxy.org/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" />&#160; Pretty nice!</p>]]></description>
			<author><![CDATA[dummy@example.com (willbprogz227)]]></author>
			<pubDate>Sun, 28 Oct 2018 03:35:13 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12535#p12535</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12534#p12534</link>
			<description><![CDATA[<p>Ron, another option is to use a wrapper script. I tested this with both atril and abiword and it works as advertised. It should work with any graphical application.</p><p>For atril, create <span class="bbc">/usr/local/bin/atril</span> with this in it:</p><div class="codebox"><pre><code>#!/bin/sh

/usr/bin/atril &quot;$@&quot; &amp;
child_pid=$!

# wait for child to have a window
while true; do
	wmctrl -lp | awk &#039;{print $3}&#039; | grep $child_pid &amp;&amp; break
	sleep 0.5
done

# get windowid of child
child_windowid=$(wmctrl -lp | awk &quot;\$3 == $child_pid { print \$1 }&quot;)

# maximize child&#039;s window
wmctrl -ir $child_windowid -b add,maximized_vert,maximized_horz</code></pre></div><p>How it works is basically this: Run target application, wait for a window associated with that application to exist, maximize that window. The <span class="bbc">wmctrl</span> utility needs to be installed for this to work, of course.</p><p>For abiword, create <span class="bbc">/usr/local/bin/abiword</span> identical to above except replace atril with abiword in the third line.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Sun, 28 Oct 2018 03:30:59 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12534#p12534</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12531#p12531</link>
			<description><![CDATA[<p>@willbprogz227 . . . You jogged my memory . . . A very long time ago, I used devilspie because of the lack of window management options in gnome2.&#160; &#160;Eventually I dropped it - it was rather fussy and sometimes didn&#039;t work.&#160; Perhaps it has improved since&#160; &#160;I ended up using compiz to do the task which was more than a bit of overkill but great fun for a while.</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Sun, 28 Oct 2018 02:50:12 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12531#p12531</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12529#p12529</link>
			<description><![CDATA[<p>While I&#039;ve not used it, <span class="bbc">gdevilspie</span> is supposed to allow you to make geometry and positioning rules for windows.&#160; I&#039;m uncertain if it has any issues running alongside with Mate or other desktop environments but it&#039;s worth a shot! <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>The Atril and AbiWord window size thing is irritating to me too, but I use JWM and can make window rules in its config file then windows will always appear the way I want.</p>]]></description>
			<author><![CDATA[dummy@example.com (willbprogz227)]]></author>
			<pubDate>Sun, 28 Oct 2018 02:34:53 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12529#p12529</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12525#p12525</link>
			<description><![CDATA[<div class="quotebox"><cite>Ron wrote:</cite><blockquote><div><p>Thanks golinux. I&#039;m using Mate. The &quot;Save Current Settings as Default&quot; option didn&#039;t help. Any other ideas?</p></div></blockquote></div><p>I suspect it&#039;s a Mate/Gnome thing rather than an application thing because it&#039;s working here even after a long idle time.&#160; Check the Mate window manager options.&#160; Also look for a Mate Settings Editor and find those apps.&#160; I can&#039;t remember much of my Gnome2 days&#160; . . . that wasn&#039;t long after Y2K.&#160; LOL!</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Sun, 28 Oct 2018 02:02:05 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12525#p12525</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12524#p12524</link>
			<description><![CDATA[<p>@arnaiz . . . Note that fullscreen is different than maximized - no visible controls.</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Sun, 28 Oct 2018 01:56:28 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12524#p12524</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] How to get these 2 apps to open maximized?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12523#p12523</link>
			<description><![CDATA[<p>a more elegant solution for atril (works for me on Mate)</p><div class="codebox"><pre><code>dconf write /org/mate/atril/default/fullscreen true
dconf update</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (arnaiz)]]></author>
			<pubDate>Sun, 28 Oct 2018 01:47:28 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12523#p12523</guid>
		</item>
	</channel>
</rss>
