Mauro Fontana
2014-07-07 13:02:26 UTC
Hey everyone
I come to you asking a very dumb question, but, as many simple problems,
perhaps the error is so obvious you'll never spot it.
I'm trying to make a simple script that runs xdotool with "at" command at a
specific time. After searching a lot, I found that as "at" works deattached
from the X session it was ran (or something like that), I had to append
"export DISPLAY=':0'" in order for xdotool to find an X server whose input
must be faked.
It was all rainbows and smiles, until I thought it would be better to
improve the script so it would run on an arbitrary X server, as I won't be
using always the same one. So basically I designed this minimal working
example.
The script itself:
http://paste.debian.net/108232/
The tempf file the scripts calls:
http://paste.debian.net/108234/
But it doesn't work.
When running ./temp.sh, I get a beautiful e-mail saying:
"Error: Can't open display: (null)
Failed creating new xdo instance"
The problem gets solved if I replace "export DISPLAY=$pantalla" in the
tempf file for "export DISPLAY=':0'", for example. However, this is not
what I'm trying to achieve.
If after running the script, if I type "echo $pantalla" it correctly
outputs displaynumber, so the variable is set. I can also see the "job ##
at DATE" message from at, so the problem isn't there neither. The options
are 2, bad scripting or not correctly understanding how xdotool works. I
can't find the syntax error, neither could I find a solution for a similar
problem, so I'm asking here for help, whatever be the case.
Thanks in advance and excuse me is this isn't the proper channel in order
to ask for help.
Cheers,
Mauro
I come to you asking a very dumb question, but, as many simple problems,
perhaps the error is so obvious you'll never spot it.
I'm trying to make a simple script that runs xdotool with "at" command at a
specific time. After searching a lot, I found that as "at" works deattached
from the X session it was ran (or something like that), I had to append
"export DISPLAY=':0'" in order for xdotool to find an X server whose input
must be faked.
It was all rainbows and smiles, until I thought it would be better to
improve the script so it would run on an arbitrary X server, as I won't be
using always the same one. So basically I designed this minimal working
example.
The script itself:
http://paste.debian.net/108232/
The tempf file the scripts calls:
http://paste.debian.net/108234/
But it doesn't work.
When running ./temp.sh, I get a beautiful e-mail saying:
"Error: Can't open display: (null)
Failed creating new xdo instance"
The problem gets solved if I replace "export DISPLAY=$pantalla" in the
tempf file for "export DISPLAY=':0'", for example. However, this is not
what I'm trying to achieve.
If after running the script, if I type "echo $pantalla" it correctly
outputs displaynumber, so the variable is set. I can also see the "job ##
at DATE" message from at, so the problem isn't there neither. The options
are 2, bad scripting or not correctly understanding how xdotool works. I
can't find the syntax error, neither could I find a solution for a similar
problem, so I'm asking here for help, whatever be the case.
Thanks in advance and excuse me is this isn't the proper channel in order
to ask for help.
Cheers,
Mauro
--
You received this message because you are subscribed to the Google Groups "xdotool-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xdotool-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to xdotool-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/xdotool-users.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "xdotool-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xdotool-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to xdotool-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/xdotool-users.
For more options, visit https://groups.google.com/d/optout.