Register
It is currently Wed Apr 23, 2014 12:41 am

Display issues for dialog cmd when executed from rc.local.


All times are UTC - 6 hours


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPosted: Mon Jul 06, 2009 7:50 pm   

Joined: Mon Jul 06, 2009 9:30 am
Posts: 8
Hello,

I have a simple script that display a form. It looks perfect when executed 'manually'. However, when the exact same script is executed by rc.local, it is not displayed correctly.

See link here for screen shots: http://api.virtualcad.com/misc/display.jpg

What I have learned so far, is that the terminal/environment is not the same when a program is executed by rc.local and that I may need to execute my script using a 'pseudo-tty wrapper'. However, I can't find any answers - perhaps I am not using the right keywords, but Google isn't helping. :(

Can someone steer me in the right direction?

Thanks,

Eric


Top
 Profile  
 PostPosted: Wed Jul 08, 2009 6:43 am   

Joined: Mon Nov 17, 2008 7:25 am
Posts: 221
This is not really a bashscript problem.
But I'll give it a shot anyway since I'm quite sure this is a $TERM problem.

Try writing at the top of your script (or rc.local):
Code:
export TERM=xterm


Best regards
Fredrik Eriksson


Top
 Profile  
 PostPosted: Wed Jul 08, 2009 7:50 am   

Joined: Mon Jul 06, 2009 9:30 am
Posts: 8
Hello Fredrik,

Thanks for your help.

I had tried that. It has an effect (so maybe it is the right direction) but still has display issues.

See the image here: http://api.virtualcad.com/misc/dialog.jpg

The difference this time is that now when I execute the script manually, I see the exact same thing. At least it is consistent now.

It is clear the issue now is some sort of 'character mapping' problem.

Have you seen this before?

Thanks in advance for any help you can offer,

Eric


Top
 Profile  
 PostPosted: Wed Jul 08, 2009 11:36 am   

Joined: Mon Nov 17, 2008 7:25 am
Posts: 221
Well it's basically how the terminal interprets nCurses.

Usually that fixes those kinds of issues... but apparently you need to set some other kind of terminal.

Remove it and echo $TERM when it works as it should and you should be able to figure out which kind of terminal should be set.

Best regards
Fredrik Eriksson


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP