Openbox autostart - detecting hostname

Giles Orr gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Aug 12 01:17:28 UTC 2014


I'm using openbox on an Acer Chromebook (full install, not crouton).  I'm
pretty pleased with the hardware, but I've got a problem with Openbox's
autostart file.  It's a shell script, so I should be able to make decisions
about what to run based on the hostname.  This matters because I share
configuration files and dotfiles across multiple hosts.  But it doesn't
work.  I've tried:

if [ "$(hostname)" == "crom" ] # works at the command line
then
    xterm -fn terminus-18 &
fi

if [ "${HOSTNAME}" == "crom" ] # ditto
...

if [ "$(cat /etc/hostname)" == "crom" ] # ditto
...

None work in ~/.config/openbox/autostart .  I dumped $(env) to a file from
within the autostart and HOSTNAME isn't set, so that explains the middle
one failing, but I have no explanation for why the others don't work.  Can
anyone help?

-- 
Giles
http://www.gilesorr.com/
gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20140811/3e4ad11d/attachment.html>


More information about the Legacy mailing list