[desktop-discuss] VTE not working properly!

Brian Cameron Brian.Cameron at Sun.COM
Fri Jan 4 15:08:37 PST 2008


Edgar:

I took a look at the backspace key not working in VTE and the problem
seems to be in the src/vte.c file, in the function
vte_terminal_key_press.

It has some code like this:

   case VTE_ERASE_AUTO:
   default:
           if (terminal->pvt->pty_master != -1) {
                   if (tcgetattr(terminal->pvt->pty_master, &tio != -1) {
                            normal = g_strdup_printf("%c",
                                     tio.c_cc[VERASE]);
                            normal_length = 1;
                   }
           }

The problem seems to be that the tcgetattr() function is returning -1.
I notice errno is 22 (EINVAL).  This is odd since the tcgetattr() man
page doesn't indicate that this is a return code tcgetattr() will
return.  EINVAL is "Invalid argument", but the arguments look okay to
me.  Weird.

You can hack around this by changing the two calls in vte_terminal_init
to pass in VTE_ERASE_ASCII_BACSPACE instead of VTE_ERASE_AUTO.

     vte_terminal_set_backspace_binding(terminal,
         VTE_ERASE_ASCII_BACKSPACE);
     vte_terminal_set_delete_binding(terminal,
         VTE_ERASE_ASCII_BACKSPACE);

That seems a hacky workaround, though.  Anybody have any ideas why
tcgetattr() would be failing here?

Brian


> Hello, I'm using SXCE and I'm actually new to Solaris. Anyway, I've been a linux user for several years now, and decided to try out an opensolaris distro, and let me tell you I'm very happy.
> 
> One of the main problems I'm haivng right now is not being able to use VTE properly, I need vte since I'm trying to use Guake [u]http://www.guake-terminal.org/[/u], I've compiled it already and it's usable, but since it uses vte it's problems migrated to guake.
> 
> Ok, to the problem: I'm not able to use the backspace nor delete keys in VTE, also when using VIM and trying to move through a document with the cursor keys is not possible, it just does strange things like scrolling on a single line(that is, shows the next line by replacing the first...). This is really annoying and happens only with vte, gnome-terminal does not show this problem (althought gnome-terminal also uses libvte... I just don't understand). First I though it was a problem with my TERM setting, but hacking the code and setting VTE terminal emulation to "xterm-color" resulted in the same issue.
> 
> Also, I would like to know what can I do to set the TERM to "xterm-color" permanently, since adding TERM=xterm-color in /etc/profile or ~/.profile only sets TERM to "xterm". One last thing... in terminals I'm not able to use the end/start keys of my keyboard... what do I need to enable those? thanks in advance!
> 
> Edgar Merino
>  
>  
> This message posted from opensolaris.org
> _______________________________________________
> desktop-discuss mailing list
> desktop-discuss at opensolaris.org



More information about the desktop-discuss mailing list