[X2Go-Commits] [[X2Go Wiki]] page changed: doc:deployment-stories:wikid
A page in your DokuWiki was added or changed. Here are the details: Date: 2017/01/19 14:05 Browser : Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 IP-Address : 78.43.90.159 Hostname: HSI-KBW-078-043-090-159.hsi4.kabel-badenwuerttemberg.de Old Revision: http://wiki.x2go.org/doku.php/doc:deployment-stories:wikid?rev=1405348881 New Revision: http://wiki.x2go.org/doku.php/doc:deployment-stories:wikid Edit Summary: ↷ Page moved from doc:deployment-stories:wikid to doc:howto:wikid User: stefanbaur @@ -1,24 +1 @@ - Remote access is often a risky proposition, mostly [[https://www.wikidsystems.com/WiKIDBlog/dbir-once-again-makes-the-case-for-two-factor-authentication|due to poor authentication]]. This document will show how simple it is to add two-factor authentication to X2Go on Ubuntu 12.04, thanks to it's support for PAM. - We recommend organizations standardize on an authentication protocol and choose products and plan implementations around that choice. We recommend RADIUS. All major remote access solutions support it. You can tie in your directory infrastructure into the authentication process and all major two-factor authentication solutions support it, including [[https://www.wikidsystems.com|WiKID]]. Of course, PAM supports radius. - - To install pam-radius on Ubuntu: - - ''$ sudo apt-get install libpam-radius-auth'' - - Now we just need to tell pam-radius where to proxy the authentication requests. Edit the file /etc/pam_radius_auth.conf. Edit the line ''other-server; other-secret 3''; replacing 'other-server' with IP address or hostname of your WiKID Strong Authentication server or radius server if you have one set up in between WiKID and your servers and change 'other-secret' the shared secret for this network client. - - Now we need to tell PAM to use radius for authentication for SSH/X2Go. - - Edit the file /etc/pam.d/sshd. - - Add the line: - ''auth sufficient pam_radius_auth.so'' - - Just above the line: - ''# Standard Un*x authentication. - @include common-auth'' - - That's all there is to it. Users will still need an account on the system. Users will login with their username and the one-time passcode. - - While we think you should use two-factor authentication (surprise, we sell it!). This same setup can be used with [[https://www.wikidsystems.com/support/wikid-support-center/how-to/how-to-add-two-factor-authentication-to-openldap-and-freeradius?searchterm=freeradi|Freeradius/OpenLDAP]] and [[https://www.wikidsystems.com/support/wikid-support-center/how-to/how-to-add-two-factor-authentication-to-nps|NPS/AD]] to tie your authentications into your directory with or without two-factor. -- This mail was generated by DokuWiki at http://wiki.x2go.org/ ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [[X2Go Wiki]] page changed: doc:howto
A page in your DokuWiki was added or changed. Here are the details: Date: 2017/01/19 14:05 Browser : Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 IP-Address : 78.43.90.159 Hostname: HSI-KBW-078-043-090-159.hsi4.kabel-badenwuerttemberg.de Old Revision: http://wiki.x2go.org/doku.php/doc:howto?rev=1483879463 New Revision: http://wiki.x2go.org/doku.php/doc:howto Edit Summary: ↷ Links adapted because of a move operation User: stefanbaur @@ -7,7 +7,7 @@ * [[doc:installation:x2goclient|Installing X2GoClient]] - see also [[doc:installation:start#clients|General Client installation advice]] for related topics * [[doc:installation:x2goserver|Installing X2GoServer]] - see also [[doc:installation:start#Server_and_Components|General Server installation advice]] for related topics * [[doc:usage:desktop-sharing|Installing and Configuring X2Go Desktop Sharing (Session Shadowing)]] * [[doc:installation:x2gobroker|Installing X2Go Session Broker]] - careful, this page seems to mix Perl- and Python-based Broker installation - * [[doc:deployment-stories:wikid| Adding two-factor authentication to X2Go]] + * [[doc:howto:wikid| Adding two-factor authentication to X2Go]] * [[doc:howto:nx-libs-betatesting|Betatesting a newer NX-Libs version from Arctica]] * [[doc:howto:ssh-agent-workaround|Workaround to use SSH Agent Forwarding inside an X2Go session]] -- This mail was generated by DokuWiki at http://wiki.x2go.org/ ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [[X2Go Wiki]] page added: doc:howto:wikid
A page in your DokuWiki was added or changed. Here are the details: Date: 2017/01/19 14:05 Browser : Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 IP-Address : 78.43.90.159 Hostname: HSI-KBW-078-043-090-159.hsi4.kabel-badenwuerttemberg.de Old Revision: --- New Revision: http://wiki.x2go.org/doku.php/doc:howto:wikid Edit Summary: ↷ Page moved from doc:deployment-stories:wikid to doc:howto:wikid User: stefanbaur Remote access is often a risky proposition, mostly [[https://www.wikidsystems.com/WiKIDBlog/dbir-once-again-makes-the-case-for-two-factor-authentication|due to poor authentication]]. This document will show how simple it is to add two-factor authentication to X2Go on Ubuntu 12.04, thanks to it's support for PAM. We recommend organizations standardize on an authentication protocol and choose products and plan implementations around that choice. We recommend RADIUS. All major remote access solutions support it. You can tie in your directory infrastructure into the authentication process and all major two-factor authentication solutions support it, including [[https://www.wikidsystems.com|WiKID]]. Of course, PAM supports radius. To install pam-radius on Ubuntu: ''$ sudo apt-get install libpam-radius-auth'' Now we just need to tell pam-radius where to proxy the authentication requests. Edit the file /etc/pam_radius_auth.conf. Edit the line ''other-server; other-secret 3''; replacing 'other-server' with IP address or hostname of your WiKID Strong Authentication server or radius server if you have one set up in between WiKID and your servers and change 'other-secret' the shared secret for this network client. Now we need to tell PAM to use radius for authentication for SSH/X2Go. Edit the file /etc/pam.d/sshd. Add the line: ''auth sufficient pam_radius_auth.so'' Just above the line: ''# Standard Un*x authentication. @include common-auth'' That's all there is to it. Users will still need an account on the system. Users will login with their username and the one-time passcode. While we think you should use two-factor authentication (surprise, we sell it!). This same setup can be used with [[https://www.wikidsystems.com/support/wikid-support-center/how-to/how-to-add-two-factor-authentication-to-openldap-and-freeradius?searchterm=freeradi|Freeradius/OpenLDAP]] and [[https://www.wikidsystems.com/support/wikid-support-center/how-to/how-to-add-two-factor-authentication-to-nps|NPS/AD]] to tie your authentications into your directory with or without two-factor. -- This mail was generated by DokuWiki at http://wiki.x2go.org/ ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] Jenkins build is back to normal : x2goclient+nightly+epel-6 #438
http://jenkins.x2go.org:8080/job/x2goclient+nightly+epel-6/438/ ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] branch master updated (1267231 -> 8b5fc72)
This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goclient. from 1267231 src/onmainwindow.cpp: remove left-over debug test message. adds 33efb13 {unixhelper.{cpp,h},x2goclient.pro{maemo}}: add unixhelper stub. adds 063cc4a unixhelper.{cpp,h}: implement cleanup program for process group. adds 35978d8 x2goclient.cpp: wrap X2Go Client main function and use that. adds 448d891 x2goclient.cpp: add fork_helper() function to start up the UNIX cleanup helper. adds c219f37 x2goclient.cpp: use setsid() on UNIX to become session and process group leader. adds 38c40d6 x2goclient.cpp: add myself to copyright header. adds 72ca36e x2goclient.cpp: add legacy header needed for old operating systems. adds 7188d69 x2goclient.cpp: fix std::edit -> std::exit typo. adds 7799e94 unixhelper.{h,cpp}: also include to have Q_OS_UNIX defined on UNIX-based platforms. Move guards around. adds 2f08e76 unixhelper.h: forgot to declare type of unix_cleanup() function. adds 7b2bb8b unixhelper.{cpp,h},x2goclient.cpp}: unixhelper should really be a (module) namespace, not a class. adds 5a2b6bd unixhelper.{cpp,h}: add documentation/comments. adds e080ab1 x2goclient.cpp: return return value of unixhelper::unix_cleanup(). adds 880d401 unixhelper.cpp: kill process group on error. adds ab201f0 unixhelper.{cpp,h}: implement signal unblocking in unixhelper::unix_cleanup(). Update documentation. adds 9822394 unixhelper.cpp: port from std::signal() to sigaction(). Handle errors. adds 678d59f x2goclient.cpp: clean up. adds 297e1ec x2goclient.cpp: don't start the UNIX cleanup helper process right after forking. adds 27a98c9 x2goclient.cpp: fix compile problems introduced with the last commit. adds ba3945b x2goclient.cpp: fix string comparison. adds 7bc682d x2goclient.cpp: create new argv array on the heap instead of on the stack. adds d662747 unixhelper.{cpp,h}: raise sleeping time to two seconds and grace period to 10 seconds. adds 1bc2069 {unixhelper.{cpp,h},x2goclient.cpp}: switch main cleanup handling to parent PID polling. adds 0996b80 unixhelper.{cpp,h}: ignore SIGINT, SIGTERM, SIGPIPE, SIGQUIT, SIGUSR1 and SIGUSR2. adds 720061d x2goclient.cpp: fix failing exec() call for the UNIX helper utility: correctly terminate arguments vector. adds 420f089 {appdialog,configwidget,onmainwindow,unixhelper}.cpp: fix some compile warnings with GCC. Fix a few whitespace issues. adds f4c4944 appdialog.cpp: initialize parent in default case. Another GCC compile warning fix. adds a298f8a onmainwindow.cpp: correctly use ~/.x2go/.ssh as ssh directory when starting sshd in user mode. adds 15a38d2 compat.{cpp,h}: new files. Implements strndup on OS X 10.6 and below. Add to x2goclient.cpp, x2goclient.pro and x2goclient.pro.maemo. adds f8a5fe8 compat.{cpp,h}: remove inline keyword, because function is not defined in header file. adds e9bbaea compat.h: include QtCore/qglobal.h for Q_OS_... macros. adds 43aae96 pulsemanager.{cpp,h}: new class for PulseAudio management. adds 1d14155 x2goclient.pro{maemo}: reference new pulsemanager.{cpp,h} files. adds 713d455 macbuild.sh: add new MACPORTS_PREFIX detection/variable. adds 0069829 macbuild.sh: add new dependency_error() helper function. adds 4a6ae0c macbuild.sh: add new lazy_canonical_path() helper function. adds aef8eb0 macbuild.sh: add new get_nesting_level() helper function. adds 1cd24f0 macbuild.sh: add new repeat_str() helper function. adds da6920e macbuild.sh: refactor nxproxy detection to use MACPORTS_PREFIX. adds 03032c1 macbuild.sh: add EXE_DIR and FRAMEWORKS_DIR internal variables. adds 5147686 macbuild.sh: define PulseAudio libraries and binaries to be later copied. adds 4cb0e1e macbuild.sh: copy PulseAudio libraries and binaries. adds b4bc691 macbuild.sh: add phase output for bundling nxproxy. adds 761fc19 macbuild.sh: add work-in-progress PulseAudio bundling. adds 2d2e15d macbuild.sh: add Linux library file name scheme regex as a precaution. adds c8a864e macbuild.sh: directories are "executable", so the first check must explicitly include a check for the argument being not a directory. adds bcf52e9 macbuild.sh: add some more debugging output. adds d5e9e59 macbuild.sh: remove libpulse and libpulsecore from libraries to be bundled, as something else will bundle them anyway. adds 3be3704 macbuild.sh: use while-read-loop and find to actually recurse through directories. adds 5ef5c2f macbuild.sh: check current file name against regex, not a (now) full path.
[X2Go-Commits] [x2goclient] 05/05: res/i18n/: refresh translation files again after copyright date changes.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 8b5fc72b2cb1f855b1017345db08c4f004203f33 Author: Mihai MoldovanDate: Thu Jan 19 13:54:37 2017 +0100 res/i18n/: refresh translation files again after copyright date changes. --- debian/changelog |1 + res/i18n/x2goclient_da.ts| 10 +- res/i18n/x2goclient_de.ts|8 ++-- res/i18n/x2goclient_es.ts|8 ++-- res/i18n/x2goclient_et.ts| 10 +- res/i18n/x2goclient_fi.ts|9 +++-- res/i18n/x2goclient_fr.ts|6 +- res/i18n/x2goclient_nb_no.ts |6 +- res/i18n/x2goclient_nl.ts|8 ++-- res/i18n/x2goclient_pt.ts| 10 +- res/i18n/x2goclient_ru.ts| 10 +- res/i18n/x2goclient_sv.ts|8 ++-- res/i18n/x2goclient_tr.ts| 10 +- res/i18n/x2goclient_zh_tw.ts | 10 +- 14 files changed, 72 insertions(+), 42 deletions(-) diff --git a/debian/changelog b/debian/changelog index a9d5fd1..bd6c6f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -541,6 +541,7 @@ x2goclient (4.1.0.0-0x2go1) UNRELEASED; urgency=medium uses proper return values. Be backwards-compatible with otool-classic. - res/i18n/: refresh translation files. - deduplicate.sh: remove file, now obsolete and merged into macbuild.sh. +- res/i18n/: refresh translation files again after copyright date changes. [ Bernard Cafarelli ] * New upstream version (4.1.0.0): diff --git a/res/i18n/x2goclient_da.ts b/res/i18n/x2goclient_da.ts index 180a6db..487e6a7 100644 --- a/res/i18n/x2goclient_da.ts +++ b/res/i18n/x2goclient_da.ts @@ -2766,6 +2766,11 @@ Unsaved documents will be lost. + +br(C) 2005-2017 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr + + + Unable to create or append to file: @@ -2933,11 +2938,6 @@ Please report a bug on: - -br(C) 2005-2016 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr - - - brX2Go Plugin mode was sponsored by a href=http://www.foss-group.de/FOSS-Group GmbH (Freiburg)/abr diff --git a/res/i18n/x2goclient_de.ts b/res/i18n/x2goclient_de.ts index 565121f..84ca6eb 100644 --- a/res/i18n/x2goclient_de.ts +++ b/res/i18n/x2goclient_de.ts @@ -2420,6 +2420,11 @@ Bitte melden Sie den Fehler wie auf der a href=http://wiki.x2go.org/do breche ab + +br(C) 2005-2017 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr +br (C) 2005-2016 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr {2005-2017 ?} + + Unable to create or append to file: @@ -3679,9 +3684,8 @@ Ungespeicherte Dokumente gehen verloren. Schlüssel kann nicht geöffnet werden: - br(C) 2005-2016 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr -br (C) 2005-2016 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr +br (C) 2005-2016 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr diff --git a/res/i18n/x2goclient_es.ts b/res/i18n/x2goclient_es.ts index c85c28e..cea8902 100644 --- a/res/i18n/x2goclient_es.ts +++ b/res/i18n/x2goclient_es.ts @@ -2817,6 +2817,11 @@ Los documentos no guardados se perderán. No se ha podido crear la carpeta: + +br(C) 2005-2017 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr +br(C) 2005-2016 de bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr {2005-2017 ?} + + Unable to create or append to file: @@ -2984,9 +2989,8 @@ Please report a bug on: - br(C) 2005-2016 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr -br(C) 2005-2016 de bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr +br(C) 2005-2016 de bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr diff --git a/res/i18n/x2goclient_et.ts b/res/i18n/x2goclient_et.ts index f3250e5..93b19de 100644 --- a/res/i18n/x2goclient_et.ts +++ b/res/i18n/x2goclient_et.ts @@ -1984,6 +1984,11 @@ Unsaved documents will be lost. + +br(C) 2005-2017 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr + + + Unable to create or append to file: @@ -2295,11 +2300,6 @@ See on nüüd: - -br(C) 2005-2016 by bobviously nice/b: Oleksandr Shneyder, Heinz-Markus Graesingbr - - - brX2Go Plugin mode was sponsored by a
[X2Go-Commits] [x2goclient] 04/05: deduplicate.sh: remove file, now obsolete and merged into macbuild.sh.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit b1d17bcf3f4a9b792684b24f39addf1424b2e46a Author: Mihai MoldovanDate: Thu Jan 19 13:52:52 2017 +0100 deduplicate.sh: remove file, now obsolete and merged into macbuild.sh. --- debian/changelog |1 + deduplicate.sh | 209 -- 2 files changed, 1 insertion(+), 209 deletions(-) diff --git a/debian/changelog b/debian/changelog index 647ae7b..a9d5fd1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -540,6 +540,7 @@ x2goclient (4.1.0.0-0x2go1) UNRELEASED; urgency=medium - macbuild.sh: make compatible with new llvm-based otool binary, which now uses proper return values. Be backwards-compatible with otool-classic. - res/i18n/: refresh translation files. +- deduplicate.sh: remove file, now obsolete and merged into macbuild.sh. [ Bernard Cafarelli ] * New upstream version (4.1.0.0): diff --git a/deduplicate.sh b/deduplicate.sh deleted file mode 100755 index 636ea5c..000 --- a/deduplicate.sh +++ /dev/null @@ -1,209 +0,0 @@ -#!/bin/bash - -typeset base_dir="" -base_dir="${1:?"No base dir given."}" - -typeset -a special_files_regex -special_files_regex+=( "pulseaudio/libpulsecommon-[0-9]\.[0-9]\.dylib" ) - -typeset -r dependency_base_format='@executable_path/../Frameworks/' - -typeset -a otool_fail_str -otool_fail_str=( "is not an object file" - "can't open file" - "Archive : " ) - -parse_otool_output() { -#set -x - typeset raw_output="${@}" - - typeset fail_str="" - for fail_str in "${otool_fail_str[@]}"; do -if echo "${raw_output}" | grep -q "${fail_str}"; then - return 1 -fi - done - - typeset tmp_regex='^[[:space:]]+(.*)[[:space:]]\(compatibility version .*, current version .*\)' - - - # In this special case, we do not want read to perform any word splitting. - typeset oldifs="${IFS}" - IFS='' - - # Used for skipping the first matching entry - which should typically be the ID line... - # That's a very naïve way to do this. Maybe there should be a bit more magic - # to catch this more reliably. - typeset -i first="1" - - typeset line="" - while read -r line; do -if [[ "${line}" =~ ${tmp_regex} ]]; then - if [ "${first}" -ne "1" ]; then -echo "${BASH_REMATCH[1]}" - else -first="0" - fi -fi - done <<< "${raw_output}" - - IFS="${oldifs}" -#set +x - return 0 -} - -lazy_canonical_path() { - typeset path="${1}" - - typeset old_path="" - while [ "${old_path}" != "${path}" ]; do -old_path="${path}" -path="${path//\/\///}" - done - - printf "${old_path}" -} - -typeset -a all_files -typeset entry="" -while read -r -d '' entry; do - all_files+=( "${entry}" ) -done < <(find "${base_dir}" -type 'f' -print0) - -typeset -a top_files -for entry in "${all_files[@]}"; do - typeset relative_path="${entry##"${base_dir}/"}" - typeset tmp_regex='^[^/]+$' - if [[ "${relative_path}" =~ ${tmp_regex} ]]; then -echo "${relative_path} is top file, adding to array." -top_files+=( "${relative_path}" ) - fi -done - -typeset -a duplicates -for entry in "${all_files[@]}"; do - typeset relative_path="${entry##"${base_dir}/"}" - typeset file_name="$(basename "${entry}")" - typeset top_entry="" - for top_entry in "${top_files[@]}"; do -if [ "${top_entry}" != "${relative_path}" ]; then - if [ "${file_name}" = "${top_entry}" ]; then -echo "Adding duplicate: ${relative_path}" -duplicates+=( "${relative_path}" ) - fi -fi - done -done - -echo "duplicates array before:" -for entry in "${duplicates[@]}"; do - echo "${entry}" -done - -typeset -i i="0" -for i in "${!duplicates[@]}"; do - entry="${duplicates[${i}]}" - typeset special_file_regex="" - for special_file_regex in "${special_files_regex[@]}"; do -typeset tmp_regex='^'"${special_file_regex}"'$' -if [[ "${entry}" =~ ${tmp_regex} ]]; then - echo "mv \"${base_dir}/$(basename "${entry}")\" \"${base_dir}/$(dirname "${special_file_regex}")/\"" - duplicates[${i}]="$(basename "${entry}")" - echo "Renamed ${entry} in duplicates array to ${duplicates[${i}]}" -fi - done -done - -echo "duplicates array after:" -for entry in "${duplicates[@]}"; do - echo "${entry}" -done - -for entry in "${duplicates[@]}"; do - echo "rm -v ${base_dir}/${entry}" - typeset -i i="0" - for i in "${!all_files[@]}"; do -typeset all_entry="${all_files[${i}]}" -typeset relative_path="${all_entry##"${base_dir}/"}" -if [ "${relative_path}" = "${entry}" ]; then - unset all_files[${i}] -fi - done -done - -echo "New value for all_files:" -for entry in "${all_files[@]}"; do - echo "${entry}" -done - -echo "Duplicates-to-real map:" -# Build complementary array to duplicates. -typeset -a to_files -for entry in "${duplicates[@]}"; do - typeset filename="$(basename "${entry}")" - -
[X2Go-Commits] [x2goclient] branch bugfix/osx updated (e552d9a -> 8b5fc72)
This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch bugfix/osx in repository x2goclient. from e552d9a macbuild.sh: make compatible with new llvm-based otool binary, which now uses proper return values. new 0573600 res/i18n/: refresh translation files. new 34ea213 misc: bump to version 4.1.0.0. new a8b0df3 common: update copyright notices. Happy new year! new b1d17bc deduplicate.sh: remove file, now obsolete and merged into macbuild.sh. new 8b5fc72 res/i18n/: refresh translation files again after copyright date changes. The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: COPYRIGHT.x2go-logos |6 +- LICENSE | 10 +- Makefile.docupload|2 +- VERSION |2 +- debian/changelog | 13 +- debian/copyright | 14 +- deduplicate.sh| 209 examples/x2goclient-cli |2 +- man/man1/x2goclient.1 |2 +- portable/stopu3client.cpp |2 +- res/i18n/x2goclient_da.ts | 1615 ++-- res/i18n/x2goclient_de.ts | 1549 +++ res/i18n/x2goclient_es.ts | 1549 +++ res/i18n/x2goclient_et.ts | 1621 ++-- res/i18n/x2goclient_fi.ts | 1556 +++ res/i18n/x2goclient_fr.ts | 457 ++- res/i18n/x2goclient_nb_no.ts | 491 +++- res/i18n/x2goclient_nl.ts | 1557 +++ res/i18n/x2goclient_pt.ts | 1627 +++-- res/i18n/x2goclient_ru.ts | 1617 ++-- res/i18n/x2goclient_sv.ts | 1574 res/i18n/x2goclient_tr.ts | 1613 ++-- res/i18n/x2goclient_zh_tw.ts | 1619 ++-- res/img/x2go-logos/mksizedsymbols.sh |2 +- src/LDAPSession.cpp |2 +- src/LDAPSession.h |2 +- src/SVGFrame.cpp |2 +- src/SVGFrame.h|2 +- src/appdialog.cpp |2 +- src/appdialog.h |2 +- src/brokerpassdlg.cpp |2 +- src/brokerpassdlg.h |2 +- src/clicklineedit.cpp |2 +- src/clicklineedit.h |2 +- src/compat.cpp|2 +- src/compat.h |2 +- src/configdialog.cpp |2 +- src/configdialog.h|2 +- src/configwidget.cpp |2 +- src/configwidget.h|2 +- src/connectionwidget.cpp |2 +- src/connectionwidget.h|2 +- src/contest.cpp |2 +- src/contest.h |2 +- src/cupsprint.cpp |2 +- src/cupsprint.h |2 +- src/cupsprintersettingsdialog.cpp |2 +- src/cupsprintersettingsdialog.h |2 +- src/cupsprintwidget.cpp |2 +- src/cupsprintwidget.h |2 +- src/editconnectiondialog.cpp |2 +- src/editconnectiondialog.h|2 +- src/exportdialog.cpp |2 +- src/exportdialog.h|2 +- src/folderbutton.cpp |2 +- src/folderbutton.h|2 +- src/folderexplorer.cpp|2 +- src/folderexplorer.h |2 +- src/help.cpp |2 +- src/help.h|2 +- src/helpdialog.cpp|4 +- src/helpdialog.h |4 +- src/httpbrokerclient.cpp |2 +- src/httpbrokerclient.h|2 +- src/imgframe.h|2 +- src/mediawidget.cpp |2 +- src/mediawidget.h |2 +- src/non_modal_messagebox.cpp
[X2Go-Commits] [x2goclient] 02/05: misc: bump to version 4.1.0.0.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 34ea213ae46a5a80cdc55e7bbea01cd85627f991 Author: Mihai MoldovanDate: Thu Jan 19 13:24:03 2017 +0100 misc: bump to version 4.1.0.0. --- VERSION |2 +- debian/changelog | 10 +- man/man1/x2goclient.1 |2 +- src/version.h |2 +- x2gobrowserplugin-2.4_1/src/res/x2goplugin.rc |8 x2goclient.spec |2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/VERSION b/VERSION index e383f91..16f4c78 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.0.5.3 +4.1.0.0 diff --git a/debian/changelog b/debian/changelog index 0bb73b9..647ae7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ -x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium +x2goclient (4.1.0.0-0x2go1) UNRELEASED; urgency=medium [ Mihai Moldovan ] - * New upstream version (4.0.5.3): + * New upstream version (4.1.0.0): - src/sessionbutton.cpp: replace drop down menu button on session buttons with a more prominent, bigger settings gear icon. Requested for visibility. @@ -542,7 +542,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - res/i18n/: refresh translation files. [ Bernard Cafarelli ] - * New upstream version (4.0.5.3): + * New upstream version (4.1.0.0): - {res/,x2goclient.pro}: rename .rcc files to .qrc. Fixes: #1096. "rcc" is the extension for compiled resource files, whereas "qrc" is the mapping file. Qt5 stumbles upon that - i.e., it doesn't try to compile files @@ -551,12 +551,12 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium correctly committed. [ Jason Alavaliant ] - * New upstream version (4.0.5.3): + * New upstream version (4.1.0.0): - src/{onmainwindow.{cpp,h},help.cpp}: modify autostart option to support multiple autostart apps at the same time. Fixes: #1024. [ Oleksandr Shneyder ] - * New upstream version (4.0.5.3): + * New upstream version (4.1.0.0): - src/onmainwindow.cpp: fix SSHFS on Windows client. Fixes: #1105. -- X2Go Release Manager Mon, 19 Sep 2016 09:07:07 +0200 diff --git a/man/man1/x2goclient.1 b/man/man1/x2goclient.1 index e8f2aed..d818576 100644 --- a/man/man1/x2goclient.1 +++ b/man/man1/x2goclient.1 @@ -5,7 +5,7 @@ \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac -.TH x2goclient 1 "Sep 2016" "Version 4.0.5.3" "X2Go Client (Qt4)" +.TH x2goclient 1 "Sep 2016" "Version 4.1.0.0" "X2Go Client (Qt4)" .SH NAME x2goclient \- Client application to launch server-side X2Go sessions. .SH SYNOPSIS diff --git a/src/version.h b/src/version.h index 9864379..bf362a1 100644 --- a/src/version.h +++ b/src/version.h @@ -19,6 +19,6 @@ #ifndef VERSION_H #define VERSION_H -#define VERSION "4.0.5.3" +#define VERSION "4.1.0.0" #endif /* !defined (VERSION_H) */ diff --git a/x2gobrowserplugin-2.4_1/src/res/x2goplugin.rc b/x2gobrowserplugin-2.4_1/src/res/x2goplugin.rc index 5b0f977..cdbfc78 100644 --- a/x2gobrowserplugin-2.4_1/src/res/x2goplugin.rc +++ b/x2gobrowserplugin-2.4_1/src/res/x2goplugin.rc @@ -1,8 +1,8 @@ 1 TYPELIB "x2goplugin.rc" 1 VERSIONINFO - FILEVERSION 4.0.5.3 - PRODUCTVERSION 4.0.5.3 + FILEVERSION 4.1.0.0 + PRODUCTVERSION 4.1.0.0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -26,8 +26,8 @@ BEGIN VALUE "LegalCopyright", "Copyright � 2010-2016 X2Go Project\0" VALUE "MIMEType", "application/x2go\0" VALUE "OriginalFilename", "npx2goplugin.dll\0" -VALUE "ProductName", "X2GoClient Plug-in 4.0.5.3\0" -VALUE "ProductVersion", "4, 0, 5, 3\0" +VALUE "ProductName", "X2GoClient Plug-in 4.1.0.0\0" +VALUE "ProductVersion", "4, 1, 0, 0\0" END END BLOCK "VarFileInfo" diff --git a/x2goclient.spec b/x2goclient.spec index 30d1bb9..2a83691 100644 --- a/x2goclient.spec +++ b/x2goclient.spec @@ -1,5 +1,5 @@ Name: x2goclient -Version:4.0.5.3 +Version:4.1.0.0 Release:0.0x2go1%{?dist} Summary:X2Go Client application (Qt4) -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 281/281: macbuild.sh: make compatible with new llvm-based otool binary, which now uses proper return values.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit e552d9ad865fb9cedd91b0dae531e443e19c0aee Author: Mihai MoldovanDate: Thu Jan 19 10:56:31 2017 +0100 macbuild.sh: make compatible with new llvm-based otool binary, which now uses proper return values. Be backwards-compatible with otool-classic. --- debian/changelog |2 ++ macbuild.sh | 79 -- 2 files changed, 49 insertions(+), 32 deletions(-) diff --git a/debian/changelog b/debian/changelog index 58d7fbf..23917e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -537,6 +537,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/mediawidget.cpp: simplify expression. - src/mediawidget.cpp: add deprecation warning for ARTS. - src/mediawidget.cpp: add deprecation warning for ESounD. +- macbuild.sh: make compatible with new llvm-based otool binary, which now + uses proper return values. Be backwards-compatible with otool-classic. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/macbuild.sh b/macbuild.sh index 90f8afb..69e342d 100755 --- a/macbuild.sh +++ b/macbuild.sh @@ -514,48 +514,63 @@ if [ "${BUNDLE}" = "1" ]; then # Try to fixup files broken by duplicates removal. for all_entry in "${all_files[@]}"; do -typeset otool_out="$(otool -L "${all_entry}")" +typeset otool_out="" typeset -i tmp_ret="0" -# Don't merge the declaration and initialization with the real value assignment. -# We need the return value of parse_otool_output(), but running -# typeset foo="$(bar)" will give us the return value of typeset, not bar(). -typeset dependencies="" +# Newer otool versions terminate with a non-zero return code on errors, +# while the classic/legacy versions do not. We need to make sure our +# script doesn't terminate just because otool returns a non-zero exit +# status. set +e -dependencies="$(parse_otool_output "${otool_out}")" +otool_out="$(otool -L "${all_entry}")" tmp_ret="${?}" set -e +# If the return code was non-zero, skip this file. +# A return code of zero does not automatically mean that otool finished +# successfully, so in that case throw otool's stdout into parse_otool_output(). if [ "${tmp_ret}" -eq "0" ]; then - typeset line="" - while read -r line; do -#echo "dependency of ${all_entry}: ${line}" - -typeset duplicate_entry="" -typeset -i i="0" -for i in "${!duplicates[@]}"; do - typeset duplicate_entry="${duplicates[${i}]}" - #echo "checking for duplicate ${duplicate_entry}" - typeset duplicate_format="$(lazy_canonical_path "${dependency_base_format}/${duplicate_entry}")" - - if [ -n "${line}" ] && [ -n "${duplicate_format}" ]; then -if [ "${line}" = "${duplicate_format}" ]; then - install_name_tool -change "${line}" "${to_files[${i}]}" "${all_entry}" -fi - else -echo "ERROR: empty file name while replacing duplicate dependencies." >&2 -echo "ERROR: for file ${all_entry}" >&2 -echo "ERROR: at dependency ${line}" >&2 -echo "ERROR: duplicate entry: \"${duplicate_entry}\"" >&2 -echo "ERROR: dependency: \"${line}\"" >&2 -exit 1 - fi -done - done <<< "${dependencies}" -else + # Don't merge the declaration and initialization with the real value assignment. + # We need the return value of parse_otool_output(), but running + # typeset foo="$(bar)" will give us the return value of typeset, not bar(). + typeset dependencies="" + set +e + dependencies="$(parse_otool_output "${otool_out}")" + tmp_ret="${?}" + set -e +fi + +if [ "${tmp_ret}" -ne "0" ]; then echo "WARNING: otool returned error for file: ${all_entry}" >&2 echo "WARNING: skipping." >&2 + continue fi + +typeset line="" +while read -r line; do + #echo "dependency of ${all_entry}: ${line}" + + typeset duplicate_entry="" + typeset -i i="0" + for i in "${!duplicates[@]}"; do +typeset duplicate_entry="${duplicates[${i}]}" +#echo "checking for duplicate ${duplicate_entry}" +typeset duplicate_format="$(lazy_canonical_path "${dependency_base_format}/${duplicate_entry}")" + +if [ -n "${line}" ] && [ -n "${duplicate_format}" ]; then + if [ "${line}" = "${duplicate_format}" ]; then +install_name_tool -change "${line}" "${to_files[${i}]}" "${all_entry}" + fi +else + echo "ERROR: empty file name while replacing duplicate dependencies." >&2 + echo "ERROR: for file ${all_entry}" >&2 + echo "ERROR: at dependency ${line}" >&2 + echo
[X2Go-Commits] [x2goclient] 280/281: src/mediawidget.cpp: add deprecation warning for ESounD.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit f8e9390ad9ed8d4f1042f5d82040483763431044 Author: Mihai MoldovanDate: Sat Dec 31 01:43:45 2016 +0100 src/mediawidget.cpp: add deprecation warning for ESounD. --- debian/changelog|1 + src/mediawidget.cpp |8 2 files changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1244fe3..58d7fbf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -536,6 +536,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/mediawidget.cpp: unify some redundant code. - src/mediawidget.cpp: simplify expression. - src/mediawidget.cpp: add deprecation warning for ARTS. +- src/mediawidget.cpp: add deprecation warning for ESounD. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/mediawidget.cpp b/src/mediawidget.cpp index 57f5b84..d5d1b37 100644 --- a/src/mediawidget.cpp +++ b/src/mediawidget.cpp @@ -169,6 +169,14 @@ void MediaWidget::slot_sndSysSelected ( int system ) #elif defined (Q_OS_DARWIN) cbSndSshTun->setEnabled (true); #endif /* defined (Q_OS_WIN) */ + +#if !defined (Q_OS_WIN) && !defined (Q_OS_DARWIN) +QMessageBox::warning (NULL, tr ("Deprecation Warning"), + tr ("ESounD support is scheduled to be removed soon.\n\n" + + "Please upgrade to PulseAudio."), + QMessageBox::Ok, QMessageBox::NoButton); +#endif sbSndPort->setValue ( 16001 ); break; } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 278/281: src/mediawidget.cpp: simplify expression.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 0915f76cca1d89f8b852514b9b772b2fbc98c12d Author: Mihai MoldovanDate: Sat Dec 31 01:41:02 2016 +0100 src/mediawidget.cpp: simplify expression. --- debian/changelog|1 + src/mediawidget.cpp |2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5621c1d..af6c534 100644 --- a/debian/changelog +++ b/debian/changelog @@ -534,6 +534,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium non-Darwin, so that not only Linux but other operating systems are covered as well. - src/mediawidget.cpp: unify some redundant code. +- src/mediawidget.cpp: simplify expression. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/mediawidget.cpp b/src/mediawidget.cpp index 16d837a..15971d6 100644 --- a/src/mediawidget.cpp +++ b/src/mediawidget.cpp @@ -210,7 +210,7 @@ void MediaWidget::slot_sndStartClicked() { lSndPort->setEnabled ( true ); sbSndPort->setEnabled ( true ); -cbDefSndPort->setEnabled ( true &>isChecked()); +cbDefSndPort->setEnabled (sound->isChecked()); } else { -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 277/281: src/mediawidget.cpp: unify some redundant code.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit ef62c5006787a4aed6bea2f3d3c15e3c83706ca5 Author: Mihai MoldovanDate: Sat Dec 31 01:38:10 2016 +0100 src/mediawidget.cpp: unify some redundant code. --- debian/changelog|1 + src/mediawidget.cpp |9 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index b8dc55c..5621c1d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -533,6 +533,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: convert piece of code to non-Windows and non-Darwin, so that not only Linux but other operating systems are covered as well. +- src/mediawidget.cpp: unify some redundant code. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/mediawidget.cpp b/src/mediawidget.cpp index c937ba4..16d837a 100644 --- a/src/mediawidget.cpp +++ b/src/mediawidget.cpp @@ -155,16 +155,13 @@ void MediaWidget::slot_sndSysSelected ( int system ) } case ESD: { +rbStartSnd->hide (); +rbNotStartSnd->hide (); +cbSndSshTun->show (); #ifdef Q_OS_WIN -rbStartSnd->hide(); -rbNotStartSnd->hide(); -cbSndSshTun->show(); cbSndSshTun->setEnabled ( false ); cbSndSshTun->setChecked ( true ); #elif defined (Q_OS_DARWIN) -rbStartSnd->hide (); -rbNotStartSnd->hide (); -cbSndSshTun->show (); cbSndSshTun->setEnabled (true); #endif /* defined (Q_OS_WIN) */ sbSndPort->setValue ( 16001 ); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 279/281: src/mediawidget.cpp: add deprecation warning for ARTS.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit b8d193c5a2c2b3fc3a94fe39fd7a565372684455 Author: Mihai MoldovanDate: Sat Dec 31 01:41:54 2016 +0100 src/mediawidget.cpp: add deprecation warning for ARTS. --- debian/changelog|1 + src/mediawidget.cpp |5 + 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index af6c534..1244fe3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -535,6 +535,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium covered as well. - src/mediawidget.cpp: unify some redundant code. - src/mediawidget.cpp: simplify expression. +- src/mediawidget.cpp: add deprecation warning for ARTS. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/mediawidget.cpp b/src/mediawidget.cpp index 15971d6..57f5b84 100644 --- a/src/mediawidget.cpp +++ b/src/mediawidget.cpp @@ -151,6 +151,11 @@ void MediaWidget::slot_sndSysSelected ( int system ) cbDefSndPort->setChecked ( false ); cbDefSndPort->setEnabled ( false ); sbSndPort->setValue ( 20221 ); +QMessageBox::warning (NULL, tr ("Deprecation Warning"), + tr ("ARTS support is scheduled to be removed soon.\n\n" + + "Please upgrade to PulseAudio."), + QMessageBox::Ok, QMessageBox::NoButton); break; } case ESD: -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 275/281: src/onmainwindow.{cpp, h}: remove left-over parec references and code.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 09bdbd61d4188b9f7e30f339c169f327cf586776 Author: Mihai MoldovanDate: Thu Dec 15 09:29:40 2016 +0100 src/onmainwindow.{cpp,h}: remove left-over parec references and code. --- debian/changelog |1 + src/onmainwindow.cpp | 41 + src/onmainwindow.h |3 --- 3 files changed, 2 insertions(+), 43 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3fc558c..b2c5cc6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -529,6 +529,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: cast the return value of realloc () to char*, as GCC doesn't seem to like reassigning the pointer otherwise. - src/unix_stdint.h: use same hack to import ssize_t into std namespace. +- src/onmainwindow.{cpp,h}: remove left-over parec references and code. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 13e7853..89b1b81 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -5368,7 +5368,6 @@ void ONMainWindow::slotRetResumeSess ( bool result, "/.pulse-cookie"; sshConnection->copyFile(cooFile, destFile, this, SLOT ( slotPCookieReady ( bool, QString,int ))); -parecTunnelOk=true; #endif /* !defined (Q_OS_WIN) && !defined (Q_OS_DARWIN) */ } } @@ -5404,18 +5403,10 @@ void ONMainWindow::slotRetResumeSess ( bool result, #endif /* !defined (Q_OS_WIN) && !defined (Q_OS_DARWIN) */ if ( sshSndTunnel ) { -const char* okSlot=0; -#ifdef Q_OS_WIN /* FIXME: Do we need explicit parec support in PulseManager? */ -if ( sndSystem==PULSE ) -{ -parecTunnelOk=false; -okSlot=SLOT ( slotSndTunOk() ); -} -#endif sndTunnel=sshConnection->startTunnel ( "localhost", resumingSession.sndPort.toInt(),"127.0.0.1", - sndPort.toInt(),true,this,okSlot, SLOT ( + sndPort.toInt(),true,this,NULL, SLOT ( slotSndTunnelFailed ( bool, QString, int ) )); @@ -12230,43 +12221,13 @@ void ONMainWindow::printSshDError_noAuthorizedKeysFile() QMessageBox::Ok,QMessageBox::NoButton ); } -#ifdef Q_OS_WIN -void ONMainWindow::slotStartParec () -{ - -if ( !parecTunnelOk ) -{ -// wait 1 sec and try again -QTimer::singleShot ( 1000, this, SLOT ( slotStartParec() ) ); -return; -} -QString passwd=getCurrentPass(); -QString user=getCurrentUname(); -QString host=resumingSession.server; -QString scmd="PULSE_CLIENTCONFIG=\"${HOME}/.x2go/C-"+ - resumingSession.sessionId+ - "/.pulse-client.conf\" "+ - "parec 1> /dev/null & sleep 1 && kill %1"; -} -#endif - -void ONMainWindow::slotSndTunOk() -{ -parecTunnelOk=true; -} - void ONMainWindow::slotPCookieReady ( bool result, QString , int ) { -#ifdef Q_OS_WIN -if ( result ) -slotStartParec(); -#else /* Silence warning. */ UNUSED (result); -#endif /* defined (Q_OS_WIN) */ } diff --git a/src/onmainwindow.h b/src/onmainwindow.h index e0f9d56..b23245c 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -777,7 +777,6 @@ private: bool runStartApp; bool ldapOnly; bool isScDaemonOk; -bool parecTunnelOk; #ifdef Q_OS_LINUX bool directRDP; #endif @@ -991,7 +990,6 @@ private slots: void startWinServers(key_types key_type = RSA_KEY_TYPE); void slotCheckXOrgLog(); void slotCheckXOrgConnection(); -void slotStartParec (); #endif #if defined (Q_OS_DARWIN) || defined (Q_OS_WIN) @@ -1128,7 +1126,6 @@ private slots: void slotAttachProxyWindow(); void slotEmbedIntoParentWindow(); void slotEmbedWindow(); -void slotSndTunOk(); void slotPCookieReady (bool result,QString output, int proc ); void slotEmbedToolBar(); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 276/281: src/onmainwindow.cpp: convert piece of code to non-Windows and non-Darwin, so that not only Linux but other operating systems are covered as well.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 7442496ea7295e4d7f22682c8fd9e3d2c09df5ac Author: Mihai MoldovanDate: Thu Dec 15 09:44:17 2016 +0100 src/onmainwindow.cpp: convert piece of code to non-Windows and non-Darwin, so that not only Linux but other operating systems are covered as well. --- debian/changelog |3 +++ src/onmainwindow.cpp |4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b2c5cc6..b8dc55c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -530,6 +530,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium GCC doesn't seem to like reassigning the pointer otherwise. - src/unix_stdint.h: use same hack to import ssize_t into std namespace. - src/onmainwindow.{cpp,h}: remove left-over parec references and code. +- src/onmainwindow.cpp: convert piece of code to non-Windows and + non-Darwin, so that not only Linux but other operating systems are + covered as well. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 89b1b81..4c5bfbe 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -5373,10 +5373,10 @@ void ONMainWindow::slotRetResumeSess ( bool result, } if ( sndSystem==ESD ) { -#ifdef Q_OS_LINUX +#if !defined (Q_OS_WIN) && !defined (Q_OS_DARWIN) sshConnection->copyFile(homeDir+"/.esd_auth", "$HOME/.esd_auth" ); -#else /* defined (Q_OS_LINUX) */ +#else /* !defined (Q_OS_WIN) && !defined (Q_OS_DARWIN) */ QString cooFile = QDir::toNativeSeparators (QDir (pulseManager->get_pulse_dir ().absolutePath () + "/.esd_auth").absolutePath ()); QString destFile="$HOME/.esd_auth"; -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 274/281: src/unix_stdint.h: use same hack to import ssize_t into std namespace.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 92106d64265a8bec76a7690d88cd0c85a4113eca Author: Mihai MoldovanDate: Sat Dec 10 15:11:36 2016 +0100 src/unix_stdint.h: use same hack to import ssize_t into std namespace. --- debian/changelog |1 + src/unix_stdint.h |5 + 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index e74d672..3fc558c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -528,6 +528,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium could be -1 and std::size_t is not applicable. - src/pulsemanager.cpp: cast the return value of realloc () to char*, as GCC doesn't seem to like reassigning the pointer otherwise. +- src/unix_stdint.h: use same hack to import ssize_t into std namespace. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/unix_stdint.h b/src/unix_stdint.h index 633ecec..db59edf 100644 --- a/src/unix_stdint.h +++ b/src/unix_stdint.h @@ -40,6 +40,11 @@ namespace std { using ::uint64_t; } +/* Same issue with unistd's ssize_t type. */ +namespace std { + using ::ssize_t; +} + #endif /* defined (Q_OS_UNIX) */ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 273/281: src/pulsemanager.cpp: cast the return value of realloc () to char*, as GCC doesn't seem to like reassigning the pointer otherwise.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit b838252320bf17b9c20db5b71d0f8ed7e6c5640c Author: Mihai MoldovanDate: Sat Dec 10 14:59:09 2016 +0100 src/pulsemanager.cpp: cast the return value of realloc () to char*, as GCC doesn't seem to like reassigning the pointer otherwise. --- debian/changelog |2 ++ src/pulsemanager.cpp |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3c79aca..e74d672 100644 --- a/debian/changelog +++ b/debian/changelog @@ -526,6 +526,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium typo ("erange" instead of "errno") and including the cerrno header. - src/pulsemanager.cpp: use std::ssize_t for the path length, because it could be -1 and std::size_t is not applicable. +- src/pulsemanager.cpp: cast the return value of realloc () to char*, as + GCC doesn't seem to like reassigning the pointer otherwise. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 1878b60..203ab29 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -153,7 +153,7 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), char *buf, *ptr; for (buf = ptr = NULL; ptr == NULL; path_len += 20) { -if (NULL == (buf = realloc (buf, path_len))) { +if (NULL == (buf = static_cast (realloc (buf, path_len { x2goErrorf (16) << "Could not allocate buffer for getting current working directory!"; show_RichText_ErrorMsgBox (tr ("Could not allocate buffer for getting current working directory!"), QString (), -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 270/281: src/pulsemanager.h: use unix_stdint.h on non-Windows-platforms to get std::(u)int*_t types without having to use C++11.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 2d9d3b2d60b3d235b560e21bc0e57b271f859a13 Author: Mihai MoldovanDate: Sat Dec 10 14:40:08 2016 +0100 src/pulsemanager.h: use unix_stdint.h on non-Windows-platforms to get std::(u)int*_t types without having to use C++11. --- debian/changelog |2 ++ src/pulsemanager.h |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ea22675..d77df4c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -520,6 +520,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium and imports functions into the std namespace. - src/: create new file unix_stdint.h which imports the (u)int*_t types into the std namespace. +- src/pulsemanager.h: use unix_stdint.h on non-Windows-platforms to get + std::(u)int*_t types without having to use C++11. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.h b/src/pulsemanager.h index 0b1ae3c..0aa5c6a 100644 --- a/src/pulsemanager.h +++ b/src/pulsemanager.h @@ -34,7 +34,7 @@ #ifdef Q_OS_WIN #include "windows_stdint.h" #else /* defined (Q_OS_WIN) */ -#include +#include "unix_stdint.h" #endif /* defined (Q_OS_WIN) */ #include "x2gosettings.h" -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 271/281: src/pulsemanager.cpp: fix Linux-based code by fixing a really stupid typo ("erange" instead of "errno") and including the cerrno header.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 6d0a4658c43700e72e3b75365cb52b33fd48e352 Author: Mihai MoldovanDate: Sat Dec 10 14:48:45 2016 +0100 src/pulsemanager.cpp: fix Linux-based code by fixing a really stupid typo ("erange" instead of "errno") and including the cerrno header. --- debian/changelog |2 ++ src/pulsemanager.cpp |3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d77df4c..319e67e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -522,6 +522,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium into the std namespace. - src/pulsemanager.h: use unix_stdint.h on non-Windows-platforms to get std::(u)int*_t types without having to use C++11. +- src/pulsemanager.cpp: fix Linux-based code by fixing a really stupid + typo ("erange" instead of "errno") and including the cerrno header. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 8b2e736..6e8df01 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #if QT_VERSION >= 0x05 @@ -163,7 +164,7 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), memset (buf, 0, path_len); ptr = getcwd (buf, path_len); -if ((NULL == ptr) && (ERANGE != erange)) { +if ((NULL == ptr) && (ERANGE != errno)) { int saved_errno = errno; x2goErrorf (17) << "getcwd() failed: " << QString (strerror (saved_errno)); show_RichText_ErrorMsgBox (tr ("getcwd() failed!"), -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 272/281: src/pulsemanager.cpp: use std::ssize_t for the path length, because it could be -1 and std::size_t is not applicable.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit e891ec2fc3fd67707bcea468444b529cad38dac8 Author: Mihai MoldovanDate: Sat Dec 10 14:57:17 2016 +0100 src/pulsemanager.cpp: use std::ssize_t for the path length, because it could be -1 and std::size_t is not applicable. --- debian/changelog |2 ++ src/pulsemanager.cpp |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 319e67e..3c79aca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -524,6 +524,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium std::(u)int*_t types without having to use C++11. - src/pulsemanager.cpp: fix Linux-based code by fixing a really stupid typo ("erange" instead of "errno") and including the cerrno header. +- src/pulsemanager.cpp: use std::ssize_t for the path length, because it + could be -1 and std::size_t is not applicable. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 6e8df01..1878b60 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -144,7 +144,7 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), server_working_dir_ = QString (app_dir_ + "/pulse/"); server_binary_ = QString (app_dir_ + "/pulse/pulseaudio.exe"); #elif defined (Q_OS_LINUX) - std::size_t path_len = pathconf (".", _PC_PATH_MAX); + std::ssize_t path_len = pathconf (".", _PC_PATH_MAX); if (-1 == path_len) { path_len = 1024; -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 267/281: src/x2goutils.cpp: fix add_to_path ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 1593e83e8cd817b2ba25e199f35a2d5f546f4442 Author: Mihai MoldovanDate: Fri Dec 9 18:51:15 2016 +0100 src/x2goutils.cpp: fix add_to_path (). We want to remove trailing slashes from elements-to-add, not just fetch a trailing slash if encountered. Also, better don't compare a value from the original path value to itself, but rather to the things we want to add in order to remove duplicates, not remove most of the list of elements to add... --- debian/changelog |5 + src/x2goutils.cpp |5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7e488ed..546f11b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -511,6 +511,11 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: remove trailing slash from Mageia/SUSE/Arch sftp-server binary search path. - src/x2goutils.cpp: add debugging output to add_to_path (). +- src/x2goutils.cpp: fix add_to_path (). We want to remove trailing + slashes from elements-to-add, not just fetch a trailing slash if + encountered. Also, better don't compare a value from the original path + value to itself, but rather to the things we want to add in order to + remove duplicates, not remove most of the list of elements to add... [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp index 0a01b62..d076c74 100644 --- a/src/x2goutils.cpp +++ b/src/x2goutils.cpp @@ -226,7 +226,8 @@ QString add_to_path (const QString _path, const QStringList , const boo for (int i = 0; i < add.size (); ++i) { if (!(add[i].isEmpty ())) { if (add[i].right (1) == "/") { -QString tmp_elem = add[i].right (1); +QString tmp_elem = add[i]; +tmp_elem.chop (1); if (!(tmp_elem.isEmpty ())) { tmp_clean_add.append (tmp_elem); @@ -254,7 +255,7 @@ QString add_to_path (const QString _path, const QStringList , const boo bool tmp_found = false; for (QStringList::const_iterator cit2 = cit + 1; cit2 != end; ++cit2) { -if (*cit == *cit) { +if (*cit == *cit2) { tmp_found = true; break; } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 269/281: src/: create new file unix_stdint.h which imports the (u)int*_t types into the std namespace.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 4596fb81cbe51e52ed273f353ddd5a6aa36bd47e Author: Mihai MoldovanDate: Sat Dec 10 14:38:02 2016 +0100 src/: create new file unix_stdint.h which imports the (u)int*_t types into the std namespace. --- debian/changelog |2 ++ src/unix_stdint.h | 46 ++ 2 files changed, 48 insertions(+) diff --git a/debian/changelog b/debian/changelog index f9b5c14..ea22675 100644 --- a/debian/changelog +++ b/debian/changelog @@ -518,6 +518,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium remove duplicates, not remove most of the list of elements to add... - src/unixhelper.cpp: use cstdio instead of stdio.h. It's the C++ header and imports functions into the std namespace. +- src/: create new file unix_stdint.h which imports the (u)int*_t types + into the std namespace. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/unix_stdint.h b/src/unix_stdint.h new file mode 100644 index 000..633ecec --- /dev/null +++ b/src/unix_stdint.h @@ -0,0 +1,46 @@ +/*** + * Copyright (C) 2016 by Mihai Moldovan * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version.* + * * + * This program is distributed in the hope that it will be useful,* + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc.,* + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***/ + +#ifndef UNIX_STDINT_H +#define UNIX_STDINT_H + +#ifdef Q_OS_UNIX + +#include + +/* + * We need this ugly hack because the cstdint header is C++11-only + * (or available with extensions we can't portably use) + * and stdint.h won't put these types into the std namespace. + */ +namespace std { + using ::int8_t; + using ::int16_t; + using ::int32_t; + using ::int64_t; + using ::uint8_t; + using ::uint16_t; + using ::uint32_t; + using ::uint64_t; +} + +#endif /* defined (Q_OS_UNIX) */ + + +#endif /* !defined (UNIX_STDINT_H) */ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 266/281: src/x2goutils.cpp: add debugging output to add_to_path ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 7b36d12ca1820ec9be973ae0e47c7106636ada31 Author: Mihai MoldovanDate: Fri Dec 9 18:49:18 2016 +0100 src/x2goutils.cpp: add debugging output to add_to_path (). --- debian/changelog |1 + src/x2goutils.cpp | 12 2 files changed, 13 insertions(+) diff --git a/debian/changelog b/debian/changelog index d58f0a0..7e488ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -510,6 +510,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium from add_to_path ()... Fixes a few bugs here and there. - src/onmainwindow.cpp: remove trailing slash from Mageia/SUSE/Arch sftp-server binary search path. +- src/x2goutils.cpp: add debugging output to add_to_path (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp index 542ae7e..0a01b62 100644 --- a/src/x2goutils.cpp +++ b/src/x2goutils.cpp @@ -216,6 +216,8 @@ QString add_to_path (const QString _path, const QStringList , const boo QStringList orig_path_list = orig_path.split (":"); + x2goDebug << "path value at beginning: " << orig_path; + /* * Clean up add list. We want to make sure no entry ends in a slash * and skip empty entries. @@ -236,6 +238,8 @@ QString add_to_path (const QString _path, const QStringList , const boo } } + x2goDebug << "tmp_clean_add: " << tmp_clean_add; + /* Nothing to add, really... */ if (tmp_clean_add.isEmpty ()) { return (ret); @@ -262,6 +266,8 @@ QString add_to_path (const QString _path, const QStringList , const boo } } + x2goDebug << "clean_add: " << clean_add; + /* Nothing to add. */ if (clean_add.isEmpty ()) { return (ret); @@ -280,6 +286,10 @@ QString add_to_path (const QString _path, const QStringList , const boo } } + for (std::size_t i = 0; i < found.size (); ++i) { +x2goDebug << "found entry i (" << i << ") in orig_path_list (" << clean_add[i] << "): " << found[i]; + } + if (back) { for (int i = 0; i < clean_add.size (); ++i) { if (!found[i]) { @@ -295,6 +305,8 @@ QString add_to_path (const QString _path, const QStringList , const boo } } + x2goDebug << "return value at end: " << ret; + return (ret); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 263/281: src/onmainwindow.cpp: stop duplicating the list of known sftp-server binary locations.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit af07a40e68cdb4991e85d8a824d45e85f1f63bb4 Author: Mihai MoldovanDate: Fri Dec 9 16:52:51 2016 +0100 src/onmainwindow.cpp: stop duplicating the list of known sftp-server binary locations. --- debian/changelog |2 ++ src/onmainwindow.cpp | 25 + 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index 066b093..8ee9906 100644 --- a/debian/changelog +++ b/debian/changelog @@ -504,6 +504,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: move generateEtcFiles () call to startSshd (). We must make sure that the sshd_config file exists and is up-to-date, so let's always do it right before starting the sshd binary. +- src/onmainwindow.cpp: stop duplicating the list of known sftp-server + binary locations. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 0649586..95c0315 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10197,20 +10197,19 @@ void ONMainWindow::generateEtcFiles() */ QString sftp_binary; +QStringList common_sftp_dirs; +common_sftp_dirs << "/usr/lib/openssh" /* Debian and Ubuntu */ + << "/usr/libexec/openssh" /* Fedora, CentOS, hopefully also RHEL */ + << "/usr/lib/ssh/" /* Mageia, OpenSUSE, SLE{S,D} < 12 x86, SLE{S,D} 12, Arch */ + << "/usr/lib64/ssh" /* SLE{S,D} < 12 x86_64 */ + << "/usr/lib/misc" /* Gentoo */ + << "/usr/libexec"; /* Slackware, OS X */ #if QT_VERSION < 0x05 QProcessEnvironment tmp_env = QProcessEnvironment::systemEnvironment (); QString path_val = tmp_env.value ("PATH"); -QStringList to_back; -to_back << "/usr/lib/openssh" /* Debian and Ubuntu */ -<< "/usr/libexec/openssh" /* Fedora, CentOS, hopefully also RHEL */ -<< "/usr/lib/ssh/" /* Mageia, OpenSUSE, SLE{S,D} < 12 x86, SLE{S,D} 12, Arch */ -<< "/usr/lib64/ssh" /* SLE{S,D} < 12 x86_64 */ -<< "/usr/lib/misc" /* Gentoo */ -<< "/usr/libexec"; /* Slackware, OS X */ - -add_to_path (path_val, to_back); +add_to_path (path_val, common_sftp_dirs); /* Just in case we bundle sftp-server ourselves. */ sftp_binary = find_binary (appDir, "sftp-server"); @@ -10230,13 +10229,7 @@ void ONMainWindow::generateEtcFiles() sftp_binary = QStandardPaths::findExecutable ("sftp-binary", search_paths); if (sftp_binary.isEmpty ()) { -search_paths = QStringList (); -search_paths << "/usr/lib/openssh" /* Debian and Ubuntu */ - << "/usr/libexec/openssh" /* Fedora, CentOS, hopefully also RHEL */ - << "/usr/lib/ssh/" /* Mageia, OpenSUSE, SLE{S,D} < 12 x86, SLE{S,D} 12, Arch */ - << "/usr/lib64/ssh" /* SLE{S,D} < 12 x86_64 */ - << "/usr/lib/misc" /* Gentoo */ - << "/usr/libexec"; /* Slackware, OS X */ +search_paths = common_sftp_dirs; sftp_binary = QStandardPaths::findExecutable ("sftp-server", search_paths); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 264/281: src/{onmainwindow, pulsemanager}.cpp: actually *use* what we got back from add_to_path ()...
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 47048cfcc4511290fde88582b0af56922e5c2b4c Author: Mihai MoldovanDate: Fri Dec 9 16:54:33 2016 +0100 src/{onmainwindow,pulsemanager}.cpp: actually *use* what we got back from add_to_path ()... Fixes a few bugs here and there. --- debian/changelog |2 ++ src/onmainwindow.cpp |2 +- src/pulsemanager.cpp |4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8ee9906..aae7bf5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -506,6 +506,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium let's always do it right before starting the sshd binary. - src/onmainwindow.cpp: stop duplicating the list of known sftp-server binary locations. +- src/{onmainwindow,pulsemanager}.cpp: actually *use* what we got back + from add_to_path ()... Fixes a few bugs here and there. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 95c0315..aadf7b6 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10209,7 +10209,7 @@ void ONMainWindow::generateEtcFiles() QProcessEnvironment tmp_env = QProcessEnvironment::systemEnvironment (); QString path_val = tmp_env.value ("PATH"); -add_to_path (path_val, common_sftp_dirs); +path_val = add_to_path (path_val, common_sftp_dirs); /* Just in case we bundle sftp-server ourselves. */ sftp_binary = find_binary (appDir, "sftp-server"); diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index a956054..8b2e736 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -72,8 +72,8 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), to_front << "/opt/local/bin"; /* MacPorts default prefix, FIXME: might need to make that configurable. */ to_back << "/usr/local/bin"; /* Homebrew or random stuff. Probably even both intermingled... */ - add_to_path (path_val, to_back); - add_to_path (path_val, to_front, false); + path_val = add_to_path (path_val, to_back); + path_val = add_to_path (path_val, to_front, false); server_binary_ = find_binary (server_working_dir_, "pulseaudio"); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 265/281: src/onmainwindow.cpp: remove trailing slash from Mageia/SUSE/Arch sftp-server binary search path.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit d02a8366209aff79fc0256a566796bb32725d1f6 Author: Mihai MoldovanDate: Fri Dec 9 18:48:07 2016 +0100 src/onmainwindow.cpp: remove trailing slash from Mageia/SUSE/Arch sftp-server binary search path. --- debian/changelog |2 ++ src/onmainwindow.cpp |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index aae7bf5..d58f0a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -508,6 +508,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium binary locations. - src/{onmainwindow,pulsemanager}.cpp: actually *use* what we got back from add_to_path ()... Fixes a few bugs here and there. +- src/onmainwindow.cpp: remove trailing slash from Mageia/SUSE/Arch + sftp-server binary search path. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index aadf7b6..13e7853 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10200,7 +10200,7 @@ void ONMainWindow::generateEtcFiles() QStringList common_sftp_dirs; common_sftp_dirs << "/usr/lib/openssh" /* Debian and Ubuntu */ << "/usr/libexec/openssh" /* Fedora, CentOS, hopefully also RHEL */ - << "/usr/lib/ssh/" /* Mageia, OpenSUSE, SLE{S,D} < 12 x86, SLE{S,D} 12, Arch */ + << "/usr/lib/ssh" /* Mageia, OpenSUSE, SLE{S,D} < 12 x86, SLE{S,D} 12, Arch */ << "/usr/lib64/ssh" /* SLE{S,D} < 12 x86_64 */ << "/usr/lib/misc" /* Gentoo */ << "/usr/libexec"; /* Slackware, OS X */ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 261/281: src/pulsemanager.cpp: fix PA binary searching logic.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit e5bac32a1d896ee59770accb3c1f7565b23c8bca Author: Mihai MoldovanDate: Mon Nov 28 18:09:53 2016 +0100 src/pulsemanager.cpp: fix PA binary searching logic. We don't want to unconditionally set system_pulse_ to true if we found a binary... it might as well be the bundled one... --- debian/changelog |3 +++ src/pulsemanager.cpp | 17 ++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index d1bad86..92217b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -498,6 +498,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium duplication now. - src/onmainwindow.cpp: fix sshd_config generation on UNIX by searching for the real sftp-server binary path. +- src/pulsemanager.cpp: fix PA binary searching logic. We don't want to + unconditionally set system_pulse_ to true if we found a binary... it + might as well be the bundled one... [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index d7b6d72..a956054 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -79,6 +79,10 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), if (server_binary_.isEmpty ()) { server_binary_ = find_binary (path_val, "pulseaudio"); + +if (!(server_binary_.isEmpty ())) { + system_pulse_ = true; +} } #else /* QT_VERSION < 0x05 */ QStringList search_paths; @@ -102,8 +106,18 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), search_paths << "/usr/local/bin"; /* Homebrew or random stuff. Probably even both intermingled... */ server_binary_ = QStandardPaths::findExecutable ("pulseaudio", search_paths); + +if (!(server_binary_.isEmpty ())) { + system_pulse_ = true; +} + } + else { +system_pulse_ = true; } } +else { + system_pulse_ = true; +} } #endif /* QT_VERSION < 0x05 */ @@ -118,9 +132,6 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), true); abort (); } - else { -system_pulse_ = true; - } QFileInfo tmp_file_info = QFileInfo (server_binary_); server_working_dir_ = tmp_file_info.canonicalPath (); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 259/281: src/pulsemanager.cpp: refactor PA binary searching code.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 68930b521e85b1cbb985ca18fe43096bad5e6954 Author: Mihai MoldovanDate: Mon Nov 28 17:33:36 2016 +0100 src/pulsemanager.cpp: refactor PA binary searching code. Less duplication now. --- debian/changelog |2 ++ src/pulsemanager.cpp | 48 ++-- 2 files changed, 16 insertions(+), 34 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5fcddb5..c825ff2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -494,6 +494,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/x2goutils.{cpp,h}: make find_binary () and add_to_path () available on all UNIX-based operating systems. We will need it for sftp-server discovery. +- src/pulsemanager.cpp: refactor PA binary searching code. Less + duplication now. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 93c83b3..d7b6d72 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -79,21 +79,6 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), if (server_binary_.isEmpty ()) { server_binary_ = find_binary (path_val, "pulseaudio"); - -if (server_binary_.isEmpty ()) { - x2goErrorf (29) << "Unable to find PulseAudio binary. Neither bundled, nor found in $PATH nor additional directories."; - show_RichText_ErrorMsgBox (tr ("Unable to find PulseAudio binary. Neither bundled, nor found in $PATH nor additional directories."), - tr ("If you downloaded the bundled, pre-compiled version from the official home page, " - "please report a bug on:\n" - "https://wiki.x2go.org/doku.php/wiki:bugs\;>" - "https://wiki.x2go.org/doku.php/wiki:bugs; - "\n"), - true); - abort (); -} -else { - system_pulse_ = true; -} } #else /* QT_VERSION < 0x05 */ QStringList search_paths; @@ -117,30 +102,25 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), search_paths << "/usr/local/bin"; /* Homebrew or random stuff. Probably even both intermingled... */ server_binary_ = QStandardPaths::findExecutable ("pulseaudio", search_paths); - -if (server_binary_.isEmpty ()) { - x2goErrorf (28) << "Unable to find PulseAudio binary. Neither bundled, nor found in $PATH nor additional directories."; - show_RichText_ErrorMsgBox (tr ("Unable to find PulseAudio binary. Neither bundled, nor found in $PATH nor additional directories."), - tr ("If you downloaded the bundled, pre-compiled version from the official home page, " - "please report a bug on:\n" - "https://wiki.x2go.org/doku.php/wiki:bugs\;>" - "https://wiki.x2go.org/doku.php/wiki:bugs; - "\n"), - true); - abort (); -} } } + } +#endif /* QT_VERSION < 0x05 */ -/* - * The detection above either failed or succeeded. - * Failure means that the program already stopped, - * success means that all code reaches this point. - * Be careful when refactoring this code. - */ + if (server_binary_.isEmpty ()) { +x2goErrorf (29) << "Unable to find the PulseAudio binary. Neither bundled, nor found in $PATH nor additional directories."; +show_RichText_ErrorMsgBox (tr ("Unable to find the PulseAudio binary. Neither bundled, nor found in $PATH nor additional directories."), + tr ("If you downloaded the bundled, pre-compiled version from the official home page, " + "please report a bug on:\n" + "https://wiki.x2go.org/doku.php/wiki:bugs\;>" + "https://wiki.x2go.org/doku.php/wiki:bugs; + "\n"), + true); +abort (); + } + else { system_pulse_ = true; } -#endif /* QT_VERSION < 0x05 */ QFileInfo tmp_file_info = QFileInfo (server_binary_); server_working_dir_ = tmp_file_info.canonicalPath (); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 260/281: src/onmainwindow.cpp: fix sshd_config generation on UNIX by searching for the real sftp-server binary path.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 0b84096ed3c8e819ea4d2a57148a4df5c141ccf8 Author: Mihai MoldovanDate: Mon Nov 28 17:38:57 2016 +0100 src/onmainwindow.cpp: fix sshd_config generation on UNIX by searching for the real sftp-server binary path. --- debian/changelog |2 ++ src/onmainwindow.cpp | 79 ++ 2 files changed, 75 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index c825ff2..d1bad86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -496,6 +496,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium discovery. - src/pulsemanager.cpp: refactor PA binary searching code. Less duplication now. +- src/onmainwindow.cpp: fix sshd_config generation on UNIX by searching + for the real sftp-server binary path. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 4409527..aabb879 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10185,14 +10185,81 @@ void ONMainWindow::generateEtcFiles() out<<"StrictModes no\n"<< "UsePrivilegeSeparation no\n"<< "PidFile \"" + varDir + "/sshd.pid\"\n" << - "AuthorizedKeysFile \"" << authKeyPath << "\"\n" << + "AuthorizedKeysFile \"" << authKeyPath << "\"\n"; #ifdef Q_OS_WIN - "Subsystem shell "<< wapiShortFileName ( appDir) +"/sh"+"\n"<< - "Subsystem sftp "<< wapiShortFileName ( appDir) +"/sftp-server"+"\n"; +out << "Subsystem shell "<< wapiShortFileName ( appDir) +"/sh"+"\n"<< + "Subsystem sftp "<< wapiShortFileName ( appDir) +"/sftp-server"+"\n"; #else - "Subsystem sftp " -/* This may need some sanitization, i.e., appDir could potentially include whitespace. */ - <
[X2Go-Commits] [x2goclient] 257/281: src/onmainwindow.cpp: use QFileInfo to get the key file's basename in exportDirs () instead of the old, potentially faulty string replace dance.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 805b394e9d44b1670d19d3559983983f23cacabb Author: Mihai MoldovanDate: Wed Oct 26 22:05:10 2016 +0200 src/onmainwindow.cpp: use QFileInfo to get the key file's basename in exportDirs () instead of the old, potentially faulty string replace dance. --- debian/changelog |3 +++ src/onmainwindow.cpp | 11 +-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0ba751f..692ea35 100644 --- a/debian/changelog +++ b/debian/changelog @@ -488,6 +488,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium it back. - src/onmainwindow.cpp: only pass non-Cygwin paths to QFile::exists () in generateKey (). Refactor a bit to drop the now-unnecessary ret variable. +- src/onmainwindow.cpp: use QFileInfo to get the key file's basename in + exportDirs () instead of the old, potentially faulty string replace + dance. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 81dea8c..4409527 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -7998,12 +7998,11 @@ void ONMainWindow::exportDirs ( QString exports,bool removable ) QString uname=getCurrentUname(); -QString dst=dr.key; -QString dhdir=homeDir+"/.x2go"; -#ifdef Q_OS_WIN -dhdir=wapiShortFileName ( dhdir ); -#endif -dst.replace ( dhdir +"/ssh/gen/","" ); + +/* For the destination, fetch the base name only. */ +QFileInfo tmp_file_info (dr.key); +QString dst = tmp_file_info.fileName (); + dst="~"+uname +"/.x2go/ssh/"+dst; dr.dstKey=dst; dr.isRemovable=removable; -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 256/281: src/onmainwindow.cpp: only pass non-Cygwin paths to QFile::exists () in generateKey ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 6fe3aa311a2cf2411a446b4f117a5435572d4b97 Author: Mihai MoldovanDate: Wed Oct 26 21:27:37 2016 +0200 src/onmainwindow.cpp: only pass non-Cygwin paths to QFile::exists () in generateKey (). Refactor a bit to drop the now-unnecessary ret variable. --- debian/changelog |2 ++ src/onmainwindow.cpp | 23 ++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index d64dde5..0ba751f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -486,6 +486,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium constructor. - src/onmainwindow.h: actually, we do need startSshd () to be public. Move it back. +- src/onmainwindow.cpp: only pass non-Cygwin paths to QFile::exists () in + generateKey (). Refactor a bit to drop the now-unnecessary ret variable. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index e01dfb4..81dea8c 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10286,8 +10286,6 @@ QString ONMainWindow::generateKey (ONMainWindow::key_types key_type, bool host_k QString stringified_key_type (key_type_to_string (key_type)); std::size_t key_bits = default_size_for_key_type (key_type); - QString ret (""); - QString base_dir (homeDir); QString private_key_file (""); @@ -10309,12 +10307,10 @@ QString ONMainWindow::generateKey (ONMainWindow::key_types key_type, bool host_k } } -#ifdef Q_OS_WIN - private_key_file = cygwinPath (wapiShortFileName (base_dir)); -#else private_key_file = base_dir; +#ifdef Q_OS_WIN + QString private_key_file_cygwin = cygwinPath (wapiShortFileName (base_dir)); #endif - ret = base_dir; { QString tmp_to_add (""); @@ -10337,14 +10333,23 @@ QString ONMainWindow::generateKey (ONMainWindow::key_types key_type, bool host_k } private_key_file += tmp_to_add; -ret += tmp_to_add; +#ifdef Q_OS_WIN +private_key_file_cygwin += tmp_to_add; +#endif } QString public_key_file (private_key_file + ".pub"); if ((!(QFile::exists (private_key_file))) || (!(QFile::exists (public_key_file { x2goDebug << "Generating SSH key. Type: " << stringified_key_type.toUpper () - << "; Location: " << private_key_file; + << "; Location: " + << +#ifdef Q_OS_WIN + private_key_file_cygwin +#else + private_key_file +#endif + ; QStringList args; @@ -10399,7 +10404,7 @@ QString ONMainWindow::generateKey (ONMainWindow::key_types key_type, bool host_k } } - return (ret); + return (private_key_file); } QString ONMainWindow::createKeyBundle (key_types key_type) { -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 250/281: src/onmainwindow.cpp: actually use key_type parameter in startSshd () and make selection more generic.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 431a047c38037a94ba0e4881e93cde0cab80ff45 Author: Mihai MoldovanDate: Wed Oct 26 19:25:33 2016 +0200 src/onmainwindow.cpp: actually use key_type parameter in startSshd () and make selection more generic. --- debian/changelog |2 ++ src/onmainwindow.cpp |8 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 79ef160..3ced34b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -473,6 +473,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium createKeyBundle (). - src/onmainwindow.cpp: add and use key_types parameter to startWinServers (). +- src/onmainwindow.cpp: actually use key_type parameter in startSshd () + and make selection more generic. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 2d61342..8f36f18 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10504,6 +10504,8 @@ bool ONMainWindow::startSshd(ONMainWindow::key_types key_type) return false; } +const QString stringified_key_type = key_type_to_string (key_type); + /* Don't start sshd, if it's already running. */ #ifdef Q_OS_WIN if (winSshdStarted) @@ -10527,8 +10529,7 @@ bool ONMainWindow::startSshd(ONMainWindow::key_types key_type) std::string clientdir=wapiShortFileName ( appDir ).toStdString(); std::stringstream strm; std::string config="\""+cygwinPath(etcDir+"/sshd_config").toStdString()+"\""; -/* FIXME: make this generic! */ -std::string key="\""+cygwinPath(etcDir+"/ssh_host_rsa_key").toStdString()+"\""; +std::string key="\""+cygwinPath(etcDir+"/ssh_host_" + stringified_key_type + "_key").toStdString()+"\""; // generate a unique sshLog filepath, and create its directory if (debugging) @@ -10618,9 +10619,8 @@ bool ONMainWindow::startSshd(ONMainWindow::key_types key_type) #endif /* !(defined (Q_OS_UNIX)) */ QStringList arguments; -/* FIXME: make key selection more generic! */ arguments<<"-f"
[X2Go-Commits] [x2goclient] 254/281: src/onmainwindow.cpp: re-order initializer list of WinServerStarter constructor.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit d13d2fdee896e8f614a5ee73885893f234338d9d Author: Mihai MoldovanDate: Wed Oct 26 20:46:08 2016 +0200 src/onmainwindow.cpp: re-order initializer list of WinServerStarter constructor. --- debian/changelog |2 ++ src/onmainwindow.cpp |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5990009..788034d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -482,6 +482,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium ssh_key_type_ member variable directly, but in the constructor. Also, use the initializer list to initialize the other member variables directly. +- src/onmainwindow.cpp: re-order initializer list of WinServerStarter + constructor. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index ee42f94..e01dfb4 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -9982,7 +9982,7 @@ void ONMainWindow::slotCheckXOrgConnection() } WinServerStarter::WinServerStarter ( daemon server, ONMainWindow * par ) : -QThread ( 0 ), ssh_key_type_ (ONMainWindow::RSA_KEY_TYPE), mode (server), parent (par) +QThread ( 0 ), mode (server), parent (par), ssh_key_type_ (ONMainWindow::RSA_KEY_TYPE) { } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 253/281: src/onmainwindow.{cpp, h}: don't try to initialize non-static ssh_key_type_ member variable directly, but in the constructor.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 827579d6d890b01377034530534c49d1cb71838d Author: Mihai MoldovanDate: Wed Oct 26 20:42:45 2016 +0200 src/onmainwindow.{cpp,h}: don't try to initialize non-static ssh_key_type_ member variable directly, but in the constructor. Also, use the initializer list to initialize the other member variables directly. --- debian/changelog |4 src/onmainwindow.cpp |4 +--- src/onmainwindow.h |2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 29c7d9a..5990009 100644 --- a/debian/changelog +++ b/debian/changelog @@ -478,6 +478,10 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.h: move WinServerStarter class definition around to hopefully get the definition of ONMainWindow::key_types. - src/onmainwindow.h: remove WWrapper definition, seems to be unused. +- src/onmainwindow.{cpp,h}: don't try to initialize non-static + ssh_key_type_ member variable directly, but in the constructor. Also, + use the initializer list to initialize the other member variables + directly. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 8f36f18..ee42f94 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -9982,10 +9982,8 @@ void ONMainWindow::slotCheckXOrgConnection() } WinServerStarter::WinServerStarter ( daemon server, ONMainWindow * par ) : -QThread ( 0 ) +QThread ( 0 ), ssh_key_type_ (ONMainWindow::RSA_KEY_TYPE), mode (server), parent (par) { -mode=server; -parent=par; } void WinServerStarter::run() diff --git a/src/onmainwindow.h b/src/onmainwindow.h index cbf4118..61c66de 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -1260,7 +1260,7 @@ public: private: daemon mode; ONMainWindow* parent; -ONMainWindow::key_types ssh_key_type_ = RSA_KEY_TYPE; +ONMainWindow::key_types ssh_key_type_; }; #endif -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 251/281: src/onmainwindow.h: move WinServerStarter class definition around to hopefully get the definition of ONMainWindow::key_types.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 55b0e0234b3bca802cded0a6cd66ea9fe48671dd Author: Mihai MoldovanDate: Wed Oct 26 20:36:14 2016 +0200 src/onmainwindow.h: move WinServerStarter class definition around to hopefully get the definition of ONMainWindow::key_types. --- debian/changelog |2 ++ src/onmainwindow.h | 35 +++ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3ced34b..0d240ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -475,6 +475,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium startWinServers (). - src/onmainwindow.cpp: actually use key_type parameter in startSshd () and make selection more generic. +- src/onmainwindow.h: move WinServerStarter class definition around to + hopefully get the definition of ONMainWindow::key_types. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.h b/src/onmainwindow.h index 14240e5..bf721a6 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -247,22 +247,6 @@ class WWrapper : public QPushButton { friend class ONMainWindow; }; -#include -#include -class ONMainWindow; -class WinServerStarter: public QThread -{ -public: -enum daemon {X,SSH}; -WinServerStarter ( daemon server, ONMainWindow * par ); -void run(); -void set_ssh_key_type (ONMainWindow::key_types key_type); -ONMainWindow::key_types get_ssh_key_type (); -private: -daemon mode; -ONMainWindow* parent; -key_types ssh_key_type_ = RSA_KEY_TYPE; -}; #endif @@ -1270,4 +1254,23 @@ private slots: end of plugin stuff }; +#ifdef Q_OS_WIN +#include +#include +class ONMainWindow; +class WinServerStarter: public QThread +{ +public: +enum daemon {X,SSH}; +WinServerStarter ( daemon server, ONMainWindow * par ); +void run(); +void set_ssh_key_type (ONMainWindow::key_types key_type); +ONMainWindow::key_types get_ssh_key_type (); +private: +daemon mode; +ONMainWindow* parent; +ONMainWindow::key_types ssh_key_type_ = RSA_KEY_TYPE; +}; +#endif + #endif -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 244/281: src/onmainwindow.{cpp, h}: make startSshd () private.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 7afae87c959db737a30132eb4afebc095a3ce7a9 Author: Mihai MoldovanDate: Wed Oct 26 18:21:13 2016 +0200 src/onmainwindow.{cpp,h}: make startSshd () private. There's no need to keep it public, as only class-internal functions are using it. --- debian/changelog |2 ++ src/onmainwindow.h |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 2690efb..5c912e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -462,6 +462,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium startSshd (). - src/onmainwindow.cpp: add listening-check loop to the Windows-specific code of startSshd (). +- src/onmainwindow.{cpp,h}: make startSshd () private. There's no need to + keep it public, as only class-internal functions are using it. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.h b/src/onmainwindow.h index f556f85..9046349 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -584,7 +584,6 @@ public: QString internAppName ( const QString& transAppName, bool* found=0l ); void setEmbedSessionActionsEnabled ( bool enable ); -bool startSshd(); QSize getEmbedAreaSize(); #ifdef Q_OS_WIN static QString cygwinPath ( const QString& winPath ); @@ -1221,6 +1220,7 @@ private: std::size_t default_size_for_key_type (key_types key_type); QString generateKey (key_types key_type, bool host_key = false); QString createKeyBundle (key_types key_type = RSA_KEY_TYPE); +bool startSshd(); plugin stuff #ifdef CFGPLUGIN -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 245/281: src/onmainwindow.{cpp, h}: add ssh_key_type_ member variable and getter and setter to WinServerStarter class.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit d8333062a972989dc4fcaa7bc466bb506cb1a13c Author: Mihai MoldovanDate: Wed Oct 26 19:04:50 2016 +0200 src/onmainwindow.{cpp,h}: add ssh_key_type_ member variable and getter and setter to WinServerStarter class. --- debian/changelog |2 ++ src/onmainwindow.cpp |7 +++ src/onmainwindow.h |3 +++ 3 files changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5c912e9..dd5690c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -464,6 +464,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium code of startSshd (). - src/onmainwindow.{cpp,h}: make startSshd () private. There's no need to keep it public, as only class-internal functions are using it. +- src/onmainwindow.{cpp,h}: add ssh_key_type_ member variable and getter + and setter to WinServerStarter class. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 1bd2797..38b258f 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10001,6 +10001,13 @@ void WinServerStarter::run() } } +void WinServerStarter::set_ssh_key_type (ONMainWindow::key_types key_type) { + ssh_key_type_ = key_type; +} + +ONMainWindow::key_types WinServerStarter::get_ssh_key_type () { + return (ssh_key_type_); +} void ONMainWindow::startWinServers() diff --git a/src/onmainwindow.h b/src/onmainwindow.h index 9046349..2e2da7f 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -256,9 +256,12 @@ public: enum daemon {X,SSH}; WinServerStarter ( daemon server, ONMainWindow * par ); void run(); +void set_ssh_key_type (ONMainWindow::key_types key_type); +ONMainWindow::key_types get_ssh_key_type (); private: daemon mode; ONMainWindow* parent; +key_types ssh_key_type_ = RSA_KEY_TYPE; }; #endif -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 246/281: src/onmainwindow.{cpp, h}: add SSH key type parameter to startSshd ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit bfe09a285d4248b0d98a47f9739da857d34f3d9b Author: Mihai MoldovanDate: Wed Oct 26 19:09:42 2016 +0200 src/onmainwindow.{cpp,h}: add SSH key type parameter to startSshd (). --- debian/changelog |1 + src/onmainwindow.cpp |2 +- src/onmainwindow.h |2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index dd5690c..ad38be2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -466,6 +466,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium keep it public, as only class-internal functions are using it. - src/onmainwindow.{cpp,h}: add ssh_key_type_ member variable and getter and setter to WinServerStarter class. +- src/onmainwindow.{cpp,h}: add SSH key type parameter to startSshd (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 38b258f..afdaa67 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10495,7 +10495,7 @@ QString ONMainWindow::createKeyBundle (key_types key_type) { return (user_key); } -bool ONMainWindow::startSshd() +bool ONMainWindow::startSshd(ONMainWindow::key_types key_type) { if ( embedMode && config.confFS && !config.useFs ) { diff --git a/src/onmainwindow.h b/src/onmainwindow.h index 2e2da7f..c6c785b 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -1223,7 +1223,7 @@ private: std::size_t default_size_for_key_type (key_types key_type); QString generateKey (key_types key_type, bool host_key = false); QString createKeyBundle (key_types key_type = RSA_KEY_TYPE); -bool startSshd(); +bool startSshd (key_types key_type = RSA_KEY_TYPE); plugin stuff #ifdef CFGPLUGIN -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 248/281: src/onmainwindow.cpp: pass key_type parameter to startSshd () in createKeyBundle ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 45ce18987166235d0bbc1db4c86b743350c6b6f4 Author: Mihai MoldovanDate: Wed Oct 26 19:14:20 2016 +0200 src/onmainwindow.cpp: pass key_type parameter to startSshd () in createKeyBundle (). --- debian/changelog |2 ++ src/onmainwindow.cpp |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8f72355..9dd4ac9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -469,6 +469,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.{cpp,h}: add SSH key type parameter to startSshd (). - src/onmainwindow.cpp: pass new ssh_key_type_ member to startSshd () call in WinServerStarter::run (). +- src/onmainwindow.cpp: pass key_type parameter to startSshd () in + createKeyBundle (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 3c09ee4..c0c289f 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10461,7 +10461,7 @@ QString ONMainWindow::createKeyBundle (key_types key_type) { #endif } - if (!(startSshd ())) { + if (!(startSshd (key_type))) { x2goDebug << "Failed to start OpenSSH Server pro-actively."; return (QString::null); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 247/281: src/onmainwindow.cpp: pass new ssh_key_type_ member to startSshd () call in WinServerStarter::run ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit d79652c293b4922a2b53e430c9c2b74e773925bd Author: Mihai MoldovanDate: Wed Oct 26 19:13:15 2016 +0200 src/onmainwindow.cpp: pass new ssh_key_type_ member to startSshd () call in WinServerStarter::run (). --- debian/changelog |2 ++ src/onmainwindow.cpp |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ad38be2..8f72355 100644 --- a/debian/changelog +++ b/debian/changelog @@ -467,6 +467,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.{cpp,h}: add ssh_key_type_ member variable and getter and setter to WinServerStarter class. - src/onmainwindow.{cpp,h}: add SSH key type parameter to startSshd (). +- src/onmainwindow.cpp: pass new ssh_key_type_ member to startSshd () call + in WinServerStarter::run (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index afdaa67..3c09ee4 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -9993,7 +9993,7 @@ void WinServerStarter::run() switch ( mode ) { case SSH: -parent->startSshd(); +parent->startSshd(ssh_key_type_); break; case X: parent->startXOrg(); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 240/281: macbuild.sh: switch to bundling PA 9.0.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit ebcb7e66c3cc78b23bc592566fb92046d76b0c03 Author: Mihai MoldovanDate: Wed Oct 26 17:51:18 2016 +0200 macbuild.sh: switch to bundling PA 9.0. --- debian/changelog |1 + macbuild.sh |2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index fc94571..c4ed053 100644 --- a/debian/changelog +++ b/debian/changelog @@ -454,6 +454,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium name createKeyBundle (). Also add a key-type parameter and use it to select the required key type (and maybe generate it if necessary.) Also use the new functions to get a stringified version of the key type etc. +- macbuild.sh: switch to bundling PA 9.0. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/macbuild.sh b/macbuild.sh index 5e7b336..90f8afb 100755 --- a/macbuild.sh +++ b/macbuild.sh @@ -178,7 +178,7 @@ NXPROXY="nxproxy" PULSEAUDIO_BINARIES=( "pulseaudio" "esdcompat" "pacat" "pacmd" "pactl" "pamon" "paplay""parec" "parecord" "pasuspender" ) PULSEAUDIO_LIBRARIES=( "libpulse-simple.0.dylib" - "pulse-8.0" + "pulse-9.0" "pulseaudio" ) RESOURCE_FILES=( "audio/startup.wav" ) -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 239/281: src/onmainwindow.{cpp, h}: rename createRSAKey () to the more-appropriate name createKeyBundle ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 71efa332906864534bfce5cad5ee18674e898011 Author: Mihai MoldovanDate: Sat Sep 24 23:12:15 2016 +0200 src/onmainwindow.{cpp,h}: rename createRSAKey () to the more-appropriate name createKeyBundle (). Also add a key-type parameter and use it to select the required key type (and maybe generate it if necessary.) Also use the new functions to get a stringified version of the key type etc. --- debian/changelog |4 src/onmainwindow.cpp | 30 +++--- src/onmainwindow.h |2 +- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index f9cbf0d..fc94571 100644 --- a/debian/changelog +++ b/debian/changelog @@ -450,6 +450,10 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium multiple times. Check if the OpenSSH Server is already running and return true, otherwise try to start it. - src/onmainwindow.cpp: add some comments only to createRSAKey (). +- src/onmainwindow.{cpp,h}: rename createRSAKey () to the more-appropriate + name createKeyBundle (). Also add a key-type parameter and use it to + select the required key type (and maybe generate it if necessary.) Also + use the new functions to get a stringified version of the key type etc. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index cea1756..4f7f173 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -7961,7 +7961,7 @@ void ONMainWindow::exportDirs ( QString exports,bool removable ) dr.dirList=exports; -dr.key=createRSAKey(); +dr.key=createKeyBundle(); // Key creation failure or the like. if (dr.key.isEmpty ()) { @@ -10395,7 +10395,7 @@ QString ONMainWindow::generateKey (ONMainWindow::key_types key_type, bool host_k return (ret); } -QString ONMainWindow::createRSAKey () { +QString ONMainWindow::createKeyBundle (key_types key_type) { /* * I spent multiple hours on trying to understand this function * and directory exporting in general, so I'd better document @@ -10423,41 +10423,49 @@ QString ONMainWindow::createRSAKey () { * private SSH key. */ - QString user_key = generateKey (RSA_KEY_TYPE); + QString stringified_key_type (key_type_to_string (key_type)); + + QString user_key = generateKey (key_type); /* * Now taking the *host* pub key here... */ - QFile rsa (homeDir + "/.x2go/etc/ssh_host_rsa_key.pub"); + const QString host_pub_key_file_name ("ssh_host_" + stringified_key_type + "_key.pub"); + QFile rsa (homeDir + "/.x2go/etc/" + host_pub_key_file_name); #ifdef Q_OS_WIN - rsa.setFileName (wapiShortFileName (homeDir + "\\.x2go\\etc\\ssh_host_rsa_key.pub")); + rsa.setFileName (wapiShortFileName (homeDir + "\\.x2go\\etc\\" + host_pub_key_file_name)); #endif if (!(rsa.open (QIODevice::ReadOnly | QIODevice::Text))) { x2goDebug << "Unable to open public host key file."; #ifdef Q_OS_UNIX x2goDebug << "Creating a new one."; -QString tmp_file_name (generateKey (RSA_KEY_TYPE, true)); +QString tmp_file_name (generateKey (key_type, true)); generateEtcFiles (); -if (!(startSshd ())) { +rsa.setFileName (tmp_file_name + ".pub"); +if (!(rsa.open (QIODevice::ReadOnly | QIODevice::Text))) { + x2goErrorf (9) << tr ("Unable to open newly generated %1 public host key file.").arg (stringified_key_type.toUpper ()); return (QString::null); } - -rsa.setFileName (tmp_file_name + ".pub"); -rsa.open (QIODevice::ReadOnly | QIODevice::Text); #else printSshDError_noHostPubKey (); return (QString::null); #endif } + if (!(startSshd ())) { +x2goDebug << "Failed to start OpenSSH Server pro-actively."; +return (QString::null); + } + QByteArray rsa_pub; if (!(rsa.atEnd ())) { rsa_pub = rsa.readLine (); + } else { -x2goErrorf (9) << tr ("RSA file empty."); +x2goErrorf (9) << tr ("%1 public host key file empty.").arg (stringified_key_type.toUpper ()); return (QString::null); } diff --git a/src/onmainwindow.h b/src/onmainwindow.h index abfb019..f556f85 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -1220,7 +1220,7 @@ private: QString key_type_to_string (key_types key_type); std::size_t default_size_for_key_type (key_types key_type); QString generateKey (key_types key_type, bool host_key = false); -QString createRSAKey (); +QString createKeyBundle (key_types key_type = RSA_KEY_TYPE); plugin stuff #ifdef CFGPLUGIN -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing
[X2Go-Commits] [x2goclient] 237/281: src/onmainwindow.cpp: let startSshd () act as a wrapper and be called multiple times.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 6073c3cd53c3553f15ef1e481c96f3bf37ef771a Author: Mihai MoldovanDate: Sat Sep 24 23:04:46 2016 +0200 src/onmainwindow.cpp: let startSshd () act as a wrapper and be called multiple times. Check if the OpenSSH Server is already running and return true, otherwise try to start it. --- debian/changelog |3 +++ src/onmainwindow.cpp | 13 + 2 files changed, 16 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6f3701b..b5f3c2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -446,6 +446,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.{cpp,h}: reformat generateKey () only. - src/onmainwindow.{cpp,h}: move createRSAKey () around. - src/onmainwindow.{cpp,h}: reformat createRSAKey () only. +- src/onmainwindow.cpp: let startSshd () act as a wrapper and be called + multiple times. Check if the OpenSSH Server is already running and + return true, otherwise try to start it. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 2e39dc4..f8d97bc 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10478,6 +10478,19 @@ bool ONMainWindow::startSshd() { return false; } + +/* Don't start sshd, if it's already running. */ +#ifdef Q_OS_WIN +if (winSshdStarted) +#else /* defined (Q_OS_WIN) */ +if (sshd) +#endif /* defined (Q_OS_WIN) */ +{ +if (isServerRunning (clientSshPort.toInt ())) { +return (true); +} +} + clientSshPort = "7022"; QString etcDir=homeDir+"/.x2go/etc"; int port=clientSshPort.toInt(); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 236/281: src/onmainwindow.{cpp, h}: reformat createRSAKey () only.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 77dff6c2e31109001acb1ecf7bc816373dcc61c6 Author: Mihai MoldovanDate: Sat Sep 24 04:38:51 2016 +0200 src/onmainwindow.{cpp,h}: reformat createRSAKey () only. --- debian/changelog |1 + src/onmainwindow.cpp | 129 -- src/onmainwindow.h |2 +- 3 files changed, 64 insertions(+), 68 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4a4af7a..6f3701b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -445,6 +445,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.h: move generateKey () declaration around. - src/onmainwindow.{cpp,h}: reformat generateKey () only. - src/onmainwindow.{cpp,h}: move createRSAKey () around. +- src/onmainwindow.{cpp,h}: reformat createRSAKey () only. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 59b1393..2e39dc4 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10395,86 +10395,81 @@ QString ONMainWindow::generateKey (ONMainWindow::key_types key_type, bool host_k return (ret); } -QString ONMainWindow::createRSAKey() -{ -/* - * I spent multiple hours on trying to understand this function - * and directory exporting in general, so I'd better document - * this. - * - * This function first generates a new RSA private-public key - * pair as ~/.x2go/ssh/gen/key.X{,.pub}. - * - * Then, the SSH daemon's public host key is read and appended - * to the *private* SSH key file after a marker looking like - * this: "BEGIN RSA IDENTITY" - * - * Later on, this *private* SSH key file is transferred to the - * remote server, which parses it in the "x2gomountdirs" perl - * script and extracts the public key (used for logging in - * to the client machine) and the public *host* key, used to - * circumvent the "untrusted host" message by SSH by - * explicitly giving the aforementioned public *host* key as - * the only element in a fake "authorized_keys" file. Again, - * this is all happening server-side. - * - * The *public* key part generated here is then taken and - * later added to the "authorized_keys" file on the client - * side, to allow auto-logins via the generated and transferred - * private SSH key. - */ +QString ONMainWindow::createRSAKey () { + /* + * I spent multiple hours on trying to understand this function + * and directory exporting in general, so I'd better document + * this. + * + * This function first generates a new RSA private-public key + * pair as ~/.x2go/ssh/gen/key.X{,.pub}. + * + * Then, the SSH daemon's public host key is read and appended + * to the *private* SSH key file after a marker looking like + * this: "BEGIN RSA IDENTITY" + * + * Later on, this *private* SSH key file is transferred to the + * remote server, which parses it in the "x2gomountdirs" perl + * script and extracts the public key (used for logging in + * to the client machine) and the public *host* key, used to + * circumvent the "untrusted host" message by SSH by + * explicitly giving the aforementioned public *host* key as + * the only element in a fake "authorized_keys" file. Again, + * this is all happening server-side. + * + * The *public* key part generated here is then taken and + * later added to the "authorized_keys" file on the client + * side, to allow auto-logins via the generated and transferred + * private SSH key. + */ -QString user_key = generateKey (RSA_KEY_TYPE); + QString user_key = generateKey (RSA_KEY_TYPE); -/* - * Now taking the *host* pub key here... - */ -QFile rsa (homeDir + "/.x2go/etc/ssh_host_rsa_key.pub"); + /* + * Now taking the *host* pub key here... + */ + QFile rsa (homeDir + "/.x2go/etc/ssh_host_rsa_key.pub"); #ifdef Q_OS_WIN -rsa.setFileName (wapiShortFileName (homeDir + "\\.x2go\\etc\\ssh_host_rsa_key.pub")); + rsa.setFileName (wapiShortFileName (homeDir + "\\.x2go\\etc\\ssh_host_rsa_key.pub")); #endif -if (!(rsa.open (QIODevice::ReadOnly | QIODevice::Text))) { -x2goDebug << "Unable to open public host key file."; + if (!(rsa.open (QIODevice::ReadOnly | QIODevice::Text))) { +x2goDebug << "Unable to open public host key file."; #ifdef Q_OS_UNIX -x2goDebug << "Creating a new one."; -QString tmp_file_name (generateKey (RSA_KEY_TYPE, true)); -generateEtcFiles (); +x2goDebug << "Creating a new one."; +QString tmp_file_name (generateKey (RSA_KEY_TYPE, true)); +generateEtcFiles (); -if (!(startSshd ())) { -return (QString::null); -} +if (!(startSshd ())) { + return
[X2Go-Commits] [x2goclient] 238/281: src/onmainwindow.cpp: add some comments only to createRSAKey ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 23b9e77d0c5a3b984644a19ded46995b0a80fbc6 Author: Mihai MoldovanDate: Sat Sep 24 23:09:18 2016 +0200 src/onmainwindow.cpp: add some comments only to createRSAKey (). --- debian/changelog |1 + src/onmainwindow.cpp |8 2 files changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index b5f3c2b..f9cbf0d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -449,6 +449,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: let startSshd () act as a wrapper and be called multiple times. Check if the OpenSSH Server is already running and return true, otherwise try to start it. +- src/onmainwindow.cpp: add some comments only to createRSAKey (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index f8d97bc..cea1756 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10466,7 +10466,15 @@ QString ONMainWindow::createRSAKey () { x2goErrorf (10) << tr ("Cannot open key: ") << user_key; return (user_key); } + + /* Append public host key into private user key file. */ QTextStream out (); + + /* + * The string here should be changed, but this requires + * changes to X2Go Server as well. + * As such, I'll be not changing it here for now. + */ out << "BEGIN RSA IDENTITY" << rsa_pub; file.close (); return (user_key); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 235/281: src/onmainwindow.{cpp, h}: move createRSAKey () around.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 5c2cd927a70d1b77fbd3c79bc5d46a44756fc89f Author: Mihai MoldovanDate: Sat Sep 24 04:33:15 2016 +0200 src/onmainwindow.{cpp,h}: move createRSAKey () around. --- debian/changelog |1 + src/onmainwindow.cpp | 164 +- src/onmainwindow.h |2 +- 3 files changed, 84 insertions(+), 83 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6b29016..4a4af7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -444,6 +444,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: use the new functions in generateKey (). - src/onmainwindow.h: move generateKey () declaration around. - src/onmainwindow.{cpp,h}: reformat generateKey () only. +- src/onmainwindow.{cpp,h}: move createRSAKey () around. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 61f910c..59b1393 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -8126,88 +8126,6 @@ void ONMainWindow::exportDefaultDirs() exportDirs ( dirs.join ( ":" ) ); } -QString ONMainWindow::createRSAKey() -{ -/* - * I spent multiple hours on trying to understand this function - * and directory exporting in general, so I'd better document - * this. - * - * This function first generates a new RSA private-public key - * pair as ~/.x2go/ssh/gen/key.X{,.pub}. - * - * Then, the SSH daemon's public host key is read and appended - * to the *private* SSH key file after a marker looking like - * this: "BEGIN RSA IDENTITY" - * - * Later on, this *private* SSH key file is transferred to the - * remote server, which parses it in the "x2gomountdirs" perl - * script and extracts the public key (used for logging in - * to the client machine) and the public *host* key, used to - * circumvent the "untrusted host" message by SSH by - * explicitly giving the aforementioned public *host* key as - * the only element in a fake "authorized_keys" file. Again, - * this is all happening server-side. - * - * The *public* key part generated here is then taken and - * later added to the "authorized_keys" file on the client - * side, to allow auto-logins via the generated and transferred - * private SSH key. - */ - -QString user_key = generateKey (RSA_KEY_TYPE); - -/* - * Now taking the *host* pub key here... - */ -QFile rsa (homeDir + "/.x2go/etc/ssh_host_rsa_key.pub"); -#ifdef Q_OS_WIN -rsa.setFileName (wapiShortFileName (homeDir + "\\.x2go\\etc\\ssh_host_rsa_key.pub")); -#endif - -if (!(rsa.open (QIODevice::ReadOnly | QIODevice::Text))) { -x2goDebug << "Unable to open public host key file."; -#ifdef Q_OS_UNIX -x2goDebug << "Creating a new one."; -QString tmp_file_name (generateKey (RSA_KEY_TYPE, true)); -generateEtcFiles (); - -if (!(startSshd ())) { -return (QString::null); -} - -rsa.setFileName (tmp_file_name + ".pub"); -rsa.open (QIODevice::ReadOnly | QIODevice::Text); -#else -printSshDError_noHostPubKey (); -return QString::null; -#endif -} - -QByteArray rsa_pub; - -if ( !rsa.atEnd() ) -rsa_pub = rsa.readLine(); -else -{ -x2goErrorf(9)< getSourceFile(pid); @@ -10477,6 +10395,88 @@ QString ONMainWindow::generateKey (ONMainWindow::key_types key_type, bool host_k return (ret); } +QString ONMainWindow::createRSAKey() +{ +/* + * I spent multiple hours on trying to understand this function + * and directory exporting in general, so I'd better document + * this. + * + * This function first generates a new RSA private-public key + * pair as ~/.x2go/ssh/gen/key.X{,.pub}. + * + * Then, the SSH daemon's public host key is read and appended + * to the *private* SSH key file after a marker looking like + * this: "BEGIN RSA IDENTITY" + * + * Later on, this *private* SSH key file is transferred to the + * remote server, which parses it in the "x2gomountdirs" perl + * script and extracts the public key (used for logging in + * to the client machine) and the
[X2Go-Commits] [x2goclient] 229/281: src/onmainwindow.{cpp, h}: add new function check_key_type ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 0d2493401bd03dea8c2ee977b6fc184524542c51 Author: Mihai MoldovanDate: Sat Sep 24 04:07:38 2016 +0200 src/onmainwindow.{cpp,h}: add new function check_key_type (). Takes a key type and checks for validity/if it's known. --- debian/changelog |2 ++ src/onmainwindow.cpp | 27 +++ src/onmainwindow.h |2 ++ 3 files changed, 31 insertions(+) diff --git a/debian/changelog b/debian/changelog index ea60df6..711e16f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -433,6 +433,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium string in generateKey (). - src/onmainwindow.cpp: terminate sshd more correctly. First via terminate (), then wait up to 5 seconds, then via kill (). +- src/onmainwindow.{cpp,h}: add new function check_key_type (). Takes a + key type and checks for validity/if it's known. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 48b7cca..3dda051 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10281,6 +10281,33 @@ void ONMainWindow::generateEtcFiles() x2goDebug
[X2Go-Commits] [x2goclient] 234/281: src/onmainwindow.{cpp, h}: reformat generateKey () only.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 84a99581c45912f812ea5b5b1fe9d4d6c55eab2e Author: Mihai MoldovanDate: Sat Sep 24 04:26:47 2016 +0200 src/onmainwindow.{cpp,h}: reformat generateKey () only. --- debian/changelog |1 + src/onmainwindow.cpp | 184 +- src/onmainwindow.h |2 +- 3 files changed, 93 insertions(+), 94 deletions(-) diff --git a/debian/changelog b/debian/changelog index e8fd1de..6b29016 100644 --- a/debian/changelog +++ b/debian/changelog @@ -443,6 +443,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium checking for validity. - src/onmainwindow.cpp: use the new functions in generateKey (). - src/onmainwindow.h: move generateKey () declaration around. +- src/onmainwindow.{cpp,h}: reformat generateKey () only. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 0e9077b..61f910c 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10357,126 +10357,124 @@ std::size_t ONMainWindow::default_size_for_key_type (ONMainWindow::key_types key return (ret); } -QString ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_key) -{ -QString stringified_key_type (key_type_to_string (key_type)); -std::size_t key_bits = default_size_for_key_type (key_type); +QString ONMainWindow::generateKey (ONMainWindow::key_types key_type, bool host_key) { + QString stringified_key_type (key_type_to_string (key_type)); + std::size_t key_bits = default_size_for_key_type (key_type); -QString ret (""); + QString ret (""); -QString base_dir (homeDir); -QString private_key_file (""); + QString base_dir (homeDir); + QString private_key_file (""); -if (host_key) { -base_dir += "/.x2go/etc/"; -} -else { -base_dir += "/.x2go/ssh/gen/"; -} + if (host_key) { +base_dir += "/.x2go/etc/"; + } + else { +base_dir += "/.x2go/ssh/gen/"; + } -{ -QDir dir (homeDir); -if (!(dir.mkpath (base_dir))) { -QMessageBox::critical (this, tr ("SSH key base directory creation error"), - tr ("Unable to create SSH key base directory '%1'.").arg (base_dir) - + "\n" - + tr ("Terminating application.")); -close (); -} + { +QDir dir (homeDir); +if (!(dir.mkpath (base_dir))) { + QMessageBox::critical (this, tr ("SSH key base directory creation error"), + tr ("Unable to create SSH key base directory '%1'.").arg (base_dir) + + "\n" + + tr ("Terminating application.")); + close (); } + } #ifdef Q_OS_WIN -private_key_file = cygwinPath (wapiShortFileName (base_dir)); + private_key_file = cygwinPath (wapiShortFileName (base_dir)); #else -private_key_file = base_dir; + private_key_file = base_dir; #endif -ret = base_dir; + ret = base_dir; -{ -QString tmp_to_add (""); + { +QString tmp_to_add (""); -if (host_key) { -tmp_to_add = "/ssh_host_" + stringified_key_type + "_key"; -} -else { -QTemporaryFile temp_file (base_dir + "/key"); -temp_file.open (); +if (host_key) { + tmp_to_add = "/ssh_host_" + stringified_key_type + "_key"; +} +else { + QTemporaryFile temp_file (base_dir + "/key"); + temp_file.open (); -/* Extract base name. */ -QFileInfo tmp_file_info (temp_file.fileName ()); -tmp_to_add = tmp_file_info.fileName (); + /* Extract base name. */ + QFileInfo tmp_file_info (temp_file.fileName ()); + tmp_to_add = tmp_file_info.fileName (); -/* Clean up again. We don't need the temporary file anymore. */ -temp_file.setAutoRemove (false); -temp_file.close (); -temp_file.remove (); -} - -private_key_file += tmp_to_add; -ret += tmp_to_add; + /* Clean up again. We don't need the temporary file anymore. */ + temp_file.setAutoRemove (false); + temp_file.close (); + temp_file.remove (); } -QString public_key_file (private_key_file + ".pub"); +private_key_file += tmp_to_add; +ret += tmp_to_add; + } -if ((!(QFile::exists (private_key_file))) || (!(QFile::exists (public_key_file -{ -x2goDebug << "Generating SSH key. Type: " << stringified_key_type.toUpper () - << "; Location: " << private_key_file; + QString public_key_file (private_key_file + ".pub"); -QStringList args; + if ((!(QFile::exists (private_key_file))) || (!(QFile::exists (public_key_file { +x2goDebug <<
[X2Go-Commits] [x2goclient] 231/281: src/onmainwindow.{cpp, h}: add new function default_size_for_key_type ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 4f26db0343a491d73fa689a1127802733d3ace58 Author: Mihai MoldovanDate: Sat Sep 24 04:17:05 2016 +0200 src/onmainwindow.{cpp,h}: add new function default_size_for_key_type (). Returns the default key size in bits for the selected key type, after checking for validity. --- debian/changelog |3 +++ src/onmainwindow.cpp | 25 + src/onmainwindow.h |1 + 3 files changed, 29 insertions(+) diff --git a/debian/changelog b/debian/changelog index 352e184..cd6e81a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -438,6 +438,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.{cpp,h}: add new function key_type_to_string (). Returns a stringified version of the selected key type, after checking for validity. +- src/onmainwindow.{cpp,h}: add new function default_size_for_key_type (). + Returns the default key size in bits for the selected key type, after + checking for validity. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index daff8fb..419de3f 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10332,6 +10332,31 @@ QString ONMainWindow::key_type_to_string (ONMainWindow::key_types key_type) { return (ret); } +std::size_t ONMainWindow::default_size_for_key_type (ONMainWindow::key_types key_type) { + ONMainWindow::key_types sanitized_key_type = check_key_type (key_type); + std::size_t ret = 0; + + switch (sanitized_key_type) { +case RSA_KEY_TYPE: + ret = 4096; + break; +case DSA_KEY_TYPE: + ret = 1024; + break; +case ECDSA_KEY_TYPE: + ret = 384; + break; +case ED25519_KEY_TYPE: + /* Fixed key length, flag will be unused. */ + ret = 0; + break; +default: + ret = 0; + } + + return (ret); +} + QString ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_key) { ONMainWindow::key_types sanitized_key_type = UNKNOWN_KEY_TYPE; diff --git a/src/onmainwindow.h b/src/onmainwindow.h index 0d3fb49..bf4ed80 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -1220,6 +1220,7 @@ private: key_types check_key_type (key_types key_type); QString key_type_to_string (key_types key_type); +std::size_t default_size_for_key_type (key_types key_type); plugin stuff #ifdef CFGPLUGIN -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 232/281: src/onmainwindow.cpp: use the new functions in generateKey ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 86fee87a4fb433244e479177d47b3e76c48dd247 Author: Mihai MoldovanDate: Sat Sep 24 04:19:42 2016 +0200 src/onmainwindow.cpp: use the new functions in generateKey (). --- debian/changelog |1 + src/onmainwindow.cpp | 41 +++-- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/debian/changelog b/debian/changelog index cd6e81a..c28a8db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -441,6 +441,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.{cpp,h}: add new function default_size_for_key_type (). Returns the default key size in bits for the selected key type, after checking for validity. +- src/onmainwindow.cpp: use the new functions in generateKey (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 419de3f..0e9077b 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10359,45 +10359,10 @@ std::size_t ONMainWindow::default_size_for_key_type (ONMainWindow::key_types key QString ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_key) { -ONMainWindow::key_types sanitized_key_type = UNKNOWN_KEY_TYPE; -QString stringified_key_type (""); -std::size_t key_bits = 0; +QString stringified_key_type (key_type_to_string (key_type)); +std::size_t key_bits = default_size_for_key_type (key_type); + QString ret (""); -switch (key_type) { -case RSA_KEY_TYPE: - sanitized_key_type = key_type; - stringified_key_type = "rsa"; - key_bits = 4096; - break; -case DSA_KEY_TYPE: - sanitized_key_type = key_type; - stringified_key_type = "dsa"; - key_bits = 1024; - break; -case ECDSA_KEY_TYPE: - sanitized_key_type = key_type; - stringified_key_type = "ecdsa"; - key_bits = 384; - break; -case ED25519_KEY_TYPE: - sanitized_key_type = key_type; - stringified_key_type = "ed25519"; - /* Fixed key length, flag will be unused. */ - key_bits = 0; - break; -default: - sanitized_key_type = UNKNOWN_KEY_TYPE; - stringified_key_type = "unknown"; - key_bits = 0; -} - -if (sanitized_key_type == UNKNOWN_KEY_TYPE) { -QMessageBox::critical (this, tr ("SSH key type selection error"), - tr ("Unknown SSH key selected.") - + "\n" - + tr ("Terminating application.")); -close (); -} QString base_dir (homeDir); QString private_key_file (""); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 227/281: src/onmainwindow.cpp: uppercase key type in debug output and comment string in generateKey ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 62058c2d2cb26c33d24d0f7ed555c2dc7a03c967 Author: Mihai MoldovanDate: Fri Sep 23 08:01:38 2016 +0200 src/onmainwindow.cpp: uppercase key type in debug output and comment string in generateKey (). --- debian/changelog |2 ++ src/onmainwindow.cpp |5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a9e0f8a..7f6d73e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -429,6 +429,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: when starting sshd on Unix-based plattforms, raise maximum startup time to 5 seconds and break out early, if the process went into running state earlier. +- src/onmainwindow.cpp: uppercase key type in debug output and comment + string in generateKey (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index fa67971..d865342 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10357,11 +10357,12 @@ QString ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_ke if ((!(QFile::exists (private_key_file))) || (!(QFile::exists (public_key_file { -x2goDebug << "Generating SSH key. Type: " << stringified_key_type; +x2goDebug << "Generating SSH key. Type: " << stringified_key_type.toUpper () + << "; Location: " << private_key_file; QStringList args; -QString comment = "X2Go Client " + stringified_key_type + " "; +QString comment = "X2Go Client " + stringified_key_type.toUpper () + " "; if (host_key) { comment += "host"; -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 223/281: src/onmainwindow.cpp: add more error handling to generateKey () and fix up a broken error-handling section.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 0ada6b7a185fe6c331b426d286452bbdc7d035fe Author: Mihai MoldovanDate: Fri Sep 23 03:12:43 2016 +0200 src/onmainwindow.cpp: add more error handling to generateKey () and fix up a broken error-handling section. --- debian/changelog |2 ++ src/onmainwindow.cpp | 30 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d02abed..1c16930 100644 --- a/debian/changelog +++ b/debian/changelog @@ -419,6 +419,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium value.) Change all locations referencing generateKey () to use the return value (if necessary) and remove dead code that was used to generate a user key manually previously. +- src/onmainwindow.cpp: add more error handling to generateKey () and fix + up a broken error-handling section. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 378a7f2..8c542b1 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10382,6 +10382,7 @@ QString ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_ke tr ("Unable to create SSH key base directory '%1'.").arg (base_dir) + "\n" + tr ("Terminating application.")); +close (); } } @@ -10445,7 +10446,34 @@ QString ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_ke << comment << "-f" << private_key_file; -QProcess::execute ("ssh-keygen", args); + +const int keygen_ret = QProcess::execute ("ssh-keygen", args); + +if (-2 == keygen_ret) { +QMessageBox::critical (this, tr ("ssh-keygen launching error"), + tr ("Unable to start the ssh-keygen binary.") + + "\n" + + tr ("Terminating application.")); +close (); +} + +if (-1 == keygen_ret) { +QMessageBox::critical (this, tr ("ssh-keygen crashed"), + tr ("The ssh-keygen binary crashed.") + + "\n" + + tr ("Terminating application.")); +close (); +} + +if (0 != keygen_ret) { +QMessageBox::critical (this, tr ("ssh-keygen program error"), + tr ("The ssh-keygen binary did not exit cleanly.") + + " " + + tr ("It was probably called with unknown arguments.") + + "\n" + + tr ("Terminating application.")); +close (); +} } return (ret); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 226/281: src/onmainwindow.cpp: when starting sshd on Unix-based plattforms, raise maximum startup time to 5 seconds and break out early, if the process went into running st
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit cc19d5c45af8ec951747ebb6e2279282fe796da0 Author: Mihai MoldovanDate: Fri Sep 23 08:00:19 2016 +0200 src/onmainwindow.cpp: when starting sshd on Unix-based plattforms, raise maximum startup time to 5 seconds and break out early, if the process went into running state earlier. --- debian/changelog |3 +++ src/onmainwindow.cpp |8 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c7ec333..a9e0f8a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -426,6 +426,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium and code related to non-user-mode-sshd setups. Simplifies code a bit and we want to always start a user-mode OpenSSH server anyway. Also get rid of the clientport variable that is now unnecessary. +- src/onmainwindow.cpp: when starting sshd on Unix-based plattforms, raise + maximum startup time to 5 seconds and break out early, if the process + went into running state earlier. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index eff2467..fa67971 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10513,9 +10513,13 @@ bool ONMainWindow::startSshd() sshd->start (binary, arguments); #endif /* defined (Q_OS_WIN) */ -// Allow sshd a grace time of 3 seconds to come up. -QTime sleepTime = QTime::currentTime ().addSecs (3); +// Allow sshd a grace time of 5 seconds to come up. +QTime sleepTime = QTime::currentTime ().addSecs (5); while (QTime::currentTime () < sleepTime) { +if (QProcess::Running == sshd->state ()) { +break; +} + QCoreApplication::processEvents (QEventLoop::AllEvents, 100); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 225/281: src/{onmainwindow.{cpp, h}, configdialog.cpp}: remove userSshd variable and code related to non-user-mode-sshd setups.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit a2f3bfb8f6204f275cda920199a89d916bf78219 Author: Mihai MoldovanDate: Fri Sep 23 04:47:22 2016 +0200 src/{onmainwindow.{cpp,h},configdialog.cpp}: remove userSshd variable and code related to non-user-mode-sshd setups. Simplifies code a bit and we want to always start a user-mode OpenSSH server anyway. Also get rid of the clientport variable that is now unnecessary. --- debian/changelog |4 + src/configdialog.cpp | 20 - src/onmainwindow.cpp | 234 ++ src/onmainwindow.h |1 - 4 files changed, 48 insertions(+), 211 deletions(-) diff --git a/debian/changelog b/debian/changelog index a1c64ed..c7ec333 100644 --- a/debian/changelog +++ b/debian/changelog @@ -422,6 +422,10 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: add more error handling to generateKey () and fix up a broken error-handling section. - src/onmainwindow.cpp: fix up a few debug strings. +- src/{onmainwindow.{cpp,h},configdialog.cpp}: remove userSshd variable + and code related to non-user-mode-sshd setups. Simplifies code a bit and + we want to always start a user-mode OpenSSH server anyway. Also get rid + of the clientport variable that is now unnecessary. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/configdialog.cpp b/src/configdialog.cpp index d1973d0..9e771d5 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -248,22 +248,6 @@ ConfigDialog::ConfigDialog ( QWidget * parent, Qt::WindowFlags f ) #endif //Q_OS_DARWIN -#ifndef Q_OS_WIN -clientSshPort=new QSpinBox ( fr ); -clientSshPort->setMaximum ( 100 ); -clientSshPort->setValue ( st.setting()->value ( "clientport", - ( QVariant ) 22 ).toInt() ); - -QHBoxLayout* sshLay=new QHBoxLayout(); -sshLay->addWidget ( -new QLabel ( tr ( - "Clientside (local) SSH daemon port for file system export usage:" - ),fr ) ); -sshLay->addWidget ( clientSshPort ); -sshLay->addStretch(); -frLay->addLayout ( sshLay ); -#endif - if ( embedMode ) { cbStartEmbed=new QCheckBox ( @@ -411,10 +395,6 @@ void ConfigDialog::slot_accepted() st.setting()->setValue ( "xdarwin/directory", ( QVariant ) leXexec->text() ); #endif -#ifndef Q_OS_WIN -st.setting()->setValue ( "clientport", - ( QVariant ) clientSshPort->value() ); -#endif pwid->saveSettings(); if ( embedMode ) diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 87bbb64..eff2467 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -151,7 +151,6 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) X2goSettings st ( "settings" ); winSshdStarted=false; #else -userSshd=false; sshd=0l; #endif @@ -1516,7 +1515,7 @@ void ONMainWindow::closeClient() #endif /* defined (Q_OS_DARWIN) || defined (Q_OS_WIN) */ #ifndef Q_OS_WIN -if ( userSshd && sshd ) +if (sshd) { x2goDebug<<"Terminating the OpenSSH server ..."; sshd->terminate(); @@ -1645,11 +1644,6 @@ void ONMainWindow::loadSettings() ldapPort2=st1.setting()->value ( "LDAP/port2", ( QVariant ) 0 ).toInt(); } -#ifndef Q_OS_WIN -if ( !userSshd ) -clientSshPort=st1.setting()->value ( "clientport", - ( QVariant ) 22 ).toString(); -#endif showToolBar=st1.setting()->value ( "toolbar/show", ( QVariant ) true ).toBool(); @@ -8144,52 +8138,26 @@ QString ONMainWindow::createRSAKey() /* * Now taking the *host* pub key here... */ -QFile rsa ( "/etc/ssh/ssh_host_rsa_key.pub" ); +QFile rsa (homeDir + "/.x2go/etc/ssh_host_rsa_key.pub"); #ifdef Q_OS_WIN -rsa.setFileName ( -wapiShortFileName ( -homeDir+"\\.x2go\\etc\\ssh_host_rsa_key.pub" ) ); -#else -if ( userSshd ) -rsa.setFileName ( homeDir+"/.x2go/etc/ssh_host_dsa_key.pub" ); - +rsa.setFileName (wapiShortFileName (homeDir + "\\.x2go\\etc\\ssh_host_rsa_key.pub")); #endif -#ifdef Q_OS_DARWIN -{ -/* OS X 10.11+ changed the key location to /etc/ssh/. */ -QFileInfo rsa_host_key ("/etc/ssh/ssh_host_rsa_key.pub"); - -x2goDebug << "first try for RSA key " << rsa_host_key.absoluteFilePath () << ": " - << rsa_host_key.exists (); -if (!(rsa_host_key.exists ())) { -rsa_host_key = QFileInfo ("/etc/ssh_host_rsa_key.pub"); - -x2goDebug << "second try for RSA key " << rsa_host_key.absoluteFilePath () << ": " -
[X2Go-Commits] [x2goclient] 222/281: src/onmainwindow.{cpp, h}: rewrite generateKey () function to actually also generate user keys.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit fdbfe8a7e1fc5f7e4d0ab069c435521a50b17ced Author: Mihai MoldovanDate: Fri Sep 23 02:49:03 2016 +0200 src/onmainwindow.{cpp,h}: rewrite generateKey () function to actually also generate user keys. Now returns the private key file path (public key file path is trivially determined by appending ".pub" to that return value.) Change all locations referencing generateKey () to use the return value (if necessary) and remove dead code that was used to generate a user key manually previously. --- debian/changelog |6 +++ src/onmainwindow.cpp | 130 +++--- src/onmainwindow.h |2 +- 3 files changed, 87 insertions(+), 51 deletions(-) diff --git a/debian/changelog b/debian/changelog index c17a56a..d02abed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -413,6 +413,12 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium key. Change old invocations of generateHostKey () accordingly. - src/onmainwindow.cpp: refactor generateKey () a little bit to compact it. +- src/onmainwindow.{cpp,h}: rewrite generateKey () function to actually + also generate user keys. Now returns the private key file path (public + key file path is trivially determined by appending ".pub" to that return + value.) Change all locations referencing generateKey () to use the + return value (if necessary) and remove dead code that was used to + generate a user key manually previously. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 388be6f..378a7f2 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -8139,35 +8139,7 @@ QString ONMainWindow::createRSAKey() * private SSH key. */ -QDir dr; -QString keyPath=homeDir +"/.x2go/ssh/gen"; -dr.mkpath ( keyPath ); -#ifdef Q_OS_WIN -keyPath=wapiShortFileName ( keyPath ); -#endif -QTemporaryFile fl ( keyPath+"/key" ); -fl.open(); -QString keyName=fl.fileName(); -fl.setAutoRemove ( false ); -fl.close(); -fl.remove(); - -QStringList args; - -/* - * Generating new key material here. - */ -args<<"-t"<<"rsa"<<"-b"<<"1024"<<"-N"<<""<<"-f"< start(); } @@ -10351,11 +10323,12 @@ void ONMainWindow::generateEtcFiles() x2goDebug
[X2Go-Commits] [x2goclient] 221/281: src/onmainwindow.cpp: refactor generateKey () a little bit to compact it.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 7ac26e82716fb26fd21d2a16e087712bdeb3d5a9 Author: Mihai MoldovanDate: Thu Sep 22 05:32:59 2016 +0200 src/onmainwindow.cpp: refactor generateKey () a little bit to compact it. --- debian/changelog |2 ++ src/onmainwindow.cpp | 19 ++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6f2fb15..c17a56a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -411,6 +411,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.{cpp,h}: rename generateHostKey () to generateKey () and add a boolean parameter with a default of false to request a public key. Change old invocations of generateHostKey () accordingly. +- src/onmainwindow.cpp: refactor generateKey () a little bit to compact + it. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index c1fe992..388be6f 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10390,21 +10390,22 @@ void ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_key) close (); } -QString etcDir = homeDir + "/.x2go/etc/"; -QDir dr (homeDir); -dr.mkpath (etcDir); -QString private_key_file = etcDir + "/ssh_host_" + stringified_key_type + "_key"; +QString etc_dir = homeDir + "/.x2go/etc/"; +QDir dir (homeDir); +dir.mkpath (etc_dir); +QString private_key_file = ""; +#ifdef Q_OS_WIN +private_key_file = cygwinPath (wapiShortFileName (etc_dir)); +#else +private_key_file = etc_dir; +#endif +private_key_file += "/ssh_host_" + stringified_key_type + "_key"; QString public_key_file = private_key_file + ".pub"; if ((!(QFile::exists (private_key_file))) || (!(QFile::exists (public_key_file { x2goDebug << "Generating host key. Type: " << stringified_key_type; -#ifdef Q_OS_WIN -private_key_file = cygwinPath (wapiShortFileName (etcDir)) - + "/ssh_host_" + stringified_key_type + "_key"; -#endif - QStringList args; args << "-t" << stringified_key_type -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 219/281: src/onmainwindow.cpp: add support for explicitly setting the private key bit size based on type and use values (currently) regarded as secure to generateHostKey ()
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 33b91f3eddbcc63493f52863470cf910aeed11be Author: Mihai MoldovanDate: Thu Sep 22 04:08:45 2016 +0200 src/onmainwindow.cpp: add support for explicitly setting the private key bit size based on type and use values (currently) regarded as secure to generateHostKey (). --- debian/changelog |3 +++ src/onmainwindow.cpp |9 + 2 files changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index d7c8581..792a3fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -405,6 +405,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/{unixhelper.cpp,x2goclient.cpp}: fix errno usage - save before use. - src/onmainwindow.cpp: document createRSAKey () because what it does is completely non-obvious. +- src/onmainwindow.cpp: add support for explicitly setting the private key + bit size based on type and use values (currently) regarded as secure to + generateHostKey (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 59db174..fa1dc4f 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10355,26 +10355,33 @@ void ONMainWindow::generateHostKey(ONMainWindow::key_types key_type) { ONMainWindow::key_types sanitized_key_type = UNKNOWN_KEY_TYPE; QString stringified_key_type = ""; +std::size_t key_bits = 0; switch (key_type) { case RSA_KEY_TYPE: sanitized_key_type = key_type; stringified_key_type = "rsa"; + key_bits = 4096; break; case DSA_KEY_TYPE: sanitized_key_type = key_type; stringified_key_type = "dsa"; + key_bits = 1024; break; case ECDSA_KEY_TYPE: sanitized_key_type = key_type; stringified_key_type = "ecdsa"; + key_bits = 384; break; case ED25519_KEY_TYPE: sanitized_key_type = key_type; stringified_key_type = "ed25519"; + /* Fixed key length, flag will be unused. */ + key_bits = 0; break; default: sanitized_key_type = UNKNOWN_KEY_TYPE; stringified_key_type = "unknown"; + key_bits = 0; } if (sanitized_key_type == UNKNOWN_KEY_TYPE) { @@ -10401,6 +10408,8 @@ void ONMainWindow::generateHostKey(ONMainWindow::key_types key_type) QStringList args; args << "-t" << stringified_key_type + << "-b" + << QString::number (key_bits) << "-N" << "" << "-C" -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 218/281: src/onmainwindow.cpp: document createRSAKey () because what it does is completely non-obvious.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 376a01347d07e2f6973a27d18bd5dbea3a6092b6 Author: Mihai MoldovanDate: Thu Sep 22 04:05:53 2016 +0200 src/onmainwindow.cpp: document createRSAKey () because what it does is completely non-obvious. --- debian/changelog |2 ++ src/onmainwindow.cpp | 33 + 2 files changed, 35 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3b5a34b..d7c8581 100644 --- a/debian/changelog +++ b/debian/changelog @@ -403,6 +403,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: remove unused variables. - src/unixhelper.cpp: code cleanup. - src/{unixhelper.cpp,x2goclient.cpp}: fix errno usage - save before use. +- src/onmainwindow.cpp: document createRSAKey () because what it does is + completely non-obvious. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 9eb6986..59db174 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -8112,6 +8112,33 @@ void ONMainWindow::exportDefaultDirs() QString ONMainWindow::createRSAKey() { +/* + * I spent multiple hours on trying to understand this function + * and directory exporting in general, so I'd better document + * this. + * + * This function first generates a new RSA private-public key + * pair as ~/.x2go/ssh/gen/key.X{,.pub}. + * + * Then, the SSH daemon's public host key is read and appended + * to the *private* SSH key file after a marker looking like + * this: "BEGIN RSA IDENTITY" + * + * Later on, this *private* SSH key file is transferred to the + * remote server, which parses it in the "x2gomountdirs" perl + * script and extracts the public key (used for logging in + * to the client machine) and the public *host* key, used to + * circumvent the "untrusted host" message by SSH by + * explicitly giving the aforementioned public *host* key as + * the only element in a fake "authorized_keys" file. Again, + * this is all happening server-side. + * + * The *public* key part generated here is then taken and + * later added to the "authorized_keys" file on the client + * side, to allow auto-logins via the generated and transferred + * private SSH key. + */ + QDir dr; QString keyPath=homeDir +"/.x2go/ssh/gen"; dr.mkpath ( keyPath ); @@ -8127,6 +8154,9 @@ QString ONMainWindow::createRSAKey() QStringList args; +/* + * Generating new key material here. + */ args<<"-t"<<"rsa"<<"-b"<<"1024"<<"-N"<<""<<"-f"<
[X2Go-Commits] [x2goclient] 215/281: src/pulsemanager.cpp: remove unused variables.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 64d9a0669ebb9bc2dc1c123c97fa2e41f3ab5247 Author: Mihai MoldovanDate: Sat Aug 13 23:27:42 2016 +0200 src/pulsemanager.cpp: remove unused variables. --- debian/changelog |1 + src/pulsemanager.cpp |2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ce03b6e..262f297 100644 --- a/debian/changelog +++ b/debian/changelog @@ -400,6 +400,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium around real_kill_pgroup (). Adjust comment. We need to do this so the cleanup process doesn't kill itself before all other processes in the process group are killed. +- src/pulsemanager.cpp: remove unused variables. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 01677dd..93c83b3 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -468,8 +468,6 @@ void PulseManager::fetch_pulseaudio_version () { } } -bool numbers_done[3] = { false, false, false }; - if (numbers_skip[0]) { x2goErrorf (30) << "Supposed to skip major version number. Something is wrong."; show_RichText_ErrorMsgBox (tr ("Error fetching PulseAudio version number!"), -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 212/281: src/unixhelper.h: style and general fixes within comments.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 83cb2637d58c4e0a943a571054ac16ed7a20dca8 Author: Mihai MoldovanDate: Fri Aug 12 09:06:32 2016 +0200 src/unixhelper.h: style and general fixes within comments. --- debian/changelog |1 + src/unixhelper.h |5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c6de400..e149113 100644 --- a/debian/changelog +++ b/debian/changelog @@ -393,6 +393,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium startup issue on Windows. - src/pulsemanager.cpp: fix PA version fetching on OS X again. - src/unixhelper.{cpp,h}: make argument of kill_pgroup () const. +- src/unixhelper.h: style and general fixes within comments. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/unixhelper.h b/src/unixhelper.h index 3c2798f..d67f3ed 100644 --- a/src/unixhelper.h +++ b/src/unixhelper.h @@ -29,7 +29,7 @@ namespace unixhelper { /* * Unblocks all signals and installs a signal handler for SIGHUP, - * which calls kill_pgroup(). + * which calls kill_pgroup (). * * Should signal unblocking or installing the signal handler fail, * an emergency exit is performed and @@ -42,7 +42,7 @@ namespace unixhelper { * * In this loop, the current parent PID is polled and compared against * the original value passed via parameter parent. - * Should they mismatch, the parent died and kill_pgroup() is called. + * Should they mismatch, the parent died and kill_pgroup () is called. */ int unix_cleanup (const pid_t parent); @@ -60,6 +60,7 @@ namespace unixhelper { * group leader dies under specific circumstances * (we cannot rely that this always happens, though, * so a polling solution is needed, see unix_cleanup().) + * Other values are not handled. */ void kill_pgroup (const int signal); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 217/281: src/{unixhelper.cpp, x2goclient.cpp}: fix errno usage - save before use.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 0acbdcb6bc00c4c7197a7b1147539c7ce6123259 Author: Mihai MoldovanDate: Sat Aug 13 23:42:53 2016 +0200 src/{unixhelper.cpp,x2goclient.cpp}: fix errno usage - save before use. --- debian/changelog |1 + src/unixhelper.cpp | 18 -- src/x2goclient.cpp |9 ++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2908c2b..3b5a34b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -402,6 +402,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium process group are killed. - src/pulsemanager.cpp: remove unused variables. - src/unixhelper.cpp: code cleanup. +- src/{unixhelper.cpp,x2goclient.cpp}: fix errno usage - save before use. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/unixhelper.cpp b/src/unixhelper.cpp index d6b4993..406cdda 100644 --- a/src/unixhelper.cpp +++ b/src/unixhelper.cpp @@ -79,7 +79,8 @@ namespace unixhelper { void real_kill_pgroup (const pid_t pgid) { /* Try to kill via SIGTERM first. */ if (0 != killpg (pgid, SIGTERM)) { - std::cerr << "WARNING: unable to send SIGTERM to process group '" << pgid << "': " << std::strerror (errno) << std::endl; + const int saved_errno = errno; + std::cerr << "WARNING: unable to send SIGTERM to process group '" << pgid << "': " << std::strerror (saved_errno) << std::endl; } /* Grant a grace period of (at least) 10 seconds. */ @@ -95,7 +96,8 @@ namespace unixhelper { * Let's handle errors and exit, if necessary. */ if (0 != kill_ret) { - std::cerr << "WARNING: failed to kill process group '" << pgid << "': " << std::strerror (err_str) << std::endl; + const int saved_errno = errno; + std::cerr << "WARNING: failed to kill process group '" << pgid << "': " << std::strerror (saved_errno) << std::endl; } std::exit (EXIT_SUCCESS); @@ -108,14 +110,16 @@ namespace unixhelper { */ sigset_t empty_set; if (0 != sigemptyset (_set)) { - std::cerr << "Unable to fetch empty signal set: " << std::strerror (errno) << std::endl; + const int saved_errno = errno; + std::cerr << "Unable to fetch empty signal set: " << std::strerror (saved_errno) << std::endl; kill_pgroup (-1); /* Anything here shall be unreachable. */ } if (0 != sigprocmask (SIG_SETMASK, _set, NULL)) { - std::cerr << "Unable to set empty signal set: " << std::strerror (errno) << std::endl; + const int saved_errno = errno; + std::cerr << "Unable to set empty signal set: " << std::strerror (saved_errno) << std::endl; kill_pgroup (-1); /* Anything here shall be unreachable. */ @@ -137,7 +141,8 @@ namespace unixhelper { /* Set up signal handler to ignore the current signal. */ if (0 != sigaction (*it, _action, NULL)) { -std::cerr << "Unable to ignore signal " << strsignal (*it) << ": " << std::strerror (errno) << std::endl; +const int saved_errno = errno; +std::cerr << "Unable to ignore signal " << strsignal (*it) << ": " << std::strerror (saved_errno) << std::endl; kill_pgroup (-1); /* Anything here shall be unreachable. */ @@ -151,7 +156,8 @@ namespace unixhelper { sig_action.sa_flags = SA_RESTART; if (0 != sigaction (SIGHUP, _action, NULL)) { -std::cerr << "Unable to set up signal handler for SIGHUP: " << std::strerror (errno) << std::endl; +const int saved_errno = errno; +std::cerr << "Unable to set up signal handler for SIGHUP: " << std::strerror (saved_errno) << std::endl; kill_pgroup (-1); /* Anything here shall be unreachable. */ diff --git a/src/x2goclient.cpp b/src/x2goclient.cpp index b201a4e..431a01e 100644 --- a/src/x2goclient.cpp +++ b/src/x2goclient.cpp @@ -58,13 +58,15 @@ int fork_helper (int argc, char **argv) { new_argv_c_str->push_back (0); if (0 != execv (new_argv_c_str->front (), &(new_argv_c_str->front ( { - std::cerr << "Failed to re-execute process as UNIX cleanup helper tool: " << std::strerror (errno) << "\n" + const int saved_errno = errno; + std::cerr << "Failed to re-execute process as UNIX cleanup helper tool: " << std::strerror (saved_errno) << "\n" << "Terminating and killing parent." << "\n" << "Please report a bug, refer to this documentation: http://wiki.x2go.org/doku.php/wiki:bugs; << std::endl; pid_t parent_pid = getppid (); if (0 != kill (parent_pid, SIGTERM)) { -std::cerr << "Failed to kill parent process: " << std::strerror (errno) << std::endl; +const int saved_errno = errno; +std::cerr << "Failed to kill parent process: " << std::strerror (saved_errno) <<
[X2Go-Commits] [x2goclient] 216/281: src/unixhelper.cpp: code cleanup.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 009384daf9ba0d30e2081fba8d619c5142ce6012 Author: Mihai MoldovanDate: Sat Aug 13 23:33:15 2016 +0200 src/unixhelper.cpp: code cleanup. --- debian/changelog |1 + src/unixhelper.cpp | 14 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 262f297..2908c2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -401,6 +401,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium cleanup process doesn't kill itself before all other processes in the process group are killed. - src/pulsemanager.cpp: remove unused variables. +- src/unixhelper.cpp: code cleanup. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/unixhelper.cpp b/src/unixhelper.cpp index 82e4374..d6b4993 100644 --- a/src/unixhelper.cpp +++ b/src/unixhelper.cpp @@ -31,7 +31,6 @@ #include #include #include -#include /* For documentation please see unixhelper.h. */ @@ -60,8 +59,8 @@ namespace unixhelper { } /* Error. */ else if (-1 == tmp_pid) { -perror ("WARNING: unable to fork off another process to kill original process group"); -std::cerr << "Proceeding with normal operation, but process might kill itself before tree vanishes." << std::endl; +std::perror ("WARNING: unable to fork off another process to kill original process group"); +std::cerr << "Proceeding with normal operation, but process might kill itself before tree vanishes." << std::endl; real_kill_pgroup (pgid_to_kill); } @@ -72,7 +71,7 @@ namespace unixhelper { * spawn a bunch of new processes due to subsequent calls * to kill_pgroup () from unix_cleanup (). */ -exit (EXIT_SUCCESS); +std::exit (EXIT_SUCCESS); } } } @@ -96,13 +95,10 @@ namespace unixhelper { * Let's handle errors and exit, if necessary. */ if (0 != kill_ret) { - char err_str[512] = { }; - snprintf (err_str, 512, "WARNING: failed to kill process group '%d'", pgid); - - perror (err_str); + std::cerr << "WARNING: failed to kill process group '" << pgid << "': " << std::strerror (err_str) << std::endl; } -exit (EXIT_SUCCESS); +std::exit (EXIT_SUCCESS); } int unix_cleanup (const pid_t parent) { -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 213/281: src/unixhelper.{cpp, h}: split off core functionality of kill_pgroup () into a new function called real_kill_pgroup ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 48b054fdc538e6e5878de8c3c2135d2b98cb7274 Author: Mihai MoldovanDate: Fri Aug 12 09:00:41 2016 +0200 src/unixhelper.{cpp,h}: split off core functionality of kill_pgroup () into a new function called real_kill_pgroup (). --- debian/changelog |2 ++ src/unixhelper.cpp | 37 +++-- src/unixhelper.h | 12 3 files changed, 41 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index e149113..daebd35 100644 --- a/debian/changelog +++ b/debian/changelog @@ -394,6 +394,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: fix PA version fetching on OS X again. - src/unixhelper.{cpp,h}: make argument of kill_pgroup () const. - src/unixhelper.h: style and general fixes within comments. +- src/unixhelper.{cpp,h}: split off core functionality of kill_pgroup () + into a new function called real_kill_pgroup (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/unixhelper.cpp b/src/unixhelper.cpp index 4488786..4d9c56f 100644 --- a/src/unixhelper.cpp +++ b/src/unixhelper.cpp @@ -30,25 +30,42 @@ #include #include #include +#include +#include /* For documentation please see unixhelper.h. */ namespace unixhelper { void kill_pgroup (const int signal) { -if (SIGHUP == signal) { - /* Try to kill via SIGTERM first. */ - if (0 != killpg (getpgrp (), SIGTERM)) { -std::cerr << "WARNING: unable to send SIGTERM to process group: " << std::strerror (errno) << std::endl; - } + } + + void real_kill_pgroup (const pid_t pgid) { +/* Try to kill via SIGTERM first. */ +if (0 != killpg (pgid, SIGTERM)) { + std::cerr << "WARNING: unable to send SIGTERM to process group '" << pgid << "': " << std::strerror (errno) << std::endl; +} + +/* Grant a grace period of (at least) 10 seconds. */ +sleep (10); - /* Grant a grace period of (at least) 10 seconds. */ - sleep (10); +int kill_ret = killpg (pgid, SIGKILL); - /* Don't handle any errors here, because we die anyway. */ - killpg (getpgrp (), SIGKILL); +/* + * Might be unreachable. + * Depending upon which pgroup we just killed, this + * code is either unreachable (because killpg () killed + * itself already), or being executed. + * Let's handle errors and exit, if necessary. + */ +if (0 != kill_ret) { + char err_str[512] = { }; + snprintf (err_str, 512, "WARNING: failed to kill process group '%d'", pgid); + + perror (err_str); } - } +exit (EXIT_SUCCESS); + } int unix_cleanup (const pid_t parent) { /* diff --git a/src/unixhelper.h b/src/unixhelper.h index d67f3ed..662b3be 100644 --- a/src/unixhelper.h +++ b/src/unixhelper.h @@ -63,6 +63,18 @@ namespace unixhelper { * Other values are not handled. */ void kill_pgroup (const int signal); + + /* + * Kills the whole process group. + * First, SIGTERM is sent to the group. + * A 10 seconds grace period is granted to make sure + * processes exit cleanly on their own. + * Lastly, SIGKILL is sent to the group -- which also + * implies the demise of this program. + * + * pgid is the process group ID to be killed. + */ + void real_kill_pgroup (const pid_t pgid); } #endif /* defined (Q_OS_UNIX) */ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 214/281: src/unixhelper.{cpp, h}: rewrite kill_pgroup () to act as a wrapper around real_kill_pgroup ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit ef305a4111b81f21738471739804764b0b2d7306 Author: Mihai MoldovanDate: Fri Aug 12 09:11:16 2016 +0200 src/unixhelper.{cpp,h}: rewrite kill_pgroup () to act as a wrapper around real_kill_pgroup (). Adjust comment. We need to do this so the cleanup process doesn't kill itself before all other processes in the process group are killed. --- debian/changelog |4 src/unixhelper.cpp | 38 ++ src/unixhelper.h | 12 ++-- 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index daebd35..ce03b6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -396,6 +396,10 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/unixhelper.h: style and general fixes within comments. - src/unixhelper.{cpp,h}: split off core functionality of kill_pgroup () into a new function called real_kill_pgroup (). +- src/unixhelper.{cpp,h}: rewrite kill_pgroup () to act as a wrapper + around real_kill_pgroup (). Adjust comment. We need to do this so the + cleanup process doesn't kill itself before all other processes in the + process group are killed. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/unixhelper.cpp b/src/unixhelper.cpp index 4d9c56f..82e4374 100644 --- a/src/unixhelper.cpp +++ b/src/unixhelper.cpp @@ -37,6 +37,44 @@ namespace unixhelper { void kill_pgroup (const int signal) { +pid_t pgid_to_kill = getpgrp (); + +if ((SIGHUP == signal) || (-1 == signal)) { + /* + * In order to not kill ourselves, we need to run this + * code in a new process group. + */ + pid_t tmp_pid = fork (); + + /* Child. */ + if (0 == tmp_pid) { +/* Create new pgid. */ +int err = setpgid (0, 0); + +if (0 != err) { + std::perror ("WARNING: unable to change PGID"); + std::cerr << "Continuing with normal operation, but process might kill itself before tree vanishes." << std::endl; +} + +real_kill_pgroup (pgid_to_kill); + } + /* Error. */ + else if (-1 == tmp_pid) { +perror ("WARNING: unable to fork off another process to kill original process group"); +std::cerr << "Proceeding with normal operation, but process might kill itself before tree vanishes." << std::endl; + +real_kill_pgroup (pgid_to_kill); + } + /* Parent. */ + else { +/* + * No need to do anything, just exit here in order to not + * spawn a bunch of new processes due to subsequent calls + * to kill_pgroup () from unix_cleanup (). + */ +exit (EXIT_SUCCESS); + } +} } void real_kill_pgroup (const pid_t pgid) { diff --git a/src/unixhelper.h b/src/unixhelper.h index 662b3be..7d30bcf 100644 --- a/src/unixhelper.h +++ b/src/unixhelper.h @@ -47,12 +47,12 @@ namespace unixhelper { int unix_cleanup (const pid_t parent); /* - * Kills the whole process group. - * First, SIGTERM is sent to the group. - * A 10 seconds grace period is granted to make sure - * processes exit cleanly on their own. - * Lastly, SIGKILL is sent to the group -- which also - * implies the demise of this program. + * Wrapper for killing a whole process group. + * The "real" killing work is done by real_kill_pgroup (). + * This function tries to fork off another process and change + * the new function's process group ID. + * If any of these operations fail, killing the original process + * group ID will still continue, albeit with warning messages. * * signal may be any of: * * -1 to indicate an error leading to emergency termination -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 211/281: src/unixhelper.{cpp, h}: make argument of kill_pgroup () const.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit bec2e92e583035b5c8fb57cf11e80a4cab2807ea Author: Mihai MoldovanDate: Fri Aug 12 09:04:42 2016 +0200 src/unixhelper.{cpp,h}: make argument of kill_pgroup () const. --- debian/changelog |1 + src/unixhelper.cpp |2 +- src/unixhelper.h |2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c0cadf8..c6de400 100644 --- a/debian/changelog +++ b/debian/changelog @@ -392,6 +392,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium instead of the "generic" slash UNIX-style separator.) Should fix a PA startup issue on Windows. - src/pulsemanager.cpp: fix PA version fetching on OS X again. +- src/unixhelper.{cpp,h}: make argument of kill_pgroup () const. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/unixhelper.cpp b/src/unixhelper.cpp index d5aa67d..4488786 100644 --- a/src/unixhelper.cpp +++ b/src/unixhelper.cpp @@ -34,7 +34,7 @@ /* For documentation please see unixhelper.h. */ namespace unixhelper { - void kill_pgroup (int signal) { + void kill_pgroup (const int signal) { if (SIGHUP == signal) { /* Try to kill via SIGTERM first. */ if (0 != killpg (getpgrp (), SIGTERM)) { diff --git a/src/unixhelper.h b/src/unixhelper.h index a34456e..3c2798f 100644 --- a/src/unixhelper.h +++ b/src/unixhelper.h @@ -61,7 +61,7 @@ namespace unixhelper { * (we cannot rely that this always happens, though, * so a polling solution is needed, see unix_cleanup().) */ - void kill_pgroup (int signal); + void kill_pgroup (const int signal); } #endif /* defined (Q_OS_UNIX) */ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 208/281: src/pulsemanager.cpp: make PA version parsing function more generic and don't expect that a number is always terminated with a period or dash.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 371010e665239548182fd23b6d0cfcaedeb8139b Author: Mihai MoldovanDate: Mon Jul 11 05:22:09 2016 +0200 src/pulsemanager.cpp: make PA version parsing function more generic and don't expect that a number is always terminated with a period or dash. Especially on Windows, with a PA version number of "6.0", this lead to errors. OS X was fine with its "8.0.0-something" version number, but the optional part at the end or even the micro version number could be missing any time. --- debian/changelog |6 ++ src/pulsemanager.cpp | 165 ++ 2 files changed, 105 insertions(+), 66 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5da4078..6650e85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -381,6 +381,12 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium initializing in_addr-type variable, the C-style universal zero initializer won't cut it here. - src/pulsemanager.h: include accidentally omitted wapi.h header file. +- src/pulsemanager.cpp: make PA version parsing function more generic and + don't expect that a number is always terminated with a period or dash. + Especially on Windows, with a PA version number of "6.0", this lead to + errors. OS X was fine with its "8.0.0-something" version number, but the + optional part at the end or even the micro version number could be + missing any time. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 1fff171..1da7ea4 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -383,28 +383,32 @@ void PulseManager::fetch_pulseaudio_version () { tmp_str = tmp_str.mid (needle.size ()); /* We should be at a digit now. */ -bool numbers_found[3] = { false, false, false }; -QString tmp_ret_str = QString (""); +bool numbers_started[3] = { false, false, false }; +bool numbers_finished[3] = { false, false, false }; +bool numbers_skip[3] = { false, false, false }; +QString tmp_remaining_str = QString (""); +QString numbers[3] = { }; for (QString::const_iterator cit = tmp_str.begin (); cit != tmp_str.end (); ++cit) { - if (!(numbers_found[0])) { + if (!(numbers_finished[0])) { if (((*cit) >= '0') && ((*cit) <= '9')) { - tmp_ret_str.append (*cit); + numbers[0].append (*cit); + numbers_started[0] = true; } else if ((*cit) == '.') { - /* First number part complete, let's convert the string and skip the period. */ - numbers_found[0] = true; - bool convert_success = false; - pulse_version_major_ = tmp_ret_str.toUInt (_success, 10); - - if (!convert_success) { -x2goErrorf (20) << "Unable to convert major version number string to integer."; -show_RichText_ErrorMsgBox (tr ("Error fetching PulseAudio version number!"), - tr ("Unable to convert major version number string to integer."), - true); -abort (); - } - - tmp_ret_str = QString (""); + /* First number part complete and more to come, mark as done. */ + numbers_finished[0] = true; +} +else if ((*cit) == '-') { + /* First number part complete and no more numbers, mark as done, and... */ + numbers_finished[0] = true; + + /* + * Skip all the other numbers (i.e., assume the default value.) + * This doesn't make a huge lot of sense for the first number, + * but let's make this robust... + */ + numbers_skip[1] = true; + numbers_skip[2] = true; } else { x2goErrorf (21) << "Unexpected character found when parsing version string for major version number: '" << QString (*cit) << "'."; @@ -415,36 +419,21 @@ void PulseManager::fetch_pulseaudio_version () { abort (); } } - else if (!(numbers_found[1])) { + else if (!(numbers_finished[1])) { if (((*cit) >= '0') && ((*cit) <= '9')) { - tmp_ret_str.append (*cit); + numbers[1].append (*cit); + numbers_started[1] = true; } -else if (((*cit) == '.') || ((*cit) == '-')) { - /* - * Second number part complete, let's convert the string and then check whether - * we stopped at a period or a dash character. - */ -
[X2Go-Commits] [x2goclient] 205/281: src/onmainwindow.cpp: fix compile error on Windows after moving some code around.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 3635837390d28d8434a27943d9edc3a375b3b6eb Author: Mihai MoldovanDate: Mon Jul 4 23:03:57 2016 +0200 src/onmainwindow.cpp: fix compile error on Windows after moving some code around. --- debian/changelog |2 ++ src/onmainwindow.cpp |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7511f03..a7c6b04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -375,6 +375,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium initialization in Windows-only code. - src/onmainwindow.cpp: add another pair of braces to in_addr-type variable initialization on Windows to silence compiler warning. +- src/onmainwindow.cpp: fix compile error on Windows after moving some + code around. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 3079ac8..2867f23 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10301,7 +10301,7 @@ void ONMainWindow::generateEtcFiles() "AuthorizedKeysFile \"" << authKeyPath << "\"\n" << #ifdef Q_OS_WIN "Subsystem shell "<< wapiShortFileName ( appDir) +"/sh"+"\n"<< - "Subsystem sftp "<< wapiShortFileName ( appDir) +"/sftp-server"+"\n"<< + "Subsystem sftp "<< wapiShortFileName ( appDir) +"/sftp-server"+"\n"; #else "Subsystem sftp " /* This may need some sanitization, i.e., appDir could potentially include whitespace. */ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 203/281: src/onmainwindow.cpp: drop obsolete pulseVersionIsLegacy variable initialization in Windows-only code.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit afe920ca3c1a4ca9ca6f548fc1a1602ee7a0165b Author: Mihai MoldovanDate: Mon Jul 4 05:35:11 2016 +0200 src/onmainwindow.cpp: drop obsolete pulseVersionIsLegacy variable initialization in Windows-only code. --- debian/changelog |2 ++ src/onmainwindow.cpp |1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c5875d2..f4f93e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -371,6 +371,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium now.) - src/onmainwindow.cpp: drop obsolete pulseVersionTest variable initialization in Windows-only code. +- src/onmainwindow.cpp: drop obsolete pulseVersionIsLegacy variable + initialization in Windows-only code. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 30522b1..73d1141 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -435,7 +435,6 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) #ifdef Q_OS_WIN winServersReady=false; saveCygnusSettings(); -pulseVersionIsLegacy=false; #endif initPassDlg(); initSelectSessDlg(); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 206/281: src/onmainwindow.cpp: use correct C++ universal initializer for initializing in_addr-type variable, the C-style universal zero initializer won't cut it here.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit f73d3070a60deac4dfa95ab10f492e85d8fd1eb5 Author: Mihai MoldovanDate: Mon Jul 4 23:16:59 2016 +0200 src/onmainwindow.cpp: use correct C++ universal initializer for initializing in_addr-type variable, the C-style universal zero initializer won't cut it here. --- debian/changelog |3 +++ src/onmainwindow.cpp |2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a7c6b04..26780f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -377,6 +377,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium variable initialization on Windows to silence compiler warning. - src/onmainwindow.cpp: fix compile error on Windows after moving some code around. +- src/onmainwindow.cpp: use correct C++ universal initializer for + initializing in_addr-type variable, the C-style universal zero + initializer won't cut it here. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 2867f23..9eb6986 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -9862,7 +9862,7 @@ bool ONMainWindow::isServerRunning ( int port ) int iResult; WSADATA wsaData; -struct in_addr addr = {{ 0 }}; +struct in_addr addr = {{ }}; iResult = WSAStartup(MAKEWORD(2, 2), ); if (iResult != 0) -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 201/281: src/onmainwindow.cpp: short out code parts unconditionally checking for the userSshd variable.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 8ad80877afc8659755fe4c1e5a306f07fb68a2b8 Author: Mihai MoldovanDate: Mon Jul 4 05:24:49 2016 +0200 src/onmainwindow.cpp: short out code parts unconditionally checking for the userSshd variable. We don't need it on Windows (and don't define it on purpose) because using an user-mode SSH daemon is implied there (for now.) --- debian/changelog |4 src/onmainwindow.cpp | 19 --- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2496023..be850d5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -365,6 +365,10 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium Windows for some reason. - src/pulsemanager.h: use windows_stdint.h header on Windows, cstdint otherwise. +- src/onmainwindow.cpp: short out code parts unconditionally checking for + the userSshd variable. We don't need it on Windows (and don't define it + on purpose) because using an user-mode SSH daemon is implied there (for + now.) [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index bcef2bc..186f90d 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -8320,8 +8320,13 @@ void ONMainWindow::slotRetExportDir ( bool result,QString output, /* * Do the user SSHD/global SSHD dance here and either use the * private .x2go/.ssh or the global .ssh dir. + * + * Note: Windows is implicitly always using an user-mode SSH server. */ -if (userSshd) { +#ifndef Q_OS_WIN +if (userSshd) +#endif /* !defined (Q_OS_WIN) */ +{ authorized_keys_dir = QDir (authorized_keys_dir.absolutePath () + "/.x2go/"); } @@ -9598,15 +9603,23 @@ void ONMainWindow::startX2goMount() /* * Do the user SSHD/global SSHD dance here and either use the * private .x2go/.ssh or the global .ssh dir. + * + * Note: Windows is implicitly always using an user-mode SSH server. */ -if (userSshd) { +#ifndef Q_OS_WIN +if (userSshd) +#endif /* !defined (Q_OS_WIN) */ +{ authorized_keys_dir = QDir (authorized_keys_dir.absolutePath () + "/.x2go/"); } authorized_keys_dir = QDir (authorized_keys_dir.absolutePath () + "/.ssh/"); QFile authorized_keys_file (authorized_keys_dir.absolutePath () + "/authorized_keys"); -if (userSshd) { +#ifndef Q_OS_WIN +if (userSshd) +#endif /* !defined (Q_OS_WIN) */ +{ x2goDebug << "Creating dir " << authorized_keys_dir.absolutePath (); authorized_keys_dir.mkpath (authorized_keys_dir.absolutePath ()); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 204/281: src/onmainwindow.cpp: add another pair of braces to in_addr-type variable initialization on Windows to silence compiler warning.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 79e4720bbb78ae7cd9890d7fb465944993217b99 Author: Mihai MoldovanDate: Mon Jul 4 05:40:33 2016 +0200 src/onmainwindow.cpp: add another pair of braces to in_addr-type variable initialization on Windows to silence compiler warning. --- debian/changelog |2 ++ src/onmainwindow.cpp |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f4f93e6..7511f03 100644 --- a/debian/changelog +++ b/debian/changelog @@ -373,6 +373,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium initialization in Windows-only code. - src/onmainwindow.cpp: drop obsolete pulseVersionIsLegacy variable initialization in Windows-only code. +- src/onmainwindow.cpp: add another pair of braces to in_addr-type + variable initialization on Windows to silence compiler warning. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 73d1141..3079ac8 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -9862,7 +9862,7 @@ bool ONMainWindow::isServerRunning ( int port ) int iResult; WSADATA wsaData; -struct in_addr addr = { 0 }; +struct in_addr addr = {{ 0 }}; iResult = WSAStartup(MAKEWORD(2, 2), ); if (iResult != 0) -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 202/281: src/onmainwindow.cpp: drop obsolete pulseVersionTest variable initialization in Windows-only code.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit b26d82b579fe9e1281eeddae66fb83d3785fd51e Author: Mihai MoldovanDate: Mon Jul 4 05:34:34 2016 +0200 src/onmainwindow.cpp: drop obsolete pulseVersionTest variable initialization in Windows-only code. --- debian/changelog |2 ++ src/onmainwindow.cpp |1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index be850d5..c5875d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -369,6 +369,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium the userSshd variable. We don't need it on Windows (and don't define it on purpose) because using an user-mode SSH daemon is implied there (for now.) +- src/onmainwindow.cpp: drop obsolete pulseVersionTest variable + initialization in Windows-only code. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 186f90d..30522b1 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -170,7 +170,6 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) homeDir=QDir::homePath(); #ifdef Q_OS_WIN -pulseVersionTest=0l; xorg=0l; xDisplay=0; #endif -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 197/281: src/x2goutils.cpp: add some debug logging to find_binary ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit cfad22602d788785669d33cd485926dc5f68e6f3 Author: Mihai MoldovanDate: Wed Jun 22 04:53:13 2016 +0200 src/x2goutils.cpp: add some debug logging to find_binary (). --- debian/changelog |1 + src/x2goutils.cpp |4 2 files changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index e23fe58..c8cea1e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -358,6 +358,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: remove extraneous newlines from debug output. - src/x2goutils.cpp: fix faulty logic in find_binary (): only reset the given path to CWD iff it's actually empty. Not the other way around. +- src/x2goutils.cpp: add some debug logging to find_binary (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp index 74b2918..f218355 100644 --- a/src/x2goutils.cpp +++ b/src/x2goutils.cpp @@ -326,6 +326,10 @@ QString find_binary (const QString , const QString _name) { ret = tmp_file_info.canonicalFilePath (); break; } + else { +x2goDebug << "Binary at " << cur_path << " either does not exist (" << !(tmp_file_info.exists ()) + << ") or is not executable (" << tmp_file_info.isExecutable () << ")"; + } } } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 191/281: src/pulsemanager.cpp: fix compile error on Windows.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit a941232dca9c03bd7e91af5b5b791726e6b28535 Author: Mihai MoldovanDate: Wed Jun 22 04:04:10 2016 +0200 src/pulsemanager.cpp: fix compile error on Windows. --- debian/changelog |1 + src/pulsemanager.cpp |4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4f0085f..0b7aec0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -350,6 +350,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: add error message boxes throughout PulseManager. Don't just abort () the program. - src/x2goutils.h: fix compile error due to typo. +- src/pulsemanager.cpp: fix compile error on Windows. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 1cb7a7e..1de1cc7 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -704,8 +704,8 @@ void PulseManager::slot_play_startup_sound () { play_file_binary += "/../exe/paplay"; play_file_file += "/../Resources/startup.wav"; #elif defined (Q_OS_WIN) -playFileBinary += "/pulse/paplay.exe"; -playFileFile += "/startup.wav"; +play_file_binary += "/pulse/paplay.exe"; +play_file_file += "/startup.wav"; #else /* FIXME: implement Linux section. */ #endif // defined (Q_OS_DARWIN) -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 193/281: src/pulsemanager.cpp: fix startup sound playback when using the system-PA version.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit c7985391b3a47b39b1a449aa6979fa0434f7d3db Author: Mihai MoldovanDate: Wed Jun 22 04:15:03 2016 +0200 src/pulsemanager.cpp: fix startup sound playback when using the system-PA version. --- debian/changelog |2 ++ src/pulsemanager.cpp | 14 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0e667ed..ad6f4da 100644 --- a/debian/changelog +++ b/debian/changelog @@ -352,6 +352,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/x2goutils.h: fix compile error due to typo. - src/pulsemanager.cpp: fix compile error on Windows. - src/pulsemanager.cpp: fix startup when using the system-PA version. +- src/pulsemanager.cpp: fix startup sound playback when using the + system-PA version. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 9582027..e837a97 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -702,14 +702,20 @@ void PulseManager::create_client_dir () { void PulseManager::slot_play_startup_sound () { if (debug_) { QProcess play_file (0); -QString play_file_binary (app_dir_); -QString play_file_file (play_file_binary); + +/* + * Assume paplay is located at the same place as + * the pulseaudio binary. + */ +QString play_file_binary (server_working_dir_); + +QString play_file_file (app_dir_); #ifdef Q_OS_DARWIN -play_file_binary += "/../exe/paplay"; +play_file_binary += "/paplay"; play_file_file += "/../Resources/startup.wav"; #elif defined (Q_OS_WIN) -play_file_binary += "/pulse/paplay.exe"; +play_file_binary += "/paplay.exe"; play_file_file += "/startup.wav"; #else /* FIXME: implement Linux section. */ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 190/281: debian/changelog: fix typo in function name.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit d6b4cc2572ae8d101ff30ad613d0dabce90edf24 Author: Mihai MoldovanDate: Wed Jun 22 03:59:51 2016 +0200 debian/changelog: fix typo in function name. --- debian/changelog |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3ebc83d..4f0085f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -339,7 +339,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium default prefix as well on OS X. - src/pulsemanager.cpp: add comments to Qt 4 code part. - src/pulsemanager.cpp: add reminder for Linux-implementation in - play_startup_sound (). + slot_play_startup_sound (). - src/x2goutils.cpp: fix compile error. - src/pulsemanager.h: add new system_pulse_ variable to indicate that a system PA binary shall be used. -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 187/281: src/x2goutils.{cpp, h}: add application modality parameter to show_RichText_Generic_MsgBox () and its wrappers.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 29cdb876ee38370ebe02f6270cd3eea26a69e47d Author: Mihai MoldovanDate: Wed Jun 22 02:45:45 2016 +0200 src/x2goutils.{cpp,h}: add application modality parameter to show_RichText_Generic_MsgBox () and its wrappers. --- debian/changelog |2 ++ src/x2goutils.cpp | 19 +-- src/x2goutils.h |6 +++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 79e1c0c..0eb1711 100644 --- a/debian/changelog +++ b/debian/changelog @@ -345,6 +345,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium a system PA binary shall be used. - src/pulsemanager.cpp: correctly initialize and set system_pulse_ when required. +- src/x2goutils.{cpp,h}: add application modality parameter to + show_RichText_Generic_MsgBox () and its wrappers. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp index 1861443..f58a436 100644 --- a/src/x2goutils.cpp +++ b/src/x2goutils.cpp @@ -99,7 +99,7 @@ QString convert_to_rich_text (const QString , bool force) { return (fixup_text); } -void show_RichText_Generic_MsgBox (QMessageBox::Icon icon, const QString _text, const QString _text) { +void show_RichText_Generic_MsgBox (QMessageBox::Icon icon, const QString _text, const QString _text, bool app_modal) { QString fixup_main_text (convert_to_rich_text (main_text)); QString fixup_informative_text (convert_to_rich_text (informative_text, true)); @@ -107,16 +107,23 @@ void show_RichText_Generic_MsgBox (QMessageBox::Icon icon, const QString _t msg_box.setTextFormat (Qt::RichText); msg_box.setInformativeText (fixup_informative_text); - msg_box.setWindowModality (Qt::WindowModal); + + if (app_modal) { +msg_box.setWindowModality (Qt::ApplicationModal); + } + else { +msg_box.setWindowModality (Qt::WindowModal); + } + msg_box.exec (); } -void show_RichText_WarningMsgBox (const QString _text, const QString _text) { - show_RichText_Generic_MsgBox (QMessageBox::Warning, main_text, informative_text); +void show_RichText_WarningMsgBox (const QString _text, const QString _text bool app_modal) { + show_RichText_Generic_MsgBox (QMessageBox::Warning, main_text, informative_text, app_modal); } -void show_RichText_ErrorMsgBox (const QString _text, const QString _text) { - show_RichText_Generic_MsgBox (QMessageBox::Critical, main_text, informative_text); +void show_RichText_ErrorMsgBox (const QString _text, const QString _text, bool app_modal) { + show_RichText_Generic_MsgBox (QMessageBox::Critical, main_text, informative_text, app_modal); } QString git_changelog_extract_commit_sha (const QString ) { diff --git a/src/x2goutils.h b/src/x2goutils.h index 4159d39..dd7613c 100644 --- a/src/x2goutils.h +++ b/src/x2goutils.h @@ -33,9 +33,9 @@ QString wrap_legacy_resource_URIs (const QString _path); QString convert_to_rich_text (const QString , bool force = false); -void show_RichText_Generic_MsgBox (QMessageBox::Icon icon, const QString _text, const QString _text); -void show_RichText_WarningMsgBox (const QString _text, const QString _text = ""); -void show_RichText_ErrorMsgBox (const QString _text, const QString _text = ""); +void show_RichText_Generic_MsgBox (QMessageBox::Icon icon, const QString _text, const QString _text, bool app_modal = false); +void show_RichText_WarningMsgBox (const QString _text, const QString _text = "", bool app_modal = false); +void show_RichText_ErrorMsgBox (const QString _text, const QString _text = "", bool app_modal = false); QString git_changelog_extract_commit_sha (const QString ); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 188/281: src/pulsemanager.cpp: add error message boxes throughout PulseManager.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 30f4aa645f16b412a42944fc79f043b5aec87b36 Author: Mihai MoldovanDate: Wed Jun 22 03:14:20 2016 +0200 src/pulsemanager.cpp: add error message boxes throughout PulseManager. Don't just abort () the program. --- debian/changelog |2 ++ src/pulsemanager.cpp | 57 +- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0eb1711..318cd1a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -347,6 +347,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium required. - src/x2goutils.{cpp,h}: add application modality parameter to show_RichText_Generic_MsgBox () and its wrappers. +- src/pulsemanager.cpp: add error message boxes throughout PulseManager. + Don't just abort () the program. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 9ec2da8..1cb7a7e 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -21,14 +21,13 @@ #include #include -#if QT_VERSION < 0x05 -#include "x2goutils.h" -#else /* QT_VERSION < 0x05 */ +#if QT_VERSION >= 0x05 #include -#endif /* QT_VERSION < 0x05 */ +#endif /* QT_VERSION >= 0x05 */ #include "pulsemanager.h" #include "x2gologdebug.h" +#include "x2goutils.h" PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), pulse_X2Go_ ("/.x2go/pulse"), @@ -83,6 +82,13 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), if (server_binary_.isEmpty ()) { x2goErrorf (29) << "Unable to find PulseAudio binary. Neither bundled, nor found in $PATH nor additional directories."; + show_RichText_ErrorMsgBox (tr ("Unable to find PulseAudio binary. Neither bundled, nor found in $PATH nor additional directories."), + tr ("If you downloaded the bundled, pre-compiled version from the official home page, " + "please report a bug on:\n" + "https://wiki.x2go.org/doku.php/wiki:bugs\;>" + "https://wiki.x2go.org/doku.php/wiki:bugs; + "\n"), + true); abort (); } else { @@ -114,6 +120,13 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), if (server_binary_.isEmpty ()) { x2goErrorf (28) << "Unable to find PulseAudio binary. Neither bundled, nor found in $PATH nor additional directories."; + show_RichText_ErrorMsgBox (tr ("Unable to find PulseAudio binary. Neither bundled, nor found in $PATH nor additional directories."), + tr ("If you downloaded the bundled, pre-compiled version from the official home page, " + "please report a bug on:\n" + "https://wiki.x2go.org/doku.php/wiki:bugs\;>" + "https://wiki.x2go.org/doku.php/wiki:bugs; + "\n"), + true); abort (); } } @@ -150,6 +163,9 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), for (buf = ptr = NULL; ptr == NULL; path_len += 20) { if (NULL == (buf = realloc (buf, path_len))) { x2goErrorf (16) << "Could not allocate buffer for getting current working directory!"; + show_RichText_ErrorMsgBox (tr ("Could not allocate buffer for getting current working directory!"), + QString (), + true); abort (); } @@ -157,7 +173,11 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), ptr = getcwd (buf, path_len); if ((NULL == ptr) && (ERANGE != erange)) { - x2goErrorf (17) << "getcwd() failed: " << QString (strerror (errno)); + int saved_errno = errno; + x2goErrorf (17) << "getcwd() failed: " << QString (strerror (saved_errno)); + show_RichText_ErrorMsgBox (tr ("getcwd() failed!"), + QString (strerror (saved_errno)), + true); abort (); } } @@ -365,6 +385,9 @@ void PulseManager::fetch_pulseaudio_version () { if (!convert_success) { x2goErrorf (20) << "Unable to convert major version number string to integer."; +show_RichText_ErrorMsgBox (tr ("Error fetching PulseAudio version number!"), + tr ("Unable to convert major version number
[X2Go-Commits] [x2goclient] 182/281: src/pulsemanager.cpp: add comments to Qt 4 code part.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit d3038b8d686274859caa8a607eeb5873e507bb4d Author: Mihai MoldovanDate: Wed Jun 22 02:20:22 2016 +0200 src/pulsemanager.cpp: add comments to Qt 4 code part. --- debian/changelog |1 + src/pulsemanager.cpp |4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 146112e..5d0d349 100644 --- a/debian/changelog +++ b/debian/changelog @@ -337,6 +337,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium function, as Qt 5 includes QStandardPaths::findExecutable (). - src/pulsemanager.cpp: auto-detect PA binary in $PATH and MacPorts default prefix as well on OS X. +- src/pulsemanager.cpp: add comments to Qt 4 code part. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 1e23d89..47e1b7c 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -69,8 +69,8 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), QString path_val = tmp_env.value ("PATH"); QStringList to_front, to_back; - to_front << "/opt/local/bin"; - to_back << "/usr/local/bin"; + to_front << "/opt/local/bin"; /* MacPorts default prefix, FIXME: might need to make that configurable. */ + to_back << "/usr/local/bin"; /* Homebrew or random stuff. Probably even both intermingled... */ add_to_path (path_val, to_back); add_to_path (path_val, to_front, false); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 183/281: src/pulsemanager.cpp: add reminder for Linux-implementation in play_startup_sound ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 2e4da1cd36596807a7068414c7f674b3ec83c655 Author: Mihai MoldovanDate: Wed Jun 22 02:21:10 2016 +0200 src/pulsemanager.cpp: add reminder for Linux-implementation in play_startup_sound (). --- debian/changelog |2 ++ src/pulsemanager.cpp |2 ++ 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5d0d349..89a97ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -338,6 +338,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: auto-detect PA binary in $PATH and MacPorts default prefix as well on OS X. - src/pulsemanager.cpp: add comments to Qt 4 code part. +- src/pulsemanager.cpp: add reminder for Linux-implementation in + play_startup_sound (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 47e1b7c..8e25b77 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -647,6 +647,8 @@ void PulseManager::slot_play_startup_sound () { #elif defined (Q_OS_WIN) playFileBinary += "/pulse/paplay.exe"; playFileFile += "/startup.wav"; +#else +/* FIXME: implement Linux section. */ #endif // defined (Q_OS_DARWIN) QStringList args (play_file_file); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 189/281: src/x2goutils.h: fix compile error due to typo.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit c894ba5644489cd5bdddb9a821331d92b677f472 Author: Mihai MoldovanDate: Wed Jun 22 03:21:11 2016 +0200 src/x2goutils.h: fix compile error due to typo. --- debian/changelog |1 + src/x2goutils.cpp |2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 318cd1a..3ebc83d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -349,6 +349,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium show_RichText_Generic_MsgBox () and its wrappers. - src/pulsemanager.cpp: add error message boxes throughout PulseManager. Don't just abort () the program. +- src/x2goutils.h: fix compile error due to typo. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp index f58a436..99739e2 100644 --- a/src/x2goutils.cpp +++ b/src/x2goutils.cpp @@ -118,7 +118,7 @@ void show_RichText_Generic_MsgBox (QMessageBox::Icon icon, const QString _t msg_box.exec (); } -void show_RichText_WarningMsgBox (const QString _text, const QString _text bool app_modal) { +void show_RichText_WarningMsgBox (const QString _text, const QString _text, bool app_modal) { show_RichText_Generic_MsgBox (QMessageBox::Warning, main_text, informative_text, app_modal); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 180/281: src/x2goutils.{cpp, h}: add new function find_binary ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 66911944ee4192d1a4a342d510467f8d0ff13b8c Author: Mihai MoldovanDate: Mon Jun 20 23:52:40 2016 +0200 src/x2goutils.{cpp,h}: add new function find_binary (). Searches for a specific binary in a colon-separated list of paths. Really just a compat function, as Qt 5 includes QStandardPaths::findExecutable (). --- debian/changelog |3 +++ src/x2goutils.cpp | 37 + src/x2goutils.h |8 3 files changed, 48 insertions(+) diff --git a/debian/changelog b/debian/changelog index aad5737..ef37a95 100644 --- a/debian/changelog +++ b/debian/changelog @@ -332,6 +332,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium start binaries like paplay. - src/pulsemanager.cpp: don't remove PA config and log file in ~/.x2go/pulse on PA shutdown if debugging has been requested. +- src/x2goutils.{cpp,h}: add new function find_binary (). Searches for a + specific binary in a colon-separated list of paths. Really just a compat + function, as Qt 5 includes QStandardPaths::findExecutable (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp index 9f3b382..f6978c5 100644 --- a/src/x2goutils.cpp +++ b/src/x2goutils.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include "x2goutils.h" #include "onmainwindow.h" @@ -287,4 +288,40 @@ QString add_to_path (const QString _path, const QStringList , const boo return (ret); } + +QString find_binary (const QString , const QString _name) { + QString ret = ""; + + if (!(binary_name.isEmpty ())) { +QString cur_path = ""; +QString tmp_path = path; + +if (!(path.isEmpty ())) { + tmp_path = "./"; +} + +QStringList path_list = tmp_path.split (":"); + +for (QStringList const_it = path_list.constBegin (); const_it != path_list.constEnd (); ++const_it) { + cur_path = *const_it; + + if (cur_path.isEmpty ()) { +cur_path = "./"; + } + + cur_path = QDir (cur_path).absolutePath (); + + cur_path += "/" + binary_name; + + QFileInfo tmp_file_info = QFileInfo (cur_path); + + if ((tmp_file_info.exists ()) && (tmp_file_info.isExecutable ())) { +ret = tmp_file_info.canonicalFilePath (); +break; + } +} + } + + return (ret); +} #endif /* defined (Q_OS_DARWIN) */ diff --git a/src/x2goutils.h b/src/x2goutils.h index e36203e..4159d39 100644 --- a/src/x2goutils.h +++ b/src/x2goutils.h @@ -57,6 +57,14 @@ void show_XQuartz_generic_error (const QString _error, const QString * Ex.: ::...: */ QString add_to_path (const QString _path, const QStringList , const bool back = true); + +/* + * Returns the first existing path that contains binary_name. + * Iff no component contains a binary called binary_name, an empty path is returned. + * + * Iff path is empty, (only) the current working dir is searched. + */ +QString find_binary (const QString , const QString _name); #endif /* defined (Q_OS_DARWIN) */ #endif /* !defined (X2GOUTILS_H) */ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 185/281: src/pulsemanager.h: add new system_pulse_ variable to indicate that a system PA binary shall be used.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit f5cc1929ce0f18af92f18c33568e7940cde2ae54 Author: Mihai MoldovanDate: Wed Jun 22 02:31:32 2016 +0200 src/pulsemanager.h: add new system_pulse_ variable to indicate that a system PA binary shall be used. --- debian/changelog |2 ++ src/pulsemanager.h |2 ++ 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index a8fd1b6..2cf4fed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -341,6 +341,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: add reminder for Linux-implementation in play_startup_sound (). - src/x2goutils.cpp: fix compile error. +- src/pulsemanager.h: add new system_pulse_ variable to indicate that + a system PA binary shall be used. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.h b/src/pulsemanager.h index 4cd49e4..6e39b9a 100644 --- a/src/pulsemanager.h +++ b/src/pulsemanager.h @@ -118,6 +118,8 @@ class PulseManager: public QObject { bool playback_; bool debug_; + +bool system_pulse_; }; #endif // PULSEMANAGER_H -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 178/281: src/pulsemanager.cpp: insert PULSE_SERVER and PULSE_COOKIE variables into environment as used by PulseManager.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 86ab7a715c32b02db743b5033c66dfc3f4831f41 Author: Mihai MoldovanDate: Thu Jun 2 04:23:05 2016 +0200 src/pulsemanager.cpp: insert PULSE_SERVER and PULSE_COOKIE variables into environment as used by PulseManager. Otherwise we won't be able to start binaries like paplay. --- debian/changelog |3 +++ src/pulsemanager.cpp | 13 + 2 files changed, 16 insertions(+) diff --git a/debian/changelog b/debian/changelog index e5f5536..64d218d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -327,6 +327,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: actually only play startup sound if debugging is enabled. - src/pulsemanager.cpp: don't insert stray newline into config.pa. +- src/pulsemanager.cpp: insert PULSE_SERVER and PULSE_COOKIE variables + into environment as used by PulseManager. Otherwise we won't be able to + start binaries like paplay. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 78fed24..539b85b 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -144,6 +144,19 @@ void PulseManager::start_generic () { connect (pulse_server_, SIGNAL (finished (int)), this, SLOT (slot_on_pulse_finished (int))); +env_.insert ("PULSE_SERVER", "127.0.0.1:" + QString::number (pulse_port_)); + + +QString clean_pulse_dir = pulse_dir_.absolutePath (); + +#ifdef Q_OS_WIN +clean_pulse_dir = wapiShortFileName (clean_pulse_dir); +#endif /* defined (Q_OS_WIN) */ + +QString tmp_auth_cookie = QDir::toNativeSeparators (clean_pulse_dir + "/.pulse-cookie"); + +env_.insert ("PULSE_COOKIE", tmp_auth_cookie); + if (debug_) { // Give PA a little time to come up. QTimer::singleShot (3000, this, SLOT (slot_play_startup_sound ())); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 175/281: src/pulsemanager.{cpp, h}: rename on_pulse_finished () to slot_on_pulse_finished ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 813d47b0c196ee28403c2ab6fbaee96f5f85db13 Author: Mihai MoldovanDate: Thu Jun 2 01:08:50 2016 +0200 src/pulsemanager.{cpp,h}: rename on_pulse_finished () to slot_on_pulse_finished (). Oops... --- debian/changelog |2 ++ src/pulsemanager.cpp |2 +- src/pulsemanager.h |2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0284fd1..d5f6f2a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -322,6 +322,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: don't overwrite the temporary string variable for the current line with what was supposed to hold new data in fetch_pulseaudio_version (). +- src/pulsemanager.{cpp,h}: rename on_pulse_finished () to + slot_on_pulse_finished (). Oops... [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 032c018..ec08e6f 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -584,7 +584,7 @@ void PulseManager::slot_play_startup_sound () { } } -void PulseManager::on_pulse_finished (int exit_code) { +void PulseManager::slot_on_pulse_finished (int exit_code) { if (!exit_code) x2goDebug << "Warning! Pulseaudio's exit code is non-zero."; diff --git a/src/pulsemanager.h b/src/pulsemanager.h index b3b7421..4cd49e4 100644 --- a/src/pulsemanager.h +++ b/src/pulsemanager.h @@ -86,7 +86,7 @@ class PulseManager: public QObject { private slots: -void on_pulse_finished (int exit_code); +void slot_on_pulse_finished (int exit_code); void slot_play_startup_sound (); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 172/281: macbuild.sh: save return value of parse_otool_output ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 3559f5fe3e98f56005cc67e12e1b30ab435fa9d6 Author: Mihai MoldovanDate: Thu May 12 23:24:03 2016 +0200 macbuild.sh: save return value of parse_otool_output (). Otherwise we'll fetch the return value of "set", which is not really what we need. --- debian/changelog |2 ++ macbuild.sh |4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c16e17a..26944fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -314,6 +314,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - macbuild.sh: fix copying of resource files. - macbuild.sh: also add PA binaries to deduplication fixup list. - macbuild.sh: don't error out while executing parse_otool_output (). +- macbuild.sh: save return value of parse_otool_output (). Otherwise we'll + fetch the return value of "set", which is not really what we need. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/macbuild.sh b/macbuild.sh index 62afe22..5e7b336 100755 --- a/macbuild.sh +++ b/macbuild.sh @@ -515,6 +515,7 @@ if [ "${BUNDLE}" = "1" ]; then # Try to fixup files broken by duplicates removal. for all_entry in "${all_files[@]}"; do typeset otool_out="$(otool -L "${all_entry}")" +typeset -i tmp_ret="0" # Don't merge the declaration and initialization with the real value assignment. # We need the return value of parse_otool_output(), but running @@ -522,9 +523,10 @@ if [ "${BUNDLE}" = "1" ]; then typeset dependencies="" set +e dependencies="$(parse_otool_output "${otool_out}")" +tmp_ret="${?}" set -e -if [ "${?}" -eq "0" ]; then +if [ "${tmp_ret}" -eq "0" ]; then typeset line="" while read -r line; do #echo "dependency of ${all_entry}: ${line}" -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 170/281: macbuild.sh: also add PA binaries to deduplication fixup list.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 9898f33ad38819bb43d497670eb86b85a83bbc54 Author: Mihai MoldovanDate: Thu May 12 23:18:23 2016 +0200 macbuild.sh: also add PA binaries to deduplication fixup list. --- debian/changelog |1 + macbuild.sh |7 +++ 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4421063..b9a560e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -312,6 +312,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium for startup.wav. - res: rename "sound" to "audio". - macbuild.sh: fix copying of resource files. +- macbuild.sh: also add PA binaries to deduplication fixup list. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/macbuild.sh b/macbuild.sh index 6e36348..f580d44 100755 --- a/macbuild.sh +++ b/macbuild.sh @@ -505,6 +505,13 @@ if [ "${BUNDLE}" = "1" ]; then done done + # Add binaries to all_files as well. + typeset entry="" + while read -r -d '' entry; do +echo "Adding ${entry} to all files" +all_files+=( "${entry}" ) + done < <(find "${EXE_DIR}" -type 'f' -executable -print0) + # Try to fixup files broken by duplicates removal. for all_entry in "${all_files[@]}"; do typeset otool_out="$(otool -L "${all_entry}")" -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 169/281: macbuild.sh: fix copying of resource files.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 02d9402414a2a70e72423b2c6eaae6624ad5f4b0 Author: Mihai MoldovanDate: Sat May 7 22:55:50 2016 +0200 macbuild.sh: fix copying of resource files. --- debian/changelog |1 + macbuild.sh |2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 04b732e..4421063 100644 --- a/debian/changelog +++ b/debian/changelog @@ -311,6 +311,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - macbuild.sh: add support for copying resource files. Currently only used for startup.wav. - res: rename "sound" to "audio". +- macbuild.sh: fix copying of resource files. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/macbuild.sh b/macbuild.sh index f57d43c..6e36348 100755 --- a/macbuild.sh +++ b/macbuild.sh @@ -333,7 +333,7 @@ cp -av "${NXPROXY}" "${EXE_DIR}/" phase "Copying misc resources" typeset cur_res_file for cur_res_file in ${RESOURCE_FILES[@]}; do - cp -av "res/${cur_res_file}" "${RESOURCES_DIR}/" + cp -av "${TOP_DIR}/res/${cur_res_file}" "${RESOURCES_DIR}/" done phase "Copying PulseAudio" -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 167/281: macbuild.sh: add support for copying resource files.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit b30aae5b8b802aa4bdda94a05cd87c45fa1964d8 Author: Mihai MoldovanDate: Sat May 7 22:38:37 2016 +0200 macbuild.sh: add support for copying resource files. Currently only used for startup.wav. --- debian/changelog |2 ++ macbuild.sh |8 2 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index a72e0e1..0892bf7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -308,6 +308,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium daemon in debug mode. - src/pulsemanager.cpp: don't time out while trying to start PA or paplay. "Handle" errors by printing out debug messages. +- macbuild.sh: add support for copying resource files. Currently only used + for startup.wav. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/macbuild.sh b/macbuild.sh index d5aadfe..f57d43c 100755 --- a/macbuild.sh +++ b/macbuild.sh @@ -158,6 +158,7 @@ BUILD_DIR="${TOP_DIR}/client_build" APPBUNDLE="${BUILD_DIR}/${NAME}.app" EXE_DIR="${APPBUNDLE}/Contents/exe/" FRAMEWORKS_DIR="${APPBUNDLE}/Contents/Frameworks/" +RESOURCES_DIR="${APPBUNDLE}/Contents/Resources/" DMGFILE="${BUILD_DIR}/${NAME}.dmg" PROJECT="${TOP_DIR}/${NAME}.pro" PKG_DMG="${TOP_DIR}/pkg-dmg" @@ -179,6 +180,7 @@ PULSEAUDIO_BINARIES=( "pulseaudio" "esdcompat" "pacat" "pacmd" "pactl" PULSEAUDIO_LIBRARIES=( "libpulse-simple.0.dylib" "pulse-8.0" "pulseaudio" ) +RESOURCE_FILES=( "audio/startup.wav" ) typeset -a special_files_regex special_files_regex+=( "pulseaudio/libpulsecommon-[0-9]\.[0-9]\.dylib" @@ -328,6 +330,12 @@ mkdir -p "${FRAMEWORKS_DIR}/" phase "Copying nxproxy" cp -av "${NXPROXY}" "${EXE_DIR}/" +phase "Copying misc resources" +typeset cur_res_file +for cur_res_file in ${RESOURCE_FILES[@]}; do + cp -av "res/${cur_res_file}" "${RESOURCES_DIR}/" +done + phase "Copying PulseAudio" for cur_binary in ${PULSEAUDIO_BINARIES_FULL[@]}; do cp -av "${cur_binary}" "${EXE_DIR}/" -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 168/281: res: rename "sound" to "audio".
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit d3bdae152f1f9be8fcc4084b3944a5f73dac8be6 Author: Mihai MoldovanDate: Sat May 7 22:46:06 2016 +0200 res: rename "sound" to "audio". --- debian/changelog |1 + res/{sound => audio}/startup.wav | Bin 211244 -> 211244 bytes 2 files changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 0892bf7..04b732e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -310,6 +310,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium "Handle" errors by printing out debug messages. - macbuild.sh: add support for copying resource files. Currently only used for startup.wav. +- res: rename "sound" to "audio". [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/res/sound/startup.wav b/res/audio/startup.wav similarity index 100% rename from res/sound/startup.wav rename to res/audio/startup.wav -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 165/281: res/sound: add startup.wav sound to be played back when starting the PA daemon in debug mode.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 98ffc89cbff93b20535ae52a11a3d5a85dc2c335 Author: Mihai MoldovanDate: Sat May 7 22:04:25 2016 +0200 res/sound: add startup.wav sound to be played back when starting the PA daemon in debug mode. --- debian/changelog |2 ++ res/sound/startup.wav | Bin 0 -> 211244 bytes 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index bc427cd..6003300 100644 --- a/debian/changelog +++ b/debian/changelog @@ -304,6 +304,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: port to new debugging feature of PulseManager. - src/pulsemanager.h: fix compile error due to mismatching function declaration for set_debug (). +- res/sound: add startup.wav sound to be played back when starting the PA + daemon in debug mode. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/res/sound/startup.wav b/res/sound/startup.wav new file mode 100644 index 000..f6b4ff2 Binary files /dev/null and b/res/sound/startup.wav differ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 163/281: src/onmainwindow.cpp: port to new debugging feature of PulseManager.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 6e849572783c14119a6bb9ca38cebe1bd734936f Author: Mihai MoldovanDate: Sat May 7 03:10:34 2016 +0200 src/onmainwindow.cpp: port to new debugging feature of PulseManager. --- debian/changelog |1 + src/onmainwindow.cpp |9 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7fe21c4..9b4836f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -301,6 +301,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium we'll get compile failures on non-Windows platforms. - src/pulsemanager.{cpp,h}: add debugging setter and private variable. - src/pulsemanager.{cpp,h}: port to new debugging feature. +- src/onmainwindow.cpp: port to new debugging feature of PulseManager. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index f7802ca..bcef2bc 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -2162,7 +2162,12 @@ void ONMainWindow::slotConfig() (QVariant) false).toBool (); if (oldDisableInput != newDisableInput) { -pulseManager->set_record (!newDisableInput); +bool ret = pulseManager->set_record (!newDisableInput); + +if (!ret) { + x2goDebug << "Failed to change recording status of PulseManager. PulseAudio not started?" << endl; +} + pulseManager->restart (); } #endif /* defined (Q_OS_WIN) || defined (Q_OS_DARWIN) */ @@ -6530,6 +6535,8 @@ void ONMainWindow::pulseManagerWrapper () { pulseManagerThread = new QThread (0); pulseManager = new PulseManager (); +pulseManager->set_debug (debugging); + pulseManager->moveToThread (pulseManagerThread); /* -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 164/281: src/pulsemanager.h: fix compile error due to mismatching function declaration for set_debug ().
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit aa6bec866eb3be37593438009d45d8fb498ae01c Author: Mihai MoldovanDate: Sat May 7 03:22:13 2016 +0200 src/pulsemanager.h: fix compile error due to mismatching function declaration for set_debug (). --- debian/changelog |2 ++ src/pulsemanager.h |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 9b4836f..bc427cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -302,6 +302,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.{cpp,h}: add debugging setter and private variable. - src/pulsemanager.{cpp,h}: port to new debugging feature. - src/onmainwindow.cpp: port to new debugging feature of PulseManager. +- src/pulsemanager.h: fix compile error due to mismatching function + declaration for set_debug (). [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.h b/src/pulsemanager.h index 9d6cec5..b3b7421 100644 --- a/src/pulsemanager.h +++ b/src/pulsemanager.h @@ -53,7 +53,7 @@ class PulseManager: public QObject { bool set_esd_port (std::uint16_t esd_port); bool set_record (bool record); bool set_playback (bool playback); -bool set_debug (bool debug); +void set_debug (bool debug); public slots: -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 162/281: src/pulsemanager.{cpp, h}: port to new debugging feature.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit fdd59e2b47c6ef3ee3efbc8097de3753cdbe8095 Author: Mihai MoldovanDate: Sat May 7 03:02:26 2016 +0200 src/pulsemanager.{cpp,h}: port to new debugging feature. --- debian/changelog |1 + src/pulsemanager.cpp | 69 +- src/pulsemanager.h | 11 +--- 3 files changed, 31 insertions(+), 50 deletions(-) diff --git a/debian/changelog b/debian/changelog index 99bce7d..7fe21c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -300,6 +300,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: hide Windows-only code behind #ifdefs. Otherwise we'll get compile failures on non-Windows platforms. - src/pulsemanager.{cpp,h}: add debugging setter and private variable. +- src/pulsemanager.{cpp,h}: port to new debugging feature. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 6fe8418..ed841eb 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -24,11 +24,6 @@ #include "pulsemanager.h" #include "x2gologdebug.h" -#ifndef DEBUG -#define DEBUG_UNDEF -#define DEBUG -#endif // defined (NDEBUG) - PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()), pulse_X2Go_ ("/.x2go/pulse"), server_binary_ (QString ("")), @@ -144,10 +139,10 @@ void PulseManager::start_generic () { connect (pulse_server_, SIGNAL (finished (int)), this, SLOT (slot_on_pulse_finished (int))); -#ifdef DEBUG -// Give PA a little time to come up. -QTimer::singleShot (3000, this, SLOT (slot_play_startup_sound ())); -#endif // defined (DEBUG) +if (debug_) { + // Give PA a little time to come up. + QTimer::singleShot (3000, this, SLOT (slot_play_startup_sound ())); +} } } @@ -163,11 +158,11 @@ void PulseManager::start_osx () { + QString::number (pulse_version_minor_) + "/modules").absolutePath () << "--high-priority"; -#ifdef DEBUG - server_args_ << "--log-level=debug" - << "--verbose" - << "--log-target=file:" + pulse_dir_.absolutePath () + "/pulse.log"; -#endif // defined (DEBUG) + if (debug_) { +server_args_ << "--log-level=debug" + << "--verbose" + << "--log-target=file:" + pulse_dir_.absolutePath () + "/pulse.log"; + } if (generate_server_config () && generate_client_config ()) { cleanup_client_dir (); @@ -191,12 +186,11 @@ void PulseManager::start_win () { + "." + QString::number (pulse_version_minor_) + "/modules/").absolutePath ()); -#ifdef DEBUG - /* FIXME: need a way to request debugging. */ - server_args_ << "--log-level=debug" - << "--verbose" - << "--log-target=file:" + pulse_dir_.absolutePath () + "\\pulse.log"; -#endif // defined (DEBUG) + if (debug_) { +server_args_ << "--log-level=debug" + << "--verbose" + << "--log-target=file:" + pulse_dir_.absolutePath () + "\\pulse.log"; + } /* * Fix for x2goclient bug #526. @@ -550,27 +544,27 @@ void PulseManager::create_client_dir () { } void PulseManager::slot_play_startup_sound () { -#ifdef DEBUG - QProcess play_file (0); - QString play_file_binary (app_dir_); - QString play_file_file (play_file_binary); + if (!debug_) { +QProcess play_file (0); +QString play_file_binary (app_dir_); +QString play_file_file (play_file_binary); #ifdef Q_OS_DARWIN - play_file_binary += "/../exe/paplay"; - play_file_file += "/../Resources/startup.wav"; +play_file_binary += "/../exe/paplay"; +play_file_file += "/../Resources/startup.wav"; #elif defined (Q_OS_WIN) - playFileBinary += "/pulse/paplay.exe"; - playFileFile += "/startup.wav"; +playFileBinary += "/pulse/paplay.exe"; +playFileFile += "/startup.wav"; #endif // defined (Q_OS_DARWIN) - QStringList args (play_file_file); - play_file.setWorkingDirectory (server_working_dir_); - play_file.setProcessEnvironment (env_); - play_file.start (play_file_binary, args); +QStringList args (play_file_file); +play_file.setWorkingDirectory (server_working_dir_); +play_file.setProcessEnvironment (env_); +play_file.start (play_file_binary, args); - if (play_file.waitForStarted ()) -play_file.waitForFinished (); -#endif // defined (DEBUG) +if (play_file.waitForStarted ()) + play_file.waitForFinished (); + } } void PulseManager::on_pulse_finished (int exit_code) { @@ -714,8 +708,3 @@
[X2Go-Commits] [x2goclient] 156/281: src/onmainwindow.cpp: fix compile error due to misuse of #ifdef.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 352bf7a63d9018b558cc5bffc9e0dd3aaafc3a13 Author: Mihai MoldovanDate: Fri May 6 23:41:52 2016 +0200 src/onmainwindow.cpp: fix compile error due to misuse of #ifdef. --- debian/changelog |1 + src/onmainwindow.cpp |2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 14de0c7..54e6e04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -291,6 +291,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium names. - src/pulsemanager.cpp: let start () act as a wrapper and do nothing if the PA server is already running. +- src/onmainwindow.cpp: fix compile error due to misuse of #ifdef. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index b215aa2..a894de9 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -1517,7 +1517,7 @@ void ONMainWindow::closeClient() } #endif /* defined (Q_OS_DARWIN) || defined (Q_OS_WIN) */ -#ifndef (Q_OS_WIN) +#ifndef Q_OS_WIN if ( userSshd && sshd ) { x2goDebug<<"Terminating the OpenSSH server ..."; -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 159/281: src/pulsemanager.cpp: fix compile error due to typo.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 5e35802fa75f0fa9ae1130226080ff8ebecbb03c Author: Mihai MoldovanDate: Fri May 6 23:47:53 2016 +0200 src/pulsemanager.cpp: fix compile error due to typo. --- debian/changelog |1 + src/pulsemanager.cpp |2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 64ef59a..352f9dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -296,6 +296,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium processing. - src/onmainwindow.cpp: make use of new PulseManager::start () behavior and always use it, no matter whether server is up already or not. +- src/pulsemanager.cpp: fix compile error due to typo. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 98f2a97..ca7926c 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -165,7 +165,7 @@ void PulseManager::start_osx () { #ifdef DEBUG server_args_ << "--log-level=debug" << "--verbose" - << "--log-target=file:" pulse_dir_.absolutePath () + "/pulse.log"; + << "--log-target=file:" + pulse_dir_.absolutePath () + "/pulse.log"; #endif // defined (DEBUG) if (generate_server_config () && generate_client_config ()) { -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 158/281: src/onmainwindow.cpp: make use of new PulseManager::start () behavior and always use it, no matter whether server is up already or not.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 93e00db02852ad92aaef20869ce79cb9f0ca9ed3 Author: Mihai MoldovanDate: Fri May 6 23:45:55 2016 +0200 src/onmainwindow.cpp: make use of new PulseManager::start () behavior and always use it, no matter whether server is up already or not. --- debian/changelog |2 ++ src/onmainwindow.cpp |6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d171d1f..64ef59a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -294,6 +294,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: fix compile error due to misuse of #ifdef. - src/onmainwindow.cpp: convert QDir object to QString for further processing. +- src/onmainwindow.cpp: make use of new PulseManager::start () behavior + and always use it, no matter whether server is up already or not. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index b58564b..f7802ca 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -5100,7 +5100,11 @@ void ONMainWindow::slotRetResumeSess ( bool result, true ).toBool(); #if defined (Q_OS_WIN) || defined (Q_OS_DARWIN) -if ((sound) && (!(pulseManager->is_server_running ( { +if (sound) { +/* + * PulseManager::start () can be called even if the server + * is already started. In this case, it will do nothing. + */ pulseManager->start (); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 157/281: src/onmainwindow.cpp: convert QDir object to QString for further processing.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 715423f1f75d8f5b50a13476f4ae94befbda73a1 Author: Mihai MoldovanDate: Fri May 6 23:44:00 2016 +0200 src/onmainwindow.cpp: convert QDir object to QString for further processing. --- debian/changelog |2 ++ src/onmainwindow.cpp |4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 54e6e04..d171d1f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -292,6 +292,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: let start () act as a wrapper and do nothing if the PA server is already running. - src/onmainwindow.cpp: fix compile error due to misuse of #ifdef. +- src/onmainwindow.cpp: convert QDir object to QString for further + processing. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index a894de9..b58564b 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -5338,7 +5338,7 @@ void ONMainWindow::slotRetResumeSess ( bool result, "/.pulse-cookie", this, SLOT ( slotPCookieReady ( bool, QString,int ))); } #else /* !defined (Q_OS_WIN) && !defined (Q_OS_DARWIN) */ -QString cooFile = QDir::toNativeSeparators (QDir (pulseManager->get_pulse_dir () + +QString cooFile = QDir::toNativeSeparators (QDir (pulseManager->get_pulse_dir ().absolutePath () + "/.pulse-cookie").absolutePath ()); QString destFile="$HOME/.x2go/C-"+ resumingSession.sessionId+ @@ -5355,7 +5355,7 @@ void ONMainWindow::slotRetResumeSess ( bool result, sshConnection->copyFile(homeDir+"/.esd_auth", "$HOME/.esd_auth" ); #else /* defined (Q_OS_LINUX) */ -QString cooFile = QDir::toNativeSeparators (QDir (pulseManager->get_pulse_dir () + +QString cooFile = QDir::toNativeSeparators (QDir (pulseManager->get_pulse_dir ().absolutePath () + "/.esd_auth").absolutePath ()); QString destFile="$HOME/.esd_auth"; sshConnection->copyFile(cooFile, -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
[X2Go-Commits] [x2goclient] 155/281: src/pulsemanager.cpp: let start () act as a wrapper and do nothing if the PA server is already running.
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 2c431cf531c0c7a245730b0db743e3cd04849521 Author: Mihai MoldovanDate: Wed May 4 23:59:53 2016 +0200 src/pulsemanager.cpp: let start () act as a wrapper and do nothing if the PA server is already running. --- debian/changelog |2 ++ src/pulsemanager.cpp |4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 2e07150..14de0c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -289,6 +289,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium faulty) line for removed restart message. - src/onmainwindow.cpp: fix compile errors due to misspelled function names. +- src/pulsemanager.cpp: let start () act as a wrapper and do nothing if + the PA server is already running. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index 93b9edb..98f2a97 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -105,7 +105,9 @@ PulseManager::~PulseManager () { } void PulseManager::start () { - assert (!is_server_running ()); + if (is_server_running ()) { +return; + } delete (pulse_server_); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git ___ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits
1 2 3 >