<div dir="ltr">On 12 August 2014 02:41, William Park <span dir="ltr"><<a href="mailto:opengeometry-FFYn/CNdgSA@public.gmane.org" target="_blank">opengeometry@yahoo.ca</a>></span> wrote:<br><div class="gmail_extra">> On Mon, Aug 11, 2014 at 09:17:28PM -0400, Giles Orr wrote:<br>
> > I'm using openbox on an Acer Chromebook (full install, not crouton). I'm<br>> > pretty pleased with the hardware, but I've got a problem with Openbox's<br>> > autostart file. It's a shell script, so I should be able to make decisions<br>
> > about what to run based on the hostname. This matters because I share<br>> > configuration files and dotfiles across multiple hosts. But it doesn't<br>> > work. I've tried:<br>> ><br>
> > if [ "$(hostname)" == "crom" ] # works at the command line<br>> > then<br>> > xterm -fn terminus-18 &<br>> > fi<br>> ><br>> > if [ "${HOSTNAME}" == "crom" ] # ditto<br>
> > ...<br>> ><br>> > if [ "$(cat /etc/hostname)" == "crom" ] # ditto<br>> > ...<br>> ><br>> > None work in ~/.config/openbox/autostart . I dumped $(env) to a file from<br>
> > within the autostart and HOSTNAME isn't set, so that explains the middle<br>> > one failing, but I have no explanation for why the others don't work. Can<br>> > anyone help?<br>><br>> Try single '=', or use Bash/Ksh which support '=='.<br>
<br>Thanks Walter - I do have the file.<br><br>William - that's a very good
point: I was automatically assuming Bash because it's what I use all the
time, and that may well NOT be what's used by Openbox. It obviously uses a shell of some sort, but which one is open to question. I will confirm
later. Thanks!<br clear="all"><br>-- <br>Giles<br><a href="http://www.gilesorr.com/">http://www.gilesorr.com/</a><br><a href="mailto:gilesorr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org">gilesorr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>
</div></div>