<?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=759&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / X without a Display Manager]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=759</link>
		<description><![CDATA[The most recent posts in X without a Display Manager.]]></description>
		<lastBuildDate>Tue, 27 Jun 2017 16:11:22 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: X without a Display Manager]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=2605#p2605</link>
			<description><![CDATA[<p>edit: <br />There should be a useful version with somewhat more advanced dbus support at::</p><p><a href="https://git.devuan.org/PeteGozz/slim/blob/master/xinitrc.sample" rel="nofollow">https://git.devuan.org/PeteGozz/slim/bl … trc.sample</a></p><p>/edit</p><p>So a slightly more baroque version.<br />Is nicer to the startx wrapper the&#160; poor user and<br />should use dbus if its available.</p><p>(of course you can set that to &quot;&quot; or /bin/true)<br />or even better rewrite this into something useful for you.</p><p>Check and edit this to suit your needs.<br />Note that startx should use and digest all the system /etc/X11/Xsession.* stuff.<br />Not so sure about xinit.</p><p>This can also work for plain old X -query&#160; type asks</p><p> Sheeze its been a while.</p><div class="codebox"><pre class="vscroll"><code># usage: (where &quot;foobar&quot; will possibly match your desired window manager)
# ~$  startx foobar
# ~$ xinit foobar -- :1
# ~$ xinit -- :$(tty | tr -d /dev/tty)
# now with simple dbus detection 
# allocate to your default window manager
DEFAULT_SESSION=openbox-session

# dbus executable ?

if [ -x dbus-launch ];then
    DESKTOP_BUS=&quot;dbus-launch --exit-with-session&quot;
else
    DESKTOP_BUS=&quot;&quot;
fi

if [ -z $1 ];
then
    # no option for xinit then just jump to default
    exec $DESKTOP_BUS $DEFAULT_SESSION
elif [ -x $1 ];
then
    # $1 in our PATH and executable  
      case $1 in
        fluxbox )
            
            # see also: ~/.fluxbox/startup
            exec $DESKTOP_BUS startfluxbox
            ;;
        openbox )
            
            # see also: ~/.config/openbox/autostart
            exec openbox-session
            ;;
        twm)
            # it is OK to not have xbindkeys
            xbindkeys || true  &amp;
            xterm -e /bin/bash &amp;
            exec twm
            ;;
        icewm)
            icewmbg &amp;
            icewmtray &amp;
            exec $DESKTOP_BUS icewm
            ;;
        wmaker)
            exec wmaker
            ;;
        blackbox)
            exec blackbox
            ;;
        *)
            # we should not arrive here unless we fed $1 with a shell or something
            # but I&#039;m just gunna pretend we never did and go default
            # 
            exec $DESKTOP_BUS $DEFAULT_SESSION

            ;;
      esac

elif [ ! -x $1 ];
then
# spit some help in the middle of all those Xorg messages
    echo &quot;&quot;
    echo Please Note: Unable to understand: $1
    echo Try xinit  or startx with no options for $DEFAULT_SESSION
    echo &quot;or if server in use try:  xinit -- :$(tty | tr -d /dev/tty)&quot;
    echo Or try:  startx $1   finally try:  startx sh
else
    # we have to hope $1 is some argument an xterm or xinit understands
    xterm -e $1 || xterm &amp;
    # this is a guess and seems a little safer than nothing
    exec $DEFAULT_SESSION 
fi

### this should never do a thing but the use cases are vast and interesting
### as this sourced thing should have been abandoned  by exec millisecs ago

if [ &quot;$?&quot; != &quot;0&quot; ]; then
    echo -e &quot;\ntry:\t xinit -- :$(tty | tr -d /dev/tty)&quot;
    echo -e &quot;or plain  startx &quot;
fi

