Re: how to make cron run gaim under my X session?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/19/07, Mikkel L. Ellertson <mikkel@xxxxxxxxxxxxxxxx> wrote:
> Valent Turkovic wrote:
> > I get an error when trying to start this script:
> >
> > ./gaim-start.sh
> > ./gaim-start.sh: line 5: script-file=~/gaim-start.sh: No such file or
> > directory
> > ./gaim-start.sh: line 20: $script: ambiguous redirect
> >
> > I tried to edit line 5 and change "script-file" to "$script-file" and
> > that also didn't work so I tried changing it to "$script" and it still
> > doesn't work...
> >
> > I don't know enough bash to troubleshoot it.
> >
> > Thank you for your feedback and help Mikkel.
> >
> > Valent.
> >
> Please do not top post!
>
> I should have tested the script. It does not like script-file, so
> replace it with script_file. In line 20, there is a typo - it should
> be $script_file instead of $script file. ($script-file with the
> original value.)
>
> Mikkel
> --
>
> A:  Because it messes up the order in which people normally read text.
> Q:  Why is top-posting a bad thing?
>

Hi Mikkel, I found a few other bugs and corrected the script - but I
couldn't have done it without you - so thank you.

The script was a non-executable and "export" was missing so this is
the final version of the script:


================== cut ===============
$ cat gaim-start.sh
#!/bin/bash
#
# A script to create a script to run GAIM at 8:15 am.
#
script_file=~/start-gaim.sh

if [ -z $XAUTHORITY ] ; then
       echo XAUTHORITY in not set!
       exit 1
fi

if [ -z $DISPLAY ] ; then
       echo DISPLAY is not set!
       exit 1
fi

echo \#\!/bin/bash > $script_file
echo export XAUTHORITY=$XAUTHORITY >> $script_file
echo export DISPLAY=$DISPLAY >> $script_file
echo gaim >> $script_file
chmod +x $script_file

at -f $script_file 8:15 am

================== cut ===============

-- 
http://kernelreloaded.blog385.com/
linux, blog, anime, spirituality, windsurf, wireless
registered as user #367004 with the Linux Counter, http://counter.li.org.
ICQ: 2125241, Skype: valent.turkovic

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux