problem with xvesa.lua

Forum: Programming and Scripting
Topic: problem with xvesa.lua
started by: minimalistic

Posted by minimalistic on Sep. 30 2006,13:42

xvesa.lua is used to set resolution.  From my limited undestanding, it looks like it pipes the output of Xvesa -listmodes to /tmp/pipe.lua, then reads from that file to create buttons to set resolution.  My problem is that almost always on the first use or two, tool comes up blank.  The file /tmp/pipe.lua always gets created, so I can only assume that the script doesn't read it consistently.  Anybody else have this problem?  If so, how do you fix it?

Posted by mikshaw on Sep. 30 2006,14:35
This seems to be a potential problem:
Code Sample
execute("Xvesa -listmodes 2>/tmp/pipe.lua &")
local file,err = openfile("/tmp/pipe.lua","r")

Xvesa -listmodes is run in the background, and immediately lua tries to open the file.  If that file has not yet been created, it will fail.  Removing the ampersand should fix it.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.