Xpra: Ticket #2528: Show full screen name in tray

If I have

"Xpra-Python2-x86_64_3.0.1-r24232\xpra_cmd" start ssh://user@ip/20  --microphone=off --speaker=off --webcam=no --pulseaudio=no --start-new-commands=yes --start=gnome-terminal

and

"Xpra-Python2-x86_64_3.0.1-r24232\xpra_cmd" start ssh://user@ip/2  --microphone=off --speaker=off --webcam=no --pulseaudio=no --start-new-commands=yes --start=gnome-terminal

open at the same time, then this

Is not very helpful.

Except for a smarter / more condensed output, consider adding the full display name ie ssh://ip/2 (or even ssh://user@ip/2)



Thu, 26 Dec 2019 17:48:16 GMT - stdedos: attachment set


Thu, 26 Dec 2019 18:13:42 GMT - Antoine Martin: status changed


Fri, 27 Dec 2019 20:28:52 GMT - Antoine Martin: owner, status changed

I have just tried with both 3.0.5-RC and 4.0-beta builds and in both cases the tray title string contained the full URI, including the display number. I have used a much simpler command line for testing:

./xpra_cmd.exe start ssh://user@host/10 --start=xterm

For good measure, I even tried the python2 builds...

What am I missing?


Sat, 28 Dec 2019 17:30:02 GMT - stdedos: owner changed

I have no idea :/


Sat, 28 Dec 2019 17:30:17 GMT - stdedos: attachment set


Sun, 29 Dec 2019 09:53:43 GMT - Antoine Martin: attachment set

correct tray title


Sun, 29 Dec 2019 10:04:51 GMT - stdedos:

How does that diagnostic message comes to terminal?


Sun, 29 Dec 2019 11:36:23 GMT - Antoine Martin: status changed; resolution set

How does that diagnostic message comes to terminal?

-d tray

As can be seen in my screenshot: correct tray title

The tray title is correct. Then this got me thinking that you must have forgotten some details from wiki/ReportingBugs (2nd item on that list..), and maybe you're not using the default 'paramiko' ssh backend? Sure enough, I can reproduce the bug with win32 and --ssh=plink.

So that's fixed in r24824. I have uploaded some new beta x86_64 win32 builds with this fix.


Sun, 29 Dec 2019 12:31:44 GMT - stdedos:

Apologies for that.

I specifically don't use config files, so I can copy-paste the terminal on the bug report.

However, you are right:

Xpra-Python3-x86_64_3.0.5-r24802>xpra_cmd showconfig
add-printer-options            = '-E', '-o printer-is-shared=false', '-u allow:$USER'
attach                         =
auth                           =
auto-refresh-delay             = 0.15
av-sync                        = True
bandwidth-detection            = True
bandwidth-limit                = 'auto'
bell                           = True
bind                           = 'Main'
bind-rfb                       =
bind-ssh                       =
bind-ssl                       =
bind-tcp                       =
bind-udp                       =
bind-vsock                     =
bind-ws                        =
bind-wss                       =
border                         = 'auto,5:off'
challenge-handlers             = 'all'
chdir                          = ''
clipboard                      = 'yes'
clipboard-direction            = 'both'
clipboard-filter-file           = ''
compression_level              = 1
compressors           (used)   = 'lz4', 'lzo', 'zlib'              <class 'list'>
compressors          (default) = 'lz4', 'lzo', 'zlib', 'brotli'    <class 'list'>
csc-modules                    = 'swscale', 'libyuv'
cursors                        = True
dbus-control                   = False
dbus-launch           (used)   = 'dbus-launch --close-stderr'      <class 'str'>
dbus-launch          (default) = 'dbus-launch --sh-syntax --close-stderr'  <class 'str'>
debug                          = ''
delay-tray                     = False
desktop-fullscreen             = False
desktop-scaling                = 'auto'
display                        = ''
displayfd                      = 0
download-path                  = 'C:\Users\user.win\Downloads'
dpi                            = 0
encoding                       = 'auto'
encodings                      = 'h264', 'vp9', 'vp8', 'mpeg4', 'mpeg4+mp4', 'h264+mp4', 'vp8+webm', 'vp9+webm', 'png', 'png/P', 'png/L', 'webp', 'rgb', 'rgb24', 'rgb32', 'jpeg', 'h265', 'mpeg1', 'mpeg2'
encryption                     = ''
encryption-keyfile             = ''
env                            =
exec-wrapper                   = ''
exit-ssh                       = True
exit-with-client               = False
file-size-limit                = 100
file-transfer                  = 'auto'
forward-xdg-open               = True
gid                            = 0
global-menus                   = True
html                           = 'auto'
idle-timeout                   = 0
input-devices                  = 'auto'
key-shortcut                   = 'Control+Menu:toggle_keyboard_grab', 'Shift+Menu:toggle_pointer_grab', 'Shift+F11:toggle_fullscreen', '#+F1:show_menu', '#+F2:show_start_new_command', '#+F3:show_bug_report', '#+F4:quit', '#+F5:increase_quality', '#+F6:decrease_quality', '#+F7:increase_speed', '#+F8:decrease_speed', '#+F10:magic_key', '#+F11:show_session_info', '#+F12:toggle_debug', '#+plus:scaleup', '#+minus:scaledown', '#+underscore:scaledown', '#+KP_Add:scaleup', '#+KP_Subtract:scaledown', '#+KP_Multiply:scalereset', '#+bar:scalereset', '#+question:scalingoff'
keyboard-layout                = ''
keyboard-layouts               =
keyboard-options               = ''
keyboard-raw                   = False
keyboard-sync                  = True
keyboard-variant               = ''
keyboard-variants              =
local-clipboard                = 'CLIPBOARD'
lock                           =
log-dir                        = 'auto'
log-file                       = '$DISPLAY.log'
lpinfo                         = '/usr/sbin/lpinfo'
max-size                       = ''
microphone                     = 'off'
microphone-codec               =
min-port                       = 1024
min-quality                    = 30
min-size                       = ''
min-speed                      = 30
mmap                           = 'yes'
modal-windows                  = True
mousewheel                     = 'on'
notifications                  = True
open-command                   = 'start '''
open-files                     = 'auto'
open-url                       = 'auto'
opengl                         = 'probe'
packet-encoders                = 'rencode', 'bencode', 'yaml'
password                       = ''
password-file                  =
pdf-printer                    = ''
pidfile                        = ''
pings                          = 5
pixel-depth                    = 0
postscript-printer             = ''
printing                       = 'yes'
proxy-start-sessions           = True
proxy-video-encoders           =
pulseaudio-configure-commands           =
quality                        = 0
readonly                       = False
remote-clipboard               = 'CLIPBOARD'
remote-logging                 = 'both'
remote-xpra                    = '$XDG_RUNTIME_DIR/xpra/run-xpra', 'xpra', '/usr/local/bin/xpra', '~/.xpra/run-xpra'
resize_display                 = False
rfb-auth                       =
rfb-upgrade                    = 5
server-idle-timeout            = 0
session-name                   = ''
sharing                        =
shortcut-modifiers             = 'auto'
sound-source                   = ''
speaker                        = 'on'
speaker-codec                  =
speed                          = 0
ssh                   (used)   = 'plink -ssh -agent'               <class 'str'>
ssh                  (default) = 'auto'                            <class 'str'>
ssh-auth                       =
ssh-upgrade                    = True
ssl                            = 'auto'
ssl-auth                       =
ssl-ca-certs                   = 'default'
ssl-ca-data                    = ''
ssl-cert                       = ''
ssl-check-hostname             = False
ssl-ciphers                    = 'DEFAULT'
ssl-client-verify-mode           = 'optional'
ssl-key                        = ''
ssl-options                    = 'ALL,NO_COMPRESSION'
ssl-protocol                   = 'TLSv1_2'
ssl-server-hostname            = 'localhost'
ssl-server-verify-mode           = 'required'
ssl-verify-flags               = 'X509_STRICT'
start-env                      =
start-via-proxy                = False
sync-xvfb                      = 0
system-proxy-socket            = 'xpra-proxy'
system-tray                    = True
systemd-run                    = 'no'
systemd-run-args               = ''
tcp-auth                       =
tcp-encryption                 = ''
tcp-encryption-keyfile           = ''
tcp-proxy                      = ''
terminate-children             = False
title                          = '@title@ on @client-machine@'
tray                           = True
tray-icon                      = ''
udp-auth                       =
uid                            = 0
username                       = 'user.win'
video-decoders                 = 'avcodec2', 'vpx'
video-encoders                 = 'x264', 'vpx', 'nvenc', 'ffmpeg'
video-scaling                  = 'auto'
vsock-auth                     =
webcam                         = 'auto'
window-close                   = 'auto'
window-icon                    = ''
windows                        = True
ws-auth                        =
wss-auth                       =

I have successfully removed %ROAMING% files; however, the configuration remains.

How much of C:\ProgramData\Xpra can I safely remove, to return to default configuration?

dir /s C:\ProgramData\Xpra
 Volume in drive C has no label.
 Volume Serial Number is 2222-1111
 Directory of C:\ProgramData\Xpra
08/03/2019  04:36 μμ    <DIR>          .
08/03/2019  04:36 μμ    <DIR>          ..
29/12/2019  02:16 μμ    <DIR>          conf.d
04/08/2018  01:30 μμ               260 cuda.conf
04/08/2018  01:30 μμ               137 nvenc.keys
04/08/2018  01:30 μμ               214 nvfbc.keys
12/10/2018  10:16 πμ             5.340 ssl-cert.pem
04/08/2018  01:30 μμ           154.106 xorg-uinput.conf
04/08/2018  01:30 μμ           153.987 xorg.conf
06/03/2019  05:17 μμ               756 xpra.conf
               7 File(s)        314.800 bytes
 Directory of C:\ProgramData\Xpra\conf.d
29/12/2019  02:16 μμ    <DIR>          .
29/12/2019  02:16 μμ    <DIR>          ..
06/03/2019  05:17 μμ               984 05_features.conf
06/03/2019  05:17 μμ             1.919 10_network.conf
06/03/2019  05:17 μμ             1.716 12_ssl.conf
06/03/2019  05:17 μμ               533 15_file_transfers.conf
06/03/2019  05:17 μμ               714 16_printing.conf
06/03/2019  05:17 μμ               984 20_sound.conf
06/03/2019  05:17 μμ             2.327 30_picture.conf
06/03/2019  05:17 μμ               176 35_webcam.conf
06/03/2019  05:17 μμ             1.757 40_client.conf
06/03/2019  05:17 μμ             1.825 42_client_keyboard.conf
06/03/2019  05:17 μμ             2.279 50_server_network.conf
06/03/2019  05:17 μμ             1.353 55_server_x11.conf
06/03/2019  05:17 μμ             2.879 60_server.conf
06/03/2019  05:17 μμ               390 65_proxy.conf
              15 File(s)         19.836 bytes
     Total Files Listed:
              22 File(s)        334.636 bytes
               5 Dir(s)  170.105.192.448 bytes free

Obviously, the issue is fixed


Sun, 29 Dec 2019 15:27:37 GMT - Antoine Martin:

How much of C:\ProgramData\Xpra can I safely remove, to return to default configuration?

All of it. However, these config files are meant to be identical to the default configuration. Unless of course, if the version you have installed is much older than the version you are running? (this matters when reporting bugs)

There are different locations which can be used for user and system config files, you can see those locations by running Path_info.exe.


Sun, 29 Dec 2019 20:59:26 GMT - stdedos:

I had versions installed, until "that time" that I discovered the portable clients. I have uninstalled, but, I guess for some reason, uninstaller does not clean up.

I have removed all system configuration (system_conf, user_conf).

However, I still see non-defaults!:

