[Ilugc] Xmessage in SUSE

2012-06-05 Thread Rajesh kumar
I am building a custom application which starts in roots cron every day. I
am using Xmessage to alert the user that the application is completed
running. It should alert all the user who have logged in via a popup.

The problem i am having is that its not getting appeared in popup. If the
same script is made run on console then i am getting this popup. What is
the reason for that. How it can be solved.

--
regards
Rajesh Kumar R.K
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] Xmessage in SUSE

2012-06-05 Thread Guruprasad
Hi Rajesh,

On Wed, Jun 6, 2012 at 10:56 AM, Rajesh kumar  wrote:
> I am building a custom application which starts in roots cron every day. I
> am using Xmessage to alert the user that the application is completed
> running. It should alert all the user who have logged in via a popup.
>
> The problem i am having is that its not getting appeared in popup. If the
> same script is made run on console then i am getting this popup. What is
> the reason for that. How it can be solved.

You will have to set the DISPLAY environment variable to the right
display number. Something like 'export DISPLAY=:0' before running the
script.

Thanks & Regards,
Guruprasad
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] Xmessage in SUSE

2012-06-06 Thread Rajesh kumar
You will have to set the DISPLAY environment variable to the right
> display number. Something like 'export DISPLAY=:0' before running the
> script.
>

I tried that still is not working.

I tried the below too

in crontab

* * * * * export DISPLAY=:0 |  xmessage "Test Message"

--
regards
Rajesh Kumar R.K
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] Xmessage in SUSE

2012-06-06 Thread Tushar Rishabadas
On 6 Jun 2012 17:38, "Rajesh kumar"  wrote:
>
> You will have to set the DISPLAY environment variable to the right
> > display number. Something like 'export DISPLAY=:0' before running the
> > script.
> >
>
> I tried that still is not working.
>
> I tried the below too
>
> in crontab
>
> * * * * * export DISPLAY=:0 |  xmessage "Test Message"
>
Is 0 the right display number? You can also pass an ip address afaik..

-tushar

> --
> regards
> Rajesh Kumar R.K
> ___
> ILUGC Mailing List:
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] Xmessage in SUSE

2012-06-06 Thread Balachandran Sivakumar
Hi,

On Wed, Jun 6, 2012 at 5:38 PM, Rajesh kumar  wrote:
> You will have to set the DISPLAY environment variable to the right
>
> * * * * * export DISPLAY=:0 |  xmessage "Test Message"
>

  I guess it should be IPAddress:0 where IP address is the IP of
the machien running your X server. I can be localhost:0 as well if
your localhost has an Xserver. Thanks

-- 
Thank you
Balachandran Sivakumar

Arise Awake and stop not till the goal is reached.
                                                             - Swami Vivekananda

Mail: benignb...@gmail.com
Blog: http://benignbala.wordpress.com/
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] Xmessage in SUSE

2012-06-06 Thread Raja Subramanian
On Jun 6, 2012 10:57 AM, "Rajesh kumar"  wrote:
>
> I am building a custom application which starts in roots cron every day. I
> am using Xmessage to alert the user that the application is completed
> running. It should alert all the user who have logged in via a popup.

Use dbus, it is designed exactly for this usage.

X has an authentication mechanism between the X server and the client. The
shared secret MIT MAGIC COOKIE is stored in the xauthority file which is
accessible only by the local user who has started the X session. If you
want to applications launched by your cron job to communicate to X sessions
of other users, you will have to bypass the X session security mechanisms.
Not a recommended practice.

- Raja
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] Xmessage in SUSE

2012-06-06 Thread Arun Khan
On Thu, Jun 7, 2012 at 12:55 AM, Raja Subramanian
 wrote:
>
> Use dbus, it is designed exactly for this usage.
>
> X has an authentication mechanism between the X server and the client. The
> shared secret MIT MAGIC COOKIE is stored in the xauthority file which is
> accessible only by the local user who has started the X session. If you
> want to applications launched by your cron job to communicate to X sessions
> of other users, you will have to bypass the X session security mechanisms.
> Not a recommended practice.

+1 (Nice and succinct explanation Raja).

Sidebar question to OP - can it not be done via a simple email?   I
guess your objective is to notify the users that the job is completed.

-- Arun Khan
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc