Giter Club home page Giter Club logo

jediterm's Introduction

JediTerm

official JetBrains project

Build Status

The main purpose of the project is to provide a pure Java terminal widget that can be easily embedded into an IDE. It supports terminal sessions both for SSH connections and local PTY on Mac OSX, Linux and Windows.

The library is used by JetBrains IDEs like PyCharm, IDEA, PhpStorm, WebStorm, AppCode, CLion, and Rider.

Since version 2.5 there is a standalone version of the JediTerm terminal, provided as Mac OSX distribution.

The name JediTerm origins from J(from Java) + edi(reversed IDE) + Term(obviously from terminal). Also the word Jedi itself gives some confidence and hope in the Universe of thousands of different terminal implementations.

Run

To run the standalone JediTerm terminal from sources just execute jediterm.sh or jediterm.bat. Or use the binary distribution from the Releases page.

Build

Gradle is used to build this project. The project consists of 4 sub-projects:

  • terminal

    The core library that provides VT100 compatible terminal emulator and Java Swing based implementation of terminal panel UI.

  • pty

    The jediterm-pty.jar library that, by using the Pty4J library, enables a terminal for local PTY terminal sessions.

  • JediTerm

    The standalone version of the JediTerm terminal distributed as a .dmg for Mac OSX.

Features

  • Local terminal for Unix, Mac and Windows using Pty4J
  • Xterm emulation - passes most of tests from vttest
  • Xterm 256 colours
  • Scrolling
  • Copy/Paste
  • Mouse support
  • Terminal resizing from client or server side
  • Terminal tabs

Authors

Dmitry Trofimov [email protected], Clément Poulain

Links

Open Source Origin and History

The initial version of the JediTerm was a reworked terminal emulator Gritty, which was in it's own turn a reworked JCTerm terminal implementation. Now there is nothing in the source code left from Gritty and JCTerm. Everything was rewritten from scratch. A lot of new features were added.

Character sets designation and mapping implementation is based on respective classes from jVT220 (https://github.com/jawi/jVT220, Apache 2.0 licensed) by J.W. Janssen.

Standalone distribution relies heavily on customized Swing UI widgets taken from IntelliJ Community platform repository (https://github.com/JetBrains/intellij-community) by JetBrains.

Licenses

JediTerm is dual-licensed under both the LGPLv3 (found in the LICENSE-LGPLv3.txt file in the root directory) and Apache 2.0 License (found in the LICENSE-APACHE-2.0.txt file in the root directory). You may select, at your option, one of the above-listed licenses.

jediterm's People

Contributors

basdxz avatar brofi avatar chitoku-k avatar cmf avatar devsh0 avatar eth-p avatar ignatov avatar jschaf avatar m-rieke avatar mikehearn avatar olegstepanov avatar plonk42 avatar pskowronek avatar rprichard avatar segrey avatar serjsysoev avatar shisheng-1 avatar shoaniki avatar stigger avatar taok avatar ydgholz avatar yole avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jediterm's Issues

Can not select console text

I don't know this is a bug or not. I just run jediterm Pty using DLL inside inellij (lib/libwinpty). It works nice,but I can not select console text. I am using windows xp or 7 or 8. With jre 8

[question] embed in browser

Hi guys,

could someone provide some hints about possible integration within browser? I am especially interested in Vaadin, but in general could be useful.

Thanks a lot.

Pty4J has no support for OS Linux

Arg!

Exception in thread "main" java.lang.ExceptionInInitializerError
at com.jediterm.pty.PtyMain.createTtyConnector(PtyMain.java:33)
at com.jediterm.terminal.ui.AbstractTerminalFrame.openSession(AbstractTerminalFrame.java:64)
at com.jediterm.terminal.ui.AbstractTerminalFrame.(AbstractTerminalFrame.java:112)
at com.jediterm.pty.PtyMain.(PtyMain.java:26)
at com.jediterm.pty.PtyMain.main(PtyMain.java:54)
Caused by: java.lang.RuntimeException: Pty4J has no support for OS Linux
at com.pty4j.Pty.(Unknown Source)
... 5 more

Maybe it was a little too early to switch to Pty4J (see trofimander@870ab55) !

I cannot use JediTerm anymore, unless using SSH connector and targeting localhost.
I feel completely discriminated :-)

For now I've reverted this commit in my working tree ;)

A release to Maven Central would be nice

We use JediTerm in one of our apps, but have to bundle the jar in the git repository. If you could take the current code and release it to Maven Central or some other repository, that would be grand.

Exception when copying lines from ScrollBuffer

How to reproduce :

  • generate a lot of lines; I use the command "tree"
  • scroll up to be completely in the ScrollBuffer (that is to say, scroll more than the term height)
  • select some text over multiple lines
  • right-click : copy.
  • you get a stacktrace :

Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: y = 669 is not within it's bounds [-89, -88]
at com.jediterm.terminal.SelectionTextAppender.consume
(SelectionTextAppender.java:35)
at com.jediterm.terminal.display.LinesBuffer$1.process
(LinesBuffer.java:173)
at com.jediterm.terminal.display.LinesBuffer.iterateLines
(LinesBuffer.java:200)
at com.jediterm.terminal.display.LinesBuffer.processLines
(LinesBuffer.java:170)
at com.jediterm.terminal.display.SelectionUtil.getSelectionText
(SelectionUtil.java:39)
at com.jediterm.terminal.ui.TerminalPanel.copySelection
(TerminalPanel.java:205)
at com.jediterm.terminal.ui.TerminalPanel$10.actionPerformed
(TerminalPanel.java:882)

This is due to a mismatch between startRow and myBegin and myEnd in SelectionTextAppender.consume()

Ctrl+K behaves like Ctrl+L instead of delete until end of line

How to reproduce:

  1. Open a terminal in PyCharm 2016.2.3 for Linux (which embeds jediterm-pty-2.2.jar)
  2. Write a few characters
  3. Go to beginning of line (Ctrl+A)
  4. Press Ctrl+K

Expected behavior:
The reset of the line is deleted.

Actual behavior:
Line is cleared, very much like if Ctrl+L has been pressed.

Discussion:
Some other readline shortcuts: Ctrl+A, Ctrl+L, Ctrl+R works fine, but not all of them:

These ones do not work, at the very least using the default configuration.
Ctrl+E: end of line
Ctrl+F: forward-character
Ctrl+G: backward-character
Alt+F: forward-word
Alt+B: backward-word

Not sure if this should be reported in PyCharm or jediterm, Let me know if I should file this elsewhere.

Issue in jediterm2.0

Hi Plonk/Traff
I am trying to use jediterm2.0 as an applet in my application.However after the recent fix of perf improvement i am seeing following error on console of browser.: After which the applet hangs and becomes unresponsive.Please suggest.

Thanks
Keshav

Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
at com.apple.laf.AquaTabbedPaneUI.rotateInsets(AquaTabbedPaneUI.java:600)
at com.apple.laf.AquaTabbedPaneUI.getContentBorderInsets(AquaTabbedPaneUI.java:568)
at com.apple.laf.AquaTabbedPaneCopyFromBasicUI$TabbedPaneLayout.calculateSize(AquaTabbedPaneCopyFromBasicUI.java:2132)
at com.apple.laf.AquaTabbedPaneCopyFromBasicUI$TabbedPaneLayout.minimumLayoutSize(AquaTabbedPaneCopyFromBasicUI.java:2126)
at java.awt.Container.minimumSize(Container.java:1840)
at java.awt.Container.getMinimumSize(Container.java:1825)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1744)
at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:663)
at java.awt.Container.minimumSize(Container.java:1840)
at java.awt.Container.getMinimumSize(Container.java:1825)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1744)
at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:663)
at java.awt.Container.minimumSize(Container.java:1840)
at java.awt.Container.getMinimumSize(Container.java:1825)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1744)
at javax.swing.BoxLayout.checkRequests(BoxLayout.java:482)
at javax.swing.BoxLayout.layoutContainer(BoxLayout.java:424)
at java.awt.Container.layout(Container.java:1503)
at java.awt.Container.doLayout(Container.java:1492)
at java.awt.Container.validateTree(Container.java:1688)
at java.awt.Container.validateTree(Container.java:1697)
at java.awt.Container.validateTree(Container.java:1697)
at java.awt.Container.validate(Container.java:1623)
at javax.swing.RepaintManager$2.run(RepaintManager.java:691)
at javax.swing.RepaintManager$2.run(RepaintManager.java:689)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:688)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1676)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Closing a tab leaves the child process running (on both Linux and Windows)

