gdbgui icon indicating copy to clipboard operation
gdbgui copied to clipboard

The font in terminal changes every time when I open gdbgui

Open ghost opened this issue 6 years ago • 4 comments

Hi,

I'm using Win10 Linux subsystem Ubuntu 18. Before I open gdbgui, the terminal is like: image

Once I open gdbgui, the font changes automatically and looks very ugly: image

How can I solve the issue? Thanks!

ghost avatar Oct 20 '19 03:10 ghost

How is it even possible for a program to change the font of a terminal emulator? Only the user should be able to change the font.

bjorn3 avatar Oct 20 '19 14:10 bjorn3

@bjorn3 I agree this seems unexpected. I did a quick search and found https://stackoverflow.com/questions/3592673/change-console-font-in-windows, so it is technically possible for a program to change the font in Windows.

That said, this is certainly not something gdbgui is doing intentionally.

It might somehow be done in one of the dependencies of gdbgui. These are the packages that are installed and used by gdbgui:

Click==7.0
Flask==0.12.4
Flask-Compress==1.4.0
Flask-SocketIO==2.9.6
gdbgui==0.13.2.0
gevent==1.4.0
greenlet==0.4.15
itsdangerous==1.1.0
Jinja2==2.10.3
MarkupSafe==1.1.1
pkg-resources==0.0.0
pygdbmi==0.9.0.2
Pygments==2.4.2
python-engineio==3.9.3
python-socketio==4.3.1
six==1.12.0
Werkzeug==0.16.0

I don't know specifically what is causing it to behave this way. What you might want to do is insert a breakpoint in the Python code with an interactive debugger like pdb or ipdb, and step through the code line-by-line until you can pin down the exact line that modifies the font in your terminal. The file to do this in is gdbgui/backend.py.

Depending on which line is causing the issue, we can then consider next steps on how to fix the issue.

cs01 avatar Oct 20 '19 15:10 cs01

I did a quick search and found https://stackoverflow.com/questions/3592673/change-console-font-in-windows, so it is technically possible for a program to change the font in Windows.

I think that would only work when using real Windows programs, and not Linux programs with WSL.

bjorn3 avatar Oct 20 '19 15:10 bjorn3

That might be the case. I don't use either so I don't know.

cs01 avatar Oct 20 '19 15:10 cs01