Bug 152673

Summary: konsole can't open pty
Product: [Applications] konsole Reporter: Armin Berres <armin>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version: 1.9.2   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Armin Berres 2007-11-21 23:44:33 UTC
Version:            (using KDE KDE 3.96.0)
Installed from:    Compiled From Sources
Compiler:          gcc-4.2 
OS:                Linux

Heyya!

We are currently working on the Debian packages for RC1 (and later) and get the following, when we start a console:
$ konsole
Have compositing:  false
konsole(3469)/kdeui (KXmlGui) KXmlGuiVersionHandler::KXmlGuiVersionHandler: found no version in "/usr/share/kde4/apps/konsole/konsoleui.rc"
konsole(3469)/kdeui (KXmlGui) KXMLGUIFactory::removeClient: KXMLGUIFactory::removeClient(  0x8140060  )
konsole(3469)/kdeui (KXmlGui) KXmlGuiVersionHandler::KXmlGuiVersionHandler: found no version in "/usr/share/kde4/apps/konsole/konsoleui.rc"
konsole(3469)/kdeui (KXmlGui) KXMLGUIFactory::addClient: KXMLGUIFactory::addClient(  0x8140060  )
konsole(3469)/kdeui (KXmlGui) KXmlGuiVersionHandler::KXmlGuiVersionHandler: found no version in "/usr/share/kde4/apps/konsole/sessionui.rc"
konsole(3469)/kdecore (KProcess/K3Process) KPty::open: Can't open a pseudo teletype
Unable to set terminal attributes.
konsole(3469)/kdecore (KProcess/K3Process) KPty::open: Can't open a pseudo teletype
konsole(3469)/kdecore (KProcess/K3Process) K3Process::start: Could not setup Communication!

There can't be a problem with the access right, because the KDE3 Konsole works just fine. E.g xterm and screen are working fine, too.
Do you have any idea what can be broken, or how we can debug it?

We tried the RC1 tarballs and also kdebase/apps/konsole from trunk (r739739).
Comment 1 Robert Knight 2007-12-07 19:48:00 UTC
> Do you have any idea what can be broken, or how we can debug it?

I don't know I'm afraid.  Kubuntu have working RC1 packages, is there some difference between their pty setup and that on Debian?
Comment 2 Armin Berres 2007-12-10 18:44:22 UTC
Sorry, we don't have an idea if there's a difference ;)
Weh should have a LiveCD ready shortly after RC2 -- maybe this can be used for debugging the issue...
Comment 3 Robert Knight 2007-12-10 21:27:50 UTC
> Weh should have a LiveCD ready shortly after RC2 --
> maybe this can be used for debugging the issue... 

Yes thanks.  Please add a note to this bug report when it is ready.
Comment 4 Uli Luckas 2007-12-13 17:34:11 UTC
an strace looks like this:
[pid  8338] open("/dev/ptyp0", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)
..
[pid  8338] open("/dev/ptyoz", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)
[pid  8338] write(2, "konsole(8338)/kdecore (KProcess/"..., 85konsole(8338)/kdecore (KProcess/K3Process) KPty::open: Can't open a pseudo teletype 
) = 85

It looks like konsole tries to find on legacy (BSD) pty. Now looking in Debian's current kernel configuration the option LEGACY_PTYS is not set.

You have to configure konsole to use Unix98 ptys.
Comment 5 Armin Berres 2007-12-13 19:32:10 UTC
OK, we finally sorted it out: The problem was a missing /dev/ptmx of the build environment which built kdelibs. Building in a 'fixed' environment fixes the problem.

Sorry for the noise.