Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't display correctly in the terminal (such as xshell) #19

Closed
colinhd8 opened this issue Oct 14, 2015 · 11 comments
Closed

can't display correctly in the terminal (such as xshell) #19

colinhd8 opened this issue Oct 14, 2015 · 11 comments

Comments

@colinhd8
Copy link

1.It seems that rtorrent-ps can't display correctly in the terminal such as xshell.
pyroscope

2.It can't redraw after resize the terminal window.

but when display in the os's terminal(like mate-terminal), it has no problem.

os: Fedora 22
rtorrent: 0.9.6
pyroscope: latest version
terminal xshell 5

@chros73
Copy link
Contributor

chros73 commented Oct 14, 2015

Maybe it's a $TERM environment variable issue, that we had in tmux as well.
I run rtorrent-ps in tmux all the time.
Take a look at the last comment of this: https://groups.google.com/forum/#!topic/pyroscope-users/_5yMqjIHcpo
The full config files (init script, tmux conf, .profile, etc) are here: https://github.com/chros73/rtorrent-ps

So, when run this command echo $TERM through a remote Mac OS X terminal:

  • outside tmux, it reports: xterm-256color
  • inside tmux, it reports: screen-256color

It also works fine in JuiceSSH (android SSH client).

@pyroscope
Copy link
Owner

This is a bug in your terminal software, which I cannot do anything about.

@colinhd8
Copy link
Author

To:chros73 thank you for your reply. I confirm that the $TERM is screen-256color.(tmux new -s $SESSION_NM "export TERM=screen-256color;rtorrent -n -o import=$PWD/rtorrent.rc";)
And i want to know if you resize the terminal window, what's the result.

@chros73
Copy link
Contributor

chros73 commented Oct 15, 2015

  1. Is this the start up command of yours?
    tmux new -s $SESSION_NM "export TERM=screen-256color;rtorrent -n -o import=$PWD/rtorrent.rc";
    If it is then I think the TERM command is the problem in it. I think you shouldn't specify the TERM variable anywhere! Specify the terminal string inside your tmux conf (or in the command line, if you can do it)!
    a) in tmux conf you need: set -g default-terminal "screen-256color"
    b) try out this command (we don't specify the TERM variable outside):
    tmux -2u new-session -d -s $SESSION_NM -n 'rT-PS' "rtorrent -n -o import=$PWD/rtorrent.rc";
  2. I couldn't try out xshell, but resizing the terminal window (native Ubuntu terminal, putty, Mac OS X terminal, JuiceSSH terminal) is working flawlessly for me with those config files. So it should be fine in xshell as well, until it reports a terminal string that is available on your server (e.g. xterm-256color).

Report back if it's fixing your problem as well.

@colinhd8
Copy link
Author

chros73, it can't resolve my problem.
a) in tmux conf you need: set -g default-terminal "screen-256color"
has the same result.
b) try out this command (we don't specify the TERM variable outside):
has the error: rtorrent: bold bright red: your terminal only supports 8 colors.

@chros73
Copy link
Contributor

chros73 commented Oct 16, 2015

Hmmm, that's strange.
Do you modify a script to start rtorrent-ps? If you do then I think it doesn't use your tmux conf at all.

A. I've tried out quickly XShell 5 on Windows 8.1 (if we are talking about the same thing), after a fresh install I entered IP, crendetials, everything else was default: it works fine for me with the above linked configs (rendering, scrolling, resizing is fine).

B. you can easily try out without issuing your init/startup script:

  1. connect to your remote server with Xshell
  2. do not start or attach a tmux sessio, but run echo $TERM : it should display: xterm !
  3. start a simple tmux session with: tmux : it should display: screen-256color ! (if you put that line in your tmux config AND your session is using the tmux config)
  4. just start rtorrent with this: rtorrent -n -o import=/home/youruser/rtorrent.rc : it should run well, without any problem.

If it's all good, then your startup script doesn't read your tmux config.

@colinhd8
Copy link
Author

I try this out:
1.create a new session in the xshell, and modify the ip and username only.
2.login with this session, and export TERM=screen-256color
3.execute rtorrent -n -o import=/home/youruser/rtorrent.rc
has the same result.

I also try what you say, and confirmed that it use the tmux conf in the tmux.
I think it's xshell's problem. because it's worked in the securecrt terminal with the same thing.(but resize is not work)
can you send me your rtorrent source? and if possible attach some xshell's result.(hard copy)
Thank you.

@chros73
Copy link
Contributor

chros73 commented Oct 17, 2015

"2.login with this session, and export TERM=screen-256color"
What I'm saying is: I think this is the cause of the problem!!!! Don't do this!!!

My rtorrent-ps 0.9.6 is running on Ubuntu 14.04, I have built it with pyroscope's build script. I have already posted all my config files (see above).
This is in xshell5 on Win 8.1:
xshell
This is in putty on Win 8.1 (what I'm using):
putty

Try out quickly in Putty how it behaves: https://github.com/chros73/rtorrent-ps/tree/master/windows-8.1

And 1 thing you can try out: install mc (Midnight Commander) and see whether it has similar rendering problems like rtorrent-ps has (since it using the same ncurses interface). If it has the same, and you applied all the changes I told you, then probably the packages has problems on you system (tmux, ncurses, etc).

PS: you can post your configs somewhere, like pastebin.

@colinhd8
Copy link
Author

"2.login with this session, and export TERM=screen-256color"
What I'm saying is: I think this is the cause of the problem!!!! Don't do this!!!
->because i want to test it without tmux. and if not set the TERM, it will have error of "rtorrent: bold bright red: your terminal only supports 8 colors."

i confirmed that it's the problem of the font and special character. If i modify the ui_pyroscope.cc(row 158:♯->#, row 159: ·->.) then everything is ok.

And i have installed the font follow this link:https://github.com/chros73/rtorrent-ps/tree/master/windows-8.1

If i run mc with the command: mc -a, the result is ok, else, it has the result like rtorrent-ps.

@chros73
Copy link
Contributor

chros73 commented Oct 23, 2015

"If i modify the ui_pyroscope.cc(row 158:♯->#, row 159: ·->.) then everything is ok."
So, is it solved for you then or not? (Sorry, I don't quite understand which case was good or not.)

@colinhd8
Copy link
Author

sorry for my poort english. it's solved if i make change to the ui_pyroscope.cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants