X2Go Bug report logs - #931
'Session preferences' window 'Session' tab content is too tall for small displays

version graph

Package: x2goclient; Maintainer for x2goclient is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goclient is src:x2goclient.

Reported by: René Genz <liebundartig@freenet.de>

Date: Wed, 26 Aug 2015 22:40:02 UTC

Severity: normal

Found in version 4.0.5.0

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#931; Package x2goclient. (Wed, 26 Aug 2015 22:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to René Genz <liebundartig@freenet.de>:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Wed, 26 Aug 2015 22:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.x2go.org (full text, mbox):

From: René Genz <liebundartig@freenet.de>
To: submit@bugs.x2go.org
Subject: 'Session preferences' window 'Session' tab content is too tall for small displays
Date: Thu, 27 Aug 2015 00:34:54 +0200
[Message part 1 (text/plain, inline)]
Package: x2goclient
Version: 4.0.5.0

This issue can be observed on GNU/Linux, Mac OS X, and Windows version of x2goclient.
I was using:
- Mac OS X 10.10
- Fedora 22
- Windows 7


Steps to reproduce:
0. start X2Go client on a computer with a small display size (1280x800 px)
1. create a new X2Go session profile
2. set: Session tab -- '[x] use Proxy server for SSH connection'
3. buttons not displayed: [OK] [Cancel] [Defaults]



On Mac OS X and Windows the 'Session preferences' window does not use the minimal size possible.
On GNU/Linux the 'Session preferences' window uses the minimal size possible.

However, for all three operating systems the 'Session preferences' window does not resize automatically to the minimum size possible.



My Mac OS X notebook has a 13" display with a resolution of 1280x800 px.
Screen width is no issue. Screen height is the issue with x2goclient.
On Mac OS X the 'Session preferences - ...' window height is 900 px by default.
So the buttons '[OK] [Cancel] [Apply]' at the bottom of the x2goclient window are not displayed by default.

On Mac OS X:
- after moving the 'Session preferences' window a little bit it resizes, so buttons are displayed.
- resizing the window does resize it automatically, you have to move the window.
- if you set '[x] use Proxy server for SSH connection' in the Session tab and maximize the window with the green green [+] button (hold down alt key) in the upper left corner of the window the content of the "Proxy server" section is garbled
On Windows and GNU/Linux the 'Session preferences' window is not resized after moving.



By hiding the 'Session' tab and recompiling I verified the culprit:
Session tab -- '[x] use Proxy server for SSH connection'
This expands a big menu.



I thought of the following solutions:
- define minimum/maximum size of the 'Session preferences' window in height; on Mac OS X the windows minimum height is as small as 693 px
-> if
Session tab -- '[x] use Proxy server for SSH connection'
is set, the minimum height will get much larger; doh!

- add automatic resizing after 'Use Proxy server' check box is toggled with:
http://stackoverflow.com/questions/13942616/qt-resize-window-after-widget-remove/30472749#30472749
-> if the menu is extended, the required size to display all is still too small; doh!

- introduce scroll bars; so the buttons at the button of the 'Session preferences' window are displayed and you can scroll the content, if necessary
-> I could not get this to work; after several days I concluded my knowledge is insufficient for this task

- in the 'Session preferences' window in the 'Session' tab move the sections 'Server' and 'Session type' to an additional tab, dubbed 'Authentication'
-> I hacked the source and it worked out. :)
The files I created/edited have been attached as an archive.

I commented the lines in 'editconnectiondialog.*' in order to make sure to not forget any line.
Maybe some 'include headers' are not required anymore and can be removed.



Note, in the file:
x2goclient/src/sessionwidget.cpp
I replaced:
    lKey=new QLabel ( tr ( "Use RSA/DSA key for ssh connection:" ),sgb );
with:
    lKey=new QLabel ( tr ( "Use RSA/DSA key for SSH connection:" ),sgb );
because in other lines it is written SSH as well, for example:
    cbAutoLogin=new QCheckBox(tr("Try auto login (via SSH Agent or default SSH key)"),sgb);
OR
    cbProxy=new QCheckBox(tr("Use Proxy server for SSH connection"),sgb);



In the file:
x2goclient/src/sessionwidget.cpp
the section:
--8<--
#ifndef Q_WS_HILDON
    openKey=new QPushButton (
        QIcon ( mainWindow->iconsPath (
                    "/32x32/file-open.png" ) ),
        QString::null,sgb );
    QVBoxLayout *sgbLay = new QVBoxLayout ( sgb );
#else
    QPushButton* openKey=new QPushButton (
        QIcon ( mainWindow->iconsPath ( "/16x16/file-open.png" ) ),
        QString::null,sgb );
    QVBoxLayout *sgbLay = new QVBoxLayout ();
#endif
--8<--
urges me to ask: why 32x32 in one branch and 16x16 in the other?





With the changes in place I compiled the source on Mac OS X.
Everything seems to work just fine.
However, when opening the 'Session preferences' window of new or existing session you can see messages in terminal:
---8<---
$ ./macbuild.sh && client_build/x2goclient.app/Contents/MacOS/x2goclient
... snipping compilation output...
~/x2go/x2goclient
x2go-INFO-1> "Starting X2Go Client..."
x2go-WARNING-1> "English language requested, not loading translator."
x2go-WARNING-1> "English language requested, not loading translator."
x2go-INFO-3> "Started X2Go Client."

Object::connect: No such slot AuthenticationWidget::slot_emitSettings()
Object::connect: No such slot AuthenticationWidget::slot_emitSettings()
Object::connect: No such signal SessionWidget::directRDP(bool)
Object::connect: No such signal SessionWidget::settingsChanged(QString,QString,QString)

2015-08-26 00:47:08.242 x2goclient[6378:72130] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
x2go-INFO-6> "Closing X2Go Client ..."
x2go-INFO-7> "Finished X2Go Client closing hooks."
---8<---



With vanilla sources the output is like:
---8<---
$ ./macbuild.sh && client_build/x2goclient.app/Contents/MacOS/x2goclient
... snipping compilation output...
~/x2go/x2goclient
x2go-INFO-1> "Starting X2Go Client..."
x2go-WARNING-1> "English language requested, not loading translator."
x2go-WARNING-1> "English language requested, not loading translator."
x2go-INFO-3> "Started X2Go Client."



Object::connect: No such slot SessionWidget::slot_emitSettings()
Object::connect: No such slot SessionWidget::slot_emitSettings()
Object::connect: No such signal SessionWidget::directRDP(bool)
Object::connect: No such signal SessionWidget::settingsChanged(QString,QString,QString)
2015-08-26 00:43:16.741 x2goclient[6023:70742] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
x2go-INFO-6> "Closing X2Go Client ..."
x2go-INFO-7> "Finished X2Go Client closing hooks."
---8<---

On GNU/Linux the vanilla X2Go client does not print anything in terminal. Hence I did not try with my changes.


-- 
Kind regards,
René
[AuthenticationTabAdded.7z (application/x-7z-compressed, attachment)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Tue Dec 11 06:45:30 2018; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.