LinHES Forums
http://forum.linhes.org/

Xauthority and Wine ?
http://forum.linhes.org/viewtopic.php?f=6&t=11410
Page 1 of 1

Author:  Warped [ Fri Sep 01, 2006 1:54 am ]
Post subject:  Xauthority and Wine ?

Hi all,

I have problem with Xauthority and Wine.
I want to launch Win32 application with Wine via cron.
Cron launching Wine launch it with bare environment.
I managed already to set proper environment for cron session.
One of needed environment variable is Xauthority
Unfortunately Xauthority variable is changing every boot - so I can't define statically it as simple EXPORT statement in may script.
So question is: how can I resolve this issue.
Should I disable xauth, or maybe .Xauthority files should be arranged in other way ?

Has anybody similar issue ?

Author:  khrusher [ Fri Sep 01, 2006 7:03 am ]
Post subject: 

After each boot, when the value is reset, is there a way to determine the value that you need for the XAUTH variable?

is it in a file? can it be determined progamatically? maybe when the mythtv user logs in following the boot, the value can be written to a file somewhere. Then your cron script can read file and set variable.

Not sure if that would work, of even makes sence, but it is a scripting way around the issue if you have access to the data

Author:  alien [ Fri Sep 01, 2006 9:23 am ]
Post subject: 

I thought XAUTHORITY env variable pointed to the .Xauthority file and therefore should not change?

I haven't tried this, but I believe if you use the userID mythtv for the cron job (assuming the cron job is on same box as mythtv), connections to the display will be allowed. I.e. Same box and same userID is allowed to connect to X. Only if from different box and/or different userID is it blocked and xhost, xauth or ssh mechanism must be used.

Cheers,

Allen

Author:  Warped [ Fri Sep 01, 2006 10:30 am ]
Post subject: 

Of course connections will be allowed, but....
My understanding is following: application should know where .Xauthority file lays. Environment variable tell that. When You start xterm variables are set.
try "env" command.
Problem is that cron is launching bare session (without environment variables set). So before application start we have to set environment. All static variables we can set i.e. via scrip. But dynamic variables should be set in some other way.
I assume when I launch xterm, in some way variables are set before giving prompt. How it is done ?
Is there launched script or sort of program ?



alien wrote:
I thought XAUTHORITY env variable pointed to the .Xauthority file and therefore should not change?

I haven't tried this, but I believe if you use the userID mythtv for the cron job (assuming the cron job is on same box as mythtv), connections to the display will be allowed.
Allen

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/