cc @Plonk42

The title sums it up, more or less. On Linux, I tested by:

  • Start a second session (File -> New Session)
  • Start a Python interpreter in the new sesson.
  • Check for the Python process using "pidof python".
  • Close the session using the context menu.
  • Check for the Python process using "pidof python". It's still running.

I think the bug was introduced in this commit, eb490a0. That commit factored out code from a termination callback and from close into a new closeTab function. The closeTab function doesn't call JediTermWidget.close, but the old close function did. JediTermWidget.close calls TerminalStarter.close, which calls TtyConnector.close (as well as shut down the ExecutorService). ProcessTtyConnector.close is responsible for destroying the PtyProcess and closing I/O streams.

There is a "Connector" thread that calls TerminalStarter.start, which blocks until the Process.getInputStream() reaches EOF. With both the Unix and Windows pty4j implementations, once the child process exits, the Process's input stream soon reaches EOF (after any existing data is removed from the pty). Once that happens, the Connector thread calls myTtyConnector.close();

Maybe the fix is to simply add a terminal.close() call:

diff --git a/src-terminal/com/jediterm/terminal/ui/TabbedTerminalWidget.java b/src-terminal/com/jediterm/terminal/ui/TabbedTerminalWidget.java
old mode 100644
new mode 100755
index fe00071..1fed355
--- a/src-terminal/com/jediterm/terminal/ui/TabbedTerminalWidget.java
+++ b/src-terminal/com/jediterm/terminal/ui/TabbedTerminalWidget.java
@@ -190,6 +190,7 @@ public class TabbedTerminalWidget extends JPanel implements TerminalWidget, Term

   public void closeTab(final JediTermWidget terminal) {
     if (terminal != null) {
+      terminal.close();
       if (myTabs != null) {
           SwingUtilities.invokeLater(new Runnable() {
             @Override

jediterm.sh gradlew not found

The content of the jediterm.sh is:
gradlew :JediTerm:run
I think will be:
./gradlew :JediTerm:run
To find the gradlew command in local path

connection breaks

Hi plonk
while fetching a huge output (fast and a lot of text), more often the connection itself breaks and entry is removed from the tabbedPane. Can something be done about it?
Assuming continous high speed output is coming for a minute for a particular command fired on the terminal.

Thanks
Keshav

not supported retina display on google chrome

Hi Plonk and Traff
I have been using jediterm as an applet on a small web application. I have been using it on MAC book pro retina on firefox. However when i use it on chrome, the text is not sharp. Can you please provide the solution for the same.

Thanks and Regards
Keshav

Erase in Line CSI sequence does not erase line content beyond the terminal width

I noticed that with jediterm, the Erase in Line CSI sequence (\x1b[<n>K) only erases the currently visible part of the line. If the line extends past the right end of the window, those characters aren't erased. If the window is later expanded horizontally, the previously invisible part of the erased line comes back into view.

This behavior seems wrong to me. It also doesn't match what other terminals do (particularly, xterm, VTE, and Konsole).

Like jediterm, xterm also keeps track of obscured line content beyond the right edge of the terminal, but both \x1b[0K and \x1b[2K erase the obscured characters.

Example:

  • Resize a terminal to (say) 50x50.
  • Run: echo -e '\x1b[2J\x1b[1;1HAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
  • Reduce the terminal's width so that the AAA string is truncated.
  • Run: echo -e '\x1b[1;1H\x1b[2K'
  • Increase the terminal's width.

FWIW: This issue is affecting my winpty project, which frequently rewrites lines when the terminal/console is resized.

Capture complete dump of a session

Hi Plonk/Traff
Will be grateful if you can guide me to capture complete dump of a session.
I want to capture the complete activity on the terminal on a click of a button till that time and store it. 'show buffers' donot show the complete output. Some output is always missing at the end

Jediterm doesn't play nice with terminal multiplexers

I've been trying for a while to get a terminal multiplexer working inside Jediterm but it looks like the output gets all messed up.

I'm encountering the same issue (albeit with small differences) with both screen and tmux. Also I've been able to replicate the issue on both PHPStorm's embedded terminal and the standalone jediterm.

Both tmux and screen work fine on Gnome Terminal, Terminator and even the Drop Down Terminal gnome extension.

To reproduce:

  • ./jediterm.sh
  • Start screen by typing screen and pressing enter.
  • Open a file which has enough content to allow scrolling with vim/neovim.
  • Try to scroll and watch as your terminal gets filled with text artefacts.

Gif showing the issue while running neovim inside screen inside jediterm:
http://i.imgur.com/sYfynPj.gif.

Gif showing the issue while running neovim inside tmux inside jediterm: http://i.imgur.com/cZF2KKj.gif.

Gif showing the correct behaviour while running neovim inside tmux inside gnome terminal: http://i.imgur.com/jGm5b8h.gif.

multiple font options

Hi
Can jedi-Term support multiple font options to display text on terminal.Current font looks outdated.

Thanks
Keshav

memory usage in mac os x

I am trying to use jediterm in my application. Despite clearing all the buffers after 1500 lines i.e. in writeCharaters function in JediTerminal.

if(myBackBuffer.myScrollBuffer.getLineCount()>=1500) {
myBackBuffer.myScrollBuffer.clearAll();
myBackBuffer.myTextBuffer.clearAll();
myBackBuffer.myTextBufferBackup.clearAll();
myBackBuffer.myScrollBufferBackup.clearAll();
}

Its memory size keeps on increasing in the activity window in mac osx. This causes application to hang. A lot of data comes on the terminal window and i want to get rid of all the buffers so that memory usage does not increase. Am i missing something here?. Kindly, suggest a way to clear all the buffers after a certain trigger.

Thanks
Keshav

On Ubuntu, graphical charset does not conforms to myCharSize

This is something that is visible when using "yast" for example.

I'm not sure if it depends of the choosen "Monospaced" font or not.

I have tried some fixes, but this does not fix the rendering of the chars. It just avoid neighbors corruption when drawing graphical chars.

You can see it here :
https://github.com/Plonk42/jediterm/compare/draw_char_width

Test file to reproduce is here :
https://raw.github.com/Plonk42/jediterm/c65bf48d5d3010304df826367a7bac07843ae227/tests/testData/bold_pipe.txt

Capture of Gnome vs. JediTerm
gnome_graphical_chars
jediterm_graphical_chars
(note that the right vertical line is higher (1-2px) than the green square, which is unwanted)

I have no idea of how to fix this properly, so any help is welcome!

application hangs for a heavy data

Hi Plonk/traff
I have embedded jediterm in my application and have written wrappers for fetching the data on a terminal. When i invoke the standalone application its size is shown as ~250 mb on activity window, however as a lot of activity starts on it, its size reaches to about 1.6GB. This causes jediterm to becomes slow. Please suggest a wayout to keep the application size in reasonable limits of 400-500 mb.

Regards
Keshav

Improve line wrapping to keep lines structure, even with long lines

Somehow, Gnome Terminal and Xterm are aware of "long line displayed over multiple line".
This allow better multi-click selection, by effectively selecting a single long line displayed over multiple lines.

I'm not sure if this is really critical, but now it is known :)

gnome_term_multi_line

gnome_term_multi_line2

Error in logs during use of terminal

0 [ConnectRunnable] ERROR com.jediterm.emulator.display.BackBuffer - Style is null for run supposed to be from 0 to 0on row 7
4 [ConnectRunnable] ERROR com.jediterm.emulator.display.BackBuffer - Style is null for run supposed to be from 0 to 0on row 9
5 [ConnectRunnable] ERROR com.jediterm.emulator.display.BackBuffer - Style is null for run supposed to be from 0 to 0on row 12

Or, during a selection :

55880 [AWT-EventQueue-0] ERROR com.jediterm.emulator.display.SelectionUtil - Text buffer has invalid content
55880 [AWT-EventQueue-0] ERROR com.jediterm.emulator.display.SelectionUtil - Text buffer has invalid content

JediEmulator might interpret a escape sequence wrongly under Windows

Hey, I have the next cmd.exe output:
initial text:

]0;ASCII Art�111111111111111111111111111111111111�[0K�[?25l
22�[0K
�[0K
�[0;7;45m ____                                     ______    __    ___             �[0m�[0K
�[0;7;45m/\  _`\                                  /\__  _\__/\ \__/\_ \            �[0m�[0K
�[0;7;45m\ \ \L\_\ __      ___     ___   __  __   \/_/\ \/\_\ \ ,_\//\ \      __   �[0m�[0K
�[0;7;45m \ \  _\/'__`\  /' _ `\  /'___\/\ \/\ \     \ \ \/\ \ \ \/ \ \ \   /'__`\ �[0m�[0K
�[0;7;45m  \ \ \/\ \L\.\_/\ \/\ \/\ \__/\ \ \_\ \     \ \ \ \ \ \ \_ \_\ \_/\  __/ �[0m�[0K
�[0;7;45m   \ \_\ \__/.\_\ \_\ \_\ \____\\/`____ \     \ \_\ \_\ \__\/\____\ \____\�[0m�[0K
�[0;7;45m    \/_/\/__/\/_/\/_/\/_/\/____/ `/___/> \     \/_/\/_/\/__/\/____/\/____/�[0m�[0K
�[0;7;45m                                    /\___/                                �[0m�[0K
�[0;7;45m                                    \/__/                                 �[0m�[0K
�[0;7;45m                                                                 �[0m�[0K
gUI�[0K�[?25h

after cmd.exe resize:

�[?25l
�[10A�[0;7;45m ____                                     ______    __    ___�[0K
/\  _`\                                  /\__  _\__/\ \__/\_ \�[0K
\ \ \L\_\ __      ___     ___   __  __   \/_/\ \/\_\ \ ,_\//\ \      __�[0K
 \ \  _\/'__`\  /' _ `\  /'___\/\ \/\ \     \ \ \/\ \ \ \/ \ \ \   /'__`\�[0K
  \ \ \/\ \L\.\_/\ \/\ \/\ \__/\ \ \_\ \     \ \ \ \ \ \ \_ \_\ \_/\  __/�[0K
   \ \_\ \__/.\_\ \_\ \_\ \____\\/`____ \     \ \_\ \_\ \__\/\____\ \____\�[0K
    \/_/\/__/\/_/\/_/\/_/\/____/ `/___/> \     \/_/\/_/\/__/\/____/\/____/�[0K
                                    /\___/�[0K
                                    \/__/�[0K
�[0m�[0K
gUI�[0K�[?25h

The last output are rendered as:
screen

You can run the next program on C# into Rider under Windows to reproduce this:


namespace ConsoleApplication12
{
  
    internal class Program
    {
      public static void Main(string[] args)
      {
        //if (args.Length > 0)
        //  Console.WriteLine(args[0]);
        //Console.WriteLine(args[1]);
        WriteFullLine("hello world!");
        Console.Error.Write("gUI");
        Console.ReadKey();
      }

      static void WriteFullLine(string value)
      {
        Console.BackgroundColor = ConsoleColor.White;
        Console.ForegroundColor = ConsoleColor.DarkMagenta;
        Console.Title = "ASCII Art";
        string title = @"
 ____                                     ______    __    ___             
/\  _`\                                  /\__  _\__/\ \__/\_ \            
\ \ \L\_\ __      ___     ___   __  __   \/_/\ \/\_\ \ ,_\//\ \      __   
 \ \  _\/'__`\  /' _ `\  /'___\/\ \/\ \     \ \ \/\ \ \ \/ \ \ \   /'__`\ 
  \ \ \/\ \L\.\_/\ \/\ \/\ \__/\ \ \_\ \     \ \ \ \ \ \ \_ \_\ \_/\  __/ 
   \ \_\ \__/.\_\ \_\ \_\ \____\\/`____ \     \ \_\ \_\ \__\/\____\ \____\
    \/_/\/__/\/_/\/_/\/_/\/____/ `/___/> \     \/_/\/_/\/__/\/____/\/____/
                                    /\___/                                
                                    \/__/                                 
                                                                 ";

        Console.WriteLine(title);


//      Console.WriteLine(value /*.PadLeft(270)*/);
        Console.ResetColor();
      }
    }

}

High CPU usage

Hi Plonk
I ran jediterm-v2.0, I am observing very high CPU usage.Please find the attached screenshot of JProfiler :
screen shot 2014-06-13 at 12 39 31 pm

Background color is not handled properly for empty chars

Here are two screenshots comparing Gnome term (left) to JediTerm (right).
First one is Midnight Commander, second one is YaST.

Background color is not set properly on empty chars (or after the end of line?), resulting in white chunks.

My guess is that we simply don't consume when there is no chars, resulting in no drawing the background color (only a guess, though).

mc_jediterm_vs_gnome
yast_jediterm_vs_gnome

Pasting multiple lines should send CR to pty instead of LF

In Unix terminals, Enter/Return produces CR ('\r'), not LF ('\n'). When pasting multiple lines, terminals usually send CR instead of LF between the lines, but JediTerm is sending LF. You can verify this on Ubuntu Linux using showkey -a, in Cygwin using winpty.exe --showkey, or on any Unix using my showkey command-line tool.

On Windows, JediTerm uses winpty, which (for better or for worse) is converting LF to Ctrl-RETURN. (Perhaps that should change, but it might make sense to generate Shift-RETURN instead, because mintty converts Shift-RETURN to LF.) Ctrl-RETURN typically doesn't do the right thing; frequently it's ignored. Pasting multiple lines into Windows JediTerm tends to paste everything onto one line.

Other terminals also do this conversion:

mintty: https://github.com/mintty/mintty/blob/d7e3fdc0c3377209e73bed9be6f71b1418833305/src/termclip.c#L177

iTerm2: https://github.com/gnachman/iTerm2/blob/b2a3b943834439eb1533f42bff83b404e35a792e/sources/iTermPasteHelper.m#L110

vte (gnome-terminal): https://github.com/GNOME/vte/blob/7b4cf2aac53e0e0daa4ff89fb2d1f30b90063148/src/vte.cc#L5473

I also tested xterm and urxvt on Ubuntu with showkey -a, and pasting multiple lines produced CR instead of LF.

AFAICT, it isn't necessary for JediTerm to recognize CRLF, because Java already converts CRLF to LF in its cross-platform clipboard code.

capture inp/op separately.

Hi Plonk/Traff
For a particular session, can input and output be stored in different 'LineBuffers' objects.
I tried by creating these objects in JediTerminal class and populating them using a 'boolean' variable. This boolean variable is introduced in 'JSchTtyConnector' class and is
set as true in its 'write()' method. However for cases like

  1. pressing a 'tab' for cli completion etc
  2. pressing a backspace
    This does not work..
    do i need to make such changes in multiple places or is there an easier way to simply collect the input/output somewhere else in the codebase.

Thanks

support split terminal window

the terminal embed in IDE(PHPStorm,PyCharm,Webstorm etc.) is nice but not perfect.

It will be better if it could support split terminal window by the follow way "split horizontally" and "split vertically" .

Look forward to your reply.

tabs tile missing boundary

Hi
screen shot 2014-05-31 at 9 45 12 am

I am using jediterm -2.0 on mac..Need some help for below issue.

  1. tab's tile is broken. Unlike jediterm-master, tab tile (remote and remote1) area is having a transparent rectangle in between. Can it be made smooth and even for the complete color.

"del" act as "backspace"

The key "del" act the same as "backspace" : it remove the char on the cursor's left, then move the cursor backward.
I expected that "del" to remove the char at the cursor's position, and don't move it.

It looks like it can depend of the VT version, but I think it is really the most intuitive behavior.

Some interesting reading : http://www.columbia.edu/kermit/k95manual/backspac.html

Launcher scripts don't include the newly-updated jars

dgholz@somehost:~/jediterm (master) $ ./jediterm-pty.sh 
Exception in thread "main" java.lang.NoClassDefFoundError: com/jediterm/pty/PtyMain
Caused by: java.lang.ClassNotFoundException: com.jediterm.pty.PtyMain
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: com.jediterm.pty.PtyMain.  Program will exit.

DeleteCharacter (DCH) don't remove chars in TextBuffer

DeleteCharacter (DCH) (ESC [ Ps P) works well on BackBuffer, but have no impact on TextBuffer.
So when BackBuffer is rebuilt from TextBuffer (after a resize, for example), some chars are unwanted.
Looking at debug buffers is very relevant.

How to reproduce :

  • type "hi there" in Jediterm when prompted
  • press 2 times backspace
  • "hi the" is displayed
  • press enter (you'll probably get a "command not found" message)
  • resize JediTerm (make it larger)
  • "hi there" is displayed on the first line. Expected is "hi the"

How can I disable ctrl+c and ctrl+f ?

hi there,

I like jediterm very much, it's very useful.
But I found I can not send ctrl+c and ctrl+f to shell.
I often use these shortcuts in shell.
Is there a way to disable these shortcuts ?

not sharper text on mac os x

Hi
I am trying to use Jedi Term on mac os x Retina display, however the text displayed is not that sharp. Would be grateful for the help.

Thanks
Keshav

Hi guys

Hi guys, I'd really like to get hold of someone familiar with this project to find out about possible implementation in one of my projects.But I couldn't find any emails that looked valid. Who should I contact and at what email?

Thanks,
Alexis

Update:
I found Dmitry's email in the commit log.

change font, background color

Hi
I wanted to change the font and color for a terminal. How can i do that. Tried some values in setFont() in BufferPanel in 'terminal.debug' however no font but the default provided viz "Monospaced-14" seems to be the one which is displayed properly.

Thanks
Keshav

Supporting erase in display mode 3

erase in display mode 3 clears the scrollback buffer, which is unsupported atm.

running jest in the terminal in watch mode uses this and it's annoying when I scroll back to the previous page to look at the errors, previous results are still there.

Determine source of input.

In class JSchTtyConnector there is 'read' method viz:
read(char[] buf, int offset, int length)
. It gets hit for both the cases, firing command at the terminal and recieving output from the server. What can be done to determine the source.

Thanks
Keshav

Incorrect representation of German umlauts (generally everything non 7-bit ASCII)

Hi,
I wrote my own connector which I use with JediTerm and it works really good so far. But when I type German umlauts (e.g. "äöü"), they are not displayed correctly.

Those characters seem to be utf-8 encoded, when they are passed into the method write(byte[] bytes) from the interface "TtyConnector". As the "byte" datatype is limited to a -128 to 127 value range and is not able to handle those, they are somehow read as negative values:
ä = -28 (256 - 28 = 228 <=> \u00E4)
ö = -10
ü = -4

Can this be configured by the existing API or is unicode not implemented (yet)?

Windows: jediterm-pty.bat fails with initial error 'Couldn't find libwinpty.dll'

With windows 7 enterprise 64 bits, made a fresh git-clone of current master (Latest commit 7765a4b), and executed jediterm-pty.bat, which fails with error 'Couldn't find libwinpty.dll'

Could this be because only lib/win/x86/libwinpty.dll exists but lib/win/x86_64/libwinpty.dll does not exist? If so, where could I get the missing lib/win/x86_64/libwinpty.dll file ?
Thanks

C:\Users\xxx\Desktop\mios\tmp\orig\jediterm>jediterm-pty.bat

C:\Users\xxx\Desktop\mios\tmp\orig\jediterm>java -cp "lib/pty4j-0.5.jar;lib/guava-14.0.1.jar;lib/jna.jar;lib/jna-platform.jar;lib/jsch-0.1.51.jar;lib/junit-4.10.jar;lib/jzlib-1
.07.jar;lib/log4j-1.2.14.jar;lib/purejavacomm-0.0.17.jar;build/jediterm-pty-2.0.jar;lib" com.jediterm.pty.PtyMain
Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.pty4j.windows.WinPtyProcess.<init>(WinPtyProcess.java:37)
        at com.pty4j.PtyProcess.exec(PtyProcess.java:77)
        at com.pty4j.PtyProcess.exec(PtyProcess.java:50)
        at com.jediterm.pty.PtyMain.createTtyConnector(PtyMain.java:39)
        at com.jediterm.terminal.ui.AbstractTerminalFrame.openSession(AbstractTerminalFrame.java:115)
        at com.jediterm.terminal.ui.AbstractTerminalFrame.<init>(AbstractTerminalFrame.java:173)
        at com.jediterm.pty.PtyMain.<init>(PtyMain.java:27)
        at com.jediterm.pty.PtyMain.main(PtyMain.java:50)
Caused by: java.lang.IllegalStateException: Couldn't detect jar containing folder
        at com.pty4j.windows.WinPty.getLibraryPath(WinPty.java:158)
        at com.pty4j.windows.WinPty.<clinit>(WinPty.java:151)
        ... 8 more
Caused by: java.lang.IllegalStateException: Couldn't find libwinpty.dll, jar folder C:\Users\ecampau\Desktop\mios\tmp\orig\jediterm\lib
        at com.pty4j.util.PtyUtil.resolveNativeLibrary(PtyUtil.java:81)
        at com.pty4j.windows.WinPty.getLibraryPath(WinPty.java:155)
        ... 9 more

[Mac] keyboard layout issues

Hello,
I use macOS 10.12.1 and a german keyboard layout (10.5+ in idea if that matters). When using the terminal in idea, some key combinations do something else than the default terminal does (iTerm2 for reference):

  • alt+7 (pipe, |) makes the terminal jump to the beginning:
    pipebug
  • alt+6 (closing square bracket, ]) doesn't work (terminal bell rings, tried multiple times in the gif)
  • alt+5 (opening square bracket, [) does work after several tries (tried 3x in the gif):
    sqbbug

Thanks for your help.

Embedded JediTermWidget prevents JavaFX application from closing.

Without this line, an embedded JediTermWidget will leave its TerminalPanel's repaint timer running after it has been closed.

diff --git a/terminal/src/com/jediterm/terminal/ui/JediTermWidget.java b/terminal/src/com/jediterm/terminal/ui/JediTermWidget.java
index abf4e1a..83eaf3a 100644
--- a/terminal/src/com/jediterm/terminal/ui/JediTermWidget.java
+++ b/terminal/src/com/jediterm/terminal/ui/JediTermWidget.java
@@ -229,6 +229,7 @@ public class JediTermWidget extends JPanel implements TerminalSession, TerminalW
   @Override
   public void close() {
     myTerminalStarter.close();
+    myTerminalPanel.dispose();
   }
 
   @Override

This timer keeps the AWT EventQueue too busy to exit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.