[elinks-users] Elinks - title resets to $TERM not what it originally was
I am using gnome-terminal whose default title is Terminal. However after use of Elinks, the title becomes the value of $TERM rather than Terminal. Is this expected behaviour? If so, is there a way to make Elinks reset to the original title rather than $TERM? Else should I enter this as a bug? (I know about ui.window_title, not looking to turn off title handling completely). Thank you. saurabh _ Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. https://signup.live.com/signup.aspx?id=60969 ___ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users
Re: [elinks-users] Elinks - title resets to $TERM not what it originally was
On Tue, Jul 06, 2010 at 04:43:02PM +, Saurabh T wrote: I am using gnome-terminal whose default title is Terminal. However after use of Elinks, the title becomes the value of $TERM rather than Terminal. Is this expected behaviour? If so, is there a way to make Elinks reset to the original title rather than $TERM? Else should I enter this as a bug? (I know about ui.window_title, not looking to turn off title handling completely). Thank you. If ELinks is compiled with X support, then on X, it can grab the terminal title when it starts and restore that title when it exits. Otherwise, ELinks is hardcoded to set the value of $TERM. ELinks needs to be compiled with the X libraries in order to be able to grab the terminal title. Did you have the libx11-devel package installed when you compiled ELinks? -- Miciah Dashiel Butler Masters miciah.mast...@gmail.com ___ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users
Re: [elinks-users] Elinks - title resets to $TERM not what it originally was
If ELinks is compiled with X support, then on X, it can grab the terminal title when it starts and restore that title when it exits. Otherwise, ELinks is hardcoded to set the value of $TERM. ELinks needs to be compiled with the X libraries in order to be able to grab the terminal title. Did you have the libx11-devel package installed when you compiled ELinks? --- I tried rebuilding Elinks with --with-x. This didnt actually do anything, so I manually defined HAVE_X11 in config.h and had to add #define _X_SENTINEL(x) __attribute__ ((__sentinel__(x))) #define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y))) above the #include X11/Xlib.h line in src/osdep/osdep.c. Still the behaviour did not change. I ran elinks under the debugger and as it turns out, get_window_title() returns an empty string which it gets from XGetWMName. On exit from Elinks, free_itrm() is called and due to itrm-orig_title being empty, it defaults to using $TERM. So essentially, the behaviour is unchanged after compiling with X. Running xprop on the terminal shows the window name is indeed Terminal, so the next thing I tried was to change the next line in get_window_title(): - while (!x_error (!status || !text_prop.value)) { + while (!x_error (!status || !text_prop.value || !*text_prop.value)) { and this actually works. I hope someone will verify this is correct and patch the codebase. Thanks for the help. saurabh _ Hotmail: Trusted email with powerful SPAM protection. https://signup.live.com/signup.aspx?id=60969 ___ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users