microwindows icon indicating copy to clipboard operation
microwindows copied to clipboard

Cannot initialise keyboard

Open bigsmokeDev opened this issue 1 year ago • 8 comments

so I have setup microwindows using the linux-fb config and ran ldd nano-X and copied all of the libs so that I can run it on a simple linux + busybox os so it is not mentioning any issues about the framebuffer but it cant initialise the keyboard if you want more info I can provide some

bigsmokeDev avatar May 10 '24 18:05 bigsmokeDev

You might try building microwindows demos without using shared libraries, that is, as a static binary. This is done by setting SHAREDLIBS=N and SHAREDLINK=N in config.

it cant initialise the keyboard

This is usually because the default is the scan-code enabled keyboard, which may not be present. You can try the simple keyboard by setting KEYBOARD=TTYKBD in config.

Thank you!

ghaerr avatar May 10 '24 18:05 ghaerr

SHAREDLIBS=N and SHAREDLINK=N was already there and I changed the KEYBOARD=SCANKBD to KEYBOARD=TTYKBD but its still giving me the same error

bigsmokeDev avatar May 10 '24 19:05 bigsmokeDev

It would help to see the error of course and exactly what you're running etc. But if the message is saying "Can't initialize keyboard" then this is probably because the open("/dev/tty", O_RDWR) is failing in src/drivers/kbd_tty.c:

#   define KEYBOARD "/dev/tty"  /* keyboard associated with screen*/

This might also because you don't have root permissions on /dev/tty or the actually tty you're using. In general, root permissions are required for framebuffer access unless device modes are changed.

You can try recompiling with the above changed and/or chmod /dev/tty or the terminal you're on. Also try running sudo. I'd have to see your complete config also to know what you've compiled.

ghaerr avatar May 10 '24 19:05 ghaerr

here is what I use: Linux 6.8.9 kernel with default config (except the framebuffer) Busybox 1.36.1 (I am mounted /dev and /sys etc)

here is my config file: config.txt

also I edited the nx11 makefile so that I can use the local X11

bigsmokeDev avatar May 10 '24 19:05 bigsmokeDev

The config file looks ok. What command are you running?

ghaerr avatar May 10 '24 19:05 ghaerr

just cd into root and run ./nano-X

bigsmokeDev avatar May 10 '24 19:05 bigsmokeDev

The nano-X server is mean to be run by the runapp shell script, as it alone doesn't do much. However, it will try to open a TTY and report the error you're seeing. It might be easier to run a simpler command, rather than one that requires client/server, like nano-X. A win32 app like ./mwdemo doesn't require client/server.

you should have to copy any shared libs with SHAREDLIBS=N. Go ahead and try the suggestions above about getting the TTY working using sudo or chmod.

ghaerr avatar May 10 '24 19:05 ghaerr

so I ran mwdemo and same error also very new to this so all I did was run chmod 777 /dev/tty

bigsmokeDev avatar May 10 '24 19:05 bigsmokeDev