Skip to content

Commit

Permalink
allow to connect to other pve system than just fwppve and enable the
Browse files Browse the repository at this point in the history
pwprompt accordingly.
  • Loading branch information
jens-maus committed Jul 25, 2024
1 parent 3fd4dd3 commit 4424640
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion qutselect.slist
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ UKD-NUK ; termserver ; UKD88 ; RDP ; Windows ; UKD - Med
===
WWW-Browser ; firefox ; ; APP ; Firefox ; Firefox ; FALSE ; scripts/qutselect_connect_app.sh
===
FWPVM40 ; fwpvm40 ; fwppve ; PVE ; Windows ; VDI ; TRUE ; scripts/qutselect_connect_pve.sh
FWPVM40 ; fwpvm40 ; fwppve.fz-rossendorf.de ; PVE ; Windows ; VDI ; TRUE ; scripts/qutselect_connect_pve.sh
FWP112VM ; fwp112vm ; 149.220.72.17:8006 ; PVE ; Windows ; VDI ; TRUE ; scripts/qutselect_connect_pve.sh
19 changes: 12 additions & 7 deletions scripts/qutselect_connect_pve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,27 @@ resolution="${4}"
#curDepth="${6}"
#keyLayout="${7}"
proxy="${8}"
username="${9}@hzdr.de"
username="${9}"
serverName="${10}"

# fallback to fwppve.fz-rossendorf.de as PVE proxy
if [[ -z ${proxy} ]] || [[ "${proxy}" == "NULL" ]]; then
proxy=fwppve.fz-rossendorf.de
fi

# if this is a ThinLinc session we can grab the password
# using the tl-sso-password command in case the user wants
# to connect to one of our servers (FZR domain)
if [[ -x ${TLSSOPASSWORD} ]] &&
if [[ ${username} == ${USER} ]] && [[ -x ${TLSSOPASSWORD} ]] &&
${TLSSOPASSWORD} -c 2>/dev/null; then
password=$(${TLSSOPASSWORD})
fi

# if username does not contain a @ we add our @hzdr.de
if [[ ! ${username} =~ "@" ]]; then
username="${username}@hzdr.de"
fi

# fallback to fwppve.fz-rossendorf.de as PVE proxy
if [[ -z ${proxy} ]] || [[ "${proxy}" == "NULL" ]]; then
proxy=fwppve.fz-rossendorf.de
fi

# read the password from stdin if not specified yet
if [[ -z "${password}" ]]; then
read -r password
Expand Down
3 changes: 2 additions & 1 deletion src/CMainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,8 @@ void CMainWindow::connectButtonPressed(void)
// if the servertype is RDP and the domain is FZR we check if qutselect
// is running in a ThinLinc session and if so we don't switch to the
// username/password prompt call startConnection() right away
if(((serverType != "RDP" || m_sDomain != "FZR") && serverType != "PVE") ||
if(((serverType != "RDP" || m_sDomain != "FZR") &&
(serverType != "PVE" || m_sDomain.startsWith("fwppve") == false)) ||
qgetenv("TLSESSIONDATA").isEmpty())
{
changeLayout(UserPassLayout);
Expand Down

0 comments on commit 4424640

Please sign in to comment.