C:\Users\user.win>cd Xpra-Python3-x86_64_4.0-r24825\
>xpra_cmd showconfig
add-printer-options            = '-E', '-o printer-is-shared=false', '-u allow:$USER'
attach                         =
auth                           =
auto-refresh-delay             = 0.15
av-sync                        = True
bandwidth-detection            = True
bandwidth-limit                = 'auto'
bell                           = True
bind                           = 'Main'
bind-rfb                       =
bind-ssh                       =
bind-ssl                       =
bind-tcp                       =
bind-udp                       =
bind-vsock                     =
bind-ws                        =
bind-wss                       =
border                         = 'auto,5:off'
challenge-handlers             = 'all'
chdir                          = ''
clipboard                      = 'yes'
clipboard-direction            = 'both'
clipboard-filter-file           = ''
compression_level              = 1
compressors                    = 'lz4', 'lzo', 'zlib', 'brotli'
csc-modules                    = 'swscale', 'libyuv'
cursors                        = True
dbus-control                   = False
dbus-launch                    = 'dbus-launch --sh-syntax --close-stderr'
debug                          = ''
delay-tray                     = False
desktop-fullscreen             = False
desktop-scaling                = 'auto'
display                        = ''
displayfd                      = 0
download-path                  = 'C:\Users\user.win\Downloads'
dpi                            = 0
encoding                       = 'auto'
encodings             (used)   = 'all'                             <class 'list'>
encodings            (default) = 'h264', 'vp9', 'vp8', 'mpeg4', 'mpeg4+mp4', 'h264+mp4', 'vp8+webm', 'vp9+webm', 'png', 'png/P', 'png/L', 'webp', 'rgb', 'rgb24', 'rgb32', 'jpeg', 'h265', 'mpeg1', 'mpeg2'  <class 'list'>
encryption                     = ''
encryption-keyfile             = ''
env                            =
exec-wrapper                   = ''
exit-ssh                       = True
exit-with-client               = False
file-size-limit                = 100
file-transfer                  = 'auto'
forward-xdg-open               = True
gid                            = 0
global-menus                   = True
html                           = 'auto'
idle-timeout                   = 0
input-devices                  = 'auto'
key-shortcut                   = 'Control+Menu:toggle_keyboard_grab', 'Shift+Menu:toggle_pointer_grab', 'Shift+F11:toggle_fullscreen', '#+F1:show_menu', '#+F2:show_start_new_command', '#+F3:show_bug_report', '#+F4:quit', '#+F5:increase_quality', '#+F6:decrease_quality', '#+F7:increase_speed', '#+F8:decrease_speed', '#+F10:magic_key', '#+F11:show_session_info', '#+F12:toggle_debug', '#+plus:scaleup', '#+minus:scaledown', '#+underscore:scaledown', '#+KP_Add:scaleup', '#+KP_Subtract:scaledown', '#+KP_Multiply:scalereset', '#+bar:scalereset', '#+question:scalingoff'
keyboard-layout                = ''
keyboard-layouts               =
keyboard-options               = ''
keyboard-raw                   = False
keyboard-sync                  = True
keyboard-variant               = ''
keyboard-variants              =
local-clipboard                = 'CLIPBOARD'
lock                           =
log-dir                        = 'auto'
log-file                       = '$DISPLAY.log'
lpinfo                         = '/usr/sbin/lpinfo'
max-size                       = ''
microphone                     = 'off'
microphone-codec               =
min-port                       = 1024
min-quality                    = 30
min-size                       = ''
min-speed                      = 30
mmap                           = 'yes'
modal-windows                  = True
mousewheel                     = 'on'
notifications                  = True
open-command                   = 'start '''
open-files                     = 'auto'
open-url                       = 'auto'
opengl                         = 'probe'
packet-encoders                = 'rencode', 'bencode', 'yaml'
password                       = ''
password-file                  =
pdf-printer                    = ''
pidfile                        = ''
pings                          = 5
pixel-depth                    = 0
postscript-printer             = ''
printing                       = 'yes'
proxy-start-sessions           = True
proxy-video-encoders           =
pulseaudio-configure-commands           =
quality                        = 0
readonly                       = False
remote-clipboard               = 'CLIPBOARD'
remote-logging                 = 'both'
remote-xpra                    = '$XDG_RUNTIME_DIR/xpra/run-xpra', 'xpra', '/usr/local/bin/xpra', '~/.xpra/run-xpra'
resize_display                 = False
rfb-auth                       =
rfb-upgrade                    = 5
server-idle-timeout            = 0
session-name                   = ''
sharing                        =
shortcut-modifiers             = 'auto'
sound-source                   = ''
speaker                        = 'on'
speaker-codec                  =
speed                          = 0
ssh                            = 'auto'
ssh-auth                       =
ssh-upgrade                    = True
ssl                            = 'auto'
ssl-auth                       =
ssl-ca-certs                   = 'default'
ssl-ca-data                    = ''
ssl-cert                       = ''
ssl-check-hostname             = False
ssl-ciphers                    = 'DEFAULT'
ssl-client-verify-mode           = 'optional'
ssl-key                        = ''
ssl-options                    = 'ALL,NO_COMPRESSION'
ssl-protocol                   = 'TLSv1_2'
ssl-server-hostname            = 'localhost'
ssl-server-verify-mode           = 'required'
ssl-verify-flags               = 'X509_STRICT'
start-env                      =
start-via-proxy                = False
sync-xvfb                      = 0
system-proxy-socket            = 'xpra-proxy'
system-tray                    = True
systemd-run                    = 'no'
systemd-run-args               = ''
tcp-auth                       =
tcp-encryption                 = ''
tcp-encryption-keyfile           = ''
tcp-proxy                      = ''
terminate-children             = False
title                 (used)   = '@title@ on @hostname@'           <class 'str'>
title                (default) = '@title@ on @client-machine@'     <class 'str'>
tray                           = True
tray-icon                      = ''
udp-auth                       =
uid                            = 0
username                       = 'user.win'
video-decoders                 = 'avcodec2', 'vpx'
video-encoders                 = 'x264', 'vpx', 'nvenc', 'ffmpeg'
video-scaling                  = 'auto'
vsock-auth                     =
webcam                         = 'auto'
window-close                   = 'auto'
window-icon                    = ''
windows                        = True
ws-auth                        =
wss-auth                       =
Xpra-Python3-x86_64_4.0-r24825>Path_info.exe
* app
  - default
    - dir                         : Xpra-Python3-x86_64_4.0-r24825
