1

I have some problems with urxvt v9.19, I'm not able to see myself reported in the who command.

My setup is:

  • Archlinux: Linux arch 3.12.7-1-ARCH #1 SMP PREEMPT Fri Jan 10 08:50:35 CET 2014 x86_64 GNU
  • zsh shell
  • rxvt-unicode (urxvt) v9.19
  • awesome v3.5.2 (The Fox)

I tried other terminal emulators like: termite, terminator and xterm they are all working well. I have checked the PKGBUILD from arch and I sow that urxvt was compiled with utmp.

I've used htop to analyze the process spawning. The process is spawned from the root process, something like this:

/sbin/init  
 |   
 urxvt  
  |  
  zsh  

And if I use w from urxvt I get this:

 ➜  ~  w   
 22:34:41 up  1:05,  0 users,  load average: 0.11, 0.17,  
 0.50   USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT

If I use w from xterm or terminator or termite I get this:

 ➜ ~  w  
 22:46:25 up  1:17,  1 user,  load average: 0.22, 0.19, 0.33  
 USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT  
 starlays pts/0     22:46    0.00s  0.06s  0.00s w  

How can I fix urxvt to work properly and report itself in the w command?

1 Answer 1

2

From the urxvt Man page:

Login Stamp

urxvt tries to write an entry into the utmp(5) file so that it can be seen via the who(1) command, and can accept messages. To allow this feature, urxvt may need to be installed setuid root on some systems or setgid to root or to some other group on others.

Or, in other words:

  sudo chmod 4755 /path/to/urxvt
7
  • Hmm, you mean chmod 755, right? owner, group, others
    – Starlays
    Commented Jan 13, 2014 at 21:43
  • @Starlays No, I mean exactly 4755. You should look up setuid root Commented Jan 13, 2014 at 21:45
  • Thank you, sad that I don't have enough reputation so I can upvote. Thank you for the extra information for SUID.
    – Starlays
    Commented Jan 13, 2014 at 22:02
  • I wander if it is safe to do like sow, there is no security risk that any user will be able to start the terminal emulator as root?
    – Starlays
    Commented Jan 13, 2014 at 22:10
  • @Starlays Not at all, quite the opposite. You should look up setuid on Wikipedia, the first 4 lines are all you need (too long for a comment). Notice that innocent-looking commands like ping have the setuid root bit set. Commented Jan 14, 2014 at 5:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .