<div class="gmail_quote">On Fri, Jun 3, 2011 at 11:57 AM, Max Horn <span dir="ltr"><<a href="mailto:max@quendi.de">max@quendi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Am 03.06.2011 um 17:22 schrieb Alex Bevilacqua:<br>
<div class="im"><br>
> Couldn't you do something along the lines of:<br>
><br>
> xterm -e less $PATH_TO_SCUMMVM_LOG<br>
><br>
> I'm assuming both commands are available (by default) on all *NIX distros. I was going to recommend a GUI message + xclip, but xclip isn't installed by default :P<br>
<br>
</div>Sure, that could be one of the fallbacks. But I know that *I* certainly would prefer if xdg-open was tried first... but then, I am not primarily a Linux user anyway ;).<br>
<br>
Anyway, I imagine something like this could work:<br>
<br>
bool OSystem_POSIX::hasFeature(Feature f) {<br>
if (f == kFeatureDisplayLogFile)<br>
return true;<br>
return OSystem_SDL::hasFeature(f);<br>
}<br>
<br>
bool OSystem_POSIX::displayLogFile() {<br>
if (_logFilePath.empty())<br>
return false;<br>
int res = system("xdg-open '%s' || xterm -e less '%s'", _logFilePath.c_str(), _logFilePath.c_str());<br>
return res != 0;<br>
}<br>
<br>
<br>
Anyway, we can just implement one solution now, and fine tune it later. Let's build the bikeshed before we argue how to paint it ;).<br>
<br></blockquote><div><br></div><div>... I want to paint my bikeshed blue :D</div><div><br></div><div><font class="Apple-style-span" face="'courier new', monospace">xterm -e 'echo -ne "\033]10;#0000ff\007" && echo -ne "\033]11;#000000\007" && less $LOGFILE</font></div>
<div><br></div><div>(sorry, couldn't resist :P)</div><div><br></div><div><br></div></div>