[PLUG] Time to learn how to do a script
Matt Alexander
lowbassman at gmail.com
Mon Dec 19 13:15:01 UTC 2005
John Jordan wrote:
> The person who told me about these two utilities also suggested
> that I write a little script instead. He suggested:
>
> #!/bin/sh
> while true; do
> xdpyinfo 2>&1 >/dev/null || exit
> soffice -quickstart
> done
>
> Nice of him to include the code, since I have zero programming
> ability. But what do I do with the code? I assume I save it as a file
> somewhere, but where? And does it need a specific extension?
> And how do I make it run?
>
>
Hi John,
I primarily use KDE, but a quick Google search brought this page up with
information on how to autostart programs in Gnome:
http://gentoo-wiki.com/HOWTO_Autostart_Programs
Whether you use KDE or Gnome, however, you'll need to create a file with
your favorite text editor and paste in the script that was given to
you. A file extension isn't required, but since it's a shell script,
you should give it a ".sh" extension to easily identify what type of
file it is. Put this file in a place such as /usr/local/bin. Next,
make the script executable. So if you named the script ooquick.sh, for
example, then you would run the command "chmod +x ooquick.sh" (or
right-click the file in your file-browser and make it executable).
~M
More information about the PLUG
mailing list