! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Terminal does not show output with --hold --execute optiions
Status:
RESOLVED: FIXED
Product:
Xfce4-terminal
Component:
General

Comments

Description mchristias 2007-07-30 21:25:04 CEST
A small script executed with --execute and --hold options does not show output on the screen.

To reproduce the bug:
1)Create a text file named prova.sh with this content:
# Script Start -----------------------------
# Generate an error message
wrong-command 
# Generate some output
pwd
echo something
# Check if the script has been executed
echo executed >> out.txt
# Uncomment the following to see the output
#sh
# Script End -----------------

2) Open a Terminal in the same directory and type:
"Terminal --hold --execute sh prova.sh"

3) Alternatively you can assign the above line to an "Open With Other Application" action:
Right click prova.sh
Choose "Open With Other Application"
Choose "Use a Custom Command"
Type "Terminal --hold --execute sh prova.sh"
Comment 1 Nick Schermer editbugs 2009-07-05 14:56:11 CEST
Work fine here, also an old bug. Please reopen if you still have this problem.
Comment 2 mchristias 2009-07-06 22:40:09 CEST
Well it is working now for me too if i open Terminal and then type:
Terminal --hold --execute sh prova.sh

But it does not work if assign the above line to an "Open With Other
Application" action (step 3). It works with xterm though.

I am using Xfce 4.4 on Ubuntu 8.10
Comment 3 Nick Schermer editbugs 2009-07-07 06:20:45 CEST
Ah, ok, will take a look at that too then ;-)
Comment 4 Nick Schermer editbugs 2009-07-07 17:28:09 CEST
That seems to work fine too, but thunar sets the working directory to the directory you're in, so it would be better to use an absolute path:

Terminal --hold --execute sh /home/yourname/prova.sh

Or use the custom action in the same directory as the prova.sh file is in.
Comment 5 mchristias 2009-07-07 18:40:54 CEST
I use <Right-Click> in Thunar -->
<Open with other Application> -->
<Use a Custom Command>
And in the command box I enter this line:
Terminal --hold --execute sh %f

I think it should work. It works with:
xterm -hold -e sh %f
Comment 6 Nick Schermer editbugs 2009-07-07 20:24:28 CEST
That works fine here too... What version of terminal / thunar / xfce are you using?
Comment 7 mchristias 2009-07-08 03:16:20 CEST
I am using: Xfce 4.4.2 and Thunar 0.9.0 on Ubuntu 8.10

Output of  xfce4-terminal --version:

Terminal 0.2.8 (Xfce 4.4.2)

Copyright (c) 2003-2007
        os-cillation e.K. All rights reserved.

Written by Benedikt Meurer <benny<img src=
Comment 8 mchristias 2009-07-08 03:20:06 CEST
I am using: Xfce 4.4.2 and Thunar 0.9.0 on Ubuntu 8.10

Output of  xfce4-terminal --version:

Terminal 0.2.8 (Xfce 4.4.2)

Copyright (c) 2003-2007
        os-cillation e.K. All rights reserved.

Written by Benedikt Meurer <benny@xfce.org>.

Built with Gtk+-2.12.8, running with Gtk+-2.12.9.

Please report bugs to <http://bugzilla.xfce.org/>.
Comment 9 mchristias 2009-07-08 04:11:14 CEST
Sorry, I correct: My Ubuntu version is 8.4.3 LTS
Comment 10 Eduardo Arnold 2014-03-30 12:58:04 CEST
I am also having problems with this bug. I've spent a few hours trying to figure out what was the problem with my C code, but then I realized it was a problem with xfce4-terminal.

I have a C code compiled and I can call it from within the terminal by using:
# ./a.out
or by calling xfce-terminal:
# xfce4-terminal -H -e "./a.out"

The result should, obviously, be the same. However, the second one doesn't show all the text info as the first one does, after some point it freezes.
To reproduce the error, my C code was:
void main()
{
        FILE* f = fopen("tmp.txt", "r");
        char c;
        
        while((c = fgetc(f)) != EOF )
                putchar(c);
        
}
The tmp.txt file is any file, preferably test with one with more than 1000 lines and more than 60kb. In my opinion it has something to do with the H argument, that's the hold one. Perhaps it's failing to recognize when the process finishes.
Comment 11 Eduardo Arnold 2014-03-30 12:59:23 CEST
Just to describe the environment, I'm using Arch Linux with xfce4, the version of xfce4-terminal is 0.6.3 (Xfce 4.10).

(In reply to Eduardo Arnold from comment #10)
> I am also having problems with this bug. I've spent a few hours trying to
> figure out what was the problem with my C code, but then I realized it was a
> problem with xfce4-terminal.
> 
> I have a C code compiled and I can call it from within the terminal by using:
> # ./a.out
> or by calling xfce-terminal:
> # xfce4-terminal -H -e "./a.out"
> 
> The result should, obviously, be the same. However, the second one doesn't
> show all the text info as the first one does, after some point it freezes.
> To reproduce the error, my C code was:
> void main()
> {
>         FILE* f = fopen("tmp.txt", "r");
>         char c;
>         
>         while((c = fgetc(f)) != EOF )
>                 putchar(c);
>         
> }
> The tmp.txt file is any file, preferably test with one with more than 1000
> lines and more than 60kb. In my opinion it has something to do with the H
> argument, that's the hold one. Perhaps it's failing to recognize when the
> process finishes.
Comment 12 Igor editbugs 2017-01-24 11:20:17 CET
(In reply to Eduardo Arnold from comment #11)
> Just to describe the environment, I'm using Arch Linux with xfce4, the
> version of xfce4-terminal is 0.6.3 (Xfce 4.10).

I can reproduce your problem on 0.8.3 but it's also reproducible with gnome-terminal - I think it's related to vte. I've submitted a bug against it: https://bugzilla.gnome.org/show_bug.cgi?id=777686
Comment 13 Igor editbugs 2019-11-18 15:48:34 CET
Fixed in vte.

Bug #3424

Reported by:
mchristias
Reported on: 2007-07-30
Last modified on: 2019-11-18

People

CC List:
2 users

Version

Attachments

Additional information