cosmos72 / twin

Text mode window environment. A "retro" program for embedded or remote systems, that doubles as X11 terminal and text-mode equivalent of VNC server
Other
654 stars 38 forks source link

Ncurses Inception issue #9

Open Mirppc opened 8 years ago

Mirppc commented 8 years ago

On one of my machines with Twin installed i was having some graphical issues with Nurces within ncurses under a Twin terminal.

I was having some graphics drivers issues with my server/workstation so i booted into a TTY session and ran TWIN so i could have multiple movable terminals using GPM a (mouse) to maneuver around and fix X.

I then had to run inside one of the terminals a Ncurses based program called YAST2 to fix some broken packages and modify my booloader. Yast uses Ncurses just like Twin and on my Opensuse machines i usually know when TWIN will be broken on a tty/ssh if Yast has the same glitchyness.

So i had TWIN running fine with no visual issues whatso ever but when i ran YAST or the Nvidia driver installer in a terminal within TWIN the ncurses interface was covered in weird symbols and non of the text was readable. i then tested out ALSAMIXER to find the same results.

My hypothesis is that Twin doesn't want or like Ncurses to go all Inception.

I will test on a ubuntu/debian machine once i can get TWIN properly compiled on a non-embedded device.

System specs of the machine with the issue; Opensuse 13.2 64bit Dual Intel X5355s 2.6ghz quadcore xeon, 16gb DDR2 FBDIMM, Nvidia GT730 2gb

Screenshots once California cools down enough to work where my computer stations are.

cosmos72 commented 8 years ago

Ok, I will wait for the screenshots / pictures.

Also, twin log messages could be useful. To see them, open the menu and click on Common -> Unfocus, then the symbol '=' in the menu -> Messages

In theory twin is very capable of inception - I have used quite often twin running inside another twin, and even inside itself (with infinity mirror effect, similar to https://www.quora.com/What-would-happen-if-you-point-a-camera-at-its-live-feed-monitor)

In the meantime, it would help if you explain a bit more the setup that causes issues. If I understand correctly it's something like:

Correct?

Mirppc commented 8 years ago

plain shell, Init3 runlevel. Grub GFXPAYLOAD=text

I will check the messages next time i need to reboot

cosmos72 commented 7 years ago

Any news on the screenshots I asked to analyze the problem?

Mirppc commented 7 years ago

Sorry. i have been busy doing distro upgrades. Sometime during the holidays i should get a screenshot. currently i will try installing twin on the CHIP and seeing how that fairs over ssh and tty. The Chip is the 9 dollar computer from NextThingCO that is running a debain based os. Also i need to make sure my camera will behave for taking the pictures.

:several hours later:

Well that didnt work :<

everything seemed to compile with no errors. got this instead when i went to run TWIN.

$ twin /usr/local/bin/twin_server: error while loading shared libraries: libTutf.so.0: cannot open shared object file: No such file or directory

will update later.

cosmos72 commented 7 years ago

If it's a Linux-based or Linux-like system, running "ldconfig" as root after installing twin should fix any error "lib: cannot open shared object file: No such file or directory"

During "make install", the new Makefiles print a notice saying that, but it gets buried in the tons of output

Mirppc commented 7 years ago

ahh. might be worth whild to see if that could be added to the readme instructions.

./configure make sudo make install ldconfig

will test this soon.

cosmos72 commented 7 years ago

updated README with your suggestion :)

Mirppc commented 7 years ago

Ncurses Nception screencapture during a stream on compiling Twin (stream failed as i could not gain access to the machine i was going to compile on).

http://paste.opensuse.org/78650573

Amazing i caught it in the wild!

Will do another stream once i figure out why my hostname on my pi is busted and will link you the video.

cosmos72 commented 7 years ago

Now it's clear, thanks :)

A minor note first: in the screenshot, twin is using the X11 font "fixed" which is latin1 (iso8859-1). This means line-drawing and other pseudo-graphical characters are not available and will be rendered in plain ASCII. Latest versions of twin try very hard to use a Unicode (iso10646-1) X11 font, to work around this limitation. In alternative, you can use xfontsel to choose a font you like, and specify it as an option: twstart --hw=gfx,font=FONTNAME (only accepts font sizes matching one of the XPM themes, currently 6x12, 8x16 o 9x19) or twstart --hw=X,font=FONTNAME (accepts any monospaced font)

About the issue you reported: in your screenshot, I can see that YaST2 output is garbled because it's sending UTF-8 to standard output, but twterm is not in UTF-8 mode. Rather than trying to convince YaST2 not to use UTF-8, I suggest to go all-the-way to an UTF-8 setup, which is modern and "the right thing".

Let me know if this fixes the problem :)

cosmos72 commented 7 years ago

Please test with commit be013197e1b9edcc4223980780b54b2f639e1dd5 or later, because the original check to autodetect UTF-8 locale was too strict.

Mirppc commented 7 years ago

Will test sometime after the holidays. UTF Local is set to UTF-16 on the poweredge server that has this same issue, but alas i am using the precompiled twin on that machine. if it works i will lety the maintainer know.