I am trying to look under the hood of libnotify, and ran strace notify-send 'hello' and one of the system calls is:

sendto(5, "AUTH\r\n", 6, MSG_NOSIGNAL, NULL, 0) = 6

Surrounded by a:

sendmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0", iov_len=1}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=2555, uid=1000, gid=1000}}], msg_controllen=32, msg_flags=0}, MSG_NOSIGNAL) = 1

sendto(5, "AUTH\r\n", 6, MSG_NOSIGNAL, NULL, 0) = 6

recvfrom(5, "REJECTED EXTERNAL\r\n", 4096, 0, NULL, NULL) = 19

(Full paste https://pastebin.com/wi9Ecvmk, the above is on lines 322 - 324)

What is causing windows-like carriage returns here? I tried to look into Desktop notifications specs and to local installed libnotify's manual but found no explanation. No explanation in man pages of sendmsg or recvfrom either. And no component of this is ever going to run on any type of Windows.

So why is purely Linux program leveraging this type of newline?

(I'm running Arch Linux if that makes any difference)

Edit: I'm new in this so I'm sorry if it's really obvious and remove the question if needed.

1 Answer 1


It's part of the authentication protocol in the D-Bus spec:

The protocol is a line-based protocol, where each line ends with \r\n. Each line begins with an all-caps ASCII command name containing only the character range [A-Z_], a space, then any arguments for the command, then the \r\n ending the line.

See here.

Not the answer you're looking for? Browse other questions tagged or ask your own question.