\documentclass[12pt,a4paper,oneside]{scrartcl}
% generated by Docutils <http://docutils.sourceforge.net/>
% rubber: set program xelatex
\usepackage[no-sscript]{xltxtra} % loads fixltx2e, metalogo, xunicode, fontspec
% \defaultfontfeatures{Scale=MatchLowercase}
\usepackage{ifthen}

\setcounter{secnumdepth}{5}
\newcommand{\DUfooter}{
Generated on: 2016-06-10  21:52:45 GMT.
Generated by \href{http://docutils.sourceforge.net/}{Docutils} from \href{http://docutils.sourceforge.net/rst.html}{reStructuredText} source.

}

%%% Custom LaTeX preamble


%%% User specified packages and stylesheets
\usepackage{RST_Palatino_OpenSans_12pt}

%%% Fallback definitions for Docutils-specific commands

% subtitle (in document title)
\providecommand*{\DUdocumentsubtitle}[1]{{\large #1}}

% hyperlinks:
\ifthenelse{\isundefined{\hypersetup}}{
  \usepackage[]{hyperref}
  \urlstyle{same} % normal text font (alternatives: tt, rm, sf)
}{}
\hypersetup{
  pdftitle={tausta.ksh.sh},
}

%%% Title Data
\title{\phantomsection%
  tausta.ksh.sh%
  \label{tausta-ksh-sh}%
  \\ % subtitle%
  \DUdocumentsubtitle{Korn Shell script, that change desktop wallpaper under X Window System}%
  \label{korn-shell-script-that-change-desktop-wallpaper-under-x-window-system}}
\author{}
\date{}

%%% Body
\begin{document}
\maketitle

\phantomsection\label{contents}
\pdfbookmark[1]{Contents}{contents}
\tableofcontents



\section{Copyright and licence%
  \label{copyright-and-licence}%
}

Copyright (C) 2003–2013 Juhapekka Tolvanen and Mika Jorma Saaristo

This script was originally created as a Bourne Shell script by:
%
\begin{quote}

Mika Jorma Saaristo

\url{http://www.cc.jyu.fi/~mjsaaris/}

\texttt{mjsaaris (at) cc (dot) jyu (dot) fi}

\end{quote}

After that it was heavily modified by:
%
\begin{quote}

Juhapekka ”naula” Tolvanen

\url{http://iki.fi/juhtolv}

\texttt{juhtolv (at) iki (dot) fi}

\end{quote}

A function called “watcher” is based on a Perl-code-snippet as seen in
a man page of \texttt{xscreensaver} -command (by Jamie Zawinski ( \url{http://www.jwz.org/} ))

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Also this documentation-file is under GNU GPL version 2 or (at your
option) any later version. Source code is file \texttt{README.tausta.txt}
and everything that is generated from it is treated like binary of
software. Some help-files that are used to generate different
documentation files, may have different licensing. They are mostly in
public domain. See commented lines in the beginning of each such file.


\section{Notes%
  \label{notes}%
}


\subsection{Pros and cons of this software%
  \label{pros-and-cons-of-this-software}%
}


\subsubsection{Pros%
  \label{pros}%
}

Main advantage of this software is extreme flexibility. Practically
any command that can change your desktop wallpaper or otherwise
manipulate background of your desktop, can be used by this software.
This software tries to avoid loading wallpaper when XScreenSaver is
running some of its screen hacks. You do not need Mad Shell-Fu Skillz
for configuring this software.


\subsubsection{Cons%
  \label{cons}%
}

If you do not want to change desktop wallpaper automatically after every few
hours, this software is definitely not for you. If you want to change your
desktop wallpaper after every few hours, but do not need all this
flexibility, this software may be a little bit overkill for you. Some
Bourne Shell -scripting skills are needed when configuring this software and
for some people it is too much (but as I said before, you do not need Mad
Shell-Fu Skillz)


\subsection{Other notes%
  \label{other-notes}%
}

In my machine a command called \texttt{ps} is from software package called
\texttt{procps}. If you use some GNU/Linux-distribution, you probably have
it. I have not tested, how well these scripts work with other
implementations of \texttt{ps}-command.

\texttt{tausta.sh} script is written in plain Bourne Shell -language;
Unfortunately it is not as reliable as \texttt{tausta.ksh.sh} : I have seen
too many times, that \texttt{tausta.sh} scripts loads wallpaper when that
xscreensaver runs some screen hack. If you experience same problem,
install some implementation of Korn Shell -language (ie. \texttt{pdksh},
\texttt{mksh} or \texttt{zsh}) and use \texttt{tausta.ksh.sh} instead. In fact, I do
not bother to maintaining \texttt{tausta.sh} anymore; I do not keep its
features and bug fixes in sync with \texttt{tausta.ksh.sh} .

Most proprietary Unix's has at least AT\&T \texttt{ksh88}. Some of them has
\texttt{dtksh}; It is \texttt{ksh93} with CDE-capabilities. \texttt{pdksh} has tinier
binary than \texttt{zsh}, so you’d better use it as implementation of Korn
Shell-language. \texttt{pdksh} is full of bugs, but those bugs should not
affect using this software. There is also so called \texttt{mksh}; it is
based on source code of \texttt{pdksh}, but its authors have fixed its bugs.
If you use \texttt{zsh} as Korn Shell-implamentation, you must make it
emulate ksh with this command:
%
\begin{quote}\begin{verbatim}
emulate ksh
\end{verbatim}

\end{quote}

The Original AT\&T KSH93 is finally really free software, so feel free to
use it:
%
\begin{quote}

\url{http://www.kornshell.com/}

\end{quote}

At least Debian GNU/Linux and Slackware Linux have it packaged already.

It seems, this script is most reliable, when you use the original AT\&T
KSH93 as your Korn Shell -implementation. Also \texttt{mksh} seems to work
just fine.


\section{Installation%
  \label{installation}%
}

First you need some cool software, that can load wallpaper or image to
X Window System desktop. I prefer \texttt{xli} and \texttt{hsetroot}. If I want to
download some frequently updated image from WWW and load it as wallpaper,
I prefer \texttt{dog} for that purpose, but \texttt{curl} is also good.

This software also tries to use \texttt{gxmessage} for showing error
messages in dialog. If it is not available, it will use just old
\texttt{xmessage} , instead.

Create directory \texttt{\textasciitilde{}/.tausta.sh.dir} . \texttt{tausta.rc.sh} has some
user-serviceable parts you can edit; at least name of window manager
process must be right or script won’t run at all. Put that file called
\texttt{tausta.rc.sh} to \texttt{\textasciitilde{}/.tausta.sh.dir/} . Put a script called
\texttt{tausta.sh} or \texttt{tausta.ksh.sh} to some directory in your \texttt{\$PATH}
, for example \texttt{\textasciitilde{}/bin/} . You may need to edit them a little bit,
first. Use \texttt{chmod} -command to ensure that you can run it.

Now create some file called \texttt{tausta.conf} and put it to
\texttt{\textasciitilde{}/tausta.sh.dir} . A file called \texttt{tausta.conf} is provided as
example. Empty lines and lines starting with \texttt{\#} are ignored, of
course. Commands are normal commands that Bourne Shell or any of its
derivative understands. You can use exported environment variables
instead of plain commands and directory paths. All those environment
variables are exported in a file called
\texttt{\textasciitilde{}/tausta.sh.dir/tausta.rc.sh} .

You can unsort lines of \texttt{tausta.conf} with software like \texttt{rl} , \texttt{unsort}
or \texttt{bogosort}.

Now everything should be in place. Then you must configure your X-session,
window manager or desktop environment so, that command like this is run
automatically during startup:
%
\begin{quote}\begin{verbatim}
nice -n 20 tausta.ksh.sh &
\end{verbatim}

\end{quote}

If your computer is powerfull enough, you can omit that \texttt{nice -n 20}, of
course.

You can stop waiting for next loading of wallpaper with commands like
these:
%
\begin{quote}\begin{verbatim}
kill -USR1 $(cat ~/.tausta.sh.dir/tausta.pid)
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
kill -USR1 `cat ~/.tausta.sh.dir/tausta.pid`
\end{verbatim}

\end{quote}

Feel free to bind them to some menu entry, panel button, keybinding
etc. After giving such command, you must wait about amount of
\texttt{\$CHECKINTERVAL} seconds before the next wallpaper is loaded.

Use signal \texttt{SIGHUP}, \texttt{SIGINT}, \texttt{SIGQUIT} or \texttt{SIGTERM} to stop
script, so it can safely exit. You can restart script with signal
\texttt{SIGUSR2} . Restarting is needed, if you edit \texttt{tausta.rc.sh} while
running this software. If you edit \texttt{tausta.conf} , there is no need
to restart this software.

If some image loading command makes your desktop background messed up,
or any other anomalies are seen, then check out file
\texttt{\textasciitilde{}/.tausta.sh.dir/lastcommand} to find out which command was tried
when loading the latest image. That file is also useful, if you think
that latest loaded wallpaper is boring and you want to stop using it.

Please, remember that command \texttt{killall sleep} is not a good way to
stop waiting for the next image-loading command: You must be sure you
do not have any other \texttt{sleep} -command running.


\section{Commands for loading wallpapers or other desktop background manipulation%
  \label{commands-for-loading-wallpapers-or-other-desktop-background-manipulation}%
}


\subsection{Software%
  \label{software}%
}

Consult these, if you can’t find some software:
%
\begin{itemize}

\item \url{http://freecode.com/} (A website formerly know as freshmeat.net)

\item \url{http://www.ftpsearch.net/}

\item \url{http://www.google.com/}

\end{itemize}


\subsubsection{For loading wallpapers%
  \label{for-loading-wallpapers}%
}
%
\begin{itemize}

\item feh
(This is really an image viewer, but it can load images to root window
and download them from WWW.)
%
\begin{itemize}

\item \url{http://feh.finalrewind.org/}

\end{itemize}

\item hsetroot
(Best software for loading center-tiled. Homepage is under
maintenance mode. Pristine source code is still available in
FTP-site of Debian and its mirrors.)
%
\begin{itemize}

\item \url{http://thegraveyard.org/hsetroot.php}

\item \url{ftp://ftp.debian.org/debian/pool/main/h/hsetroot/hsetroot_1.0.2-3.debian.tar.gz}

\item \url{ftp://ftp.debian.org/debian/pool/main/h/hsetroot/hsetroot_1.0.2.orig.tar.gz}

\item \url{http://www.debian.org/mirror/list}

\end{itemize}

\item qiv

(This is really an image viewer, but it can load images to
background, too. It can read also SVG-files and some other vector
graphic files, too.)
%
\begin{itemize}

\item \url{http://spiegl.de/qiv/}

\end{itemize}

\item xli
(Good for all but loading wallpaper center-tiled.
Homepage has been disappeared. Pristine source code is still available
in FTP-site of Debian and its mirrors.)
%
\begin{itemize}

\item \url{http://pantransit.reptiles.org/prog/}

\item \url{ftp://ftp.debian.org/debian/pool/main/x/xli/xli_1.17.0+20061110.orig.tar.gz}

\item \url{http://www.debian.org/mirror/list}

\end{itemize}

\item xloadimage (has \texttt{xsetbg}).
YOU DO NOT NEED THIS CRAP!: Use \texttt{xli}, because it is improved version of
xloadimage. \texttt{xloadimage} is likely to be present on any X11 contrib
mirror site:
%
\begin{itemize}

\item \url{http://www.mirrormonster.com/ftp.x.org/R5contrib/xloadimage.4.1.tar.gz}

\item \url{http://www.x.org/mirrors.html}

\end{itemize}

\item chbg
(This is buggy crap that depends on ancient and obsolete GTK+ 1.* .
Homepage URL do not work, anymore.)
%
\begin{itemize}

\item \url{http://chbg.sourceforge.net/}

\end{itemize}

\item Esetroot
(This is mostly for users of Enlightenmet -window manager. Homepage
URL do not work, anymore.)
%
\begin{itemize}

\item \url{http://www.jnrowe.ukfsn.org/projects/esetroot.html}

\end{itemize}

\end{itemize}


\subsubsection{For loading  desktop wallpaper from many files%
  \label{for-loading-desktop-wallpaper-from-many-files}%
}
%
\begin{itemize}

\item habak (I haven’t tried this.
Homepage has been disappeared. Pristine source code is still available
in FTP-site of Debian and its mirrors.)
%
\begin{itemize}

\item \url{ftp://ftp.debian.org/debian/pool/main/h/habak/habak_0.2.5.orig.tar.gz}

\item \url{http://www.debian.org/mirror/list}

\end{itemize}

\item telak
(I haven’t tried this. This is a small tool to draw local or remote
pictures on your root window.)
%
\begin{itemize}

\item \url{http://julien.danjou.info/projects/telak}

\end{itemize}

\end{itemize}


\subsubsection{For loading planet or moon images%
  \label{for-loading-planet-or-moon-images}%
}
%
\begin{itemize}

\item xplanet.
%
\begin{itemize}

\item \url{http://xplanet.sourceforge.net/}

\end{itemize}

\item xphoon
%
\begin{itemize}

\item \url{http://xphoon.sourceforge.net/}

\item \url{http://sourceforge.net/projects/xphoon/}

\item \url{http://www.acme.com/software/xphoon/}

\end{itemize}

\item pngphoon.
%
\begin{itemize}

\item \url{http://svolli.de/software/pngphoon/}

\end{itemize}

\end{itemize}


\subsubsection{For making (random) pics (on the root window)%
  \label{for-making-random-pics-on-the-root-window}%
}
%
\begin{itemize}

\item xstarfish
%
\begin{itemize}

\item \url{http://www.redplanetsw.com/starfish}

\end{itemize}

\item Evolvotron
(I haven’t tried this yet, but it seems promising. Maybe you
should create images with this software by hand and then load them with
\texttt{xli} or \texttt{hsetroot})
%
\begin{itemize}

\item \url{http://www.bottlenose.demon.co.uk/share/evolvotron/}

\end{itemize}

\item Randim
(I haven’t tried this yet, but it seems promising. It is
“interactive fractal image generation program based on the theory of
iterated function systems”.)
%
\begin{itemize}

\item \url{http://interstitiality.net/ifs_f.html}

\end{itemize}

\item xtartan
(Can draw tartan patterns on root window).
%
\begin{itemize}

\item \url{ftp://ftp.x.org/contrib/applications/xtartan-*}

\end{itemize}

\item XBanner
(This is for XDM, but it may be useful for desktop, too. I
haven’t tried this, yet.)
%
\begin{itemize}

\item \url{http://www.hijinks.com/~spade/linux/XBanner/}

\end{itemize}

\end{itemize}


\subsubsection{For changing color of desktop background%
  \label{for-changing-color-of-desktop-background}%
}
%
\begin{itemize}

\item xsetroot
(At least in Debian GNU/Linux binary of this command belongs to a package
called \texttt{x11-xserver-utils} .)
%
\begin{itemize}

\item \url{http://xorg.freedesktop.org/releases/individual/app/}

\end{itemize}

\end{itemize}


\subsubsection{For unsorting lines of \texttt{tausta.conf}%
  \label{for-unsorting-lines-of-tausta-conf}%
}
%
\begin{itemize}

\item bogosort
%
\begin{itemize}

\item \url{http://www.lysator.liu.se/~qha/bogosort/}

\end{itemize}

\item GNU coreutils (Version 6.0 and above includes \texttt{shuf})
%
\begin{itemize}

\item \url{http://www.gnu.org/software/coreutils/}

\end{itemize}

\item msort (It has random sorting as one of its comparison types)
%
\begin{itemize}

\item \url{http://billposer.org/Software/msort.html}

\end{itemize}

\item rl (randomize lines)
%
\begin{itemize}

\item \url{http://arthurdejong.org/rl/}

\end{itemize}

\item unsort
%
\begin{itemize}

\item \url{http://www.vanheusden.com/unsort/}

\end{itemize}

\end{itemize}

You’d better learn this feature of your text editor: How to pipe chosen
lines of text to external command and then substitute those lines with
output of that command. If your text editor can’t do it, it’s time to
learn some better text editor, like vi, Vim, GNU Emacs, XEmacs or SXEmacs.
Learn to use “undo”, too.


\subsubsection{For fetching files from WWW%
  \label{for-fetching-files-from-www}%
}
%
\begin{itemize}

\item dog
(This is probably the fastest software for this purpose, because it
has the smallest binary. But it has been reported to have ugly
source code. This program can not handle redirection at all. Hence,
it needs direct URL. Homepage has been disappeared. Pristine source
code is still available in FTP-site of Debian and its mirrors)
%
\begin{itemize}

\item \url{http://jl.photodex.com/dog/}

\item \url{ftp://ftp.debian.org/debian/pool/main/d/dog/dog_1.7.orig.tar.gz}

\item \url{http://www.debian.org/mirror/list}

\end{itemize}

\item feh
(This is really an image viewer, but it can load images to root
window and download them from WWW. Very handy, because you do not
need piping.)
%
\begin{itemize}

\item \url{http://feh.finalrewind.org/}

\end{itemize}

\item snarf
(Has smaller binary than \texttt{curl}. In fact it is just a little
bit bigger than binary of \texttt{dog}. Very recommended.)
%
\begin{itemize}

\item \url{http://www.xach.com/snarf/}

\end{itemize}

\item curl
(Much smaller binary than in \texttt{wget}. Available in most
Linux-distributions and very commonly found in many
Unix-workstations. Very recommended; oriented towards downloading
just one file. This is also available as a library: With that
library it is easy to add downloading features to almost any
software. BTW feh uses those libraries.)
%
\begin{itemize}

\item \url{http://curl.haxx.se/}

\end{itemize}

\item wget. (Available in most Linux-distributions. Not too bad, but
oriented towards downloading whole directories or other bigger
entities. It has bigger binary than \texttt{curl}.)
%
\begin{itemize}

\item \url{http://www.gnu.org/software/wget/wget.html}

\end{itemize}

\item httpie (It claims to be “cURL-like tool for humans”, but you must
have new enough version, at leat 0.3.1.)
%
\begin{itemize}

\item \url{http://httpie.org}

\item \url{https://github.com/jkbr/httpie}

\end{itemize}

\item lynx. (This is really a WWW-browser)
%
\begin{itemize}

\item \url{http://lynx.isc.org/}

\end{itemize}

\item w3m. (This is really a WWW-browser)
%
\begin{itemize}

\item \url{http://w3m.sourceforge.net/}

\end{itemize}

\item links / elinks / links2 / links hacked / whatever. (These are really
WWW-browsers. Argh… I just do not bother telling homepages of all
those forks. Just use Google and Wikipedia and be happy.)
%
\begin{itemize}

\item \url{http://en.wikipedia.org/wiki/Links_\%28web_browser\%29}

\end{itemize}

\item C-Kermit (Old program that can also act as replacement for programs
like wget or curl. It can do file transfer, terminal emulation,
character set conversion and many other things.)
%
\begin{itemize}

\item \url{http://www.kermitproject.org/}

\end{itemize}

\end{itemize}


\subsection{Commands%
  \label{commands}%
}

Especially I tell you how to substitute \texttt{xv}-commands with free software.


\subsubsection{Beginning of commands%
  \label{beginning-of-commands}%
}
%
\begin{quote}\begin{verbatim}
xv -smooth +noresetroot -root -quit
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xli -quiet -onroot
\end{verbatim}

\end{quote}


\subsubsection{Tiled%
  \label{tiled}%
}
%
\begin{quote}\begin{verbatim}
xv -smooth +noresetroot -root -quit /usr/local/textures/3com01.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xli -quiet -onroot /usr/local/textures/3com01.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
feh --bg-tile /usr/local/textures/3com01.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
qiv -y /usr/local/textures/3com01.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
qiv --root_t /usr/local/textures/3com01.jpg
\end{verbatim}

\end{quote}


\subsubsection{Double size tiled%
  \label{double-size-tiled}%
}
%
\begin{quote}\begin{verbatim}
xli -quiet -onroot -zoom 200  /usr/local/textures/3com01.jpg
\end{verbatim}

\end{quote}


\subsubsection{Center tiled%
  \label{center-tiled}%
}
%
\begin{quote}\begin{verbatim}
xv -smooth +noresetroot -root -rmode 4 -quit \
/usr/local/textures/applix01.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
hsetroot -tile /usr/local/textures/applix01.jpg
chbg -mode centertile /usr/local/textures/applix01.jpg
\end{verbatim}

\end{quote}


\subsubsection{Centered%
  \label{centered}%
}
%
\begin{quote}\begin{verbatim}
xv -smooth +noresetroot -root -rmode 5 -quit \
/usr/local/textures/stickdeath01.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xli -quiet -onroot -center -border black \
/usr/local/textures/stickdeath01.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
hsetroot -center /usr/local/textures/stickdeath01.jpg
\end{verbatim}

\end{quote}

Centered with black borders:
%
\begin{quote}\begin{verbatim}
xli -quiet -onroot -center -border black \
/usr/local/textures/stickdeath01.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
hsetroot -solid '#000000' -center
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
feh --bg-center /usr/local/textures/3com01.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
qiv  -x /usr/local/share/textures/escher18.png
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
qiv  --root /usr/local/share/textures/escher18.png
\end{verbatim}

\end{quote}

Centered with white borders:
%
\begin{quote}\begin{verbatim}
xli -quiet -cdither -onroot -center -border white
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
hsetroot -solid '#ffffff' -center
\end{verbatim}

\end{quote}

Double size pic. Centered. White borders:
%
\begin{quote}\begin{verbatim}
xli -quiet -onroot -center -zoom 200 -border white
\end{verbatim}

\end{quote}

Double size pic. Centered. Black borders:
%
\begin{quote}\begin{verbatim}
xli -quiet -onroot -center -zoom 200 -border black
\end{verbatim}

\end{quote}


\subsubsection{Maximized: Stretch image to fill whole screen%
  \label{maximized-stretch-image-to-fill-whole-screen}%
}
%
\begin{quote}\begin{verbatim}
xv -smooth +noresetroot -root -max -quit \
/usr/local/textures/soundbla.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
hsetroot -fill /usr/local/textures/soundbla.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xli -quiet -onroot -fillscreen -border black \
-smooth /usr/local/textures/soundbla.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
feh --bg-scale /usr/local/textures/soundbla.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
qiv -z /usr/local/textures/soundbla.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
qiv --root_s /usr/local/textures/soundbla.jpg
\end{verbatim}

\end{quote}


\subsubsection{Maximized: Stretch image, but keep aspect ratio%
  \label{maximized-stretch-image-but-keep-aspect-ratio}%
}
%
\begin{quote}\begin{verbatim}
hsetroot -full /usr/local/textures/soundbla.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xli -quiet-onroot -fullscreen -border black \
-smooth /usr/local/textures/soundbla.jpg
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
feh --bg-max /usr/local/textures/soundbla.jpg
\end{verbatim}

\end{quote}


\subsubsection{Solid background color and no image%
  \label{solid-background-color-and-no-image}%
}
%
\begin{quote}\begin{verbatim}
xsetroot -solid SOMECOLOR
\end{verbatim}

\end{quote}

That color can be for example “salmon” (or any other color mentioned
in \texttt{rgb.txt} -file of your X Window System) or RGB value in hex, for
example \texttt{\#000000} (black) . \texttt{xsetroot} can do other background
manipulations, too. With this command it creates grid sized 16×16
pixels and its foreground color is LightSalmon and background color
is MidnightBlue:
%
\begin{quote}\begin{verbatim}
xsetroot -mod 16 16 -fg LightSalmon -bg MidnightBlue
\end{verbatim}

\end{quote}


\subsubsection{Often updated WWW-image%
  \label{often-updated-www-image}%
}

(Don’t blame me, if such image is one day replaced with goatse or tubgirl or
if some goatse-like guy starts doing his thing in front of some webcam…)
dog can not handle redirection. hsetroot can not read from stdin.
%
\begin{quote}\begin{verbatim}
dog --no-header http://vision.ucsd.edu/~atai/softwarewar.png \
| xsetbg -quiet -onroot -center stdin
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
feh --bg-max http://www.ssec.wisc.edu/data/comp/latest_moll.gif
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
dog --no-header http://www.ssec.wisc.edu/data/comp/latest_moll.gif \
| xsetbg -quiet -onroot -fullscreen stdin
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
dog --no-header http://www.ssec.wisc.edu/data/comp/latest_moll.gif \
| xli -quiet -cdither -onroot -fullscreen -border black -smooth \
stdin
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
snarf http://www.ssec.wisc.edu/data/comp/latest_moll.gif - \
| xsetbg -quiet -onroot -fullscreen stdin
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
curl -s http://vision.ucsd.edu/~atai/softwarewar.png \
| xsetbg -quiet -onroot stdin
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
wget -q -O - http://vision.ucsd.edu/~atai/softwarewar.png \
| xsetbg -quiet -onroot -center stdin
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
lynx --source --dump http://vision.ucsd.edu/~atai/softwarewar.png \
| xsetbg -quiet -onroot -center stdin
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
elinks -dump -source  http://iki.fi/juhtolv/pix/ryppy_black.jpg \
| xsetbg -quiet -onroot stdin
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
w3m -dump_source http://iki.fi/juhtolv/pix/ryppy.jpg \
| xsetbg -quiet -onroot stdin
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
# This is command of HTTPie
http --body GET \
http://www.ssec.wisc.edu/data/comp/latest_moll.gif \
| xli -quiet -cdither -onroot -fullscreen -border black -smooth stdin
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
kermit -q -H -i -E -C \
'HTTP /TOSCREEN GET http://www.ssec.wisc.edu/data/comp/latest_moll.gif , QUIT' \
| xli -quiet -cdither -onroot -fullscreen -border black -smooth stdin
\end{verbatim}

\end{quote}


\subsubsection{Phase of the moon etc.%
  \label{phase-of-the-moon-etc}%
}
%
\begin{quote}\begin{verbatim}
xphoon
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xplanet -config ~/.xplanet/config -longitude 25.5 -latitude \
62.1 -label -num_times 1 -label_string "Origin: %o. Target:  %t." \
-labelpos "+15+15" -pango -font 'Sans' -fontsize 12
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xplanet -config ~/.xplanet/config -longitude 25.5 -label \
-num_times 1 -label_string "Origin: %o. Target:  %t." \
-labelpos "+15+15" -pango -font 'Sans' -fontsize 12 -projection \
mercator
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xplanet -config ~/.xplanet/config -longitude 25.5 -label \
-num_times 1 -label_string "Origin: %o. Target:  %t." -labelpos \
"+15+15" -pango -font 'Sans' -fontsize 12 -projection lambert
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xplanet -config ~/.xplanet/config -latitude 90 -label \
-num_times 1 -label_string "Origin: %o. Target:  %t." -labelpos \
"+15+15" -pango -font 'Sans' -fontsize 12 -projection azimuthal
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xplanet -config ~/.xplanet/config -latitude -90 -label -num_times \
1 -label_string "Origin: %o. Target:  %t." -labelpos "+15+15" \
-pango -font 'Sans' -fontsize 12 -projection azimuthal
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xplanet -config ~/.xplanet/config -longitude 25.5 -label \
-num_times 1 -label_string "Origin: %o. Target:  %t." -labelpos \
"+15+15" -pango -font 'Sans' -fontsize 12 -projection ancient
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xplanet -config ~/.xplanet/config -longitude 25.5 -label \
-num_times 1 -label_string "Origin: %o. Target:  %t." -labelpos \
"+15+15" -pango -font 'Sans' -fontsize 12 -projection hemisphere
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xplanet -config ~/.xplanet/config -longitude 25.5 -latitude \
62.1 -label -num_times 1 -label_string "Origin: %o. Target:  %t." \
-labelpos "+15+15" -pango -font 'Sans' -fontsize 12 -projection \
orthographic
\end{verbatim}

\end{quote}


\subsubsection{Randomly generated pic%
  \label{randomly-generated-pic}%
}
%
\begin{quote}\begin{verbatim}
xstarfish --size random
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xstarfish --size small
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xstarfish --size medium
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xstarfish --size large
\end{verbatim}

\end{quote}
%
\begin{quote}\begin{verbatim}
xstarfish --size full
\end{verbatim}

\end{quote}


\subsubsection{Doing it in Gnome way%
  \label{doing-it-in-gnome-way}%
}

Set background image:
%
\begin{quote}\begin{verbatim}
gconftool --type string --set \
/desktop/gnome/background/picture_filename \
/path/to/filename
\end{verbatim}

\end{quote}

Image options (yes, separated command):
%
\begin{quote}\begin{verbatim}
# Fill screen. Keep aspect ratio (in Gnome 2.16):
gconftool --type string --set \
/desktop/gnome/background/picture_options scaled
\end{verbatim}

\end{quote}

As I am writing this, that part \texttt{picture\_options} can have one of these
values:
%
\begin{itemize}

\item none

\item wallpaper

\item centered

\item scaled

\item stretched

\end{itemize}

You can check out which image options are available by doing this:
Start up a program called \texttt{gconf-editor}. See gconf-option
\texttt{/desktop/gnome/background/} . AFAIK Gnome can use also SVG-files as
a wallpaper.


\section{TODO%
  \label{todo}%
}

Somebody please tell me, how to do this thing:
%
\begin{itemize}

\item How to manipulate background of Plasma of KDE via command line?

\end{itemize}


\section{About this document%
  \label{about-this-document}%
}

This document is originally written in lightweight markup language
called “reStructuredText”. It is written in a file called
\texttt{README.tausta.txt}. If you want to edit it and then re-generate
other formats of this document, you must first install a software
package called \texttt{python-docutils}. Bourne Shell -script called
\texttt{compileall.sh} generates HTML and LaTeX. HTML-file is ready for any
WWW-browser. LaTeX-version is compiled with \texttt{xelatex} to create
PDF-file. You’d better have quite decent TeX-distribution, or that
compilation of LaTeX-file will fail. I use TeX Live. Then PDF-file is
converted to PostScript with a command called \texttt{pdftops} (belongs to
\texttt{poppler-utils}). You can get even more exotic file formats (for
example EPUB), if you install more software and then edit
\texttt{compileall.sh}. Especially you need Calibre and \texttt{pandoc}. A file
called \texttt{cleanall.sh} removes all generated files and all their
auxiliary and temporary files.

\end{document}
