Closed schlomo closed 12 years ago
Hmm... I just tested mc in Firefox and Chrome and I'm not seeing this... You're using Windows/Chrome? What version?
I just pushed a TON of changes that fixed a lot of terminal emulation bugs... I believe this issue might have been caused by improper handling of the ^[> or ^[< escape sequences (which I fixed a few commit ago).
Can you please test out mc and let me know if you're still having this problem? Thanks
This may or may not be related, but the kernel menuconfig doesn't look right either. It doesn't appear to have out of place items and misaligned things, but the display is all wrong. See: http://danielosborne.net/gateone/menuconfig.png and http://danielosborne.net/gateone/menuconfig_search.png What do you think? I think I remember you mentioning recently that you didn't have all the ASCII characters implemented, which would at least explain the menu borders.
Can you post or email me a .golog file that recorded one of these issues in action? I can't seem to reproduce it. I think it might be something to do with your platform (Mac, right?). Gate One is probably just missing support for an escape sequence that I haven't seen in testing yet.
I'm on Gentoo for the server side, Windows for the client side (no Mac here...). As requested: http://danielosborne.net/gateone/20111111144219678676.golog
Side note, is there a way to automatically clean up those gologs? I see they're piling up.
I downloaded that .golog but it appears to be corrupt... logviewer.py can't read it (says it's not a gzip file). Also, when I look at it in vim it doesn't appear to be gzipped either. This leads me to believe that your web server re-gzipped it or something and the browser then un-gzipped it leading to a corrupted file (since the headers would get all messed up like that).
Can you double-check that the .golog is viewable with the logviewer.py? If it is can you do me a favor and just rename it to *.golog.gz and re-post the link? That should ensure that your webserver doesn't try to re-gzip the data.
Forget it... I was able to download the .golog using wget without issue. Apparently Chrome's negotiation with your web server is what corrupted the file (gzip misunderstanding =). Looking at it now.
Oh, apache probably doesn't recognize the extension, so it's defaulting to text/plain or something. I didn't know it was a gzipped file. I was trying to examine it, but didn't recognize anything familiar.
When I was coming up with the format for Gate One logs I originally had them in plain text but I figured that since the format would require a special viewer it made sense to keep the data pre-compressed (no need to support things like awk and grep). Since gzip is a stream format appending to a pre-gzipped file works pretty well.
Also, I had a look at your .golog and it is very, very strange... If I play back the file in an xterm I see the same exact results as what is shown in Gate One. This leads me to believe that there's some sort of terminal interaction going on that wasn't recorded. That in itself is very strange because all output from the underlying terminal program gets saved to the .golog--even if Gate One itself didn't properly handle the characters with its terminal emulator (the characters are written to the .golog before it even gets to the terminal emulator).
Fortunately, replicating a "make menuconfig" with the Linux kernel itself is pretty easy to reproduce :). I'll download the latest tarball and try it myself with Gate One. In the mean time, can you tell me what you've got set as your $TERM on that host right after you login? Thanks.
BTW: The qqqqqq stuff is typically what you get when you set TERM=linux and you run an ncurses application. Gate One used to translate those just fine until I decided it was better to emulate "xterm" rather than "linux". I might have to move forward my plans to support changeable emulation modes.
echo $TERM reports 'xterm'.
I just pushed a commit that should fix this. It had to do with the G0 and G1 charsets not being applied when they were changed. Please pull the latest code and confirm. Thanks.
Beautiful! It looks WAY better now! It just looks like the white '|' character isn't tall enough, so it makes a broken line (black one is fine though, oddly).
At first glance, it might also fix issue #58, as I didn't see the same missing lines I usually do. I'll have to test more though.
For reference the line drawing characters are defined by your font. Gate One's CSS just tells your browser to use a monospace font. So try configuring your browser to use something different and you might get better lines. For reference, in Linux I'm using the Ubuntu font and it seems to draw all the lines without any gaps.
If the font is relevant for the display then maybe GO should bring its own font(s)? Seems to be fairly simple nowadays: http://www.giantflyingsaucer.com/blog/?p=2250
Maybe the font could be part of the theme?
On 13 November 2011 12:54, Dan McDougall < reply@reply.github.com
wrote:
For reference the line drawing characters are defined by your font. Gate One's CSS just tells your browser to use a monospace font. So try configuring your browser to use something different and you might get better lines. For reference, in Linux I'm using the Ubuntu font and it seems to draw all the lines without any gaps.
Reply to this email directly or view it on GitHub: https://github.com/liftoff/GateOne/issues/45#issuecomment-2721927
I used to have a font pre-bundled with Gate One (DejaVu Sans Mono) but it wouldn't render properly in Windows (the line drawing characters especially). The reason is that Windows font rendering is horribly broken and for whatever reason Google decided to use a native Windows API for rendering fonts in Chrome/Chromium. This is why fonts look so much better in Firefox on Windows than they do in Chrome.
Anyway, I played around with many different monospaced fonts and none of them looked quite right on every platform (Ubuntu--the font--looks downright ugly in Windows for some reason and doesn't show all the glyphs). For this reason I chose to just forgo making the decision on behalf of the user and decided to let the browser/platform/user make the decision as to which monospace font looks best.
I forgot to mention: The font can absolutely be part of a theme. If you want to make a theme that uses a specific font, knock yourself out.
Thinking out loud, maybe I should change the way themes are configured to allow for generic layering... You simply select the various components (CSS files) that you want and decide the order in which they are loaded. I always wanted to add the ability for the user to customize the GUI via the GUI but maybe it would be better to break the CSS up into little pieces and let the user mix & match.
Or we bundle several fonts with GO, one for Chrome/IE on Windows and another one for all the other browsers. Maybe it needs to be in OTF or EOT to render properly?
Else, maybe we should make it a user configuration option to be set through the web GUI.
BTW, did you ever try Andale Mono?
On 13 November 2011 19:27, Dan McDougall < reply@reply.github.com
wrote:
I used to have a font pre-bundled with Gate One (DejaVu Sans Mono) but it wouldn't render properly in Windows (the line drawing characters especially). The reason is that Windows font rendering is horribly broken and for whatever reason Google decided to use a native Windows API for rendering fonts in Chrome/Chromium. This is why fonts look so much better in Firefox on Windows than they do in Chrome.
Anyway, I played around with many different monospaced fonts and none of them looked quite right on every platform (Ubuntu--the font--looks downright ugly in Windows for some reason and doesn't show all the glyphs). For this reason I chose to just forgo making the decision on behalf of the user and decided to let the browser/platform/user make the decision as to which monospace font looks best.
Reply to this email directly or view it on GitHub: https://github.com/liftoff/GateOne/issues/45#issuecomment-2723579
Chrome is using Courier New, which is the same one Putty uses (pretty much the standard monospace font on Windows). EDIT: Putty might very well use it's own rendering though, because even notepad has the same gaps.
Andalé Mono is not a "free" font so I couldn't bundle it with Gate One. For reference, here's what I've considered or already used at one point or another:
The font that looked the most respectable on all platforms was DejaVu Sans Mono but on Windows a lot of the glyphs would not render at all (showed up as blocks). This might have been the result of the way I converted the font from TrueType to EOT but I'm not entirely certain.
If you want to perform some testing of fonts on your own I'll gladly try including a font again based on your recommendation. Just be aware that whatever font it is needs to have the full set of line drawing glyphs and support (most of) the full range of Unicode characters. Oh, and it has to be something I can bundle (100% free).
You know, I was thinking about this and I might be able to close the gap, as it were ;) Can you take a screenshot of an example where there's gaps? A line-height setting in CSS might be able to work around the problem.
Here's a screenshot: http://danielosborne.net/gateone/gap.png And comparable putty window: http://danielosborne.net/gateone/putty_nogap.png
I did check in Notepad, and it looks like that character is normally 5 or so pixels or two taller than the pipe char ('│' vs '|'), at least with Courier New, which is font I'm using.
Additionally, if you compare the two images, you'll notice there's no shadow below in gateone, and the blue background is one row shorter than it should be. Don't know how long it was like that, I just noticed now.
What happens if you change your browser's monospace font to something like DejaVu Sans Mono? Does that get rid of the gap?
Here's something else you can try: Edit your preferred CSS theme in GateOne/gateone/templates/themes and add the following to .{{prefix}}terminal pre
(around line 107):
line-height: 1;
...and let me know if that makes the gap go away. I had that as the default at one point but it made the screen look a bit squished on my laptop so I got rid of it. If that fixes it for you I could make a Windows-specific rule to enable that line-height setting for that platform.
I don't have DejaVu Sans Mono. However I did try Lucida Console and Consolas, and the gap isn't there (although Lucida is a bit squished).
I've having trouble adding that line. For some reason, even though I've emptied the browser cache (in Chrome and Firefox), it's still pulling the old version of the css file (I've completely removed that class, and it still has no effect). Does tornado have a persistent cache? I've restarted gateone, with no effect.
EDIT: I closed the tab and came back to it about 30 minutes later, I also stopped gateone and manually ran it from the command-line. Now the CSS changes are in effect.
Setting line-height does not fix the gap. Indeed, line-height isn't appropriate, as the bottom parts of characters are cut off now (like 'y'). Plus, the height seems fine normally if compared side-by-side to putty.
Also, I just noticed this, in 'menuconfig' if you arrow over to the help button, the blue highlighting extends all the way to the end of the line.
Can you do me a favor and download DejaVu Sans Mono and configure Chrome to use it for monospace fonts? I just want to see if it fixes the gap--if it does then I'll go back to including it in Gate One. You can download it here:
http://dejavu-fonts.org/wiki/index.php?title=Download
Alternatively, you could just add the following to the top of your CSS theme:
@import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono);
Then do a search/replace for 'monospace' in the file with 'Droid Sans Mono'
(Make sure you include those single quote characters). For changes to CSS themes to take effect you must restart Gate One and then reload the page in Chrome. That will have Gate One using DejaVu Sans Mono. Let me know if it looks OK (I remember having issues but I don't remember what they were).
I installed Deja Vu, and that didn't help. Additionally, it made the screen worse: http://danielosborne.net/gateone/deja_vu.png.
Hi,
maybe stupid question, but can't we convert one of the Linux console fonts into something that can be used in a browser?
Regards, Schlomo
On 15 November 2011 19:32, Daniel < reply@reply.github.com
wrote:
I installed Deja Vu, and that didn't help. Additionally, it made the screen worse: http://danielosborne.net/gateone/deja_vu.png
Reply to this email directly or view it on GitHub: https://github.com/liftoff/GateOne/issues/45#issuecomment-2748908
@Phoenix84: Your screenshot looks like you set your browser to use "DejaVu Sans" instead of "DejaVu Sans Mono". Can you double-check that?
@schlomo: I'd be happy to try out some different fonts... What do you recommend? For reference, I don't think the Linux console font is truetype or anything usable on the web. There's similar fonts though: Ubuntu Mono, Terminus, DejaVu Sans Mono, and more. My biggest problem with these is that they all tend to look kind of broken on Windows due to Windows' broken font renderer.
Confirmed, for reference, here's DejaVu Sans: http://danielosborne.net/gateone/deja_vu_sans.png.
LOL! Well I guess that won't work. Why do fonts on Windows suck so bad? Argh! I'll have to keep looking for a better replacement font.
I can't reproduce that gap in other applications with that same font (ie. Notepad). Interestingly, even Gmail shows it correctly (after making sure the font was set properly after pasting). That removes the suspicion I had that it was an overall browser rendering issue.
Just a heads-up regarding this issue: I'm currently leaning towards including the Ubuntu monospace font in GateOne to use as the default. What do you think? Have you tried it?
Since I am not using Windows this would probably be a good choice. My platform will be Chrome on Chrome OS.
On 4 January 2012 03:34, Dan McDougall < reply@reply.github.com
wrote:
Just a heads-up regarding this issue: I'm currently leaning towards including the Ubuntu monospace font in GateOne to use as the default. What do you think? Have you tried it?
Reply to this email directly or view it on GitHub: https://github.com/liftoff/GateOne/issues/45#issuecomment-3349901
The Ubuntu font is one of the freely available ones through Google, so it'll be available on all capable browsers.
I just committed a code change that includes the Ubuntu Mono font. Please try it out and let me know if you like/dislike it! I myself think it is pretty nice. Particularly in regards to how different the lower-case letter i is from the number 1 and the letter l. Very easy to distinguish those three and I appreciate it.
No feedback on the new Ubuntu Mono font? If I don't hear anything back soon I'm going to close this issue as, "Works for me" (on Macs, Linux, and Windows XP with Chrome and Firefox anyway).
Sorry, I've been struggling with other issues in my setup. Fonts kinda make it down the list.
I know google's code works for me (Chrome OS), so if you copied it, you should be fine.
You're having issues with your Gate One setup or just your OS in general? If there's something wrong with Gate One I can fix it :)
There's nothing wrong with GateOne. Just the complexity of my design has lead to problems in the middleware. Basically, reverse proxies with SSL, URL-based dispatch, and WebSocket support are hard to come by.
I'm going to close out this issue since there haven't been any updates. Regardless, the subject of the discussion is far removed from the issue that was opened originally.
Sorry to reopen issue #1 again, with the code from today MC is garbled, see the screenshot: