konsole -e does not work due to pty problems

Bug #43965 reported by Simon Hausmann
16
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: konsole

How to reproduce:

konsole -e 'ls; echo hi'

That brings up a message box indicating problems with the PTY configuration.

It's particularly annoying if x-terminal-emulator points to /usr/bin/konsole, since it works fine with xterm.

konsole package version is 3.5.2-0ubuntu19.

Revision history for this message
Kenny Duffus (kduffus) wrote : error dialogue
Changed in kdebase:
status: Unconfirmed → Confirmed
Revision history for this message
Andreas Simon (andreas-w-simon) wrote :

I can reproduce this error also with konsole 3.5.4-0ubuntu5 on Edgy and get the same error message as shown in Kenny's picture.

But strangly I have to put a whitespace after the ';', i.e. use

  konsole -e 'ls ; echo hi'

Otherwise I get an error "konsole: ERROR: can not execute ls;". But this seems unrelated to the pty issue of this bug report.

Here the pty related device permissions on my system:

$ ls -l /dev/ptmx
crw-rw-rw- 1 root root 5, 2 2006-08-16 12:12 /dev/ptmx
$ ls -l /dev/pts
total 0
crw------- 1 andreas tty 136, 0 2006-08-16 12:19 0
crw------- 1 andreas tty 136, 1 2006-08-16 12:18 1
crw------- 1 andreas tty 136, 2 2006-08-16 10:28 2
crw------- 1 andreas tty 136, 3 2006-08-16 12:18 3
crw------- 1 andreas tty 136, 4 2006-08-16 12:12 4
crw--w---- 1 andreas tty 136, 5 2006-08-16 10:28 5
$ ls -ld /dev/pts
drwxr-xr-x 2 root root 0 2006-08-16 12:15 /dev/pts
$ ls -l /dev/pty*
crw-rw-rw- 1 root tty 2, 176 2006-08-16 12:15 /dev/ptya0
...
The /dev/pty* devices all have the same ownership and permission.

Revision history for this message
Andreas Simon (andreas-w-simon) wrote :

I think this is no permission issue. When I try this as root user I get the same error.

Revision history for this message
Robert Knight (robertknight) wrote :

> That brings up a message box indicating problems with the PTY configuration.

The error has nothing to do with PTY configuration. The Konsole code first checks to see if the executable exists and if it does then it assumes that any subsequent failures are a PTY related issue. This behaviour is not correct and will need to be fixed.

Konsole and xterm treat the -e option differently I believe. The following works in Konsole and xterm:

konsole -e sh -c "ls;echo hello;sleep 10"

I think in xterm the "sh -c" part is implicit.

> It's particularly annoying if x-terminal-emulator points to /usr/bin/konsole, since it
> works fine with xterm.

What is the use case?

Revision history for this message
Harald Sitter (apachelogger) wrote :

Doesn't happen in KDE 4 anymore.

Changed in kdebase:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.