* default_conf
  - dirs                          : Xpra-Python3-x86_64_4.0-r24825\etc\xpra
* desktop-background              : C:\Users\user.win\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper
* download
  - dir                           : C:\Users\user.win\Downloads
* home                            : C:\Users\user.win
* icons                           : Xpra-Python3-x86_64_4.0-r24825\icons
* install
  - prefix                        :
* libexec
  - dir                           : Xpra-Python3-x86_64_4.0-r24825
* log
  - dirs                          : ~/.xpra
* mmap
  - dir                           : C:\Users\USER.WIN\AppData\Local\Temp\4
* nodock_command                  : Xpra-Python3-x86_64_4.0-r24825\Xpra.exe
* resources                       : Xpra-Python3-x86_64_4.0-r24825
* socket
  - dirs                          : []
* sound_command                   : Xpra-Python3-x86_64_4.0-r24825\Xpra_Audio.exe
* ssh_conf
  - dirs                          : C:\ProgramData\ssh, %APPDATA%\ssh, C:\Windows\System32\OpenSSH, ~/.ssh, ~/ssh
* sshpass_command                 : None
* system_conf
  - dirs                          : C:\ProgramData\Xpra
* user_conf
  - dirs                          : C:\Users\user.win\AppData\Roaming\Xpra
* xpra-module                     : Xpra-Python3-x86_64_4.0-r24825\lib\xpra\
* xpra-tmp
  - dir                           : C:\Users\USER.WIN\AppData\Local\Temp\4
* xpra_command                    : Xpra-Python3-x86_64_4.0-r24825\Xpra.exe
Xpra-Python3-x86_64_4.0-r24825>dir C:\Users\user.win\AppData\Roaming\Xpra
 Volume in drive C has no label.
 Volume Serial Number is 1111-2222
 Directory of C:\Users\user.win\AppData\Roaming\Xpra
29/12/2019  02:19 μμ    <DIR>          .
29/12/2019  02:19 μμ    <DIR>          ..
29/12/2019  02:19 μμ               282 xpra.conf
               1 File(s)            282 bytes
               2 Dir(s)  169.725.992.960 bytes free
