Re: [MSEide-MSEgui-talk] tterminal again
22.10.2011 06:48, Martin Schreiber пишет: All MSEgui bugs must be fixed. :-) Where can I download the pacman version you used? Martin Impressive position Ok, here link to pacman http://www.archlinux.org/pacman/ Link for download (simple ftp) on this page p.s. get ready for a large number of bugfixes :) -- Yours, Alexandre Minoshi ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
25.10.2011 14:40, minoshi пишет: p.s. get ready for a large number of bugfixes :) bug reports of cause :)) -- Yours, Alexandre Minoshi ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
ptytee does not use a tterminal. What happens with your pacmanXG with the newest tterminal? The same as before. Martin, let's leave this topic because the on developer`s site announced a new branch of pacman utility. I plan to download and compile it and see how it works. -- Yours, Alexandre Minoshi ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Saturday 22 October 2011 08.42:14 minoshi wrote: ptytee does not use a tterminal. What happens with your pacmanXG with the newest tterminal? The same as before. Martin, let's leave this topic because the on developer`s site announced a new branch of pacman utility. I plan to download and compile it and see how it works. All MSEgui bugs must be fixed. :-) Where can I download the pacman version you used? Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
Hallo Martin, Du schriebst am Thu, 20 Oct 2011 08:16:54 +0200: the program / project: Is it possible to devise a function to download the real data of such a URL non-interactively? It is the web interface of the MSEuniverse git repository. The git Yes. I realize that. It's just that web interfaces usually don't lend themselves rather little to easy automatic access. repository is described here: http://gitorious.org/mseuniverse ... In order to get updates, cd in your mseuniverse directory and ... Anyway, thank you for the information. If I might come up with something useful toward this, I will report. -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) --- Mit freundlichen Grüßen, S. Schicktanz --- ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
Hallo Martin, Du schriebst am Sat, 22 Oct 2011 07:43:13 +0200: That's probabely because pacman gets fed its input by pipe - I said ... ptytee should make an exact copy of the data into the file, so there is something wrong because the file and the xterml input are not the same. Not neccessarily - the only difference is the y and newline following it that do not appear in the log file. That means these two characters were not output via the same mechanism as the rest of the text. Now, it's possible for a program to set its terminal into raw mode to receive every input character, even every key press, immediately and without translation. The terminal doesn't even neccessarily echo them, but may let the application do that itself. These characters might not even be output via stdout/stderr, but could be sent to the terminal directly. On the other hand, a Unix terminal has a whole lot of options to handle input and output internally, without an application's interaction, and maybe without reflection on any of the standard I/O channels. You might consult man stty or just study the output of stty --help on this. It's sufficient to pass it a response by pipe to make it suppress the progress display as well as the newline after the input prompt. In theory current ptytee and tterminal should use a PTY on input and output so there is something wrong again. Does ptytee pass the y-newline sequence as keyboard actions? If not, this might be sufficient to trigger the alternate behaviour of pacman already - the missing progress display indicates that this has happened indeed. So there's probabely nothing wrong with ptytee and tterminal, the unwanted behaviour is just due to pacman's overly cautious method of input acquisition, which cannot be correctly reflected by any means except real keyboard entry. And even that might not be able to capture the automatic action of the terminal itself on input, because they might not appear at all in the output stream. -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) --- Mit freundlichen Grüßen, S. Schicktanz --- ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
Hallo Martin, Du schriebst am Thu, 20 Oct 2011 17:45:25 +0200: So no progress display? Strange the missing linefeeds. That's probabely because pacman gets fed its input by pipe - I said already that it has such a flaw (IMO) concerning redirections. It's sufficient to pass it a response by pipe to make it suppress the progress display as well as the newline after the input prompt. It does this even when called directly in a terminal. Maybe it switches the terminal to raw input, although it does not use single key control - perhaps yet, possibly? -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) --- Mit freundlichen Grüßen, S. Schicktanz --- ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Friday 21 October 2011 20.58:35 Sieghard wrote: Hallo Martin, Du schriebst am Thu, 20 Oct 2011 17:45:25 +0200: So no progress display? Strange the missing linefeeds. That's probabely because pacman gets fed its input by pipe - I said already that it has such a flaw (IMO) concerning redirections. ptytee should make an exact copy of the data into the file, so there is something wrong because the file and the xterml input are not the same. It's sufficient to pass it a response by pipe to make it suppress the progress display as well as the newline after the input prompt. In theory current ptytee and tterminal should use a PTY on input and output so there is something wrong again. Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Wednesday 19 October 2011 22.12:59 Sieghard wrote: Hallo Martin, Du schriebst am Tue, 18 Oct 2011 10:37:42 +0200: Thanks, I made a program which copies the PTY output to a file: http://gitorious.org/mseuniverse/mseuniverse/trees/master/tools/utilities /ptytee Sorry to come back on this again - but I got a question trying to access the program / project: Is it possible to devise a function to download the real data of such a URL non-interactively? It is the web interface of the MSEuniverse git repository. The git repository is described here: http://gitorious.org/mseuniverse In order to get a local copy of the whole repository make git clone git://gitorious.org/mseuniverse/mseuniverse.git In order to get updates, cd in your mseuniverse directory and git pull Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
Should work now, git master (d7d2f15940c0611c36fcc13da7c43b0e081dbb21). Hello, Martin! proc.options = [pro_output,pro_errorouttoout,pro_tty] in real console: [root@server ptytee]# LANG=en_US.utf8 ./ptytee --command=pacman -Sw acl --file=test.txt resolving dependencies... Targets (1): acl-2.2.51-1 [0.13 MB] Total Download Size:0.13 MB Proceed with download? [Y/n] y :: Retrieving packages from core... downloading acl-2.2.51-1-i686.pkg.tar.xz... [root@server ptytee]# test.txt file: [root@server ptytee]# cat test.txt resolving dependencies... Targets (1): acl-2.2.51-1 [0.13 MB] Total Download Size:0.13 MB Proceed with download? [Y/n] :: Retrieving packages from core... downloading acl-2.2.51-1-i686.pkg.tar.xz... [root@server ptytee]# -- Yours, Alexandre Minoshi ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Thursday 20 October 2011 17.54:06 minoshi wrote: proc.options = [pro_output,pro_errorouttoout,pro_tty] Where is this? In ptytee mainmo? Yes. So no progress display? Strange the missing linefeeds. What about the newest tterminal from git master? It has a PTY on input and output and sets processgroup and sessionleader. Martin But it`s newest. I update from git and recompile MSEide ~40 minutes ago. I meant newest tterminal, not newest ptytee. ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
20.10.2011 15:59, Martin Schreiber пишет: I meant newest tterminal, not newest ptytee. Yes, I understand you correctly. For the purity of the experiment i clear msetrunk directory and execute git clone git://gitorious.org/mseide-msegui/mseide-msegui.git mseide-msegui then build mseide -- Yours, Alexandre Minoshi ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Thursday 20 October 2011 18.14:00 minoshi wrote: 20.10.2011 15:59, Martin Schreiber пишет: I meant newest tterminal, not newest ptytee. Yes, I understand you correctly. For the purity of the experiment i clear msetrunk directory and execute git clone git://gitorious.org/mseide-msegui/mseide-msegui.git mseide-msegui then build mseide ptytee does not use a tterminal. What happens with your pacmanXG with the newest tterminal? Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
Martin Schreiber wrote: Martin Schreiber wrote: On Monday 17 October 2011 17.16:36 minoshi wrote: 17.10.2011 09:45, Martin Schreiber пишет: I tested with the ls command which has different output on a PTY, works for me. work for me too. but with 'pacman' no :/ git mseide-msegui master (e90ded93bc597a9153975e5bdbe25076c74d5198) has a pty on input and output, please test. That disturbs FPC in MSEide... I'll try to fix tomorrow. Should work now, git master (d7d2f15940c0611c36fcc13da7c43b0e081dbb21). Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
Hallo Martin, Du schriebst am Tue, 18 Oct 2011 10:37:42 +0200: Thanks, I made a program which copies the PTY output to a file: http://gitorious.org/mseuniverse/mseuniverse/trees/master/tools/utilities/ptytee Sorry to come back on this again - but I got a question trying to access the program / project: Is it possible to devise a function to download the real data of such a URL non-interactively? I'm doing nearly all my internet access by scripts that get called by a cron job; they perform such tasks as fetching and sending mail and news or downloading files. Previously, you provided a script to download a svn trunk snapshot, which I also used - but the git link you gave only returns me a web page containing the parts of the project as file:// links, seemingly implying they were local to _my_ machine if I attempted to download them, which clearly cannot be the case. How to get at the data without having to do everything manually all the time, then? -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) --- Mit freundlichen Grüßen, S. Schicktanz --- ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
Hallo Martin, Du schriebst am Tue, 18 Oct 2011 10:37:42 +0200: http://gitorious.org/mseuniverse/mseuniverse/trees/master/tools/utilities/ptytee Sorry, back on that again - meanwhile I found that it's sufficient to prepend http://gitorious.org; in place of the file:// to all the paths in the web page. Now what remains is to extract _all_ the pertinent links from the page and none beyond. The rest should be trivial... -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) --- Mit freundlichen Grüßen, S. Schicktanz --- ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Tuesday 18 October 2011 01.39:06 Sieghard wrote: Sorry, no comments - please refer to the man pages and kernel documentation. (I don't recall any detail any more myself now;) For other terminal devices, like e.g. xterm, rxvt or such I don't know of any method to access their text buffers, altough there may exist some - I'm afraid, very specific for the pertinent terminal implementation, respectively. Thanks, I made a program which copies the PTY output to a file: http://gitorious.org/mseuniverse/mseuniverse/trees/master/tools/utilities/ptytee minoshi, can you run ptytee --command=pacman -Sw acl --file=test.txt and send the result? Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
Thanks, I made a program which copies the PTY output to a file: http://gitorious.org/mseuniverse/mseuniverse/trees/master/tools/utilities/ptytee minoshi, can you run ptytee --command=pacman -Sw acl --file=test.txt and send the result? Martin no result. [root@server Новый]# LANG=en_US.utf8 ./ptytee --command=pacman -Sw acl --file=test.txtresolving dependencies... Targets (1): acl-2.2.51-1 Total Download Size:0.13 MB Proceed with download? [Y/n] y And program stop here. As I understand, ptytee can`t send answer to process. I add option --noconfirm to command line and got that : [root@server tee]# LANG=en_US.utf8 ./ptytee --command=pacman -S --noconfirm acl --file=test.txt warning: acl-2.2.51-1 is up to date -- reinstalling resolving dependencies... looking for inter-conflicts... Targets (1): acl-2.2.51-1 Total Download Size:0.13 MB Total Installed Size: 0.59 MB Proceed with installation? [Y/n] :: Retrieving packages from core... downloading acl-2.2.51-1-i686.pkg.tar.xz... [root@server tee]# the test file: warning: acl-2.2.51-1 is up to date -- reinstalling resolving dependencies... looking for inter-conflicts... Targets (1): acl-2.2.51-1 Total Download Size:0.13 MB Total Installed Size: 0.59 MB Proceed with installation? [Y/n] :: Retrieving packages from core... downloading acl-2.2.51-1-i686.pkg.tar.xz... -- Yours, Alexandre Minoshi ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Tuesday 18 October 2011 20.03:18 minoshi wrote: no result. [root@server Новый]# LANG=en_US.utf8 ./ptytee --command=pacman -Sw acl --file=test.txtresolving dependencies... Targets (1): acl-2.2.51-1 Total Download Size:0.13 MB Proceed with download? [Y/n] y And program stop here. As I understand, ptytee can`t send answer to process. I add option --noconfirm to command line and got that : ptytee e2bb13357d2671d207e54537605d1ab63d794aaf has no input pipe and should work with terminal entry, please try again. Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Monday 17 October 2011 17.16:36 minoshi wrote: 17.10.2011 09:45, Martin Schreiber пишет: I tested with the ls command which has different output on a PTY, works for me. work for me too. but with 'pacman' no :/ git mseide-msegui master (e90ded93bc597a9153975e5bdbe25076c74d5198) has a pty on input and output, please test. Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
Martin Schreiber wrote: On Monday 17 October 2011 17.16:36 minoshi wrote: 17.10.2011 09:45, Martin Schreiber пишет: I tested with the ls command which has different output on a PTY, works for me. work for me too. but with 'pacman' no :/ git mseide-msegui master (e90ded93bc597a9153975e5bdbe25076c74d5198) has a pty on input and output, please test. That disturbs FPC in MSEide... I'll try to fix tomorrow. Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
17.10.2011 08:04, minoshi пишет: In pacman news i wrote that now pacman is only front-end for library libalpm.so. And I suppose that missing output is output of this library. In pacman news i read ... Sorry for mistake -- Yours, Alexandre Minoshi ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Monday 17 October 2011 10.04:26 minoshi wrote: Hello again! I continue write pacmanXG. In it I run utility 'pacman' in tterminal and then parse output pacman is package manager for archlinux Some time ago pacman was updated and now output in tterminal and in real console (for example xterm) is different. tterminal: = = EXECUTE : pacman -Sw acl = resolving dependencies... Targets (1): acl-2.2.51-1 Total Download Size:0.13 MB Proceed with download? [Y/n] y :: Retrieving packages from core... downloading acl-2.2.51-1-i686.pkg.tar.xz... = done (= done is mark that tterminal finish executing) in real console : [root@server pkg]# pacman -Sw acl resolving dependencies... Targets (1): acl-2.2.51-1 Total Download Size:0.13 MB Proceed with download? [Y/n] y :: Retrieving packages from core... acl-2.2.51-1-i686 135.4K 247.1K/s 00:00:01 [##] 100% (1/1) checking package integrity [##] 100% [root@server pkg]# In pacman news i wrote that now pacman is only front-end for library libalpm.so. And I suppose that missing output is output of this library. Unfortunaly there is no documentation for library (only promise to write it) and i can`t write own wrapper. I looked code of library but I don`t know c++ :( Any ideas? Maybe a problem of the sent line editing characters for the progress display. Please tee the pacman terminal output to a file and send the file. Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
17.10.2011 08:56, Alexander пишет: On Mon, 17 Oct 2011 08:29:27 + minoshiminoshi-o+mxotu4lmchxe+lvdl...@public.gmane.org wrote: Can`t translate tee, sorry :( man tee Never use before this utility. As I understand correctly i must execute pacman -Sw acl | tee test.txt See attachment -- Yours, Alexandre Minoshi resolving dependencies... Targets (1): acl-2.2.51-1 Total Download Size:0.13 MB :: Retrieving packages from core... downloading acl-2.2.51-1-i686.pkg.tar.xz... checking package integrity... ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Monday 17 October 2011 10.29:27 minoshi wrote: Maybe a problem of the sent line editing characters for the progress display. Please tee the pacman terminal output to a file and send the file. Martin Can`t translate tee, sorry :( Executing pacman -Sw acl 1.txt ? pacman -Sw acl | tee 1.txt It is possible that pacman works different if output is not connected to a pseudotermial. If so I fear you must debug yourself. To the Unix specialists: Is there a possibility to get a copy of the data the terminal receives? Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Monday 17 October 2011 10.51:23 minoshi wrote: 17.10.2011 08:56, Alexander пишет: On Mon, 17 Oct 2011 08:29:27 + minoshiminoshi-o+mxotu4lmchxe+lvdl...@public.gmane.org wrote: Can`t translate tee, sorry :( man tee Never use before this utility. As I understand correctly i must execute pacman -Sw acl | tee test.txt See attachment Aha. resolving dependencies... Targets (1): acl-2.2.51-1 Total Download Size:0.13 MB :: Retrieving packages from core... downloading acl-2.2.51-1-i686.pkg.tar.xz... checking package integrity... What did you see on the terminal? ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
What did you see on the terminal? [root@server ~]# pacman -Sw acl | tee test.txt resolving dependencies... Targets (1): acl-2.2.51-1 Total Download Size:0.13 MB Proceed with download? [Y/n] y :: Retrieving packages from core... downloading acl-2.2.51-1-i686.pkg.tar.xz... checking package integrity... [root@server ~]# -- Yours, Alexandre Minoshi ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Monday 17 October 2011 10.57:55 minoshi wrote: What did you see on the terminal? [root@server ~]# pacman -Sw acl | tee test.txt resolving dependencies... Targets (1): acl-2.2.51-1 Total Download Size:0.13 MB Proceed with download? [Y/n] y :: Retrieving packages from core... downloading acl-2.2.51-1-i686.pkg.tar.xz... checking package integrity... [root@server ~]# So tterminal actually shows the correct output. Is tterminal.optionsprocess pro_tty active? It should use pseudo terminal if active. ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
17.10.2011 09:01, Martin Schreiber пишет: So tterminal actually shows the correct output. Istterminal.optionsprocess pro_tty active? It should use pseudo terminal if active. yes [pro_output,pro_input,pro_errorouttoout,pro_tty] -- Yours, Alexandre Minoshi ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
17.10.2011 09:45, Martin Schreiber пишет: I tested with the ls command which has different output on a PTY, works for me. work for me too. but with 'pacman' no :/ I try without pro_tty and more output but not all. Well, if no more ideas I go to write a crutch :) -- Yours, Alexandre Minoshi ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
On Monday 17 October 2011 17.16:36 minoshi wrote: 17.10.2011 09:45, Martin Schreiber пишет: I tested with the ls command which has different output on a PTY, works for me. work for me too. but with 'pacman' no :/ I try without pro_tty and more output but not all. Well, if no more ideas I go to write a crutch :) I should have a file of the terminal output of pacman in order to test. We must wait until a Unix expert explains how. :-) Or you can write a program which does the task. Martin ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] tterminal again
Hallo Martin, Du schriebst am Mon, 17 Oct 2011 10:52:41 +0200: It is possible that pacman works different if output is not connected to a pseudotermial. If so I fear you must debug yourself. That's it - pacman senses whether it's talking to a real (controlling) terminal or to a pipe, and adjusts its output accordingly. To a real terminal, e.g. it sends progress indicators, while it doesn't do that if it's connected to a pipe. (Any Unix program can do that, it just takes a couple of ioctl calls, AFAIR.) But pacman's sense logic even has a flaw: it doesn't discern whether it's its _output_ or its _input_ which is connected to a pipe. So even if you only feed it input (which might be useful in a script if it's overly interrogative during some operations), it will _not_ output any progress information, which uses terminal control data (aka escape sequences). To the Unix specialists: Is there a possibility to get a copy of the data the terminal receives? Well, I'm not a Unix specialist, whatever that might mean. It's just that I found out a couple of facts about these things by tinkering about... If it's a real terminal, like the /dev/tty pseudo consoles, yes, there is. Their output is reflected on the /dev/vcs(a) devices, which are character devices containing either the text only or text-attribute pairs of the console display. The following (FPC) program can read them and display the content (text only): PROGRAM catvcc; USES SysUtils, Crt; VAR i: integer; C: char; Z: string; v: text; d: FILE OF byte ABSOLUTE v; CONST l: byte {integer} = 80; BEGIN IF ParamCount 1 THEN Halt (1); CheckBreak:= true; Assign (d, '/dev/vcsa'+ ParamStr (1)); Reset (d); Read (d, l); Read (d, l); // get line length Assign (v, '/dev/vcs'+ ParamStr (1)); Reset (v); Z:= ''; i:= 0; WHILE NOT EoF (v) DO BEGIN Read (v, C); Inc (i); Z:= Z+ C; IF i = l THEN BEGIN Write (TrimRight (Z)); ClrEoL; WriteLn; Z:= ''; i:= 0; END (* IF i = l *); END (* WHILE NOT EoF (v) *); IF i 0 THEN WriteLn (TrimRight (Z)); Close (v); END. Sorry, no comments - please refer to the man pages and kernel documentation. (I don't recall any detail any more myself now;) For other terminal devices, like e.g. xterm, rxvt or such I don't know of any method to access their text buffers, altough there may exist some - I'm afraid, very specific for the pertinent terminal implementation, respectively. -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) --- Mit freundlichen Grüßen, S. Schicktanz --- ___ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk