LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 05-12-2016, 11:42 AM   #1
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Rep: Reputation: 55
Who doesn't show pty logins


Hello

I am trying to figure out a potential problem. When I am logged in ttys, the who command works as expected, but when using pseudoterminals (under X), I don't get the pty logins in who.

Code:
> who
rueno    tty1         2016-05-12 12:32
rueno    tty2         2016-05-12 12:37
where I expect to see something like this:
Code:
> who
rueno    tty1         2016-05-12 12:32
rueno    pts/0
rueno    pts/1
rueno    tty2         2016-05-12 12:37
Here is the ps -e output:

Code:
> ps -e
  PID TTY          TIME CMD
    1 ?        00:00:01 systemd
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 ksoftirqd/0
    5 ?        00:00:00 kworker/0:0H
    6 ?        00:00:00 kworker/u8:0
    7 ?        00:00:00 rcu_sched
    8 ?        00:00:00 rcu_bh
    9 ?        00:00:00 migration/0
   10 ?        00:00:00 migration/1
   11 ?        00:00:00 ksoftirqd/1
   13 ?        00:00:00 kworker/1:0H
   14 ?        00:00:00 migration/2
   15 ?        00:00:00 ksoftirqd/2
   17 ?        00:00:00 kworker/2:0H
   18 ?        00:00:00 migration/3
   19 ?        00:00:00 ksoftirqd/3
   21 ?        00:00:00 kworker/3:0H
   22 ?        00:00:00 kdevtmpfs
   23 ?        00:00:00 netns
   24 ?        00:00:00 perf
   25 ?        00:00:00 writeback
   26 ?        00:00:00 crypto
   27 ?        00:00:00 bioset
   28 ?        00:00:00 kblockd
   29 ?        00:00:00 ata_sff
   30 ?        00:00:00 md
   31 ?        00:00:00 kworker/0:1
   32 ?        00:00:00 rpciod
   34 ?        00:00:00 kworker/1:1
   35 ?        00:00:00 kswapd0
   36 ?        00:00:00 vmstat
   37 ?        00:00:00 fsnotify_mark
   38 ?        00:00:00 nfsiod
   63 ?        00:00:00 kworker/3:1
   64 ?        00:00:00 acpi_thermal_pm
   65 ?        00:00:00 bioset
   66 ?        00:00:00 bioset
   67 ?        00:00:00 bioset
   68 ?        00:00:00 bioset
   69 ?        00:00:00 bioset
   70 ?        00:00:00 bioset
   71 ?        00:00:00 bioset
   72 ?        00:00:00 bioset
   73 ?        00:00:00 scsi_eh_0
   74 ?        00:00:00 scsi_tmf_0
   75 ?        00:00:00 scsi_eh_1
   76 ?        00:00:00 scsi_tmf_1
   77 ?        00:00:00 scsi_eh_2
   78 ?        00:00:00 scsi_tmf_2
   79 ?        00:00:00 scsi_eh_3
   80 ?        00:00:00 scsi_tmf_3
   81 ?        00:00:00 kworker/u8:1
   82 ?        00:00:00 kworker/u8:2
   83 ?        00:00:00 bioset
   84 ?        00:00:00 kworker/2:2
   85 ?        00:00:00 kpsmoused
   87 ?        00:00:00 kworker/1:2
   88 ?        00:00:00 ipv6_addrconf
   89 ?        00:00:00 deferwq
   90 ?        00:00:00 bioset
   91 ?        00:00:00 kworker/1:1H
   92 ?        00:00:00 jbd2/sda3-8
   93 ?        00:00:00 ext4-rsv-conver
   94 ?        00:00:00 kworker/3:1H
   95 ?        00:00:00 kworker/2:1H
   96 ?        00:00:00 kworker/0:1H
  117 ?        00:00:00 systemd-journal
  122 ?        00:00:00 kworker/2:4
  132 ?        00:00:00 kworker/3:2
  144 ?        00:00:00 systemd-udevd
  165 ?        00:00:00 kworker/0:3
  168 ?        00:00:00 cfg80211
  170 ?        00:00:00 irq/47-iwlwifi
  181 ?        00:00:00 kworker/u9:0
  188 ?        00:00:00 kworker/u9:1
  196 ?        00:00:00 jbd2/sda2-8
  197 ?        00:00:00 ext4-rsv-conver
  203 ?        00:00:00 systemd-timesyn
  207 ?        00:00:00 systemd-logind
  208 ?        00:00:00 cupsd
  210 ?        00:00:00 sshd
  211 ?        00:00:00 cups-browsed
  212 ?        00:00:00 dbus-daemon
  215 ?        00:00:00 systemd-network
  226 ?        00:00:00 colord
  228 ?        00:00:00 wpa_supplicant
  230 tty1     00:00:00 login
  233 ?        00:00:00 systemd-resolve
  258 ?        00:00:00 dbus
  262 ?        00:00:00 hci0
  263 ?        00:00:00 hci0
  266 ?        00:00:00 bluetoothd
  295 ?        00:00:00 systemd
  297 ?        00:00:00 (sd-pam)
  300 tty1     00:00:00 bash
  302 tty1     00:00:00 startx
  323 tty1     00:00:00 xinit
  324 tty1     00:00:02 Xorg
  327 tty1     00:00:00 openbox
  331 tty1     00:00:00 tint2
  332 tty1     00:00:00 pnmixer
  333 tty1     00:00:00 blueman-applet
  335 tty1     00:00:00 urxvtd
  340 ?        00:00:00 dbus-daemon
  342 ?        00:00:00 scim-launcher
  356 tty1     00:00:00 dbus-launch
  357 ?        00:00:00 dbus-daemon
  359 ?        00:00:00 at-spi-bus-laun
  363 ?        00:00:00 dbus-daemon
  365 ?        00:00:00 at-spi2-registr
  369 ?        00:00:00 scim-helper-man
  370 ?        00:00:00 scim-panel-gtk
  372 ?        00:00:00 scim-launcher
  385 ?        00:00:00 polkitd
  401 pts/0    00:00:00 bash
  440 tty1     00:00:10 chrome
  447 tty1     00:00:00 cat
  448 tty1     00:00:00 cat
  450 tty1     00:00:00 chrome-sandbox
  452 tty1     00:00:00 chrome
  454 tty1     00:00:00 chrome-sandbox
  456 tty1     00:00:00 nacl_helper
  458 tty1     00:00:00 chrome
  463 tty1     00:00:00 scim-im-agent
  509 tty1     00:00:05 chrome
  541 tty1     00:00:00 chrome
  553 ?        00:00:00 gconfd-2
  559 tty1     00:00:00 chrome
  589 tty1     00:00:00 chrome
  763 pts/1    00:00:00 bash
  915 tty1     00:00:06 chrome
  948 tty2     00:00:00 login
  951 tty2     00:00:00 bash
  965 pts/1    00:00:00 ps
