PerBothner / DomTerm

DOM/JavaScript-based terminal-emulator/console

Home Page:https://domterm.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QtDomTerm doesn't work with no error messages.

opened this issue · comments

After running qtdomterm, I am getting the following window:

image

The menus can be opened, but all the buttons have zero effect and zero error messages.

Build configuration:

java -version
Picked up _JAVA_OPTIONS:  -Dsun.java2d.uiScale=1.35 -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (IcedTea 3.16.0) (Slackware)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

CFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --infodir=/usr/info \
  --with-libwebsockets \
  --with-asciidoctor \
  --with-javafx \
  --with-qtwebengine \
  --build=$ARCH-slackware-linux || exit 1

Typing anything into the window also produces no effect.

Which OS/Platform are you using?
Java is not used by qtdomterm, so java -version shouldn't matter.

I haven't tested those configure options, so it is possible something can't find somethings else :-)
Can you run the build in-place, without install? I.e.

./configure ..whatever...
make
bin/domterm --qt

I can run it from the build directory with the same result.

Furthermore, running domterm --firefox also produces a blank page in Firefox.

This is the list of files produced by the build:

install/
install/slack-desc
usr/
usr/bin/
usr/bin/domterm
usr/bin/qtdomterm
usr/doc/
usr/doc/domterm-2.1/
usr/doc/domterm-2.1/README
usr/doc/domterm-2.1/domterm.info
usr/doc/domterm-2.1/slack-desc
usr/man/
usr/man/man1/
usr/man/man1/domterm.1
usr/man/man1/qtdomterm.1
usr/share/
usr/share/appdata/
usr/share/appdata/domterm.appdata.xml
usr/share/appdata/qtdomterm.appdata.xml
usr/share/applications/
usr/share/applications/domterm.desktop
usr/share/applications/qtdomterm.desktop
usr/share/domterm/
usr/share/domterm/electron/
usr/share/domterm/electron/main.js
usr/share/domterm/electron/package.json
usr/share/domterm/electron/preload.js
usr/share/domterm/help/
usr/share/domterm/help/domterm-attach.html
usr/share/domterm/help/domterm-attach.txt
usr/share/domterm/help/domterm-browse.html
usr/share/domterm/help/domterm-browse.txt
usr/share/domterm/help/domterm-hcat.html
usr/share/domterm/help/domterm-hcat.txt
usr/share/domterm/help/domterm-imgcat.html
usr/share/domterm/help/domterm-imgcat.txt
usr/share/domterm/help/domterm-is-domterm.html
usr/share/domterm/help/domterm-is-domterm.txt
usr/share/domterm/help/domterm-list.html
usr/share/domterm/help/domterm-list.txt
usr/share/domterm/help/domterm-new.html
usr/share/domterm/help/domterm-new.txt
usr/share/domterm/help/domterm-window-specifier.html
usr/share/domterm/help/domterm-window-specifier.txt
usr/share/domterm/help/domterm.html
usr/share/domterm/help/domterm.txt
usr/share/domterm/help/qtdomterm.html
usr/share/domterm/help/qtdomterm.txt

The page displayed in Firefox looks has this code:

<!DOCTYPE html>
<html><head>
<base href='http://localhost:42579/'/>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title>DomTerm</title>
<link type='text/css' rel='stylesheet' href='hlib/domterm-core.css'>
<link type='text/css' rel='stylesheet' href='hlib/domterm-standard.css'>
<link type='text/css' rel='stylesheet' href='hlib/goldenlayout-base.css'>
<link type='text/css' rel='stylesheet' href='hlib/jsMenus.css'>
<link type='text/css' rel='stylesheet' href='hlib/domterm-layout.css'>
<link type='text/css' rel='stylesheet' href='hlib/domterm-default.css'>
<script type='text/javascript' src='hlib/domterm.js'> </script>
<script type='text/javascript' src='hlib/domterm-version.js'> </script>
<script type='module' src='hlib/terminal.js'> </script>
<script type='module' src='hlib/domterm-parser.js'> </script>
<script type='module' src='hlib/sixel/Colors.js'> </script>
<script type='module' src='hlib/sixel/SixelDecoder.js'> </script>
<script type='text/javascript' src='hlib/browserkeymap.js'> </script>
<script type='module' src='hlib/commands.js'> </script>
<script type='text/javascript' src='hlib/wcwidth.js'> </script>
<script type='text/javascript' src='hlib/FileSaver.js'> </script>
<script type='text/javascript' src='hlib/ResizeSensor.js'> </script>
<script type='text/javascript' src='hlib/jquery.min.js'> </script>
<script type='text/javascript' src='hlib/goldenlayout.js'> </script>
<script type='text/javascript' src='hlib/domterm-layout.js'> </script>
<script type='text/javascript' src='hlib/domterm-menus.js'> </script>
<script type='text/javascript' src='hlib/qwebchannel.js'> </script>
<script type='text/javascript' src='hlib/jsMenus.js'> </script>
<script type='text/javascript' src='hlib/screenfull.js'> </script>
<script type='text/javascript' src='hlib/domterm-client.js'> </script>
<script type='text/javascript'>
DomTerm.server_port = 42579;
DomTerm.server_key = 'dyehilLvAH8_fVG-RQYF';
</script>
</head>
<body></body>
</html>

"The page displayed in Firefox looks has this code:"

Yes, that looks correct.

I just did:

cd /tmp; mkdir DT
git clone git@github.com:PerBothner/DomTerm.git
cd DomTerm
autoreconf -i
./configure --prefix=/tmp/DT-root --with-qtwebengine --without-asciidoctor --without-docbook
make
make install

and it ran fine, both using /tmp/DT/DomTerm/bin/domterm and /tmp/DT-root/bin/domterm.

Adding --with-webview to configure also works, but make install is missing a dependency for the bin dir.

However, this is on Fedora 32.

One possibility is you have an old/incompatible version of libwebsockets installed on Slackware. If you run bin/domterm status it should tell you the version it is using. Could you try building libwebsockets following the instructions in "Building libwebsockets, if needed" ?

lockywolf@delllaptop:/tmp/DomTerm-2.1$ domterm status
DomTerm version 2.1.0
Copyright 2020 Per Bothner and others
Using Libwebsockets 3.1.0
Reading settings from: /home/lockywolf/.config/domterm/settings.ini
Backend command socket: /home/lockywolf/.domterm/default.socket
session#: 1, pid: -1, tty: /dev/pts/4
  (detached)

Libwebsockets 3.1.0 is rather old.
You might consider adding -DLWS_WITHOUT_EXTENSIONS=0 to the cmake line for libwebsockets. I'm not quite sure why or if that is needed, but I made a note about it and forgot why ...

Well, the documentation says that 2.2 should be enough.

As an alternative to building libwebsockets, you could try adding --enable-compiled-in-resources to the domterm configure line.

"Well, the documentation says that 2.2 should be enough."

True, but I haven't tested 2.2 in a while, so I might have broken something ... It is also possible 3.1.0 might just happen to be broken but earlier and later versions might work.

you could try adding --enable-compiled-in-resources to the domterm configure line.

lockywolf@delllaptop:/tmp/DomTerm-2.1$ domterm --firefox
Segmentation fault (core dumped)

"you could try adding --enable-compiled-in-resources to the domterm configure line."
"Segmentation fault (core dumped)"

All I can say it works for me.
I guess building libwebsockets is the next thing to try.

Another possibility which doesn't use libwebsockets at all is electron-nodepty. This uses Electron for the server-side (not just the display side) so it is quite a bit simpler. However, as you can see from the webpage it is missing some features and is rather more experimental.