#eof</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (PeteGozz)]]></author>
			<pubDate>Tue, 27 Jun 2017 16:11:22 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=2605#p2605</guid>
		</item>
		<item>
			<title><![CDATA[Re: X without a Display Manager]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=2601#p2601</link>
			<description><![CDATA[<div class="quotebox"><cite>msi wrote:</cite><blockquote><div><div class="quotebox"><cite>PeteGozz wrote:</cite><blockquote><div><p>an optionally dbus free window manager</p></div></blockquote></div><p>As far as I can see, all window managers are &quot;<em>dbus</em>-free&quot;. <em>dbus</em> is, for example, required by file managers for mounting external devices. See: <a href="https://dev1galaxy.org/viewtopic.php?pid=1028" rel="nofollow">https://dev1galaxy.org/viewtopic.php?pid=1028</a></p><p>That&#039;s why you would probably want to have</p><div class="codebox"><pre><code>exec dbus-launch --exit-with-session openbox-session</code></pre></div><p>instead of just</p><div class="codebox"><pre><code>exec openbox-session</code></pre></div><p>inside your ~/.xinitrc file. At least when using Thunar or PCManFM.</p></div></blockquote></div><p>The type of use case as discussed above would most probably use a Display Manager in any case.<br />(and dbus and udev etc)</p><p>I am not suggesting that a chopped down xinit type login would have all&#160; conveniences.<br />I am certainly not suggesting this is a default setting for anybody but those who are curious<br /> or working toward smaller footprints and perhaps developing&#160; debugging.</p><p>Its also a dying skill set <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />(and I&#039;m not excluding myself)<br />In any case the next post should go some way to covering your absolutely correct note.<br />(untested as I have no dbus to test ) <br />And probably even buggier now .</p><p>I need to trace startx a little more carefully as well.</p><p>Its just a hack. Not for user land.</p>]]></description>
			<author><![CDATA[dummy@example.com (PeteGozz)]]></author>
			<pubDate>Tue, 27 Jun 2017 15:36:45 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=2601#p2601</guid>
		</item>
		<item>
			<title><![CDATA[Re: X without a Display Manager]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=2600#p2600</link>
			<description><![CDATA[<p>Yes that probably is wise.<br />There are many apps that use dbus.</p><p>I get by without it OK though just occasionally its&#160; a bother.<br />I will post a better version in any case with dbus options.</p>]]></description>
			<author><![CDATA[dummy@example.com (PeteGozz)]]></author>
			<pubDate>Tue, 27 Jun 2017 15:13:46 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=2600#p2600</guid>
		</item>
		<item>
			<title><![CDATA[Re: X without a Display Manager]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=2597#p2597</link>
			<description><![CDATA[<div class="quotebox"><cite>PeteGozz wrote:</cite><blockquote><div><p>an optionally dbus free window manager</p></div></blockquote></div><p>As far as I can see, all window managers are &quot;<em>dbus</em>-free&quot;. <em>dbus</em> is, for example, required by file managers for mounting external devices. See: <a href="https://dev1galaxy.org/viewtopic.php?pid=1028" rel="nofollow">https://dev1galaxy.org/viewtopic.php?pid=1028</a></p><p>That&#039;s why you would probably want to have</p><div class="codebox"><pre><code>exec dbus-launch --exit-with-session openbox-session</code></pre></div><p>instead of just</p><div class="codebox"><pre><code>exec openbox-session</code></pre></div><p>inside your ~/.xinitrc file. At least when using Thunar or PCManFM.</p>]]></description>
			<author><![CDATA[dummy@example.com (msi)]]></author>
			<pubDate>Tue, 27 Jun 2017 12:28:09 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=2597#p2597</guid>
		</item>
		<item>
			<title><![CDATA[X without a Display Manager]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=2592#p2592</link>
			<description><![CDATA[<p>I like to keep things light in desktop world.<br />You may not. Thats is more than fine. Its not called free software for nothing !<br />However, sometimes,&#160; it feels as though loginkit and dbus is a soggy box, and certainly not a help.<br />So&#160; you can live with <em>and / or </em> without them :</p><p>Here is part of one reasonably flexible solution.</p><p>Assuming you have:<br />&#160; &#160; a/&#160; xutils installed AND <br />&#160; &#160; b/ you are allowed to login from the console.<br />&#160; &#160; &#160; &#160; see: /etc/X11/Xwrapper.config <br />&#160; &#160; c/ an optionally dbus free window manager</p><p>You should be able to simply login and<br />&#160; <br />startx <br />or <br />xinit somexsessionhere -- :2</p><p>the icewm is a nice example <br />this _may_ override any commandline options (xinit)</p><div class="codebox"><pre class="vscroll"><code># save to ~/.xinitrc  and or ~/.xsession
# ~$ man startx   for more information about why and what
# this file was originally from the sources of *slim display manager*
# edit to taste 
# usage: (where &quot;foobar&quot; will match your desired window manager)
# ~$  startx foobar
# ~$ xinit foo -- :1
# allocate to your default preference
# here 
DEFAULT_SESSION=openbox-session

case $1 in
    openb* | ob | foo)
    # see also: ~/.config/openbox/autostart 
        exec openbox-session
        ;;
    twm)
        # it is OK to not have xbindkeys
        xbindkeys || true  &amp;
        xterm &amp;
        exec twm
        ;;
     # examples 
    enlightenment)
        exec /usr/bin/enlightenment_start
        ;;
    enlightenment?*)
        exec /usr/local/bin/enlightenment_start
        ;;
    icewm)
        icewmbg &amp;
        icewmtray &amp;
        exec icewm
        ;;
    wmaker)
        exec wmaker
        ;;
    blackbox)
        exec blackbox
        ;;
    *)
        exec $DEFAULT_SESSION
        ;;
esac</code></pre></div><p>of course you can simply try:<br />xinit -- :1<br />startx </p><p>for defaults<br />Or your window manager may provide an initialisation script<br />tab may be your friend <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Upsides and uses include:<br />- testing window managers<br />and gui tools. (multiple logins and quick tests are easy to flip between)<br />- If you don&#039;t need&#160; or want a full Desktop Manager with <br />DBUS and login &quot;friends&quot; <br />- Its OK with no {pulse,port}audio as well <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />you can uninstall all or some of the above&#160; and _simplify your life_&#160; or not. ;&gt;<br />- You also wont need a Display Manager (slim or lightdm)<br />But you can still use them for other users. (or even yourself with a little thought)<br />and certainly wont need GDM or kdm etal.</p><p><strong>Its your system its your code <br />break it your way.</strong></p>]]></description>
			<author><![CDATA[dummy@example.com (PeteGozz)]]></author>
			<pubDate>Tue, 27 Jun 2017 07:14:57 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=2592#p2592</guid>
		</item>
	</channel>
</rss>
