Re: [DNG] mlterm to display path in window frame
On Sat, 9 Nov 2019 20:58:03 -0500, Haines wrote in message <20191110015803.gb27...@engels.histomat.net>: > I'm running mltrm as my main terminal under Beowulf. I vaguely recall > that with xterm the path to the location of the current session of > the terminal was printed along the top of the window frame. At > present it simply displays "mlterm". ..aye, http://mlterm.sourceforge.net/mlterm.1.html clearly states: -T, --title=name Specify a title for a mlterm window. The default is "mlterm". ..further up, it adds to the confusion by stating: -N, --name=name Specify application name.The default is "mlterm". ..further down, it helpfully states: ... -y, --term=string Specify terminal type, i.e., the value of TERM variable. The default is xterm. ...which means it should accept xterm tricks from e.g. https://invisible-island.net/xterm/xterm.faq.html#how2_title and: https://invisible-island.net/xterm/xterm.html ..you may want to have your shell set the window (and tabs) title. Chk your output of 'env ', you may have unset what you want set. ..your ~/.mlterm/main config file may have a ... title=name (-T, --title) Title name. ...entry, which should accept shell strings like $PS1 and $PWD and ~/.mlterm/msg.log should tell you what works and not. ..try launch it from e.g. an xterm cli with e.g.: mlterm -T $PS1 & ..googling possible explanations to your findings, may be found in both https://invisible-island.net/ncurses/terminfo.src.html#tic-mlterm and https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Title-Modes ...or: titleModes (class TitleModes) Tells xterm whether to accept or return window- and icon-labels in ISO-8859-1 (the default) or UTF-8. Either can be encoded in hexadecimal. The default for this resource is “0”. Each bit (bit “0” is 1, bit “1” is 2, etc.) corresponds to one of the parameters set by the title modes control sequence: 0Set window/icon labels using hexadecimal 1Query window/icon labels using hexadecimal 2Set window/icon labels using UTF-8 (overrides utf8Title resource). 3Query window/icon labels using UTF-8 ...from man xterm, if you threw out everything ISO-8859-* and if mlterm still needs such support, http://mlterm.sourceforge.net/mlterm.1.html advices: -8, --88591(=bool) Use ISO8859-1 fonts for US-ASCII part of various encodings. ...and: -n, --noucsfont(=bool) Use non-Unicode fonts even when mlterm encoding is UTF-8. Useful when you don't have ISO10646-1 fonts and you want to use UTF-8 encoding. The default is false. ...and: -u, --onlyucsfont(=bool) Use Unicode fonts even when mlterm encoding is not UTF-8. Useful when you have ISO10646 fonts but you don't have other fonts and want to use non- UTF-8 encodings. Note that conversion to Unicode is lossy. i.e. if mlterm encoding is not a subset of Unicode like ISO-2022-JP-2 or EUC-TW, charac- ters which are regarded as a same character in Unicode will be displayed with the same glyph and cannot be distinguished. The default is false. ...and: --ucsnoconv=value Use unicode fonts partially regardless of -n option. e.g.) --ucsnoconv=U+1234-5678,U+0123-4567 ...and: CONFIGURATION mlterm loads configuration files of "main", "font", "vfont", "tfont", "aafont", "vaafont", "taafont", "color", "key", "termcap", and "xim" on start up. "menu" configuration file is loaded by the configurable menu displayer (mlterm-menu). See the section of CONFIGURABLE MENU for detail. ..also chk your mlterm's GUI CONFIGURATOR, which may have changed things to your displeasure. ..you may be looking for mlterm's equvivalent of konsole's %w (which also sets konsole's tab names) and xterm's -title (alias -T ) in man xterm: title (class Title) Specifies a string that may be used by the window manager when displaying this application. > Did some searching and reading of man mlterm, but failed to find how > to get it to display its current path in the frame. Can it be done? ..try title=$PWD in your ~/.mlterm/main config file and tell us. Me, I find $PS1 sexier. ;o) -- ..med vennlig hilsen = with Kind Regards from Arnt Karlsen ...with a number of polar bear hunters in his ancestry... Scenarios always come in sets of three: best case, worst cas
Re: [DNG] mlterm to display path in window frame
On Sun, Nov 10, 2019 at 03:55:44PM +0100, Arnt Karlsen wrote: > On Sat, 9 Nov 2019 20:58:03 -0500, Haines wrote in message > <20191110015803.gb27...@engels.histomat.net>: > > > I'm running mltrm as my main terminal under Beowulf. I vaguely recall > > that with xterm the path to the location of the current session of > > the terminal was printed along the top of the window frame. At > > present it simply displays "mlterm". In the manual I misunderstood --title=name to specify a title rather than the path. I find the variable $PWD does return the path, and I can start mlterm with the command $ mlterm -T $PWD to get the path displayed in the window frame. However, if I put into ~/.mlterm/main the line: title=$PWD, what then appears in the wndow frame is: "$PWD". Somehow I'm missing the syntax for expanding that variable. > ...which means it should accept xterm tricks from e.g. > https://invisible-island.net/xterm/xterm.faq.html#how2_title > and: https://invisible-island.net/xterm/xterm.html I found no help here. > ..you may want to have your shell set the window (and tabs) title. > Chk your output of 'env ', you may have unset what you want set. My env has PWD=/home/haines, and so it seems $PWD should work. > ..your ~/.mlterm/main config file may have a ... > title=name (-T, --title) >Title name. > > ...entry, which should accept shell strings like $PS1 and $PWD > and ~/.mlterm/msg.log should tell you what works and not. The only content in ~/.mlterm are where I define geometry=80x24. bg_color=linen,fontsize=13, Nothing about accepting shell strings. The msg.log only reports not caring for my choices of font size when I find installed mlgerm. > ..try launch it from e.g. an xterm cli with e.g.: > mlterm -T $PS1 & Yes, Launching it with -T $PWD & does return the current path. > ..googling possible explanations to your findings, may be found in both > https://invisible-island.net/ncurses/terminfo.src.html#tic-mlterm and > https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Title-Modes Looked at these, but found no help here. > ...or: titleModes (class TitleModes) >Tells xterm whether to accept or return window- and > icon-labels in ISO-8859-1 (the default) or UTF-8. > Either can be encoded in hexadecimal. The default for > this resource is “0”. > >Each bit (bit “0” is 1, bit “1” is 2, etc.) corresponds >to one of the parameters set by the title modes control >sequence: > >0Set window/icon labels using hexadecimal > >1Query window/icon labels using hexadecimal > >2Set window/icon labels using UTF-8 (overrides > utf8Title resource). > >3Query window/icon labels using UTF-8 > > ...from man xterm, if you threw out everything ISO-8859-* and if > mlterm still needs such support, > http://mlterm.sourceforge.net/mlterm.1.html advices: >-8, --88591(=bool) > Use ISO8859-1 fonts for US-ASCII part of various > encodings. > > ...and: >-n, --noucsfont(=bool) > Use non-Unicode fonts even when mlterm encoding is > UTF-8. Useful when you don't have ISO10646-1 > fonts and you want to use UTF-8 encoding. The > default is false. > > ...and: >-u, --onlyucsfont(=bool) > Use Unicode fonts even when mlterm encoding is not > UTF-8. Useful when you have ISO10646 fonts but > you don't have other fonts and want to use non- > UTF-8 encodings. Note that conversion to Unicode > is lossy. i.e. if mlterm encoding is not a subset > of Unicode like ISO-2022-JP-2 or EUC-TW, charac- > ters which are regarded as a same character in > Unicode will be displayed with the same glyph and > cannot be distinguished. > > The default is false. > > ...and: >--ucsnoconv=value > Use unicode fonts partially regardless of -n > option. > > e.g.) --ucsnoconv=U+1234-5678,U+0123-4567 > > ...and: I'm too dense to see how this related to title. > CONFIGURATION >mlterm loads configuration files of "main", "font", >"vfont", "tfont", "aafont", "vaafont", "taafont", >"color", "key", "termcap", and "xim" on start up. "menu" >configuration file is loaded by the configurable menu >displayer (mlterm-menu). See the section of CONFIGURABLE >MENU for detail. > ..also chk your mlterm's GUI CONFIGURATOR, which may have changed > things to your displeasure. the only config file I get is main. I found that Ctl=both mouse buttons when mlterm open did raise a menu. None seemed of use. One seems to have
Re: [DNG] mlterm to display path in window frame
Hello I am under the impression that some xterminal emulators understand a certain escape sequence (maybe tsl ?) which update the title bar. What does tput hsl and tput tsl ; echo -n hello ; tput fsl do ? Maybe that escape sequence has been removed from your terminfo entry ? Use infocmp to check on a working system... regards marc ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mlterm to display path in window frame
my shell function "title()" has echo -n "\033]0;$1\007" which seems to do its thing for mlterm as well as xfce4-terminal and xterm, and probably other. Ralph. marc wrote on 11/11/19 8:44 am: Hello I am under the impression that some xterminal emulators understand a certain escape sequence (maybe tsl ?) which update the title bar. What does tput hsl and tput tsl ; echo -n hello ; tput fsl do ? Maybe that escape sequence has been removed from your terminfo entry ? Use infocmp to check on a working system... regards marc ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mlterm to display path in window frame
On Sun, Nov 10, 2019 at 10:44:02PM +0100, marc wrote: > Hello > > I am under the impression that some xterminal emulators > understand a certain escape sequence (maybe tsl ?) which > update the title bar. > > What does > > tput hsl > > and > > tput tsl ; echo -n hello ; tput fsl > > do ? They have no effect. > Maybe that escape sequence has been removed > from your terminfo entry ? Use infocmp to check > on a working system... Not sure how to use infocmp, but tput does not show up, and $ infocmp | grep mlterm # Reconstructed via infocmp from file: /usr/share/terminfo/m/mlterm mlterm|multi lingual terminal emulator, Haines ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mlterm to display path in window frame
Hello > > I am under the impression that some xterminal emulators > > understand a certain escape sequence (maybe tsl ?) which > > update the title bar. > > > > What does > > > > tput hsl > > > > and > > > > tput tsl ; echo -n hello ; tput fsl > > > > do ? > > They have no effect. And what if you type export TERM=xterm+sl and then repeat the above tput commands ? That should give you the same effect as Ralph has hardcoded into his prompt, assuming you have the correct terminfo entry > Not sure how to use infocmp, but tput does not show up, and > > $ infocmp | grep mlterm Hmm, I might have been a bit terse. Tput allows you to look up escape sequences in the terminfo/termcap database. We are interested in tsl (escape sequence to write to the status bar). infocmp displays the whole database, so you could type infocmp mlterm | grep tsl infocmp xterm+sl | grep tsl to find this sequence. Man 8 terminfo gives you an explanation of the escape codes. If none of that works, try Ralph's hardcoded approach, eg echo -e "\033]0;hello\007" In an effort to trim things, many distributions ship only a small subset of the terminfo database by default, and relegate the rest to an optional package... regards marc ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mlterm to display path in window frame
I apologize for the time gap, but ill health put me out of commission for two months. My aim was to have mlterm behave like xterm and display the current path in its frame. The mltem accepts a value for -T that specifies the title for the mlterm window. In a terminal if I issue the command: $ mlterm -T $PWD I get the current path displayed as I want. If in ~/.mlterm/main I put the line: title = $PWD, the window of mlterm displays $PWD literally rather than current path. Assuming mlterm is a variant of xterm, I should be able to set the window title by placing this stanza into /etc/profile if [ "$TERM" = "xterm" ]; then PS1="\033]2;\u@\h:\w\007bash$ " fi I tried if [ "$TERM" = "xterm" ]; then PS1="$PWD" fi but neither had any effect. There is nothing in .mlterm/msg.log If I launch from a CLI with the command $ mlterm -T $PS1 the window displays: ${debian_chroot:+($debian_chroot)}\u@\h:\w\$ If I launch form CLI with the command: $ mlterm -T $PWD it works as desired. At Arnt Karlsen's suggesttion, I took a look at http://tldp.org/HOWTO/Xterm-Title.html, https://invisible-island.net/ncurses/terminfo.src.html#tic-mlterm, https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Title-Modes but it did not help. It was suggesed that mlterm might understand the tsl escape sequence. $ tput hsl tput: unknown terminfo capability 'hsl' $ tput tsl ; echo -n hellow ; tput fsl [nothing returned] If I type export TERM=xterm+sl and then do $ tput hsl tput: unknown terminfo capability 'hsl' $ tput tsl ; echo -n hello ; tput fsl [nothing returns] $ infocomp mlterm | grep tsl [nothing returns] $ infocmp xterm+sl | grep tsl dsl=\E]0;\007, fsl=^G, tsl=\E]0;, Haines Brown ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] mlterm to display path in window frame
Hello > I apologize for the time gap, but ill health put me out of > commission for two months. Hope you are recovering well > $ tput tsl ; echo -n hello ; tput fsl > [nothing returns] But does the title bar of your terminal say hello ? regards marc ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng