Results 1 to 10 of 10

Thread: wall

  1. #1

    Unhappy wall

    Hello,
    "wall" command doesn't display a message on Leap 42.2, worked nicely on 13.2.
    Has it changed in any way? Would you advise any other command that does anything similar to it?

    It was really useful for me.


    Best regards.

  2. #2

    Default Re: wall

    Quote Originally Posted by dantelu View Post
    Hello,
    "wall" command doesn't display a message on Leap 42.2, worked nicely on 13.2.
    Has it changed in any way? Would you advise any other command that does anything similar to it?
    Your post lacks important information.

    Where do you expect a message and it doesn't show?
    In the shell/terminal? On your desktop?
    And if the latter, which desktop?

    wall itself doesn't display messages anywhere, it just sends them.

  3. #3

    Default Re: wall

    Quote Originally Posted by wolfi323 View Post
    Your post lacks important information.

    Where do you expect a message and it doesn't show?
    In the shell/terminal? On your desktop?
    And if the latter, which desktop?

    wall itself doesn't display messages anywhere, it just sends them.
    "wall" if used by root, will display a message in any open terminal.

    I used it on scripts, to let me know something was wrong without the need to monitor a log, the message simply displayed in any open terminal.

    And if you've read the manual page of wall you would've seen:

    "DESCRIPTION
    wall displays a message, or the contents of a file, or otherwise its standard input, on the terminals of all currently logged in users.
    The command will wrap lines that are longer than 79 characters. Short lines are whitespace padded to have 79 characters. The command will
    always put a carriage return and new line at the end of each line.

    Only the superuser can write on the terminals of users who have chosen to deny messages or are using a program which automatically denies
    messages.
    Reading from a file is refused when the invoker is not superuser and the program is suid or sgid."

    So are we talking about the same "wall" command?

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,363
    Blog Entries
    3

    Default Re: wall

    Quote Originally Posted by dantelu View Post
    So are we talking about the same "wall" command?
    I'm pretty sure that wolfi is talking about the same "wall" command.

    What software are you using for the terminal?

    I checked with:
    Code:
    ls -l `tty`
    If I run that from an "xterm" session, then I see that the terminal device is group-writable and "wall" should display a message no matter who uses it. But if I instead use a "konsole" session or a "yakuake" session, then the terminal device is not group-writable, so "wall" will only display there if it comes from root or from myself.

    I'm not sure if this is a change to "konsole" from Plasma 4. In any case, you could use the command
    Code:
    chmod g+w `tty`
    to change it. Perhaps put the command in ".profile" or a similar place so that it is automatically run on konsole startup (assuming that you use "konsole").
    openSUSE Leap 15.1; KDE Plasma 5;

  5. #5

    Default Re: wall

    Just curious, what does
    Code:
    mesg
    output?

  6. #6

    Default Re: wall

    Hey,
    to answer the terminal, is a gnome-terminal.
    # ls -l `tty`
    crw--w---- 1 admin tty 136, 0 Feb 13 18:39 /dev/pts/0
    Sending the command on the gnome-terminal it just beeps.

    You are right about Xterm, it works:
    # wall test

    Broadcast message from admin@user.suse (pts/4) (Mon Feb 13 18:41:52 2017):

    test


    It displayed the message and beeped.

    But in the output of "ls -l" on xterm show the same permissions:

    # ls -l `tty`
    crw--w---- 1 admin tty 136, 4 Feb 13 18:44 /dev/pts/4


    "chmod g+w `tty`" did not change anything though.

    Which now made me very confused, if both have similar permissions why only one of them stdouts the message?

  7. #7

    Default Re: wall

    Quote Originally Posted by backflip View Post
    Just curious, what does
    Code:
    mesg
    output?
    # mesg
    is y

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,363
    Blog Entries
    3

    Default Re: wall

    Quote Originally Posted by backflip View Post
    Just curious, what does
    Code:
    mesg
    output?
    For me:

    In an "xterm" window, it give "y". In a konsole window or yakuake window, it give "n".

    I had forgotten about the "mesg" command.

    Checking my shell startup file, it contains
    Code:
    #mesg n > /dev/null
    As you can see, it is commented out.

    I needed that when on a multi-user system, and my students wanted to bug me with messages. But I don't need it on my home system.

    Actually, with "xterm", you can use "-ut" as a command line option. And then there is no "utmp" entry so "wall" won't even attempt to send messages to that terminal.
    openSUSE Leap 15.1; KDE Plasma 5;

  9. #9
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,363
    Blog Entries
    3

    Default Re: wall

    Quote Originally Posted by dantelu View Post
    Hey,
    to answer the terminal, is a gnome-terminal.
    # ls -l `tty`
    crw--w---- 1 admin tty 136, 0 Feb 13 18:39 /dev/pts/0
    Sending the command on the gnome-terminal it just beeps.
    I just tested that. It seems that gnome-terminal does not write an entry to the "utmp" database. So the "wall" command does not find your terminal (it uses "utmp" to identify users).

    However Gnome startup does itself write a "utmp" entry for the Gnome session. So it is probably catching the "wall" and then sending a beep through the sound system as a notification.
    openSUSE Leap 15.1; KDE Plasma 5;

  10. #10

    Thumbs up Re: wall

    Well, thank you guys for the insights. I guess I'll have to run the script and keep the Xterm open to check for the wall alerts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •