2

When I use echo "hi" | wall on a device I have running Ubuntu 14.04 I get back:

Broadcast Message from rescue@ws1-/share/locale-langpack/en_CA.UTF-8.utf8/LC_ID
        (/dev/pts/2) at 14:19 ...                                              

hi         

But when I run the same command on my desktop running Ubuntu 16.04 I get back nothing.

Permissions for Wall:

-rwxr-sr-x 1 root tty 27368 Jun 14 17:51 /usr/bin/wall

Results of tty:

/dev/pts/5

Results of w:

 12:56:21 up  2:40,  1 user,  load average: 0.66, 0.65, 0.79
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
philip   tty7     :0               10:17    2:39m  1:47   2.35s i3

Why wouldn't this be working, how can I debug the issue?


Also tried echo hi > /tmp/msg && sudo wall /tmp/msg

Normally using i3 but I also tried logging out and back in with unity and got the same results.

Philip Kirkbride
  • 9,816
  • 25
  • 95
  • 167
  • It's not just a case of using sudo? – Raman Sailopal Oct 03 '17 at 15:05
  • @RamanSailopal same results with sudo – Philip Kirkbride Oct 03 '17 at 15:38
  • 2
    On your problematic system, run the `tty` and `w` commands. Is your tty listed? You may be using a terminal program that doesn't update the logged-in user list `utmp`. Try running `xterm` and see if wall writes to that window. – Mark Plotnick Oct 03 '17 at 16:25
  • @MarkPlotnick it shows on `xterm` I'm using `i3` will update question with results of `w` and `tty`. – Philip Kirkbride Oct 03 '17 at 16:57
  • How about `sudo w` ? – 林果皞 Dec 01 '17 at 18:11
  • @林果皞 same output with `sudo w` – Philip Kirkbride Dec 01 '17 at 18:56
  • 1
    Are you using gnome and login as usual (since you're using classic `xterm` instead of `gnome-terminal` or other) ? How come `pts/5` output from `tty` not listed in `w` ? Are both of the commands run in the same terminal emulator ? – 林果皞 Dec 01 '17 at 19:11
  • @林果皞 I use the default ubuntu login and select `i3`. Would that be `gnome-terminal`? As for the `tty` I ran the `w` command 2 hours after my original post, I don't remember if I restarted. Now I get `pts/0`. – Philip Kirkbride Dec 01 '17 at 19:34
  • @林果皞 but now when I run `w` I still get `tty/7`, I guess that's strange that it doesn't show the same `tty`? Maybe related to why `wall` doesn't work? – Philip Kirkbride Dec 01 '17 at 19:36
  • 2
    what if you switch to other tty by `Ctrl+Shift+F5` then run `wall hello`, will message display in both xterm and tty5 ? Also you can do `dpkg -S $(which wall)` to find out the package name(e.g. `bsdutils`), then run `apt source bsdutils` to get the source, `find . -iname '*wall*'` to figure out the `wall.c` path, then add some debug line in that file, and then in parent directory do `./configure` and `make wall` to build and run `./wall` debug. (or `-g3`, `gdb` something) – 林果皞 Dec 01 '17 at 21:24
  • 1
    sorry my typo, is ctrl+alt+f5, not shift – 林果皞 Dec 01 '17 at 21:31
  • @林果皞 I was able to switch with `Ctrl+Shift+F5` but the same shortcut wasn't working to switch back. So I had to log out which closed the first tty. – Philip Kirkbride Dec 01 '17 at 21:36
  • will message display in tty5 if you run `wall` in tty5 ? – 林果皞 Dec 01 '17 at 21:37
  • @林果皞 ah I see I need `F7` for `tty7` and `F5` for `tty5`? – Philip Kirkbride Dec 01 '17 at 21:37
  • It shows in tty5 but not tty7 – Philip Kirkbride Dec 01 '17 at 21:38
  • `apt source bsdutils` returns `E: You must put some 'source' URIs in your sources.list` – Philip Kirkbride Dec 01 '17 at 21:39
  • `apt-cache policy bsdutils` to figure out the installed(or other if still failed) repo link which also occur in `/etc/apt/sources.list`, then `sudo vi /etc/apt/sources.list` and duplicated the relevant `deb` line match with that repo link with prefix `deb-src`, then `sudo apt-get update`, then `apt source bsdutils` again. – 林果皞 Dec 01 '17 at 22:14

0 Answers0