kterm
kterm copied to clipboard
Help
I installed debian with container on Kindle, when I use Kterm in debian system, it will report the following error
*** VTE ***: Failed to load terminal capabilities from '/etc/termcap'
You probably don't have termcap installed in your container? You could probably use the one shipped with kterm kindle package.
I will try again. thanks for your reminder.
This version of libvte seems to need termcap file. Modern ones rely on terminfo.
Do you have /etc/termcap
folder in your debian container? The library probably also looks for /usr/share/vte/termcap
directory. You need this folder with xterm
file inside.
If you don't have it, install it or link to termcap from kterm package.
I have tried it, but it didn't work. You can try installing this(https://github.com/Zucker-jex/Debian-System-in-Kindle) on kindle before using Kterm.
So you have /etc/termcap/xterm
file in your debian chroot and you still see this error: *** VTE ***: Failed to load terminal capabilities from '/etc/termcap'
?
yes
Make sure to run kterm with kterm.sh script, as it sets TERM=xterm
environment variable.
Other than that I have no clues.
Thanks for your reminder.
It still doesn't work.
I solved the error, but a new problem appeared.
I moved the file /etc/termcap in the Kindle (note that this is a file) to the /etc/ directory of the debian container. Solved the '*** VTE ***: Failed to load terminal capabilities from '/etc/termcap' error.
But after I run it it quits very quickly, this is the new problem.
https://user-images.githubusercontent.com/98502190/180653200-8b59e2f3-8e65-4ff7-a1ce-1973d4dbfb67.mp4
Ok. So the termcap in /etc is just a file. Probably default termcap? Try to run kterm from terminal directly without the script. Maybe you will see any error in the console.
Nothing happens, just a flash and it's gone
.
You may try with -d
to see some debugging output. Also set the environment variables, like in the script.
You may also try to run it from standard kindle path: /mnt/us/extensions/kterm
. I don't remember now, but some paths might be hard coded in the kindle package.
First of all, the first question, I don't think it has a hard directory requirement on software.
I modified the directory specified in Kterm.sh in the debian container, and modified it to EXTENSION=/mnt/debian/root/kterm pointing to the debian container Kterm.
![IMG_20220725_104958](https://user-
After this modification, it can run in Kindle Linux.
Then I entered the debian container, changed back to the directory of kterm.sh and ran kterm.sh again. It's still the same as before, just a flash and it's gone.
In the debian container, I used the -d parameter and its output is as follows.
click to show log
root@Debian[~/kterm/bin]# ./kterm -d
Dbus connection failed: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Dbus connection failed: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Layout path from config: /root/kterm/layouts/keyboard-300dpi.xml
attribute id = "kt keyboard 299"
attribute fill = "true"
attribute display = "image:img-300dpi/esc.png"
attribute action = "escape"
key width: 45
end name: default
end name: key
attribute display = "1"
key width: 27
end name: default
attribute display = "!"
key width: 17
end name: shifted
attribute display = "image:img-300dpi/f1.png"
attribute action = "f1"
key width: 32
end name: mod1
attribute display = "?"
key width: 17
end name: mod2
end name: key
attribute display = "2"
key width: 27
end name: default
attribute display = "@"
key width: 42
end name: shifted
attribute display = "image:img-300dpi/f2.png"
attribute action = "f2"
key width: 32
end name: mod1
attribute display = "?"
key width: 17
end name: mod2
end name: key
attribute display = "3"
key width: 27
end name: default
attribute display = "#"
key width: 35
end name: shifted
attribute display = "image:img-300dpi/f3.png"
attribute action = "f3"
key width: 32
end name: mod1
attribute display = "?"
key width: 27
end name: mod2
end name: key
attribute display = "4"
key width: 27
end name: default
attribute display = "$"
key width: 27
end name: shifted
attribute display = "image:img-300dpi/f4.png"
attribute action = "f4"
key width: 32
end name: mod1
attribute display = "?"
key width: 27
end name: mod2
end name: key
attribute display = "5"
key width: 27
end name: default
attribute display = "%"
key width: 40
end name: shifted
attribute display = "image:img-300dpi/f5.png"
attribute action = "f5"
key width: 32
end name: mod1
attribute display = "?"
key width: 27
end name: mod2
end name: key
attribute display = "6"
key width: 27
end name: default
attribute display = "^"
key width: 35
end name: shifted
attribute display = "image:img-300dpi/f6.png"
attribute action = "f6"
key width: 32
end name: mod1
attribute display = "?"
key width: 27
end name: mod2
end name: key
attribute display = "7"
key width: 27
end name: default
attribute display = "&"
key width: 33
end name: shifted
attribute display = "image:img-300dpi/f7.png"
attribute action = "f7"
key width: 32
end name: mod1
attribute display = "?"
key width: 17
end name: mod2
end name: key
attribute display = "8"
key width: 27
end name: default
attribute display = "*"
key width: 21
end name: shifted
attribute display = "image:img-300dpi/f8.png"
attribute action = "f8"
key width: 32
end name: mod1
attribute display = "?"
key width: 22
end name: mod2
end name: key
attribute display = "9"
key width: 27
end name: default
attribute display = "("
key width: 16
end name: shifted
attribute display = "image:img-300dpi/f9.png"
attribute action = "f9"
key width: 32
end name: mod1
attribute display = "?"
key width: 27
end name: mod2
end name: key
attribute display = "0"
key width: 27
end name: default
attribute display = ")"
key width: 16
end name: shifted
attribute display = "image:img-300dpi/f10.png"
attribute action = "f10"
key width: 50
end name: mod1
attribute display = "¡ì"
key width: 21
end name: mod2
end name: key
attribute display = "-"
key width: 15
end name: default
attribute display = "_"
key width: 21
end name: shifted
attribute display = "image:img-300dpi/f11.png"
attribute action = "f11"
key width: 50
end name: mod1
attribute display = "?"
key width: 27
end name: mod2
end name: key
attribute display = "="
key width: 35
end name: default
attribute display = "+"
key width: 35
end name: shifted
attribute display = "image:img-300dpi/f12.png"
attribute action = "f12"
key width: 50
end name: mod1
attribute display = "¡ã"
key width: 21
end name: mod2
end name: key
attribute width = "2000"
attribute display = "image:img-300dpi/back.png"
attribute action = "backspace"
key width: 0
end name: default
attribute display = "image:img-300dpi/del.png"
attribute action = "delete"
key width: 0
end name: mod1
end name: key
end name: row
attribute width = "1500"
attribute fill = "true"
attribute display = "image:img-300dpi/tab.png"
attribute action = "tab"
key width: 0
end name: default
end name: key
attribute obey-caps = "true"
attribute display = "q"
key width: 27
end name: default
attribute display = "Q"
key width: 33
end name: shifted
attribute display = "¨¤"
key width: 26
end name: mod1
attribute display = "?"
key width: 29
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "w"
key width: 34
end name: default
attribute display = "W"
key width: 41
end name: shifted
attribute display = "¨¢"
key width: 26
end name: mod1
attribute display = "?"
key width: 29
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "e"
key width: 26
end name: default
attribute display = "E"
key width: 26
end name: shifted
attribute display = "?"
key width: 26
end name: mod1
attribute display = "?"
key width: 29
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "r"
key width: 17
end name: default
attribute display = "R"
key width: 29
end name: shifted
attribute display = "?"
key width: 26
end name: mod1
attribute display = "?"
key width: 29
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "t"
key width: 16
end name: default
attribute display = "T"
key width: 26
end name: shifted
attribute display = "?"
key width: 26
end name: mod1
attribute display = "?"
key width: 29
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "y"
key width: 25
end name: default
attribute display = "Y"
key width: 26
end name: shifted
attribute display = "?"
key width: 26
end name: mod1
attribute display = "?"
key width: 29
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "u"
key width: 27
end name: default
attribute display = "U"
key width: 31
end name: shifted
attribute display = "?"
key width: 23
end name: mod1
attribute display = "?"
key width: 29
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "i"
key width: 12
end name: default
attribute display = "I"
key width: 12
end name: shifted
attribute display = "?"
key width: 23
end name: mod1
attribute display = "?"
key width: 29
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "o"
key width: 26
end name: default
attribute display = "O"
key width: 33
end name: shifted
attribute display = "¨¨"
key width: 26
end name: mod1
attribute display = "?"
key width: 26
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "p"
key width: 27
end name: default
attribute display = "P"
key width: 25
end name: shifted
attribute display = "¨¦"
key width: 26
end name: mod1
attribute display = "?"
key width: 26
end name: mod2
end name: key
attribute display = "["
key width: 16
end name: default
attribute display = "{"
key width: 27
end name: shifted
attribute display = "?"
key width: 26
end name: mod1
attribute display = "?"
key width: 26
end name: mod2
end name: key
attribute display = "]"
key width: 16
end name: default
attribute display = "}"
key width: 27
end name: shifted
attribute display = "?"
key width: 26
end name: mod1
attribute display = "?"
key width: 26
end name: mod2
end name: key
attribute display = "\"
key width: 14
end name: default
attribute display = "|"
key width: 14
end name: shifted
end name: key
end name: row
attribute width = "1500"
attribute fill = "true"
attribute display = "image:img-300dpi/capslk.png"
attribute action = "modifier:caps"
key width: 0
end name: default
end name: key
attribute obey-caps = "true"
attribute display = "a"
key width: 26
end name: default
attribute display = "A"
key width: 29
end name: shifted
attribute display = "¨¬"
key width: 12
end name: mod1
attribute display = "?"
key width: 12
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "s"
key width: 22
end name: default
attribute display = "S"
key width: 27
end name: shifted
attribute display = "¨ª"
key width: 12
end name: mod1
attribute display = "?"
key width: 12
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "d"
key width: 27
end name: default
attribute display = "D"
key width: 32
end name: shifted
attribute display = "?"
key width: 12
end name: mod1
attribute display = "?"
key width: 12
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "f"
key width: 15
end name: default
attribute display = "F"
key width: 24
end name: shifted
attribute display = "?"
key width: 12
end name: mod1
attribute display = "?"
key width: 24
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "g"
key width: 27
end name: default
attribute display = "G"
key width: 32
end name: shifted
attribute display = "?"
key width: 27
end name: mod1
attribute display = "?"
key width: 31
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "h"
key width: 27
end name: default
attribute display = "H"
key width: 31
end name: shifted
attribute display = "?"
key width: 27
end name: mod1
attribute display = "?"
key width: 31
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "j"
key width: 12
end name: default
attribute display = "J"
key width: 12
end name: shifted
attribute display = "¨®"
key width: 26
end name: mod1
attribute display = "?"
key width: 33
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "k"
key width: 24
end name: default
attribute display = "K"
key width: 27
end name: shifted
attribute display = "¨°"
key width: 26
end name: mod1
attribute display = "?"
key width: 33
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "l"
key width: 12
end name: default
attribute display = "L"
key width: 23
end name: shifted
attribute display = "?"
key width: 26
end name: mod1
attribute display = "?"
key width: 33
end name: mod2
end name: key
attribute display = ";"
key width: 14
end name: default
attribute display = ":"
key width: 14
end name: shifted
attribute display = "?"
key width: 26
end name: mod1
attribute display = "?"
key width: 33
end name: mod2
end name: key
attribute display = "'"
key width: 12
end name: default
attribute display = """
key width: 19
end name: shifted
attribute display = "?"
key width: 22
end name: mod1
attribute display = "?"
key width: 27
end name: mod2
end name: key
attribute width = "2000"
attribute display = "image:img-300dpi/return.png"
attribute action = "return"
key width: 0
end name: default
end name: key
end name: row
attribute width = "1500"
attribute fill = "true"
attribute display = "image:img-300dpi/shift.png"
attribute action = "modifier:shift"
key width: 0
end name: default
end name: key
attribute display = "`"
key width: 21
end name: default
attribute display = "~"
key width: 35
end name: shifted
end name: key
attribute obey-caps = "true"
attribute display = "z"
key width: 22
end name: default
attribute display = "Z"
key width: 29
end name: shifted
attribute display = "?"
key width: 26
end name: mod1
attribute display = "?"
key width: 31
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "x"
key width: 25
end name: default
attribute display = "X"
key width: 29
end name: shifted
attribute display = "¨´"
key width: 27
end name: mod1
attribute display = "?"
key width: 31
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "c"
key width: 23
end name: default
attribute display = "C"
key width: 29
end name: shifted
attribute display = "¨²"
key width: 27
end name: mod1
attribute display = "?"
key width: 31
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "v"
key width: 25
end name: default
attribute display = "V"
key width: 29
end name: shifted
attribute display = "?"
key width: 27
end name: mod1
attribute display = "?"
key width: 31
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "b"
key width: 27
end name: default
attribute display = "B"
key width: 29
end name: shifted
attribute display = "¨¹"
key width: 27
end name: mod1
attribute display = "?"
key width: 26
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "n"
key width: 27
end name: default
attribute display = "N"
key width: 31
end name: shifted
attribute display = "?"
key width: 25
end name: mod1
attribute display = "?"
key width: 26
end name: mod2
end name: key
attribute obey-caps = "true"
attribute display = "m"
key width: 41
end name: default
attribute display = "M"
key width: 36
end name: shifted
attribute display = "?"
key width: 25
end name: mod1
attribute display = "?"
key width: 26
end name: mod2
end name: key
attribute display = ","
key width: 13
end name: default
attribute display = "<"
key width: 35
end name: shifted
attribute display = "?"
key width: 22
end name: mod1
attribute display = "?"
key width: 29
end name: mod2
end name: key
attribute display = "."
key width: 13
end name: default
attribute display = ">"
key width: 35
end name: shifted
attribute display = "?"
key width: 22
end name: mod1
attribute display = "?"
key width: 29
end name: mod2
end name: key
attribute display = "/"
key width: 14
end name: default
attribute display = "?"
key width: 22
end name: shifted
end name: key
attribute display = "image:img-300dpi/up.png"
attribute action = "up"
key width: 27
end name: default
attribute display = "image:img-300dpi/pgup.png"
attribute action = "pageup"
key width: 27
end name: mod1
end name: key
attribute display = "image:img-300dpi/shift.png"
attribute action = "modifier:shift"
key width: 27
end name: default
end name: key
end name: row
attribute width = "1500"
attribute fill = "true"
attribute display = "image:img-300dpi/ctrl.png"
attribute action = "modifier:ctrl"
key width: 0
end name: default
end name: key
attribute display = "image:img-300dpi/alt.png"
attribute action = "modifier:alt"
key width: 38
end name: default
end name: key
attribute display = "image:img-300dpi/sym1.png"
attribute action = "modifier:mod1"
key width: 43
end name: default
end name: key
attribute width = "7000"
attribute display = " "
attribute action = "space"
key width: 0
end name: default
end name: key
attribute display = "image:img-300dpi/sym2.png"
attribute action = "modifier:mod2"
key width: 48
end name: default
end name: key
attribute display = "image:img-300dpi/left.png"
attribute action = "left"
key width: 27
end name: default
attribute display = "image:img-300dpi/home.png"
attribute action = "home"
key width: 27
end name: mod1
end name: key
attribute display = "image:img-300dpi/down.png"
attribute action = "down"
key width: 27
end name: default
attribute display = "image:img-300dpi/pgdn.png"
attribute action = "pagedown"
key width: 27
end name: mod1
end name: key
attribute display = "image:img-300dpi/right.png"
attribute action = "right"
key width: 27
end name: default
attribute display = "image:img-300dpi/end.png"
attribute action = "end"
key width: 54
end name: mod1
end name: key
end name: row
end name: layout
end name: keyboard
Parsed 63 keys in 5 rows
wmin: 58, wmax: 0 => 58
window size: 1x1
screen size: 1072x1448 (301 dpi)
hmin: 53, hmax: 96, pref: 94 => 94
keyboard size: 1x470
font_name: Monospace 6
grab focus: termBox
set keyboard size: 1072x470
wmin: 58, wmax: 71 => 71
window size: 1072x1448
screen size: 1072x1448 (301 dpi)
hmin: 53, hmax: 96, pref: 94 => 94
keyboard size: 1072x470
cleanup
the end
root@Debian[~/kterm/bin]#
According to this error, I think dbus is not started. So I used /etc/init.d/dbus start /etc/init.d/dbus start to start dbus and run the daemon. Then its error message becomes as follows. Dbus reply error: org.freedesktop.DBus.Error.ServiceUnknown: The name com.lab126.winmgr was not provided by any .service files
Generally the problem is you are using kterm version that was built for Kindle OS, but you are using it in Debian OS.
I don't know exactly what the problem is. The dbus issue should not be fatal. It is just a warning. Dbus is used to change terminal orientation on Kindle. It communicates with Kindle framework on dbus. You may try different orientation setups in config to see what happens, but that should not matter. From debug log it seems the application immediately exits main GTK loop, as if it received some termination signal.
Please run kterm -v
. This should show GTK version. Maybe there is some mismatch?
Ideally you should just rebuild kterm for pure Linux without Kindle tweaks and for your exact environment. I thought the Kindle version might still work, but it seems not so easy.
The reason I use the Kindle OS version is that I really don't cross-compile.
Since I don't cross-compile, I will build Kterm directly in the debian container, but the following problems occur during the process
Probably missing or too old version of pkg-config?
One thing is not clear to me. Are you going to use kterm in Debian window manager or in Amazon GUI? If you only want to use default Kindle window manager and not start X server in Debian chroot you will still need Kindle version of kterm. You can still rebuild it and see if it helps.
I want to implement lightweight code writing work on Kindle, but you also know that Kindle's Linux is a crippled, so I tried to use container technology to run debian's complete Linux environment. But because the Amazon GUI still exists and takes up a lot of system resources, there is no way to use the debian operating system well. So I want to use UpStart to directly start the debian environment. The specific process is to write a system startup configuration file in the /etc/upstart directory, similar to the following.
################################################################# pre-start script echo "Log from $(date)" > /mnt/us/debian.log exec >>/mnt/us/debian.log 2>&1 echo "# Debian ::: pre-start script" echo "Starting debian linux" mount -o loop -t ext3 /mnt/us/extensions/linux/sys/debian.ext3 /mnt/debian mount -o bind /dev /mnt/debian/dev mount -o bind /proc /mnt/debian/proc mount -o bind /sys /mnt/debian/sys cp /etc/hosts /mnt/debian/etc/hosts cp /etc/resolv.conf /mnt/debian/etc/resolv.conf chmod a+w /dev/shm end script
script exec >>/mnt/us/debian.log 2>&1 echo "# Debian ::: script" sleep 1 stop lab126_gui su -c "chroot /mnt/debian /bin/login" kill $(pgrep Xephyr) end script
post-stop script exec >>/mnt/us/debian.log 2>&1 echo "# Debian ::: post-stop script" echo "Unmounting Debian rootfs" LOOPDEV="$(mount | grep loop | grep /mnt/debian | cut -d" " -f1)" umount /mnt/debian/sys sleep 1 umount /mnt/debian/dev umount /mnt/debian/proc # Sync beforehand so umount doesn't fail due to the device being busy still sync umount /mnt/debian || true # Sometimes it fails still and only works by trying again while [ "$(mount | grep /mnt/debian)" ] do echo "Debian is still mounted, trying again shortly.." sleep 3 umount /mnt/debian || true done echo "Debian unmounted" echo "Disassociating loop device >>$LOOPDEV<<" losetup -d $LOOPDEV echo "All done, starting kindle's gui." start lab126_gui end script #################################################################
But I want to use Kterm as GUI interface after it starts, unfortunately it doesn't work.
So I should start Kterm in debian system environment.
The following is the log after I use the above configuration file to start.
For the specific content of this container, you can go and see this.
https://github.com/Zucker-jex/Debian-System-in-Kindle
Read how to run GUI programs in chroot to solve "cannot open display" issue. You seem to stop Amazon window manager, so you don't need kterm version made for Kindle.
So,What should I do?
I can help you with kterm, but I cannot solve all the issues with your project. You will have to dig yourself. You need to find out how to run GUI programs in chroot. You surely need to export DISPLAY variable, but more steps may be needed in your case. As you copied your scripts from internet, try to find out more about what the original authors did. If you want to run kterm in Debian window manager, it would be best to rebuild it. Kindle version might also work, but it is hard to say without trying.
Thank you very much.
I solved this problem in a weird way.