Bug 248451 - x11/xpra: xpra tries to use Linux paths by default
Summary: x11/xpra: xpra tries to use Linux paths by default
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Gleb Popov
Depends on:
Reported: 2020-08-03 12:18 UTC by Aram Hăvărneanu
Modified: 2020-08-19 11:07 UTC (History)
1 user (show)

See Also:
arrowd: maintainer-feedback+

xpra server log (3.39 KB, text/plain)
2020-08-03 12:18 UTC, Aram Hăvărneanu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aram Hăvărneanu 2020-08-03 12:18:05 UTC
Created attachment 216989 [details]
xpra server log

Xpra doesn't seem to work by default. Server log attached below.

Paths like /var/run/user/1001/xpra and /var/run/xpra do not exist
by default on FreeBSD.

Starting xpra with xpra --socket-dir=/tmp on both the client and server
makes it work.

Apparently a default for this can be set at compile time.
Comment 1 Gleb Popov freebsd_committer 2020-08-19 08:18:54 UTC
Can you, please, check if creating /var/run/xpra directory with 0666 permission mode fixes the problem for you?
Comment 2 Aram Hăvărneanu 2020-08-19 08:57:30 UTC
It appears not. The server log is identical to the one previously
uploaded.  The server does start, but the client can't find the
session, not even when it is running on the same machine. Also, the
/var/run/xpra/ directory remains empty at all times.
Comment 3 Gleb Popov freebsd_committer 2020-08-19 09:04:55 UTC
(In reply to Aram Hăvărneanu from comment #2)
You still see

2020-08-03 11:54:21,948 Warning: failed to create socket directory '/var/run/xpra'
2020-08-03 11:54:21,948  [Errno 13] Permission denied: '/var/run/xpra'

in the log? This is strange.
Comment 4 Aram Hăvărneanu 2020-08-19 09:23:36 UTC
Sorry, user error, I created the directory on the wrong machine...

Now with this:

z800:aram$ ls -lad /var/run/xpra
drw-rw-rw-  2 root  wheel  2 Aug 19 10:50 /var/run/xpra

I get this snippet in the log instead:

2020-08-19 11:14:47,351 cannot create group socket '/var/run/xpra/z800.mgk.ro-102'
2020-08-19 11:14:47,351  [Errno 13] Permission denied

So I changed the permissions to 1777:

z800:aram$ ls -lad /var/run/xpra
drwxrwxrwt  2 root  wheel  2 Aug 19 10:50 /var/run/xpra

And now that message went away and was replaced with:

2020-08-19 11:21:07,667 created unix domain socket '/var/run/xpra/z800.mgk.ro-103'

With this configuration the client can find the socket, and the programs works correctly:

2020-08-19 11:21:49,869 New unix-domain connection received
2020-08-19 11:21:49,870  on '/var/run/xpra/z800.mgk.ro-103'
2020-08-19 11:21:49,875 Handshake complete; enabling connection
Comment 5 commit-hook freebsd_committer 2020-08-19 11:05:55 UTC
A commit references this bug:

Author: arrowd
Date: Wed Aug 19 11:05:50 UTC 2020
New revision: 545311
URL: https://svnweb.freebsd.org/changeset/ports/545311

  x11/xpra: Create /var/run/xpra directory during installation. It is required by
  Xpra when no XDG_RUNTIME_DIR is available.

  PR:		248451

Comment 6 Gleb Popov freebsd_committer 2020-08-19 11:07:01 UTC
Thanks for testing, fixed!