X11 terminal emulator issues
toxic (0.8.1) creates an invisible X11 window over its terminal. I assume this is done so that a console app running within an xterm can support Drag'nDrop and XDND. But this causes a variety of side effects on my terminal emulator when events are forwarded to it by an X window it knows nothing about. There are also security issues which arise from this approach. I can't just disable X11 during the build without also losing video chat support. I currently work around the issue with a patch that mimics toxic's behavior on OSX's Terminal app (attached). A build switch would be more appropriate though.
diff -ruN toxic-0.8.2/src/xtra.c toxic-0.8.2-p/src/xtra.c --- toxic-0.8.2/src/xtra.c Wed Feb 28 00:46:56 2018 +++ toxic-0.8.2-p/src/xtra.c Tue May 21 01:08:31 2019 @@ -369,7 +369,8 @@
long unsigned int focused_window_id() {
- if (!Xtra.display) return 0; +// if (!Xtra.display)
-
return 0;
Window focus; int revert;
Looks like this is handled in x11focus.c now?
Looks like this is handled in x11focus.c now?
Correct. The purpose of this file is so that Toxic doesn't spam you with sound/desktop notifications when you have the window focused.
If these side effects and security issues could be elaborated on I'll consider adding a build option for it.
Is toxic intended to be runnable within screen, tmux and/or a ssh session?
Is toxic intended to be runnable within screen, tmux and/or a ssh session?
Yes, though certain features revolving around notifications might be a bit buggy.
If these side effects and security issues could be elaborated on I'll consider adding a build option for it.
The invisible X11 window and use of XSendEvent() to forward X events have been removed (0.10.1). My patch merely disabled this functionality. The security issues are those that arise from the use of XSendEvent() compounded because toxic is a network connected console app that may be running in a different security context than the underlying terminal emulator. A multi-window capable terminal emulator such as T2 (https://sourceforge.net/projects/terminal2.mgstep.p/) must maintain some form of mapping between its known X11 windows and its internal structures, it does not expect a console app to forward X events from an unknown invisible window, the resulting side effects are implementation specific.
Resolved