You are not logged in.

#1 2013-08-15 08:19:42

Avenger
Member
Registered: 2005-11-11
Posts: 65

Konsole (and some other virtual terminals) not working correctly.

When starting Konsole I just get a blank black window. I can see in the log that it's because it cannot open a pseudo terminal:

KPty::open: Can't open a pseudo teletype

I tried to open urxvt and got this message:

urxvt: can't initialize pseudo-tty

My permissions are as follows:

drwxr-xr-x  2 root root             0 Aug 15 09:28 /dev/pts
crw-rw-rw-  1 root tty 5,           2 Aug 15 10:14 /dev/ptmx
c---------  1 root root 5,          2 Aug 15 09:28 /dev/pts/ptmx

On the other hand xterm works, but it creates pts's with the wrong group permissions, it creates it as my user-group. And looking at strace I can see that urxvt fails because it cannot chown the created pts to the tty group.
So, I added my self to the tty group and now everything works, but looking at my other computers, my user is not a member of the tty group there and have no issues with the pseudo terminals.

Does anyone know what it could be?

I can add: I'm running testing on this computer.

Last edited by Avenger (2013-08-15 08:22:58)

Offline

#2 2013-08-15 08:31:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 8,693

Re: Konsole (and some other virtual terminals) not working correctly.

is /dev/pts mounted?

Online

#3 2013-08-15 09:19:59

Avenger
Member
Registered: 2005-11-11
Posts: 65

Re: Konsole (and some other virtual terminals) not working correctly.

Yes, it's mounted but it seems the mount parameters were wrong. I noticed this email on the mailing list just now:

https://mailman.archlinux.org/pipermail … 33999.html

I had an old devpts mount line in fstab that I have now removed.

Offline

#4 2013-08-15 18:00:08

balta2ar
Member
From: Russia, Moscow
Registered: 2010-03-23
Posts: 25
Website

Re: Konsole (and some other virtual terminals) not working correctly.

Same problem. Removing /dev/pts line helped indeed. Can anybody explain why did glibc break it? And why there're no notifications about this on the archlinux.org?

Offline

#5 2013-08-15 18:03:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Konsole (and some other virtual terminals) not working correctly.

balta2ar wrote:

Same problem. Removing /dev/pts line helped indeed. Can anybody explain why did glibc break it? And why there're no notifications about this on the archlinux.org?

Why did you have /dev/pts in your fstab?

Offline

#6 2013-08-15 18:05:37

balta2ar
Member
From: Russia, Moscow
Registered: 2010-03-23
Posts: 25
Website

Re: Konsole (and some other virtual terminals) not working correctly.

karol wrote:
balta2ar wrote:

Same problem. Removing /dev/pts line helped indeed. Can anybody explain why did glibc break it? And why there're no notifications about this on the archlinux.org?

Why did you have /dev/pts in your fstab?

I don't know. I only ever changed lines with my own partitions, never changed any of system's lines. It was there for ages.

Offline

#7 2013-08-15 18:12:39

Thaodan
Member
From: Dortmund, Nordrein-Westfalen
Registered: 2012-04-28
Posts: 448

Re: Konsole (and some other virtual terminals) not working correctly.

its present in my /etc/mtab this is ok or not?


Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux

Offline

#8 2013-08-15 18:13:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Konsole (and some other virtual terminals) not working correctly.

Thaodan wrote:

its present in my /etc/mtab this is ok or not?

It's OK.

Last edited by karol (2013-08-15 18:13:54)

Offline

#9 2013-08-15 19:24:43

johni
Member
Registered: 2012-02-03
Posts: 102

Re: Konsole (and some other virtual terminals) not working correctly.

I don't have /dev/pts in my /etc/fstab file and I am suffering from the same problem after glibc-2.18 update.

Any idea how I can fix it?  I may have to rollback glibc for now , which I really don't want to do sad

Offline

#10 2013-08-15 19:46:25

johni
Member
Registered: 2012-02-03
Posts: 102

Re: Konsole (and some other virtual terminals) not working correctly.

Some more info from running konsole with strace:

1402  open("/dev/ptmx", O_RDWR)         = 9
1402  statfs("/dev/pts", {f_type="DEVPTS_SUPER_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
1402  ioctl(9, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
1402  ioctl(9, TIOCGPTN, [1])           = 0
1402  stat("/dev/pts/1", {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0
1402  getuid()                          = 518
1402  socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 10
1402  connect(10, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
1402  close(10)                         = 0
1402  socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 10
1402  connect(10, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
1402  close(10)                         = 0
1402  open("/etc/group", O_RDONLY|O_CLOEXEC) = 10
1402  fstat(10, {st_mode=S_IFREG|0644, st_size=807, ...}) = 0
1402  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5fb6a4c000
1402  read(10, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 807
1402  close(10)                         = 0
1402  munmap(0x7f5fb6a4c000, 4096)      = 0
1402  chown("/dev/pts/1", 518, 5)       = -1 EPERM (Operation not permitted)

Looks like it opens /dev/ptmx to get the new tty, /dev/pts/1, and then tried to chown /dev/pts/1 to my user id, which fails with EPERM.

Offline

#11 2013-08-15 20:24:33

johni
Member
Registered: 2012-02-03
Posts: 102

Re: Konsole (and some other virtual terminals) not working correctly.

Nevermind on my problem.  I figured it out.

I was indeed mounting /dev/pts manually because of a custom initcpio boot hook based on the dropbear_initrd_encrypt from aur.  It mounts devpts so dropbear can work during boot to allow me to enter decryption key remotely.  However after continuing my hook forgot to unmount /dev/pts.  I fixed my hook, and now it works.

Note: This should not effect normal users of dropbear_initrd_encrypt because it correctly umounts /dev/pts.  I am using a customized hook based on this because I am using loopAES for root encryption rather than luks.

FYI, the difference beween the default devpts mount, and the one you should have for glibc-2.18:

old:

devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)

new:

devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)

Thanks to Avenger for pointing to the mailing list entry on /etc/fstab that led me to search my boot hook.

Offline

#12 2013-08-15 20:43:36

irrlicht
Member
Registered: 2010-12-06
Posts: 107

Re: Konsole (and some other virtual terminals) not working correctly.

nvm, i figured it out.

Last edited by irrlicht (2013-08-15 20:51:40)


Everything less than immortality is a complete waste of time!

Offline

Board footer

Powered by FluxBB