where did I go wrong? Thanks in advance for any guidance!

I am using 7.9-Systemd, with openbox-session

Last edited by kcirick; 05-12-2016 at 11:44 AM.
 
Old 05-12-2016, 11:49 AM   #2
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Original Poster
Rep: Reputation: 55
Additional information:

If I start X under root, everything works as expected. So it might be a permission issue?

I also have linux-PAM installed, if this information helps...
 
Old 05-12-2016, 07:06 PM   #3
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Original Poster
Rep: Reputation: 55
After playing with the settings and Googling the issue some more, I found a solution.

Firstly, I was using urxvtd in the xsession and then urxvtc to open each terminal. I think using this way each client doesn't get its own pts number (is it true?)

Secondly, /usr/bin/urxvt is not a member of utmp, so it doesn't have permission to update the /var/run/utmp file. Following http://unix.stackexchange.com/questi...als-get-a-pts:
Code:
chgrp utmp /usr/bin/urxvt
chmod g+s /usr/bin/urxvt
This will let urxvt update /var/run/utmp. (But is this safe? Let me know if this is a bad idea for whatever reason).

Now when I do 'who', I get all of the pts/x logins. I'll mark this one solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vpn poptop - CTRL: PTY read or GRE write failed (pty,gre)=(5,6) dezeque Linux - Networking 9 08-26-2016 10:39 AM
totem-pps plugin doesn't seem to work (doesn't show up) prushik Linux - Software 1 07-29-2013 09:51 AM
gtkmm: show() doesn't show the window when adding windows from other places than main() Hvl Programming 0 06-21-2012 09:54 AM
LXer: Using scponly To Allow SCP/SFTP Logins And Disable SSH Logins On Debian Squeeze LXer Syndicated Linux News 0 08-24-2011 04:20 AM
show active logins debian sinister1 Debian 2 12-24-2008 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 08:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration