Xpra: Ticket #1203: Set working dir to $HOME in xpra environment

When starting session with: xpra start ssh:... --start-child=xterm xterm (or any child) would have working dir set to /etc/xpra instead of user's homedir.

Using xpra 0.17.2 on current Debian Testing



Fri, 20 May 2016 10:23:22 GMT - Antoine Martin: owner, description changed

I cannot reproduce with a clean jessie install and the xpra repository:

$ dpkg --list | grep xpra
ii  xpra                                  0.17.2-1
$ xpra start --start=xterm
..
$ xpra attach

In xterm:

$ pwd
/home/jessie
$ echo $HOME
/home/jessie

I get the exact same results if I do the full start in one remote command from another box.

I suspect that you are leaving some details about your setup, or that the package you are using is not one of ours. I see no reason why the current working directory would be set to /etc/xpra.


Fri, 20 May 2016 10:56:58 GMT - psycho_zs:

Sorry, misinformed a bit, I get /etc as working dir.

Xrpa config (without comments):

clipboard = yes
notifications = yes
tray = yes
system-tray = yes
speaker = off
microphone = off
pings = no
remote-logging = both
file-transfer = yes
file-size-limit = 10
open-files = no
printing = True
lpadmin = /usr/sbin/lpadmin
lpinfo = /usr/sbin/lpinfo
postscript-printer =
pdf-printer =
encodings = all
video-encoders = all
csc-modules = all
video-decoders = all
video-scaling = on
quality = auto
min-quality = 30
speed = auto
min-speed = 30
auto-refresh-delay = 0.15
av-sync = on
webcam = auto
mmap = yes
mmap-group = no
socket-permissions = 600
sharing = no
compressors = lz4, lzo, zlib
compression_level = 1
packet-encoders = rencode, bencode, yaml
socket-dirs = socket-dirs = ~/.xpra
idle-timeout = 0
server-idle-timeout = 0
opengl = auto
title = @title@ on @client-machine@
keyboard-sync = yes
ssh = ssh -x
key-shortcut = Meta+Shift+F1:show_menu
key-shortcut = Meta+Shift+F2:show_start_new_command
key-shortcut = Meta+Shift+F3:show_bug_report
key-shortcut = Meta+Shift+F4:quit
key-shortcut = Meta+Shift+F5:increase_quality
key-shortcut = Meta+Shift+F6:decrease_quality
key-shortcut = Meta+Shift+F7:increase_speed
key-shortcut = Meta+Shift+F8:decrease_speed
key-shortcut = Meta+Shift+F10:magic_key
key-shortcut = Meta+Shift+F11:show_session_info
key-shortcut = Meta+Shift+F12:toggle_debug
key-shortcut = Meta+Shift+plus:scaleup
key-shortcut = Meta+Shift+minus:scaledown
key-shortcut = Meta+Shift+underscore:scaledown
key-shortcut = Meta+Shift+KP_Add:scaleup
key-shortcut = Meta+Shift+KP_Subtract:scaledown
key-shortcut = Meta+Shift+KP_Multiply:scalereset
key-shortcut = Meta+Shift+bar:scalereset
key-shortcut = Meta+Shift+question:scalingoff
window-close = auto
desktop-scaling = auto
shadow-fullscreen = no
log-dir = ~/.xpra
log-file = $DISPLAY.log
start = /etc/X11/Xsession true
exit-with-children = no
dbus-launch = dbus-launch --close-stderr
dbus-control = True
dbus-proxy = yes
start-new-commands = no
bind = ~/.xpra/
mdns = True
wm-name = Xpra
input-method=none
env = #avoid Ubuntu's global menu, which is a mess and cannot be forwarded:
env = UBUNTU_MENUPROXY=
env = QT_X11_NO_NATIVE_MENUBAR=1
env = #fix for MainSoft's MainWin buggy window management:
env = MWNOCAPTURE=true
env = MWNO_RIT=true
env = MWWM=allwm
pulseaudio = yes
pulseaudio-command =  pulseaudio --start -n --daemonize=false --system=false \
         --exit-idle-time=-1 --load=module-suspend-on-idle \
         '--load=module-null-sink sink_name="Xpra-Speaker" sink_properties=device.description="Xpra\ Speaker"' \
         '--load=module-null-sink sink_name="Xpra-Microphone" sink_properties=device.description="Xpra\ Microphone"' \
         --load=module-native-protocol-unix --load=module-dbus-protocol \
         --log-level=2 --log-target=stderr
pulseaudio-configure-commands =  pactl set-default-sink Xpra-Speaker
pulseaudio-configure-commands =  pactl set-default-source Xpra-Microphone.monitor
sync-xvfb = 0
xvfb =  Xorg -noreset -nolisten tcp +extension GLX +extension RANDR +extension \
         RENDER -auth $XAUTHORITY -logfile \
         ${HOME}/.xpra/Xorg.${DISPLAY}.log -configdir \
         ${HOME}/.xpra/xorg.conf.d -config /etc/xpra/xorg.conf
displayfd = yes

Test connection:

xpra start --desktop-scaling=off ssh:user@server:port:101 --start-child=xterm --exit-with-children This way I get /etc as pwd.

If I start session on server with xpra start :101 --start-child=xterm and then connect, pwd is $HOME.


Fri, 20 May 2016 11:07:46 GMT - psycho_zs:

After a few attempts I've started getting correct $HOME pwd with remote starts. Changed nothing, just observed cmdlines of involved processes to find some clues. Now I'm consistently get correct working dir, no ideas what was the cause.


Sat, 11 Jun 2016 15:37:40 GMT - Antoine Martin: status changed; resolution set

Probably an old version laying around. Closing.

Feel free to re-open if you can reproduce it.


Tue, 12 Jul 2016 16:52:22 GMT - Antoine Martin: milestone changed

Milestone renamed


Sat, 23 Jan 2021 05:17:48 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1203