Xpra-Python3-x86_64_4.0-r24825>type C:\Users\user.win\AppData\Roaming\Xpra\xpra.conf
# xpra user configuration file
# place your custom settings in this file
# they will take precedence over the system default ones.
# Examples:
# speaker=off
# dpi=144
# For more information on the file format,
# see the xpra manual at:
# https://xpra.org/manual.html
Xpra-Python3-x86_64_4.0-r24825>dir C:\ProgramData\Xpra
 Volume in drive C has no label.
 Volume Serial Number is 1111-2222
 Directory of C:\ProgramData
File Not Found

I think I have had asked some time, to identify which file sets a setting (i.e. which file set encodings (used)). Was that implemented somehow?

If not, can it be? If not, can it be somehow set as system or user?


Mon, 30 Dec 2019 09:51:51 GMT - Antoine Martin:

I have uninstalled, but, I guess for some reason, uninstaller does not clean up.

Must have been quite old? The uninstaller does clean up everything and should completely remove the directory.

However, I still see non-defaults!:

Maybe you're running a version older than r24830?

I think I have had asked some time, to identify which file sets a setting (i.e. which file set encodings (used)).

Is there a ticket?

Was that implemented somehow?

No.

If not, can it be?

Anything is possible. This one would take a time.

If not, can it be somehow set as system or user?

I don't understand that part.


Mon, 30 Dec 2019 10:44:09 GMT - stdedos:

Replying to Antoine Martin:

I have uninstalled, but, I guess for some reason, uninstaller does not clean up.

Must have been quite old? The uninstaller does clean up everything and should completely remove the directory.

I would guess more or less a year old.

However, I still see non-defaults!:

Maybe you're running a version older than r24830?

I only use the portable versions published here https://www.xpra.org/beta/windows/?C=M&O=D&P=*r248*.zip* Therefore no.

I think I have had asked some time, to identify which file sets a setting (i.e. which file set encodings (used)).

Is there a ticket?

I think I have asked it somewhere, although you had said already that it would be complicated. Probably I refrained from creating a ticket, since it is a niche feature, and it would probably not be implemented

Was that implemented somehow?

No.

If not, can it be?

Anything is possible. This one would take a time.

If not, can it be somehow set as system or user?

I don't understand that part.

I am not sure how settings parsing works. If it would be like that:

def print_setting(k, v, label=''):
    print('%s %s = %s' % (k, label.center(9), effective_value))
settings = {
    'default': parse_settings('default'),
    'system': parse_settings('system'),
    'user': parse_settings('user'),
    'cmd_line': parse_settings('cmd_line'),
}
config = {}
for k,v in settings.items():
    config.update(v)
for k, v in config:
    default_value = settings['default'][k]
    effective_value = v
    if default_value == effective_value:
        print_setting(k, effective_value)
    else:
        print_setting(k, effective_value, label='(user)')
        print_setting(k, default_value, label='(default)')

Then, I would propose that the else would change to:

    else:
        origin = find_setting_origin(settings, k, effective_value)
        print_setting(k, effective_value, label='(%s)' % origin)
        print_setting(k, default_value, label='(default)')

along with

def find_setting_origin(settings, key, value):
    for k, v in settings.items():
        if v[key] == value:
            return k

Mon, 30 Dec 2019 11:35:50 GMT - Antoine Martin:

Maybe you're running a version older than r24830?

I only use the portable versions published here https://www.xpra.org/beta/windows/?C=M&O=D&P=*r248*.zip* Therefore no.

You mean "yes" (as in, yes it is older): at this time, there are no builds r24830 or newer.

(..)

def find_setting_origin(settings, key, value):
    for k, v in settings.items():
        if v[key] == value:
            return k

I don't think it is as easy as this, but I will gladly take a patch.


Mon, 13 Jan 2020 13:31:35 GMT - Antoine Martin:

The fix in r24825 caused a regression - see get_tray_title error reported in #2549.


Sat, 23 Jan 2021 05:53:43 GMT - migration script:

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