Bug 146786

Summary: -e option sometimes fails: Konsole can't open a PTY (segfault, perhaps)
Product: [Applications] konsole Reporter: sheeettin
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description sheeettin 2007-06-14 19:04:41 UTC
Version:           1.6.6 (using KDE KDE 3.5.7)
Installed from:    Ubuntu Packages
OS:                Linux

Depending on what you execute, Konsole's -e option will cause Konsole to produce an error message (console output and dialog box) and exit without executing the desired command.
For example, try "konsole -e 'echo foo'". Here, it causes Konsole to print 

kdecore (KProcess): WARNING: _attachPty() 11
konsole: WARNING: Unable to open a pseudo teletype!
Uh oh.. can't get terminal attributes..

...and a dialog box appears saying that Konsole needs read/write access to the PTYs. Strangely, "ls -Al /dev/pt*" shows everything is owned by root (group tty), permissions 0666.
In /dev/pts, I can read from and write to everything.

I can execute the launcher scripts for America's Army (a game) and Sauerbraten (another game) just fine (through the K menu, as "konsole -e '/path/to/script'", but the launcher script for Docking Station (another game) doesn't execute. It does work if executed in a shell, however.
Comment 1 Robert Knight 2007-06-17 01:15:04 UTC
Closely related to another report.  Konsole always shows the same pty error if the program fails to start for any reason, whether the pty is setup correctly or not.

*** This bug has been marked as a duplicate of 120322 ***