[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Program started by bash works, program started by rc.local shows pro

From: Thomas Dickey
Subject: Re: Program started by bash works, program started by rc.local shows problems
Date: Sat, 24 Mar 2012 14:05:07 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Mar 15, 2012 at 01:49:26PM +0100, Hohl, Gerrit wrote:
> Hello everyone,
> in the meantime I download the new ncurses 5.9 package from the Ubuntu 11.10 
> branch and installed it in my 10.04.4:
> libncurses5_5.9-1ubuntu5_i386.deb
> libtinfo5_5.9-1ubuntu5_i386.deb
> My program works the same as before: No problem in the bash shell, but still 
> problems if it is started from the /etc/rc.local file.
> Means that problem is not limited to ncurses 5.7, but still exists in ncurses 
> 5.9.

no - the problem is with jcurses.  You're apparently linking with ncurses 
(rather than ncursesw)
and running the result in a terminfo which uses UTF-8 encoding.  In the example 
on the left side
of the screenshot, the locale is not set to reflect that, and ncurses tries to 
positions not knowing that some of the characters are multibyte.

In the example on the right side of the figure, the locale is set to reflect 
the encoding
and ncurses doesn't try to do that, using the ASCII equivalents.

If you modify the makefile and dependencies to use ncursesw, which can handle 
then that problem goes away.
> Regards,
> Gerrit
> -----Ursprüngliche Nachricht-----
> Von: Hohl, Gerrit 
> Gesendet: Donnerstag, 15. März 2012 12:44
> An: 'address@hidden'
> Betreff: Program started by bash works, program started by rc.local shows 
> problems
> Hello everyone,
> I'm using Java and the Java Curses Library ( 
> http://sourceforge.net/projects/javacurses/ ) which is some kind of wrapper 
> for the ncurses library. If I start my program from the bash, I don't have 
> any problems. As my program is some kind of setup program, I want to start it 
> from the /etc/rc.local on an Ubuntu 10.04.4 LTS 32-bit system (libncurses5 
> 5.7+20090803-2ubuntu3 depending on lic6 >= 2.4). But if I do that the program 
> shows some odd problems: The "rendering" of the screen is not correct. The 
> shadow of my windows is on the left border on the screen instead of in the 
> column before the last column. And a few other things are also upside-down.
> I already opened a bug at the Java Curses Library website:
> https://sourceforge.net/tracker/?func=detail&aid=3504280&group_id=37998&atid=420913
> There I also added a screenshot which shows the problem.
> As I didn't know if the problem was caused by that library or the ncurses 
> library, I did some debugging: I created a log containing every move() and 
> addch() (means the y and x coordinates as well as the character which was 
> drawn). I compared the logs from the program startet from the bash and the 
> program started by the rc.local. They were identical - in size and content. 
> Means the Java Curses Library does the absolutely identical ncurses calls in 
> both cases. So I guess it is a bug or problem within the ncurses or one of 
> the libraries that are used by it.
> Did someone have similar trouble in the past? Is there any bugfix or 
> workaround available?
> Regards,
> Gerrit
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-ncurses

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]