x2goclient-4.0.1.1/appdialog.cpp 0000644 0000000 0000000 00000014436 12214040350 013262 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "appdialog.h"
#include "onmainwindow.h"
AppDialog::AppDialog(ONMainWindow* parent):QDialog(parent)
{
setupUi(this);
mw=parent;
media=0;
dev=0;
edu=0;
game=0;
graph=0;
net=0;
office=0;
set=0;
sys=0;
util=0;
other=0;
startButton->setEnabled(false);
loadApps();
}
AppDialog::~AppDialog()
{
}
void AppDialog::slotSearchChanged(QString text)
{
QTreeWidgetItemIterator it(treeWidget);
while (*it)
{
QString exec=(*it)->data(0,Qt::UserRole).toString();
QString comment=(*it)->data(0,Qt::UserRole+1).toString();
QString name=(*it)->text(0);
if ((*it)->childCount()==0)
{
if (text.length()<2)
{
(*it)->setHidden(false);
(*it)->setSelected(false);
}
else
{
if (exec.indexOf(text, 0,Qt::CaseInsensitive)!= -1 ||
comment.indexOf(text, 0,Qt::CaseInsensitive)!= -1 ||
name.indexOf(text, 0,Qt::CaseInsensitive)!= -1 )
{
treeWidget->clearSelection();
(*it)->setSelected(true);
(*it)->setHidden(false);
treeWidget->scrollToItem((*it));
}
else
{
(*it)->setHidden(true);
(*it)->setSelected(false);
}
}
}
++it;
}
}
QTreeWidgetItem* AppDialog::initTopItem(QString text, QPixmap icon)
{
QTreeWidgetItem* item;
item=new QTreeWidgetItem(treeWidget);
item->setText(0,text);
item->setFlags(Qt::ItemIsEnabled);
item->setIcon(0,icon);
return item;
}
void AppDialog::loadApps()
{
QTreeWidgetItem* parent;
foreach (Application app, mw->getApplications())
{
switch (app.category)
{
case Application::MULTIMEDIA:
if (!media)
media=initTopItem(tr("Multimedia"), QPixmap(":/icons/22x22/applications-multimedia.png"));
parent=media;
break;
case Application::DEVELOPMENT:
if (!dev)
dev=initTopItem(tr("Development"), QPixmap(":/icons/22x22/applications-development.png"));
parent=dev;
break;
case Application::EDUCATION:
if (!edu)
edu=initTopItem(tr("Education"), QPixmap(":/icons/22x22/applications-education.png"));
parent=edu;
break;
case Application::GAME:
if (!game)
game=initTopItem(tr("Game"), QPixmap(":/icons/22x22/applications-games.png"));
parent=game;
break;
case Application::GRAPHICS:
if (!graph)
graph=initTopItem(tr("Graphics"), QPixmap(":/icons/22x22/applications-graphics.png"));
parent=graph;
break;
case Application::NETWORK:
if (!net)
net=initTopItem(tr("Network"), QPixmap(":/icons/22x22/applications-internet.png"));
parent=net;
break;
case Application::OFFICE:
if (!office)
office=initTopItem(tr("Office"), QPixmap(":/icons/22x22/applications-office.png"));
parent=office;
break;
case Application::SETTINGS:
if (!set)
set=initTopItem(tr("Settings"), QPixmap(":/icons/22x22/preferences-system.png"));
parent=set;
break;
case Application::SYSTEM:
if (!sys)
sys=initTopItem(tr("System"), QPixmap(":/icons/22x22/applications-system.png"));
parent=sys;
break;
case Application::UTILITY:
if (!util)
util=initTopItem(tr("Utility"), QPixmap(":/icons/22x22/applications-utilities.png"));
parent=util;
break;
case Application::OTHER:
if (!other)
other=initTopItem(tr("Other"), QPixmap(":/icons/22x22/applications-other.png"));
parent=other;
break;
}
QTreeWidgetItem* it;
if (app.category==Application::TOP)
it=new QTreeWidgetItem(treeWidget);
else
it=new QTreeWidgetItem(parent);
it->setText(0, app.name);
it->setToolTip(0,app.comment);
it->setIcon(0,app.icon);
it->setData(0, Qt::UserRole, app.exec);
it->setData(0, Qt::UserRole+1, app.comment);
}
treeWidget->sortItems(0,Qt::AscendingOrder);
}
void AppDialog::slotSelectedChanged()
{
startButton->setEnabled(false);
if (treeWidget->selectedItems().count())
{
startButton->setEnabled(true);
}
}
void AppDialog::slotDoubleClicked(QTreeWidgetItem* item)
{
QString exec=item->data(0,Qt::UserRole).toString();
if (exec.length()>0)
mw->runApplication(exec);
}
void AppDialog::slotStartSelected()
{
if (treeWidget->selectedItems().count()>0)
{
QString exec=treeWidget->selectedItems()[0]->data(0,Qt::UserRole).toString();
if (exec.length()>0)
mw->runApplication(exec);
}
}
x2goclient-4.0.1.1/appdialog.h 0000644 0000000 0000000 00000004064 12214040350 012723 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef APPDIALOG_H
#define APPDIALOG_H
#include
#include "ui_appdialog.h"
class QTreeWidgetItem;
class ONMainWindow;
class AppDialog: public QDialog, public Ui_AppDialog
{
Q_OBJECT
public:
AppDialog(ONMainWindow *parent = 0);
~AppDialog();
private:
void loadApps();
QTreeWidgetItem* initTopItem(QString text, QPixmap icon=QPixmap());
ONMainWindow* mw;
QTreeWidgetItem* media;
QTreeWidgetItem* dev;
QTreeWidgetItem* edu;
QTreeWidgetItem* game;
QTreeWidgetItem* graph;
QTreeWidgetItem* net;
QTreeWidgetItem* office;
QTreeWidgetItem* set;
QTreeWidgetItem* sys;
QTreeWidgetItem* util;
QTreeWidgetItem* other;
private slots:
void slotSelectedChanged();
void slotStartSelected();
void slotDoubleClicked(QTreeWidgetItem* item);
void slotSearchChanged(QString text);
};
#endif // APPDIALOG_H
x2goclient-4.0.1.1/appdialog.ui 0000644 0000000 0000000 00000010761 12214040350 013112 0 ustar
Oleksandr Shneyder(o.shneyder@phoca-gmbh.de)
AppDialog
0
0
510
400
Published Applications
-
-
22
22
true
true
true
false
false
false
1
-
-
Search:
-
-
-
&Start
-
Qt::Vertical
20
40
-
&Close
closeButton
clicked()
AppDialog
reject()
475
372
468
286
treeWidget
itemSelectionChanged()
AppDialog
slotSelectedChanged()
180
121
468
144
startButton
clicked()
AppDialog
slotStartSelected()
462
18
453
78
treeWidget
itemDoubleClicked(QTreeWidgetItem*,int)
AppDialog
slotDoubleClicked(QTreeWidgetItem*)
266
226
459
200
lineEdit
textChanged(QString)
AppDialog
slotSearchChanged(QString)
167
378
444
314
slotSelectedChanged()
slotStartSelected()
slotDoubleClicked(QTreeWidgetItem*)
slotSearchChanged(QString)
x2goclient-4.0.1.1/AUTHORS 0000644 0000000 0000000 00000000165 12214040350 011660 0 ustar Oleksandr Shneyder
Heinz-Markus Graesing
x2goclient-4.0.1.1/brokerpassdialog.ui 0000644 0000000 0000000 00000010517 12214040350 014504 0 ustar
Oleksandr Shneyder(o.shneyder@phoca-gmbh.de)
BrokerPassDialogUi
0
0
311
176
Dialog
-
-
Old password:
-
QLineEdit::Password
-
New password:
-
QLineEdit::Password
-
Confirm password:
-
QLineEdit::Password
-
Qt::Vertical
20
40
-
TextLabel
-
-
Qt::Horizontal
40
20
-
Qt::Horizontal
QDialogButtonBox::Cancel|QDialogButtonBox::Ok
buttonBox
accepted()
BrokerPassDialogUi
accept()
292
143
157
153
buttonBox
rejected()
BrokerPassDialogUi
reject()
286
143
286
153
lePass1
textChanged(QString)
BrokerPassDialogUi
slotPassChanged()
167
46
103
113
lePass2
textChanged(QString)
BrokerPassDialogUi
slotPassChanged()
215
79
208
105
slotPassChanged()
x2goclient-4.0.1.1/brokerpassdlg.cpp 0000644 0000000 0000000 00000004232 12214040350 014155 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "brokerpassdlg.h"
#include
BrokerPassDlg::BrokerPassDlg(QWidget* parent, Qt::WindowFlags f): QDialog(parent, f)
{
setupUi(this);
statusLabel->setText(QString::null);
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
}
BrokerPassDlg::~BrokerPassDlg()
{
}
void BrokerPassDlg::slotPassChanged()
{
bool passEq=false;
if (lePass1->text()!=lePass2->text())
{
passEq=false;
statusLabel->setText(tr("Passwords do not match"));
}
else
{
passEq=true;
statusLabel->setText(QString::null);
}
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(passEq &&
lePass1->text().size()>0 &&
leOldPas->text().size()>0);
}
void BrokerPassDlg::accept()
{
QDialog::accept();
}
void BrokerPassDlg::reject()
{
QDialog::reject();
}
QString BrokerPassDlg::newPass()
{
return lePass1->text();
}
QString BrokerPassDlg::oldPass()
{
return leOldPas->text();
}
x2goclient-4.0.1.1/brokerpassdlg.h 0000644 0000000 0000000 00000003215 12214040350 013622 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef BROKERPASSDLG_H
#define BROKERPASSDLG_H
#include
#include "ui_brokerpassdialog.h"
class BrokerPassDlg: public QDialog, private Ui_BrokerPassDialogUi
{
Q_OBJECT
public:
BrokerPassDlg(QWidget* parent = 0, Qt::WindowFlags f = 0);
virtual ~BrokerPassDlg();
virtual void accept();
virtual void reject();
QString oldPass();
QString newPass();
private slots:
void slotPassChanged();
};
#endif // BROKERPASSDLG_H
x2goclient-4.0.1.1/build_win_plugin.bat 0000755 0000000 0000000 00000000416 12214040350 014634 0 ustar mingw32-make
copy release\npx2goplugin.dll d:\share\plugin\x2goplugin\
d:
cd \share\plugin\x2goplugin\
idc.exe npx2goplugin.dll /idl npx2goplugin.idl -version 1.0
midl npx2goplugin.idl /nologo /tlb npx2goplugin.tlb
idc.exe npx2goplugin.dll /tlb npx2goplugin.tlb
x2goclient-4.0.1.1/clicklineedit.cpp 0000644 0000000 0000000 00000003503 12214040350 014116 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "clicklineedit.h"
#include "x2gologdebug.h"
#include
ClickLineEdit::ClickLineEdit(QWidget * parent)
: QLineEdit(parent)
{
}
ClickLineEdit::~ClickLineEdit()
{
}
#ifdef Q_OS_LINUX
void ClickLineEdit::mouseReleaseEvent ( QMouseEvent * event )
{
QLineEdit::mouseReleaseEvent(event);
emit clicked();
setFocus(Qt::MouseFocusReason);
}
// void ClickLineEdit::focusInEvent ( QFocusEvent * event )
// {
// QLineEdit::focusInEvent(event);
// x2goDebug<<"focus in";
// }
//
// void ClickLineEdit::focusOutEvent ( QFocusEvent * event )
// {
// QLineEdit::focusOutEvent(event);
// x2goDebug<<"focus out";
// }
#endif
x2goclient-4.0.1.1/clicklineedit.h 0000644 0000000 0000000 00000003305 12214040350 013563 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef CLICKLINEEDIT_H
#define CLICKLINEEDIT_H
#include
/**
@author Oleksandr Shneyder
*/
class ClickLineEdit : public QLineEdit
{
Q_OBJECT
public:
ClickLineEdit ( QWidget * parent = 0 );
~ClickLineEdit();
signals:
void clicked();
#ifdef Q_OS_LINUX
protected:
virtual void mouseReleaseEvent ( QMouseEvent * event );
/* virtual void focusInEvent ( QFocusEvent * event );
virtual void focusOutEvent ( QFocusEvent * event );*/
#endif
};
#endif
x2goclient-4.0.1.1/configdialog.cpp 0000644 0000000 0000000 00000052266 12214040350 013752 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include
#include
#include
#include
#include
#include
#include
#include "x2gosettings.h"
#include
#include
#include "onmainwindow.h"
#include
#include
#include
#include "configdialog.h"
#include "x2gologdebug.h"
#include "printwidget.h"
#include
#include "x2goclientconfig.h"
#include "connectionwidget.h"
#include "settingswidget.h"
#if defined ( Q_OS_WIN) && defined (CFGCLIENT )
#include "xsettingswidget.h"
#endif
ConfigDialog::ConfigDialog ( QWidget * parent, Qt::WFlags f )
: QDialog ( parent,f )
{
tabWidg=new QTabWidget ( this );
QVBoxLayout* ml=new QVBoxLayout ( this );
ml->addWidget ( tabWidg );
QWidget *fr=new QWidget ( this );
QVBoxLayout* frLay=new QVBoxLayout ( fr );
tabWidg->addTab ( fr,tr ( "General" ) );
embedMode= ( ( ONMainWindow* ) parent )->getEmbedMode();
X2goSettings st ( "settings" );
#ifndef CFGPLUGIN
gbTrayIcon=new QGroupBox(tr("Display icon in system tray"),fr);
frLay->addWidget(gbTrayIcon);
gbTrayIcon->setCheckable(true);
QHBoxLayout* grmainLay=new QHBoxLayout(gbTrayIcon);
QFrame* frTray=new QFrame(gbTrayIcon);
grmainLay->setMargin(0);
grmainLay->addWidget(frTray);
cbMinToTray=new QCheckBox(tr("Hide to system tray when minimized"),frTray);
cbNoClose=new QCheckBox(tr("Hide to system tray when closed"),frTray);
cbMinimizeTray=new QCheckBox(tr("Hide to system tray after connection is established"),frTray);
cbMaxmizeTray=new QCheckBox(tr("Restore from system tray after session is disconnected"),frTray);
QVBoxLayout* trLay=new QVBoxLayout(frTray);
trLay->addWidget(cbMinToTray);
trLay->addWidget(cbNoClose);
trLay->addWidget(cbMinimizeTray);
trLay->addWidget(cbMaxmizeTray);
gbTrayIcon->setChecked ( st.setting()->value ( "trayicon/enabled", false ).toBool() );
cbMinimizeTray->setChecked ( st.setting()->value ( "trayicon/mincon", false ).toBool() );
cbMaxmizeTray->setChecked ( st.setting()->value ( "trayicon/maxdiscon", false ).toBool() );
cbNoClose->setChecked ( st.setting()->value ( "trayicon/noclose", false ).toBool() );
cbMinToTray->setChecked ( st.setting()->value ( "trayicon/mintotray", false ).toBool() );
#endif
#ifdef USELDAP
if ( !embedMode )
{
ONMainWindow* par= ( ONMainWindow* ) parent;
gbLDAP=new QGroupBox ( tr ( "Use LDAP" ),fr );
gbLDAP->setCheckable(true);
QHBoxLayout* grmainLay=new QHBoxLayout(gbLDAP);
QFrame* frLdap=new QFrame(gbLDAP);
grmainLay->setMargin(0);
grmainLay->addWidget(frLdap);
ldapServer=new QLineEdit ( frLdap );
port=new QSpinBox ( frLdap );
ldapBase=new QLineEdit ( frLdap );
port->setMaximum ( 1000000 );
QHBoxLayout *grLay=new QHBoxLayout ( frLdap );
QVBoxLayout *laiLay=new QVBoxLayout();
QVBoxLayout *setLay=new QVBoxLayout();
setLay->setSpacing ( 6 );
laiLay->setSpacing ( 6 );
grLay->setSpacing ( 20 );
grLay->addLayout ( laiLay );
grLay->addStretch();
grLay->addLayout ( setLay );
laiLay->addWidget ( new QLabel ( tr ( "Server URL:" ),frLdap) );
laiLay->addWidget ( new QLabel ( tr ( "BaseDN:" ),frLdap ) );
laiLay->addWidget ( new QLabel (
tr ( "Failover server 1 URL:" ),frLdap ) );
laiLay->addWidget ( new QLabel (
tr ( "Failover server 2 URL:" ),frLdap ) );
ldapServer1=new QLineEdit ( frLdap);
port1=new QSpinBox ( frLdap );
ldapServer2=new QLineEdit ( frLdap );
port2=new QSpinBox ( frLdap );
port1->setMaximum ( 1000000 );
port2->setMaximum ( 1000000 );
QHBoxLayout* aLay=new QHBoxLayout();
aLay->setSpacing ( 3 );
aLay->addWidget ( new QLabel ( "ldap//:",frLdap ) );
aLay->addWidget ( ldapServer );
aLay->addWidget ( new QLabel ( ":",frLdap ) );
aLay->addWidget ( port );
QHBoxLayout* aLay1=new QHBoxLayout();
aLay1->setSpacing ( 3 );
aLay1->addWidget ( new QLabel ( "ldap//:",frLdap ) );
aLay1->addWidget ( ldapServer1 );
aLay1->addWidget ( new QLabel ( ":",frLdap ) );
aLay1->addWidget ( port1 );
QHBoxLayout* aLay2=new QHBoxLayout();
aLay2->setSpacing ( 3 );
aLay2->addWidget ( new QLabel ( "ldap//:",frLdap ) );
aLay2->addWidget ( ldapServer2 );
aLay2->addWidget ( new QLabel ( ":",frLdap ) );
aLay2->addWidget ( port2 );
setLay->addLayout ( aLay );
setLay->addWidget ( ldapBase );
setLay->addLayout ( aLay1 );
setLay->addLayout ( aLay2 );
gbLDAP->setChecked ( st.setting()->value ( "LDAP/useldap",
( QVariant ) par->retUseLdap()
).toBool() );
ldapServer->setText ( st.setting()->value (
"LDAP/server",
( QVariant ) par->retLdapServer()
).toString() );
port->setValue ( st.setting()->value ( "LDAP/port",
( QVariant ) par->retLdapPort()
).toInt() );
ldapServer1->setText ( st.setting()->value (
"LDAP/server1",
( QVariant ) par->retLdapServer1()
).toString() );
port1->setValue ( st.setting()->value ( "LDAP/port1",
( QVariant ) par->retLdapPort1()
).toInt() );
ldapServer2->setText ( st.setting()->value (
"LDAP/server2",
( QVariant ) par->retLdapServer2()
).toString() );
port2->setValue ( st.setting()->value ( "LDAP/port2",
( QVariant ) par->retLdapPort2()
).toInt() );
ldapBase->setText ( st.setting()->value ( "LDAP/basedn",
( QVariant ) par->retLdapDn()
).toString() );
frLdap->setEnabled ( gbLDAP->isChecked() );
frLay->addWidget ( gbLDAP );
connect ( gbLDAP,SIGNAL ( toggled ( bool ) ),frLdap,
SLOT ( setEnabled ( bool ) ) );
connect ( gbLDAP,SIGNAL ( toggled ( bool ) ),this,
SLOT ( slot_checkOkStat() ) );
connect ( ldapBase,SIGNAL ( textChanged ( const QString& ) ),
this,
SLOT ( slot_checkOkStat() ) );
connect ( ldapServer,SIGNAL ( textChanged ( const QString& ) ),
this,
SLOT ( slot_checkOkStat() ) );
}
#endif //USELDAP
#ifdef Q_OS_DARWIN
QGroupBox* xgb=new QGroupBox ( tr ( "X-Server settings" ),fr );
QGridLayout *xLay=new QGridLayout ( xgb );
leXexec=new QLineEdit ( xgb );
leXexec->setReadOnly ( true );
pbOpenExec=new QPushButton (
QIcon ( ( ( ONMainWindow* ) parent )->iconsPath (
"/32x32/file-open.png" ) ),
QString::null,xgb );
xLay->addWidget ( new QLabel ( tr ( "X11 application:" ) ),0,0 );
leCmdOpt=new QLineEdit ( xgb );
leCmdOpt->setReadOnly ( true );
QHBoxLayout* cmdLay=new QHBoxLayout();
cmdLay->addWidget ( leXexec );
cmdLay->addWidget ( pbOpenExec );
xLay->addLayout ( cmdLay,0,1 );
xLay->addWidget ( new QLabel ( tr ( "X11 version:" ) ),1,0 );
xLay->addWidget ( leCmdOpt,1,1 );
frLay->addWidget ( xgb );
QString xver;
QString path=getXDarwinDirectory();
if ( path!="" )
{
leXexec->setText ( findXDarwin ( xver,path ) );
leCmdOpt->setText ( xver );
}
else
slot_findXDarwin();
QPushButton* findButton=new QPushButton (
tr ( "Find X11 application" ),xgb );
xLay->addWidget ( findButton,2,1 );
connect ( findButton,SIGNAL ( clicked() ),this,
SLOT ( slot_findXDarwin() ) );
connect ( pbOpenExec,SIGNAL ( clicked() ),this,
SLOT ( slot_selectXDarwin() ) );
#endif //Q_OS_DARWIN
#ifndef Q_OS_WIN
clientSshPort=new QSpinBox ( fr );
clientSshPort->setMaximum ( 1000000 );
clientSshPort->setValue ( st.setting()->value ( "clientport",
( QVariant ) 22 ).toInt() );
QHBoxLayout* sshLay=new QHBoxLayout();
sshLay->addWidget (
new QLabel ( tr (
"Clientside SSH port for file system export usage:"
),fr ) );
sshLay->addWidget ( clientSshPort );
sshLay->addStretch();
frLay->addLayout ( sshLay );
#endif
if ( embedMode )
{
cbStartEmbed=new QCheckBox (
tr (
"Start session embedded inside website" ) ,fr );
frLay->addWidget ( cbStartEmbed );
advancedOptions=new QPushButton (
tr ( "Advanced options" ) +" >>" ,
this );
connect ( advancedOptions,SIGNAL ( clicked() ),this,
SLOT ( slotAdvClicked() ) );
advancedOptions->setVisible ( (
( ONMainWindow* ) parent )->
getShowAdvOption() );
advOptionsShown=false;
conWidg=new ConnectionWidget ( QString::null,
( ONMainWindow* ) parent,this );
setWidg=new SettingsWidget ( QString::null,
( ONMainWindow* ) parent,this );
conWidg->hide();
setWidg->hide();
X2goSettings st ( "sessions" );
cbStartEmbed->setChecked (
st.setting()->value ( "embedded/startembed",
true ).toBool() );
}
/* #ifdef Q_OS_WIN
else
{
tabWidg->removeTab ( 0 );
}
#endif*/
frLay->addStretch();
defaults=new QPushButton ( tr ( "Defaults" ),this );
ok=new QPushButton ( tr ( "&OK" ),this );
QPushButton* cancel=new QPushButton ( tr ( "&Cancel" ),this );
QHBoxLayout* bLay=new QHBoxLayout();
connect ( this,SIGNAL ( accepted() ),this,SLOT ( slot_accepted() ) );
connect ( ok,SIGNAL ( clicked() ),this,SLOT ( accept() ) );
connect ( cancel,SIGNAL ( clicked() ),this,SLOT ( reject() ) );
connect ( defaults,SIGNAL ( clicked() ),this,
SLOT ( slotDefaults() ) );
bLay->setSpacing ( 5 );
if ( embedMode )
bLay->addWidget ( advancedOptions );
bLay->addStretch();
bLay->addWidget ( ok );
bLay->addWidget ( cancel );
bLay->addWidget ( defaults );
ml->addLayout ( bLay );
setSizeGripEnabled ( true );
setWindowIcon ( QIcon ( (
( ONMainWindow* ) parent )->iconsPath (
"/32x32/edit_settings.png" ) ) );
setWindowTitle ( tr ( "Settings" ) );
#ifdef Q_WS_HILDON
QFont fnt=font();
fnt.setPointSize ( 10 );
setFont ( fnt );
QSize sz=ok->sizeHint();
sz.setWidth ( ( int ) ( sz.width() /1.5 ) );
sz.setHeight ( ( int ) ( sz.height() /1.5 ) );
ok->setFixedSize ( sz );
sz=cancel->sizeHint();
sz.setWidth ( ( int ) ( sz.width() ) );
sz.setHeight ( ( int ) ( sz.height() /1.5 ) );
cancel->setFixedSize ( sz );
clientSshPort->setFixedHeight (
int ( clientSshPort->sizeHint().height() *1.5 ) );
defaults->hide();
#endif
pwid=new PrintWidget ( this );
tabWidg->addTab ( pwid,tr ( "Printing" ) );
#if defined ( Q_OS_WIN) && defined (CFGCLIENT )
xsetWidg=new XSettingsWidget(this);
tabWidg->addTab(xsetWidg, tr("X-Server settings"));
#endif
}
ConfigDialog::~ConfigDialog()
{}
void ConfigDialog::slot_accepted()
{
X2goSettings st ( "settings" );
#ifndef CFGPLUGIN
st.setting()->setValue ( "trayicon/enabled", gbTrayIcon->isChecked() );
st.setting()->setValue ( "trayicon/mintotray", cbMinToTray->isChecked() );
st.setting()->setValue ( "trayicon/noclose", cbNoClose->isChecked() );
st.setting()->setValue ( "trayicon/mincon", cbMinimizeTray->isChecked() );
st.setting()->setValue ( "trayicon/maxdiscon", cbMaxmizeTray->isChecked() );
#endif
#ifdef USELDAP
if ( !embedMode )
{
st.setting()->setValue ( "LDAP/useldap",
( QVariant ) gbLDAP->isChecked() );
st.setting()->setValue ( "LDAP/port",
( QVariant ) port->value() );
if ( ldapServer->text().length() )
st.setting()->setValue ( "LDAP/server",
( QVariant ) ldapServer->text() );
st.setting()->setValue ( "LDAP/port1",
( QVariant ) port1->value() );
if ( ldapServer1->text().length() )
st.setting()->setValue ( "LDAP/server1", ( QVariant )
ldapServer1->text() );
st.setting()->setValue ( "LDAP/port2",
( QVariant ) port2->value() );
if ( ldapServer2->text().length() )
st.setting()->setValue ( "LDAP/server2", ( QVariant )
ldapServer2->text() );
if ( ldapBase->text().length() )
st.setting()->setValue ( "LDAP/basedn",
( QVariant ) ldapBase->text() );
}
#endif //USELDAP
#ifdef Q_OS_DARWIN
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 )
{
X2goSettings st ( "sessions" );
st.setting()->setValue ( "embedded/startembed",
( QVariant ) cbStartEmbed->isChecked() );
st.setting()->sync();
setWidg->saveSettings();
conWidg->saveSettings();
}
#if defined ( Q_OS_WIN) && defined (CFGCLIENT )
xsetWidg->saveSettings();
#endif
}
void ConfigDialog::slot_checkOkStat()
{
ok->setEnabled ( ( !gbLDAP->isChecked() ) ||
( ( ldapBase->text().length() &&
ldapServer->text().length() ) ) );
}
#ifdef Q_OS_WIN
QString ConfigDialog::getCygwinDir ( const QString& dir )
{
QString cygdir=QString::null;
QSettings lu_st ( "HKEY_CURRENT_USER\\Software"
"\\Cygnus Solutions\\Cygwin\\mounts v2\\"+
dir,QSettings::NativeFormat );
cygdir=lu_st.value ( "native", ( QVariant ) QString::null ).toString();
if ( cygdir!= QString::null )
return cygdir;
QSettings lm_st ( "HKEY_LOCAL_MACHINE\\SOFTWARE"
"\\Cygnus Solutions\\Cygwin\\mounts v2\\"+
dir,QSettings::NativeFormat );
return lm_st.value ( "native", ( QVariant ) QString::null ).toString();
}
#endif
#ifdef Q_OS_DARWIN
QString ConfigDialog::retMaxXDarwinVersion ( QString v1, QString v2 )
{
QStringList vl1=v1.split ( "." );
QStringList vl2=v2.split ( "." );
for ( int i=0;i<3;++i )
{
if ( vl1.count() vl2[i].toInt() ) ?v1:v2;
}
return v1;
}
QString ConfigDialog::findXDarwin ( QString& version, QString path )
{
if ( path=="" )
{
QString dir1="/Applications/Utilities/X11.app";
QString ver1="0.0.0";
if ( QFile::exists ( dir1+"/Contents/Info.plist" ) )
{
QSettings vst ( dir1+"/Contents/Info.plist",
QSettings::NativeFormat );
ver1=vst.value ( "CFBundleShortVersionString",
( QVariant ) "0.0.0" ).toString();
}
QString dir2="/usr/X11/X11.app";
QString ver2="0.0.0";;
if ( QFile::exists ( dir2+"/Contents/Info.plist" ) )
{
QSettings vst ( dir2+"/Contents/Info.plist",
QSettings::NativeFormat );
ver2=vst.value ( "CFBundleShortVersionString",
( QVariant ) "0.0.0" ).toString();
}
if ( retMaxXDarwinVersion ( ver1,ver2 ) ==ver1 )
{
version=ver1;
return dir1;
}
else
{
version=ver2;
return dir2;
}
}
version="0.0.0";
if ( QFile::exists ( path+"/Contents/Info.plist" ) )
{
QSettings vst ( path+"/Contents/Info.plist",
QSettings::NativeFormat );
version=vst.value ( "CFBundleShortVersionString",
( QVariant ) "0.0.0" ).toString();
}
return path;
}
void ConfigDialog::slot_findXDarwin()
{
QString version;
QString path=findXDarwin ( version );
if ( path=="" )
{
QMessageBox::warning (
this,tr ( "Warning" ),
tr ( "x2goclient could not find any suitable X11 "
"Application. Please install Apple X11 "
"or select the path to the application" ) );
}
QString minVer="2.1.0";
if ( retMaxXDarwinVersion ( minVer,version ) ==minVer )
{
printXDarwinVersionWarning ( version );
}
leXexec->setText ( path );
leCmdOpt->setText ( version );
}
void ConfigDialog::printXDarwinVersionWarning ( QString version )
{
QMessageBox::warning (
this,tr ( "Warning" ),
tr ( "Your are using X11 (Apple X-Window Server) version " )
+version+
tr ( ". This version causes problems with X-application in 24bit "
"color mode. You should update your X11 environment "
"(http://trac.macosforge.org/projects/xquartz)." ) );
}
void ConfigDialog::slot_selectXDarwin()
{
QString newDir=QFileDialog::getOpenFileName ( this,QString(),leXexec->text() +"/.." );
QString version;
if ( newDir.length() >0 )
{
findXDarwin ( version,newDir );
if ( version=="0.0.0" )
{
QMessageBox::warning (
this, tr ( "Warning" ),
tr ( "No suitable X11 application found "
"in selected path" ) );
return;
}
QString minVer="2.1.0";
if ( retMaxXDarwinVersion ( minVer,version ) ==minVer )
{
printXDarwinVersionWarning ( version );
}
leXexec->setText ( newDir );
leCmdOpt->setText ( version );
}
}
QString ConfigDialog::getXDarwinDirectory()
{
X2goSettings st ("settings");
return st.setting()->value ( "xdarwin/directory",
( QVariant ) "" ).toString() ;
}
#endif
void ConfigDialog::slotAdvClicked()
{
if ( advOptionsShown )
{
advancedOptions->setText ( tr ( "Advanced options" ) +" >>" );
conWidg->hide();
setWidg->hide();
conWidg->setParent ( this );
setWidg->setParent ( this );
tabWidg->removeTab ( 3 );
tabWidg->removeTab ( 2 );
}
else
{
tabWidg->addTab ( conWidg,tr ( "&Connection" ) );
tabWidg->addTab ( setWidg, tr ( "&Settings" ) );
advancedOptions->setText ( tr ( "Advanced options" ) +" <<" );
}
advOptionsShown=!advOptionsShown;
}
void ConfigDialog::slotDefaults()
{
switch ( tabWidg->currentIndex() )
{
case 0:
{
if ( embedMode )
cbStartEmbed->setChecked ( true );
clientSshPort->setValue ( 22 );
#ifndef CFGPLUGIN
gbTrayIcon->setChecked (false);
cbMinimizeTray->setChecked (false);
cbMaxmizeTray->setChecked ( false);
cbNoClose->setChecked (false);
cbMinToTray->setChecked (false);
#endif
}
break;
#if defined ( Q_OS_WIN) && defined (CFGCLIENT )
case 2:
{
xsetWidg->setDefaults();
}
break;
#else
case 1:
break;
case 2:
{
conWidg->setDefaults();
}
break;
case 3:
{
setWidg->setDefaults();
}
break;
#endif
}
}
x2goclient-4.0.1.1/configdialog.h 0000644 0000000 0000000 00000006507 12214040350 013414 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef CONFIGDIALOG_H
#define CONFIGDIALOG_H
#include "x2goclientconfig.h"
#include
class QLineEdit;
class QCheckBox;
class QSpinBox;
class QPushButton;
class QRadioButton;
class QButtonGroup;
class PrintWidget;
class ConnectionWidget;
class SettingsWidget;
class QTabWidget;
class QGroupBox;
#if defined (Q_OS_WIN) && defined (CFGCLIENT )
class XSettingsWidget;
#endif
/**
@author Oleksandr Shneyder
*/
class ConfigDialog : public QDialog
{
Q_OBJECT
public:
ConfigDialog ( QWidget * parent,
Qt::WFlags f = 0 );
~ConfigDialog();
#ifdef Q_OS_DARWIN
static QString findXDarwin ( QString& version,
QString path="" );
static QString retMaxXDarwinVersion ( QString v1,
QString v2 );
static QString getXDarwinDirectory();
void printXDarwinVersionWarning ( QString version );
#endif
#ifdef Q_OS_WIN
static QString getCygwinDir ( const QString& dir );
#endif
private:
QTabWidget* tabWidg;
QCheckBox* cbStartEmbed;
QLineEdit* ldapBase;
QLineEdit* ldapServer;
QSpinBox* port;
QLineEdit* ldapServer1;
QSpinBox* port1;
PrintWidget* pwid;
QLineEdit* ldapServer2;
bool embedMode;
QSpinBox* port2;
QSpinBox* clientSshPort;
QPushButton* ok;
bool advOptionsShown;
QGroupBox* gbLDAP;
QPushButton* defaults;
QPushButton* advancedOptions;
QLineEdit* leXexec;
QLineEdit* leCmdOpt;
QSpinBox* sbDisp;
QLineEdit* leXexecDir;
QRadioButton* rbX[3];
QPushButton* pbOpenExec;
QButtonGroup* bgRadio;
ConnectionWidget* conWidg;
SettingsWidget* setWidg;
#if defined ( Q_OS_WIN) && defined (CFGCLIENT )
XSettingsWidget* xsetWidg;
#endif
QGroupBox *gbTrayIcon;
QCheckBox *cbMinimizeTray;
QCheckBox *cbMaxmizeTray;
QCheckBox *cbNoClose;
QCheckBox *cbMinToTray;
public slots:
void slot_accepted();
void slot_checkOkStat();
private slots:
#ifdef Q_OS_DARWIN
void slot_selectXDarwin();
void slot_findXDarwin();
#endif
private slots:
void slotAdvClicked();
void slotDefaults();
};
#endif
x2goclient-4.0.1.1/config_linux_plugin.sh 0000755 0000000 0000000 00000000132 12214040350 015203 0 ustar #!/bin/bash
make distclean
lrelease x2goclient.pro
X2GO_CLIENT_TARGET=plugin qmake-qt4
x2goclient-4.0.1.1/config_linux.sh 0000755 0000000 0000000 00000000046 12214040350 013631 0 ustar #!/bin/bash
make distclean
qmake-qt4
x2goclient-4.0.1.1/config_linux_static_plugin.sh 0000755 0000000 0000000 00000000252 12214040350 016555 0 ustar #!/bin/bash
make distclean
export X2GO_LINUX_STATIC=x2go_linux_static
X2GO_CLIENT_TARGET=plugin /usr/local/Trolltech/Qt-4.7.1/bin/qmake -config release -spec linux-g++
x2goclient-4.0.1.1/config_linux_static.sh 0000755 0000000 0000000 00000000211 12214040350 015172 0 ustar #!/bin/bash
make distclean
X2GO_LINUX_STATIC=x2go_linux_static /usr/local/Trolltech/Qt-4.7.1/bin/qmake -config release -spec linux-g++
x2goclient-4.0.1.1/config_mac.sh 0000755 0000000 0000000 00000000062 12214040350 013230 0 ustar #!/bin/bash
make distclean
qmake -spec macx-g++
x2goclient-4.0.1.1/configwidget.cpp 0000644 0000000 0000000 00000003106 12214040350 013763 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "configwidget.h"
#include "onmainwindow.h"
ConfigWidget::ConfigWidget ( QString id, ONMainWindow * mw,
QWidget * parent, Qt::WindowFlags f )
: QFrame ( parent,f )
{
sessionId=id;
mainWindow=mw;
miniMode=mw->retMiniMode();
embedMode=embedMode= mw->getEmbedMode();
if(embedMode)
sessionId="embedded";
}
ConfigWidget::~ConfigWidget()
{
}
x2goclient-4.0.1.1/configwidget.h 0000644 0000000 0000000 00000003236 12214040350 013434 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef CONFIGWIDGET_H
#define CONFIGWIDGET_H
#include
#include "x2goclientconfig.h"
/**
@author Oleksandr Shneyder
*/
class ONMainWindow;
class ConfigWidget : public QFrame
{
public:
ConfigWidget ( QString id, ONMainWindow * mv,
QWidget * parent = 0, Qt::WindowFlags f = 0 );
~ConfigWidget();
protected:
bool miniMode;
bool embedMode;
QString sessionId;
ONMainWindow* mainWindow;
};
#endif
x2goclient-4.0.1.1/config_win.bat 0000755 0000000 0000000 00000000116 12214040350 013421 0 ustar mingw32-make distclean
lrelease x2goclient.pro
set X2GO_CLIENT_TARGET=
qmake
x2goclient-4.0.1.1/config_win_console.sh 0000755 0000000 0000000 00000000136 12214040350 015011 0 ustar #!/bin/bash
make distclean
/usr/local/Trolltech/Qt-4.7.1/bin/qmake -spec win32-x-g++-console
x2goclient-4.0.1.1/config_win_plugin.bat 0000755 0000000 0000000 00000000075 12214040350 015003 0 ustar mingw32-make distclean
set X2GO_CLIENT_TARGET=plugin
qmake
x2goclient-4.0.1.1/config_win_plugin.sh 0000755 0000000 0000000 00000000200 12214040350 014635 0 ustar #!/bin/bash
make distclean
X2GO_CLIENT_TARGET=plugin /usr/local/Trolltech/Qt-4.7.1/bin/qmake -config release -spec win32-x-g++
x2goclient-4.0.1.1/config_win.sh 0000755 0000000 0000000 00000000127 12214040350 013267 0 ustar #!/bin/bash
make distclean
/usr/local/Trolltech/Qt-4.7.1/bin/qmake -spec win32-x-g++
x2goclient-4.0.1.1/connectionwidget.cpp 0000644 0000000 0000000 00000013624 12214040350 014663 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "connectionwidget.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include "x2gosettings.h"
#include
#include
#include
#include "onmainwindow.h"
ConnectionWidget::ConnectionWidget ( QString id, ONMainWindow * mw,
QWidget * parent, Qt::WindowFlags f )
: ConfigWidget ( id,mw,parent,f )
{
QVBoxLayout *connLay=new QVBoxLayout ( this );
#ifndef Q_WS_HILDON
QGroupBox* netSpd=new QGroupBox ( tr ( "&Connection speed" ),this );
QVBoxLayout *spdLay=new QVBoxLayout ( netSpd );
#else
QFrame* netSpd=this ;
QVBoxLayout *spdLay=new QVBoxLayout ();
spdLay->addWidget ( new QLabel ( tr ( "Connection speed:" ),netSpd ) );
#endif
spd=new QSlider ( Qt::Horizontal,netSpd );
spd->setMinimum ( 0 );
spd->setMaximum ( 4 );
spd->setTickPosition ( QSlider::TicksBelow );
spd->setTickInterval ( 1 );
spd->setSingleStep ( 1 );
spd->setPageStep ( 1 );
QHBoxLayout *tickLay=new QHBoxLayout();
QHBoxLayout *slideLay=new QHBoxLayout();
slideLay->addWidget ( spd );
QLabel* mlab= new QLabel ( "MODEM",netSpd );
tickLay->addWidget ( mlab );
tickLay->addStretch();
tickLay->addWidget ( new QLabel ( "ISDN",netSpd ) );
tickLay->addStretch();
tickLay->addWidget ( new QLabel ( "ADSL",netSpd ) );
tickLay->addStretch();
tickLay->addWidget ( new QLabel ( "WAN",netSpd ) );
tickLay->addStretch();
tickLay->addWidget ( new QLabel ( "LAN",netSpd ) );
spdLay->addLayout ( slideLay );
spdLay->addLayout ( tickLay );
QFontMetrics fm ( mlab->font() );
slideLay->insertSpacing ( 0,fm.width ( "MODEM" ) /2 );
slideLay->addSpacing ( fm.width ( "LAN" ) /2 );
#ifndef Q_WS_HILDON
QGroupBox* compr=new QGroupBox ( tr ( "C&ompression" ),this );
QHBoxLayout* comprLay=new QHBoxLayout ( compr );
#else
QFrame* compr=this;
QHBoxLayout* comprLay=new QHBoxLayout ();
#endif
packMethode = new QComboBox ( this );
quali= new QSpinBox ( this );
quali->setRange ( 0,9 );
#ifdef Q_WS_HILDON
quali->setFixedHeight ( int ( quali->sizeHint().height() *1.5 ) );
#endif
QVBoxLayout* colLay=new QVBoxLayout();
QVBoxLayout* cowLay=new QVBoxLayout();
QHBoxLayout* spbl=new QHBoxLayout();
#ifndef Q_WS_HILDON
colLay->addWidget ( new QLabel ( tr ( "Method:" ),compr ) );
#else
colLay->addWidget ( new QLabel ( tr ( "Compression method:" ),compr ) );
#endif
colLay->addWidget ( qualiLabel=new QLabel ( tr ( "Image quality:" ),
compr ) );
cowLay->addWidget ( packMethode );
spbl->addWidget ( quali );
spbl->addStretch();
cowLay->addLayout ( spbl );
comprLay->addLayout ( colLay );
comprLay->addLayout ( cowLay );
#ifndef Q_WS_HILDON
connLay->addWidget ( netSpd );
connLay->addWidget ( compr );
#else
connLay->addLayout ( spdLay );
connLay->addLayout ( comprLay );
#endif
connLay->addStretch();
connect ( packMethode,SIGNAL ( activated ( const QString& ) ),this,
SLOT ( slot_changePack ( const QString& ) ) );
readConfig();
}
ConnectionWidget::~ConnectionWidget()
{
}
void ConnectionWidget::loadPackMethods()
{
QFile file ( ":/txt/packs" );
if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) )
return;
QTextStream in ( &file );
while ( !in.atEnd() )
{
QString pc=in.readLine();
if ( pc.indexOf ( "-%" ) !=-1 )
{
pc=pc.left ( pc.indexOf ( "-%" ) );
qualiList<addItem ( pc );
}
file.close();
}
void ConnectionWidget::slot_changePack ( const QString& pc )
{
bool ct=qualiList.contains ( pc );
quali->setEnabled ( ct );
qualiLabel->setEnabled ( ct );
}
void ConnectionWidget::readConfig()
{
loadPackMethods();
X2goSettings st ( "sessions" );
spd->setValue ( st.setting()->value (
sessionId+"/speed",
( QVariant ) mainWindow->getDefaultLink()
).toInt() );
QString mt=st.setting()->value (
sessionId+"/pack",
( QVariant ) mainWindow->getDefaultPack() ).toString();
packMethode->setCurrentIndex ( packMethode->findText ( mt ) );
quali->setValue ( st.setting()->value ( sessionId+"/quality",
mainWindow->getDefaultQuality() ).toInt() );
slot_changePack ( mt );
}
void ConnectionWidget::setDefaults()
{
spd->setValue ( 2 );
packMethode->setCurrentIndex (
packMethode->findText ( "16m-jpeg" ) );
quali->setValue ( 9 );
slot_changePack ( "16m-jpeg" );
}
void ConnectionWidget::saveSettings()
{
X2goSettings st ( "sessions" );
st.setting()->setValue ( sessionId+"/speed", ( QVariant ) spd->value() );
st.setting()->setValue ( sessionId+"/pack",
( QVariant ) packMethode->currentText() );
st.setting()->setValue ( sessionId+"/quality", ( QVariant ) quali->value() );
st.setting()->sync();
}
x2goclient-4.0.1.1/connectionwidget.h 0000644 0000000 0000000 00000003752 12214040350 014331 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef CONNECTIONWIDGET_H
#define CONNECTIONWIDGET_H
#include "configwidget.h"
#include
/**
@author Oleksandr Shneyder
*/
class QPushButton;
class QLabel;
class QSlider;
class QStringList;
class ONMainWindow;
class QComboBox;
class QSpinBox;
class ConnectionWidget : public ConfigWidget
{
Q_OBJECT
public:
ConnectionWidget ( QString id, ONMainWindow * mw,
QWidget * parent=0, Qt::WindowFlags f=0 );
~ConnectionWidget();
void setDefaults();
void saveSettings();
private slots:
void slot_changePack ( const QString& pc );
private:
void loadPackMethods();
private:
QLabel* qualiLabel;
QSlider *spd;
QStringList qualiList;
QComboBox* packMethode;
QSpinBox* quali;
private:
void readConfig();
};
#endif
x2goclient-4.0.1.1/contest.cpp 0000644 0000000 0000000 00000012354 12214040350 012776 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "contest.h"
#include "x2gologdebug.h"
#include
#include "httpbrokerclient.h"
#include
ConTest::ConTest(HttpBrokerClient* broker, QUrl url, QWidget* parent, Qt::WindowFlags f): QDialog(parent, f)
{
socket=0l;
setupUi(this);
this->broker=broker;
brokerUrl=url;
timer=new QTimer(this);
connect(timer,SIGNAL(timeout()),this,SLOT(slotTimer()));
connect(broker,SIGNAL(connectionTime(int,int)),this, SLOT(slotConSpeed(int,int)));
start();
}
ConTest::~ConTest()
{
}
void ConTest::resetSocket()
{
if (socket)
{
socket->disconnectFromHost();
socket->close();
delete socket;
socket=0l;
}
}
void ConTest::reset()
{
timer->stop();
lhttps->setText("");
lssh->setText("");
lspeed->setText("");
prhttps->setValue(0);
prspeed->setValue(0);
prssh->setValue(0);
httpsOk=false;
resetSocket();
buttonBox->button(QDialogButtonBox::Retry)->setEnabled(false);
}
void ConTest::start()
{
reset();
testConnection(HTTPS);
}
void ConTest::testConnection(tests test)
{
time=0;
timer->start(100);
resetSocket();
currentTest=test;
if (test==SPEED)
{
if (!httpsOk)
{
slotConSpeed(1,0);
return;
}
broker->testConnection();
return;
}
socket=new QTcpSocket(this);
socket->connectToHost(brokerUrl.host(),test);
connect( socket,SIGNAL(connected()),this,SLOT(slotConnected()));
connect( socket, SIGNAL(error(QAbstractSocket::SocketError)),this,SLOT(slotError(QAbstractSocket::SocketError)));
}
void ConTest::slotConnected()
{
x2goDebug<<"connected\n";
timer->stop();
QPalette pal=lhttps->palette();
pal.setColor(QPalette::WindowText, Qt::green);
switch (currentTest)
{
case HTTPS:
prhttps->setValue(100);
lhttps->setText(tr("OK"));
lhttps->setPalette(pal);
httpsOk=true;
testConnection(SSH);
break;
case SSH:
prssh->setValue(100);
lssh->setText(tr("OK"));
lssh->setPalette(pal);
testConnection(SPEED);
break;
default:
break;
}
}
void ConTest::slotConSpeed(int msecElapsed, int bytesRecived)
{
timer->stop();
prspeed->setValue(100);
double sec=msecElapsed/1000.;
int KB=bytesRecived/1024;
int Kbsec=(int)(KB/sec)*8;
QPalette pal=lspeed->palette();
pal.setColor(QPalette::WindowText, Qt::green);
if (Kbsec<1000)
pal.setColor(QPalette::WindowText, Qt::yellow);
if (Kbsec<512)
pal.setColor(QPalette::WindowText, Qt::red);
lspeed->setPalette(pal);
lspeed->setText(QString::number(Kbsec)+" Kb/s");
buttonBox->button(QDialogButtonBox::Retry)->setEnabled(true);
}
void ConTest::slotError(QAbstractSocket::SocketError socketError)
{
QString error;
if (socketError==QAbstractSocket::SocketTimeoutError)
error=tr("Socket operation timed out");
else
error=socket->errorString();
x2goDebug<<"Error: "<stop();
QPalette pal=lhttps->palette();
pal.setColor(QPalette::WindowText, Qt::red);
switch (currentTest)
{
case HTTPS:
prhttps->setValue(100);
lhttps->setText(tr("Failed: ")+error);
lhttps->setPalette(pal);
testConnection(SSH);
break;
case SSH:
prssh->setValue(100);
lssh->setText(tr("Failed: ")+error);
lssh->setPalette(pal);
testConnection(SPEED);
break;
default:
break;
}
}
void ConTest::slotTimer()
{
time++;
if (time>150)
{
if (currentTest==SSH || currentTest==HTTPS)
{
socket->close();
slotError(QAbstractSocket::SocketTimeoutError);
}
}
QProgressBar* bar=0l;
switch (currentTest)
{
case SSH:
bar=prssh;
break;
case HTTPS:
bar=prhttps;
break;
case SPEED:
bar=prspeed;
break;
}
if (bar->value()==100)
bar->setValue(0);
else
bar->setValue(bar->value()+10);
}
x2goclient-4.0.1.1/contest.h 0000644 0000000 0000000 00000004062 12214040350 012440 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef CONTEST_H
#define CONTEST_H
#include
#include "ui_contest.h"
#include
#include
class HttpBrokerClient;
class QTcpSocket;
class QTimer;
class ConTest : public QDialog, public Ui_ConTest
{
Q_OBJECT
public:
ConTest(HttpBrokerClient* broker, QUrl url, QWidget* parent = 0, Qt::WindowFlags f = 0);
virtual ~ConTest();
private:
enum tests {SSH=22,HTTPS=443,SPEED} currentTest;
void reset();
void testConnection(tests test);
void resetSocket();
private slots:
void slotConnected();
void slotError(QAbstractSocket::SocketError socketError);
void slotTimer();
void slotConSpeed(int msecElapsed, int bytesRecived);
private:
HttpBrokerClient* broker;
QUrl brokerUrl;
QTcpSocket* socket;
QTimer* timer;
int time;
bool httpsOk;
public slots:
void start();
};
#endif // CONTEST_H
x2goclient-4.0.1.1/contest.ui 0000644 0000000 0000000 00000016500 12214040350 012626 0 ustar
Oleksandr Shneyder(o.shneyder@phoca-gmbh.de)
ConTest
0
0
336
161
Connectivity test
-
-
-
HTTPS connection:
-
SSH connection:
-
Connection speed:
-
-
24
false
false
-
24
false
-
24
false
-
-
255
0
0
255
0
0
146
145
144
Failed
-
255
0
0
255
0
0
146
145
144
Failed
-
255
0
0
255
0
0
146
145
144
0 Kb/s
-
Qt::Vertical
20
4
-
Qt::Horizontal
QDialogButtonBox::Close|QDialogButtonBox::Retry
buttonBox
rejected()
ConTest
reject()
281
132
286
146
buttonBox
accepted()
ConTest
start()
242
122
4
84
start()
x2goclient-4.0.1.1/COPYING 0000644 0000000 0000000 00000043106 12214040350 011645 0 ustar GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
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
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
x2goclient-4.0.1.1/COPYRIGHT.x2go-logos 0000644 0000000 0000000 00000001540 12214040350 014100 0 ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: X2Go-artwork [~X]
Upstream-Contact: Heinz-M. Graesing
Files: x2go-logos/mksizedsymbols.sh
Copyright: 2006-2012 Heinz-M. Graesing
License: GPL-2.0+
x2go-logos/x2go-logo-colored.svg
x2go-logos/x2go-logo.svg
x2go-logos/x2go-logo-rotated.svg
x2go-logos/x2go-mascot.svg
Copyright: 2006-2012 Heinz-M. Grasesing
License: GPL-2.0+
Files: icons/16x16/x2goclient.png
icons/32x32/x2goclient.png
icons/48x48/x2goclient.png
icons/64x64/x2goclient.png
icons/128x128/x2goclient.png
Copyright: 2006-2012 Heinz-M. Graesing
License: GPL-2.0+
x2goclient-4.0.1.1/cupsprint.cpp 0000644 0000000 0000000 00000024227 12214040350 013350 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "cupsprint.h"
#ifndef Q_OS_WIN
#include "x2gologdebug.h"
#include "x2gosettings.h"
#include
CUPSPrint::CUPSPrint()
{
ppd=0l;
num_dests= cupsGetDests ( &dests );
}
CUPSPrint::~CUPSPrint()
{
cupsFreeDests ( num_dests, dests );
if ( ppd )
ppdClose ( ppd );
ppd=0l;
}
QStringList CUPSPrint::getPrinters()
{
QStringList printers;
for ( int i=0;ivalue (
"CUPS/defaultprinter","" ). toString();
if ( defPrint.length() >0 )
{
cups_dest_t *dest = cupsGetDest ( defPrint.toAscii(),
0l, num_dests, dests );
if ( dest )
return defPrint;
}
cups_dest_t *dest = cupsGetDest ( 0l, 0l, num_dests, dests );
if ( dest )
defPrint=dest->name;
return defPrint;
}
void CUPSPrint::setDefaultUserPrinter ( QString printer )
{
X2goSettings st ( "printing" );
st.setting()->setValue ( "CUPS/defaultprinter", QVariant ( printer ) );
}
bool CUPSPrint::getPrinterInfo ( const QString& printerName, QString& info,
bool& acceptJobs, QString& location,
QString& model, printState& state,
QString& stateReason )
{
cups_dest_t *dest = cupsGetDest ( printerName.toAscii(), 0l,
num_dests,
dests );
if ( !dest )
return false;
acceptJobs=qstrcmp ( cupsGetOption ( "printer-is-accepting-jobs",
dest->num_options,
dest->options ),"0" );
info=QString::fromLocal8Bit (
cupsGetOption ( "printer-info",
dest->num_options, dest->options ) );
location=QString::fromLocal8Bit (
cupsGetOption ( "printer-location",
dest->num_options, dest->options ) );
model=QString::fromLocal8Bit (
cupsGetOption ( "printer-make-and-model",
dest->num_options, dest->options ) );
QString st=cupsGetOption ( "printer-state",
dest->num_options, dest->options );
state=NDEF;
if ( st=="3" )
state=IDLE;
if ( st=="4" )
state=PRINTING;
if ( st=="5" )
state=STOPPED;
stateReason=QString::fromLocal8Bit (
cupsGetOption ( "printer-state-reasons",
dest->num_options, dest->options ) );
return true;
}
bool CUPSPrint::setCurrentPrinter ( QString prn )
{
currentPrinter=prn;
QString fl=cupsGetPPD ( prn.toAscii() );
if ( fl.length() <=0 )
return false;
if ( ppd )
ppdClose ( ppd );
ppd=0l;
ppd=ppdOpenFile ( fl.toAscii() );
unlink ( fl.toAscii() );
if ( ppd==0l )
return false;
ppdMarkDefaults ( ppd );
loadUserOptions();
if ( ppdConflicts ( ppd ) !=0 )
{
x2goDebug<<"There are conflicting options in user settings,\n"
"loading defaults"<defchoice );
if ( !choice )
return false;
}
value=QString::fromLocal8Bit ( choice->choice );
valueText=QString::fromLocal8Bit ( choice->text );
// x2goDebug<<"getValue:"<num_choices;++k )
{
ppd_choice_t* choice=& ( opt->choices[k] );
if ( choice->marked )
{
cur_val=values.size();
}
//if no choice is marked, return default
if ( !qstrcmp ( choice->choice,opt->defchoice ) && cur_val==-1 )
{
cur_val=values.size();
}
values<choice );
descriptions<text );
}
return cur_val;
}
int CUPSPrint::getOptionGroups ( QStringList& names, QStringList& texts )
{
names.clear();
texts.clear();
if ( !ppd )
return -1;
for ( int i=0;inum_groups;++i )
{
ppd_group_t* group=& ( ppd->groups[i] );
names<name );
texts<text );
}
return names.size();
}
int CUPSPrint::getOptionsList ( const QString& groupName, QStringList& names,
QStringList& texts )
{
names.clear();
texts.clear();
if ( !ppd )
return -1;
for ( int i=0;inum_groups;++i )
{
ppd_group_t* group=& ( ppd->groups[i] );
if ( groupName.length() >0 && groupName !=
QString::fromLocal8Bit ( group->name ) )
continue;
for ( int j=0;jnum_options;++j )
{
ppd_option_t* option=& ( group->options[j] );
names<keyword );
texts<text );
}
}
return names.size();
}
bool CUPSPrint::setValue ( const QString& option, const QString& value,
QString& conflict_opt, QString& conflict_val )
{
if ( !ppd )
return false;
int conflictsBefore= ppdConflicts ( ppd );
QString valueBefore, textBefore;
if ( !getOptionValue ( option,valueBefore,textBefore ) )
return false;
ppdMarkOption ( ppd,option.toAscii(),value.toAscii() );
if ( conflictsBefore==ppdConflicts ( ppd ) )
{
return true;
}
//find conflicting option
for ( int i=0;inum_consts;++i )
{
QString confOpt,confVal;
if ( option==ppd->consts[i].option1 &&
value==ppd->consts[i].choice1 )
{
confOpt=ppd->consts[i].option2;
confVal=ppd->consts[i].choice2;
}
else if ( option==ppd->consts[i].option2 &&
value==ppd->consts[i].choice2 )
{
confOpt=ppd->consts[i].option1;
confVal=ppd->consts[i].choice1;
}
else
continue;
QString selectedValue, selectedText;
if ( getOptionValue ( confOpt,selectedValue,selectedText ) )
{
if ( selectedValue==confVal )
{
//conflicting option/choice found
conflict_val=confVal;
conflict_opt=confOpt;
break;
}
}
}
//set previous value
ppdMarkOption ( ppd,option.toAscii(),valueBefore.toAscii() );
return false;
}
bool CUPSPrint::getOptionText ( const QString& option, QString& text )
{
if ( !ppd )
return false;
ppd_option_t* opt=ppdFindOption ( ppd,option .toAscii() );
if ( !opt )
return false;
text=QString::fromLocal8Bit ( opt->text );
return true;
}
void CUPSPrint::setDefaults()
{
//don't use ppdMarkDefaults here
//ppdMarkDefaults do not unmark
//already marked choices
if ( !ppd )
return;
for ( int i=0;inum_groups;++i )
{
ppd_group_t* group=& ( ppd->groups[i] );
for ( int j=0;jnum_options;++j )
{
ppd_option_t* option=& ( group->options[j] );
ppdMarkOption ( ppd,option->keyword,option->defchoice );
}
}
}
void CUPSPrint::saveOptions()
{
if ( !ppd )
return;
X2goSettings st( "printing" );
QStringList options;
for ( int i=0;inum_groups;++i )
{
ppd_group_t* group=& ( ppd->groups[i] );
for ( int j=0;jnum_options;++j )
{
ppd_option_t* option=& ( group->options[j] );
QString val,valtext;
if ( !getOptionValue ( option->keyword,val,valtext ) )
continue; //something is wrong here
if ( val!=option->defchoice )
{
QString opt=option->keyword;
opt+="="+val;
options<setValue ( "CUPS/options/"+currentPrinter,
QVariant ( options ) );
}
void CUPSPrint::loadUserOptions()
{
X2goSettings st ( "printing" );
QStringList options=st.setting()->value (
"CUPS/options/"+currentPrinter ).toStringList();
for ( int i=0;inum_groups;++i )
{
ppd_group_t* group=& ( ppd->groups[i] );
for ( int j=0;jnum_options;++j )
{
ppd_option_t* option=& ( group->options[j] );
QString val,valtext;
if ( !getOptionValue ( option->keyword,val,valtext ) )
continue; //something is wrong here
if ( val!=option->defchoice )
{
num_options = cupsAddOption ( option->keyword,
val.toAscii(),
num_options,
&options );
}
}
}
cupsPrintFile ( currentPrinter.toAscii(),file.toAscii(),
title.toAscii(), num_options,options );
cupsFreeOptions ( num_options, options );
}
#endif
x2goclient-4.0.1.1/cupsprintersettingsdialog.cpp 0000644 0000000 0000000 00000026314 12214040350 016637 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "cupsprintersettingsdialog.h"
#include "cupsprint.h"
#ifndef Q_OS_WIN
#include
#include
#include
CUPSPrinterSettingsDialog::CUPSPrinterSettingsDialog (
QString prnName,
CUPSPrint* cupsObject,
QWidget * parent,
Qt::WFlags flags
) :QDialog ( parent, flags )
{
m_cups=cupsObject;
printer=prnName;
ui.setupUi ( this );
setWindowTitle ( prnName );
QList sz;
sz<<250<<100;
ui.splitter->setSizes ( sz );
if ( !m_cups->setCurrentPrinter ( printer ) )
{
//message here
close();
}
setGeneralTab();
setPPDTab();
connect ( ( QObject* ) ( ui.buttonBox->button (
QDialogButtonBox::RestoreDefaults ) ),
SIGNAL ( clicked() ),this,SLOT ( slot_restoreDefaults() ) );
connect ( ( QObject* ) ( ui.buttonBox->button (
QDialogButtonBox::Save ) ),
SIGNAL ( clicked() ),this,SLOT ( slot_saveOptions() ) );
connect ( ( QObject* ) ( ui.buttonBox->button (
QDialogButtonBox::Cancel ) ),
SIGNAL ( clicked() ),this,SLOT ( reject() ) );
connect ( ( QObject* ) ( ui.buttonBox->button (
QDialogButtonBox::Ok ) ),
SIGNAL ( clicked() ),this,SLOT ( slot_ok() ) );
}
CUPSPrinterSettingsDialog::~CUPSPrinterSettingsDialog()
{
}
void CUPSPrinterSettingsDialog::setCbBox ( QComboBox* cb,
QString optionKeyword )
{
QStringList values;
QStringList descriptions;
int cur_val=m_cups->getOptionValues ( optionKeyword,
values,descriptions );
if ( cur_val==-1 )
cb->setEnabled ( false );
else
{
cb->addItems ( descriptions );
cb->setCurrentIndex ( cur_val );
}
}
void CUPSPrinterSettingsDialog::slot_optionSelected ( QTreeWidgetItem * current,
QTreeWidgetItem * )
{
ui.optionsTree->clear();
if ( current )
if ( current->childCount() ==0 )
{
ui.gbOptions->setTitle ( current->text ( 0 ) );
QStringList valueNames, valueTexts;
int selectedValue=m_cups->
getOptionValues (
current->text ( 2 ),
valueNames,valueTexts );
for ( int i=0;isetText ( 0,valueTexts[i] );
ritem->setText ( 1,valueNames[i] );
if ( i==selectedValue )
ui.optionsTree->setCurrentItem (
ritem );
}
return;
}
ui.gbOptions->setTitle ( tr ( "No option selected" ) );
}
void CUPSPrinterSettingsDialog::slot_valueSelected ( QTreeWidgetItem * current,
QTreeWidgetItem * )
{
if ( !current )
return;
QTreeWidgetItem* optionItem=ui.ppdTree->currentItem();
QString option=optionItem->text ( 2 );
QString newVal=current->text ( 1 );
QString prevVal,prevText;
m_cups->getOptionValue ( option,prevVal,prevText );
if ( prevVal==newVal )
return;
//we need change current item
//do it outside this function
setNewValue ( option,newVal ) ;
QTimer::singleShot ( 1, this, SLOT ( slot_reloadValues() ) );
m_cups->getOptionValue ( option,prevVal,prevText );
optionItem->setText ( 1,prevText );
optionItem->setText ( 3,prevVal );
setGeneralTab();
}
void CUPSPrinterSettingsDialog::setGeneralTab()
{
disconnect ( ui.cbPageSize,SIGNAL ( currentIndexChanged ( int ) ),
this,SLOT ( slot_changePSize ( int ) ) );
disconnect ( ui.cbMediaType,SIGNAL ( currentIndexChanged ( int ) ),
this,SLOT ( slot_changePType ( int ) ) );
disconnect ( ui.cbInputSlot,SIGNAL ( currentIndexChanged ( int ) ),
this,SLOT ( slot_changeISlot ( int ) ) );
disconnect ( ui.rbNone,SIGNAL ( clicked ( ) ),
this,SLOT ( slot_changeDuplex() ) );
disconnect ( ui.rbShort,SIGNAL ( clicked ( ) ),
this,SLOT ( slot_changeDuplex() ) );
disconnect ( ui.rbLong,SIGNAL ( clicked ( ) ),
this,SLOT ( slot_changeDuplex() ) );
ui.cbPageSize->clear();
ui.cbMediaType->clear();
ui.cbInputSlot->clear();
setCbBox ( ui.cbPageSize,"PageSize" );
setCbBox ( ui.cbMediaType,"MediaType" );
setCbBox ( ui.cbInputSlot,"InputSlot" );
QString valueName, valueText;
ui.rbNone->setChecked ( true );
if ( m_cups->getOptionValue ( "Duplex",valueName,valueText ) )
{
if ( valueName=="DuplexTumble" )
ui.rbShort->setChecked ( true );
if ( valueName=="DuplexNoTumble" )
ui.rbLong->setChecked ( true );
}
else
ui.gbDuplex->setEnabled ( false );
connect ( ui.cbPageSize,SIGNAL ( currentIndexChanged ( int ) ),
this,SLOT ( slot_changePSize ( int ) ) );
connect ( ui.cbMediaType,SIGNAL ( currentIndexChanged ( int ) ),
this,SLOT ( slot_changePType ( int ) ) );
connect ( ui.cbInputSlot,SIGNAL ( currentIndexChanged ( int ) ),
this,SLOT ( slot_changeISlot ( int ) ) );
connect ( ui.rbNone,SIGNAL ( clicked ( ) ),
this,SLOT ( slot_changeDuplex() ) );
connect ( ui.rbShort,SIGNAL ( clicked ( ) ),
this,SLOT ( slot_changeDuplex() ) );
connect ( ui.rbLong,SIGNAL ( clicked ( ) ),
this,SLOT ( slot_changeDuplex() ) );
}
void CUPSPrinterSettingsDialog::setPPDTab()
{
disconnect ( ui.ppdTree,
SIGNAL ( currentItemChanged ( QTreeWidgetItem*,
QTreeWidgetItem* ) ),
this,
SLOT ( slot_optionSelected ( QTreeWidgetItem*,
QTreeWidgetItem* ) ) );
disconnect ( ui.optionsTree,
SIGNAL ( currentItemChanged ( QTreeWidgetItem*,
QTreeWidgetItem* ) ),
this,
SLOT ( slot_valueSelected ( QTreeWidgetItem*,
QTreeWidgetItem* ) ) );
QString info;
bool acceptJobs;
QString location;
QString model;
CUPSPrint::printState state;
QString stateReason;
QString valueName,valueText;
!m_cups->getPrinterInfo ( printer,
info,acceptJobs,
location,model,state,stateReason ) ;
ui.ppdTree->clear();
QTreeWidgetItem* ritem=new QTreeWidgetItem ( ( QTreeWidgetItem* ) 0,
QTreeWidgetItem::Type ) ;
ritem->setText ( 0,model );
ui.ppdTree->addTopLevelItem ( ritem );
QStringList grName, grText;
m_cups->getOptionGroups ( grName,grText );
for ( int i=0;isetText ( 0,grText[i] );
gritem->setText ( 2,grName[i] );
QStringList optName, optText;
m_cups->getOptionsList ( grName[i],optName,optText );
for ( int j=0;jsetText ( 0,optText[j] );
optitem->setText ( 2,optName[j] );
m_cups->getOptionValue ( optName[j],valueName,
valueText );
optitem->setText ( 1,valueText );
optitem->setText ( 3,valueName );
}
}
ui.ppdTree->expandAll();
ui.ppdTree->header()->resizeSections ( QHeaderView::ResizeToContents );
slot_optionSelected ( ritem,0l );
connect ( ui.ppdTree,
SIGNAL ( currentItemChanged ( QTreeWidgetItem*,
QTreeWidgetItem* ) ),
this,
SLOT ( slot_optionSelected ( QTreeWidgetItem*,
QTreeWidgetItem* ) ) );
connect ( ui.optionsTree,
SIGNAL ( currentItemChanged ( QTreeWidgetItem*,
QTreeWidgetItem* ) ),
this,
SLOT ( slot_valueSelected ( QTreeWidgetItem*,
QTreeWidgetItem* ) ) );
}
bool CUPSPrinterSettingsDialog::setNewValue ( const QString& option,
const QString& value )
{
QString confVal,confOpt;
bool res=m_cups->setValue ( option,value,confOpt,confVal );
if ( !res )
{
QString textMessage=
tr ( "This value is in conflict with other option" );
QString txt;
m_cups->getOptionText ( confOpt,txt );
QString val,valt;
m_cups->getOptionValue ( confOpt,val,valt );
if ( confOpt.length() >0 &&confVal.length() >0 )
{
textMessage+="\n("+txt+" : "+valt+")";
}
QMessageBox::critical ( this,tr ( "Options conflict" ),
textMessage );
}
return res;
}
void CUPSPrinterSettingsDialog::slot_reloadValues()
{
if ( ui.ppdTree->currentItem() )
slot_optionSelected ( ui.ppdTree->currentItem(),0l );
QTreeWidgetItemIterator it ( ui.ppdTree );
while ( *it )
{
if ( ( *it )->childCount() ==0 )
{
QString opt= ( *it )->text ( 2 );
QString nval,ntext;
m_cups->getOptionValue ( opt,nval,ntext );
if ( ( *it )->text ( 3 ) != nval )
( *it )->setText ( 1,ntext );
( *it )->setText ( 3,nval );
}
++it;
}
}
void CUPSPrinterSettingsDialog::slot_changePSize ( int ind )
{
changeFromCbBox ( "PageSize",ind );
}
void CUPSPrinterSettingsDialog::slot_changePType ( int ind )
{
changeFromCbBox ( "MediaType",ind );
}
void CUPSPrinterSettingsDialog::slot_changeISlot ( int ind )
{
changeFromCbBox ( "InputSlot",ind );
}
void CUPSPrinterSettingsDialog::changeFromCbBox ( const QString& opt, int id )
{
QStringList vals,texts;
m_cups->getOptionValues ( opt,vals,texts );
if ( vals.size() isChecked() )
{
changeGeneralOption ( "Duplex","DuplexTumble" );
}
if ( ui.rbLong->isChecked() )
{
changeGeneralOption ( "Duplex","DuplexNoTumble" );
}
if ( ui.rbNone->isChecked() )
{
changeGeneralOption ( "Duplex","None" );
}
}
void CUPSPrinterSettingsDialog::changeGeneralOption ( const QString& option,
const QString& val )
{
if ( !setNewValue ( option,val ) )
QTimer::singleShot ( 1, this, SLOT ( setGeneralTab() ) );
slot_reloadValues();
}
void CUPSPrinterSettingsDialog::slot_restoreDefaults()
{
m_cups->setDefaults();
setGeneralTab();
slot_reloadValues();
}
void CUPSPrinterSettingsDialog::slot_saveOptions()
{
m_cups->saveOptions();
}
void CUPSPrinterSettingsDialog::slot_ok()
{
m_cups->saveOptions();
accept();
}
#endif
x2goclient-4.0.1.1/cupsprintersettingsdialog.h 0000644 0000000 0000000 00000005256 12214040350 016306 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef CUPSPRINTERSETTINGSDIALOG_H
#define CUPSPRINTERSETTINGSDIALOG_H
#include "x2goclientconfig.h"
#ifndef Q_OS_WIN
#include
#include "ui_cupsprintsettingsdialog.h"
/**
@author Oleksandr Shneyder
*/
class CUPSPrint;
class CUPSPrinterSettingsDialog : public QDialog
{
Q_OBJECT
public:
enum tabs{GENERAL,PPD};
CUPSPrinterSettingsDialog ( QString prnName,
CUPSPrint* cupsObject,
QWidget * parent=0l,
Qt::WFlags flags =0 );
~CUPSPrinterSettingsDialog();
private:
CUPSPrint* m_cups;
Ui::CupsPrinterSettingsDialog ui;
QString printer;
private:
void setCbBox ( QComboBox* cb, QString optionKeyword );
void setPPDTab();
bool setNewValue ( const QString& option,
const QString& value );
void changeFromCbBox ( const QString& opt, int id );
void changeGeneralOption ( const QString& option,
const QString& val );
private slots:
void slot_optionSelected ( QTreeWidgetItem * current,
QTreeWidgetItem * previous );
void slot_valueSelected ( QTreeWidgetItem * current,
QTreeWidgetItem * previous );
void slot_reloadValues();
void slot_changePSize ( int ind );
void slot_changePType ( int ind );
void slot_changeISlot ( int ind );
void slot_changeDuplex();
void setGeneralTab();
void slot_restoreDefaults();
void slot_saveOptions();
void slot_ok();
};
#endif
#endif
x2goclient-4.0.1.1/cupsprint.h 0000644 0000000 0000000 00000005374 12214040350 013017 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef CUPSPRINT_H
#define CUPSPRINT_H
#include "x2goclientconfig.h"
#ifndef Q_OS_WIN
#include
#include
#include
/**
@author Oleksandr Shneyder
*/
class CUPSPrint
{
public:
enum printState {NDEF,IDLE,PRINTING,STOPPED};
CUPSPrint();
~CUPSPrint();
void setDefaultUserPrinter ( QString printer );
QString getDefaultUserPrinter();
QStringList getPrinters();
bool getPrinterInfo ( const QString& printerName,
QString& info, bool& acceptJobs,
QString& location, QString& model,
printState& state, QString& stateReason );
bool setCurrentPrinter ( QString );
bool getOptionValue ( const QString& option,
QString& value, QString& valueText );
int getOptionValues ( const QString& option,
QStringList& values,
QStringList& descriptions );
int getOptionGroups ( QStringList& names, QStringList& texts );
int getOptionsList ( const QString& group, QStringList& names,
QStringList& texts );
bool setValue ( const QString& option, const QString& value,
QString& conflict_opt, QString& conflict_val );
bool getOptionText ( const QString& option, QString& text );
void setDefaults();
void saveOptions();
void print ( const QString& file, QString title="" );
private:
cups_dest_t *dests;
int num_dests;
ppd_file_t *ppd;
QString currentPrinter;
private:
void loadUserOptions();
};
#endif
#endif
x2goclient-4.0.1.1/cupsprintsettingsdialog.ui 0000644 0000000 0000000 00000015775 12214040350 016154 0 ustar
Oleksandr Shneyder(o.shneyder@phoca-gmbh.de)
CupsPrinterSettingsDialog
0
0
503
551
0
0
Dialog
-
0
0
0
General
-
-
-
Page size:
-
0
0
-
Paper type:
-
-
Paper source:
-
-
Qt::Horizontal
40
20
-
Duplex Printing
-
None
-
Long side
-
Short side
-
Qt::Vertical
20
211
Driver settings
-
true
Qt::Vertical
false
false
true
true
true
false
Option
Value
No option selected
-
false
false
true
false
text
-
QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Save
false
x2goclient-4.0.1.1/cupsprintwidget.cpp 0000644 0000000 0000000 00000006315 12214040350 014552 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "cupsprint.h"
#include "cupsprintwidget.h"
#ifndef Q_OS_WIN
#include "x2gologdebug.h"
#include "cupsprintersettingsdialog.h"
CUPSPrintWidget::CUPSPrintWidget ( QWidget* parent )
: QWidget ( parent )
{
m_cups=new CUPSPrint;
ui.setupUi ( this );
ui.cbPrinters->addItems ( m_cups->getPrinters() );
int defind=ui.cbPrinters->findText ( m_cups->getDefaultUserPrinter() );
if ( defind!=-1 )
{
ui.cbPrinters->setCurrentIndex ( defind );
slot_printerSelected ( defind );
}
connect ( ui.cbPrinters,
SIGNAL ( currentIndexChanged ( int ) ),
this,SLOT ( slot_printerSelected ( int ) ) ) ;
connect ( ui.pbProps,
SIGNAL ( clicked() ),
this, SLOT ( slot_printerSettings() ) );
}
CUPSPrintWidget::~CUPSPrintWidget()
{
delete m_cups;
}
void CUPSPrintWidget::slot_printerSelected ( int index )
{
if ( index == -1 )
return;
QString info;
bool acceptJobs;
QString location;
QString model;
CUPSPrint::printState state;
QString stateReason;
if ( !m_cups->getPrinterInfo ( ui.cbPrinters->currentText(),
info,acceptJobs,
location,model,state,stateReason ) )
return;
QString stText;
switch ( state )
{
case CUPSPrint::IDLE:
stText=tr ( "Idle" );
break;
case CUPSPrint::PRINTING:
stText=tr ( "Printing" );
break;
case CUPSPrint::STOPPED:
stText=tr ( "Stopped" );
break;
default:
break;
}
if ( stateReason.length() >0 && stateReason != "none" )
stText+= " ("+stateReason+")";
ui.lState->setText ( stText );
( acceptJobs ) ?ui.lJAccept->setText (
tr ( "Yes" ) ) :ui.lJAccept->setText ( tr ( "No" ) );
ui.lType->setText ( info );
ui.lLocation->setText ( location );
ui.lComment->setText ( model );
}
void CUPSPrintWidget::slot_printerSettings()
{
CUPSPrinterSettingsDialog dlg ( ui.cbPrinters->currentText(),
m_cups,this );
dlg.exec();
}
void CUPSPrintWidget::savePrinter()
{
m_cups->setDefaultUserPrinter ( ui.cbPrinters->currentText() );
}
#endif
x2goclient-4.0.1.1/cupsprintwidget.h 0000644 0000000 0000000 00000003364 12214040350 014220 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef CUPSPRINTWIDGET_H
#define CUPSPRINTWIDGET_H
#include
#include "x2goclientconfig.h"
#ifndef Q_OS_WIN
#include "cupsprint.h"
#include "ui_cupsprintwidget.h"
/**
@author Oleksandr Shneyder
*/
class CUPSPrintWidget : public QWidget
{
Q_OBJECT
public:
CUPSPrintWidget ( QWidget* parent =0 );
~CUPSPrintWidget();
void savePrinter();
private:
CUPSPrint* m_cups;
Ui::CUPSPrintWidget ui;
private slots:
void slot_printerSelected ( int index );
void slot_printerSettings();
};
#endif
#endif
x2goclient-4.0.1.1/cupsprintwidget.ui 0000644 0000000 0000000 00000006010 12214040350 014375 0 ustar
Oleksandr Shneyder(o.shneyder@phoca-gmbh.de)
CUPSPrintWidget
0
0
362
292
0
0
Form
-
Name:
-
0
0
-
Properties
-
State:
-
-
Accepting jobs:
-
-
Type:
-
-
Location:
-
-
Comment:
-
x2goclient-4.0.1.1/debian/changelog 0000644 0000000 0000000 00000104606 12214040350 013711 0 ustar x2goclient (4.0.1.1-0~x2go1) unstable; urgency=low
[ Nicolai Hansen ]
* New upstream version (4.0.1.1):
- Update Danish translation file.
[ Terje Andersen ]
* New upstream version (4.0.1.1):
- Update Norwegian Bokmaal translation file.
[ Oleksandr Shneyder ]
* New upstream version (4.0.1.1):
- Use "127.0.0.1" instead of localhost to avoid wrong IPv6 hostname
resolution. (Fixes: #151).
- Wait for x2gocmdexitmessage to return before closing in hidden mode.
- Support for published applications in X2Go Plugin
- Support for "shadow" mode in X2Go Plugin
[ Mike Gabriel ]
* New upstream version (4.0.1.1):
- If a priv SSH key has been specified, skip the autologin procedure.
Let's consider a given SSH private key that fails to log the user
in as an overall login failure. (Fixes: #141).
- Avoid multiple selectUserSession requests when in broker
mode.
- Properly set the remote server address received via selectUserSession
method when in broker mode. (Fixes: #226).
- Fix segmentation fault that started occurring since the custom trayIcon
patch was applied. Segfault only occurred if the tray icon was not used.
- Show session name in notification bubbles.
- Update German translation.
- Add cmdline option --broker-autologoff: Enforce re-authentication against
X2Go Session Broker after a session has been suspended or terminated.
(Fixes: #179).
- Enable full access desktop sharing across user accounts. (Fixes: #222).
- Make X2Go Client aware of the MATE desktop environment.
- Make X2Go Client work in SSH broker mode without the need of a auth-id
file.
[ Heinrich Schuchardt ]
* New upstream version (4.0.1.1):
- Call ssh_clean_pubkey_hash() for deallocating public key hashes instead of
just calling free(). Required under MS Windows as documented in libssh2
API. (Fixes: #243). (For further details see:
http://api.libssh.org/master/group__libssh__session.html).
* Provide bin:package with debug symbols for X2Go Client. (Fixes: #255).
[ Ezra Bühler ]
* New upstream version (4.0.1.1):
- Fix auto-resume when session type is »Single Application«. (Fixes: #183).
[ Ricardo DÃaz MartÃn ]
* New upstream version (4.0.1.1):
- Fix detection of maximum screen area available for a session. (Fixes:
#165).
- Use the session icon as tray icon, pop up notification bubble that informs
about current session actions. (Fixes: #177).
- Allow for setting maximum available desktop size as window size via the
session profile card. Unfortunately, this feature is for now only
available on Linux. (Fixes: #214).
[ Otto Kjell ]
* New upstream version (4.0.1.1):
- Enable debug mode through cmd line parameter. (Fixes: #142).
- Standardize output to stdout+stderr and make it parseable.
[ Orion Poplawski ]
* New upstream version (4.0.1.1):
- Instead of using a hard-code DPI of 96, use local DPI settings for new
sessions if not explicitly set in session profile (Fixes: #164).
[ Daniel Lindgren ]
* New upstream version (4.0.1.1):
- Update Swedish translation file.
[ Ricardo DÃaz MartÃn ]
* New upstream version (4.0.1.1):
- Update Spanish translation file.
-- Mike Gabriel Wed, 11 Sep 2013 12:06:02 +0200
x2goclient (4.0.1.0-0~x2go1) unstable; urgency=low
[ Frédéric Motte ]
* New upstream version (4.0.1.0):
- Add French translation file.
[ Oleksandr Shneyder ]
* New upstream version (4.0.1.0):
- Launching parec to init pulseaudio input only on Windows.
- Hide profilecard area on broker authentication.
- Fix ONMainWindow layout in broker mode.
- Set passphrase for key to reverse SSH connection.
Fix closing client after getting passphrase (Fixes: #137)
- Support for recent cygwin API on Windows.
- Add checkbox for -noclipboardprimary argument for internal vcxsrv.
[ Mike Gabriel ]
* New upstream version (4.0.1.0):
- Fix position shifts of broker login widget on repetetive authentication
failures. (Fixes: #71).
-- Mike Gabriel Fri, 22 Mar 2013 23:15:45 +0100
x2goclient (4.0.0.4-0~x2go1) unstable; urgency=low
[ Clemens Lang ]
* New upstream version (4.0.0.4):
- Add scripts and additional files for building X2Go Client
disk images for Mac OS X. (Fixes: #131).
[ Mike Gabriel ]
* New upstream version (4.0.0.4):
- Update man page: Add broker relevant cmdline options.
-- Mike Gabriel Mon, 04 Mar 2013 05:46:16 +0100
x2goclient (4.0.0.3-0~x2go1) unstable; urgency=low
* Fix version in version.h, VERSION and x2goplugin.rc.
-- Mike Gabriel Wed, 13 Feb 2013 14:37:24 +0100
x2goclient (4.0.0.2-0~x2go1) unstable; urgency=low
[ Mike Gabriel ]
* New upstream version (4.0.0.2):
- More icon updates needed. Discovered during Debian package update.
[ Orion Poplawski ]
* New upstream version (4.0.0.2):
- Fix .desktop file, fix FSF address. (Fixes: #88).
[ Oleksandr Shneyder ]
* New upstream version (4.0.0.2):
- Fix support for RSA Keys in X2Go Broker code.
- Set autologin as false by default. Quote session ID in SSH broker code
- Support for session key "usebrokerpassforproxy" - use broker pass for
authentication on proxy.
- Fix X2Go Logo.
- Terminate nxproxy from X2Go Client if connection to server is lost.
(Fixes: #100)
- Fix building x2goplugin.
-- Mike Gabriel Tue, 12 Feb 2013 19:29:53 +0100
x2goclient (4.0.0.1-0~x2go1) unstable; urgency=low
* Bugfix release (4.0.0.1):
- Replace symlink at svg/x2gologo.svg with copied file. Fixes
tarball release esp. for MS Windows builds.
-- Mike Gabriel Wed, 02 Jan 2013 12:19:01 +0100
x2goclient (4.0.0.0-0~x2go1) unstable; urgency=low
[ Christoffer Krakou ]
* New upstream version (4.0.0.0):
- Update Danish translation.
- Update Danish translation (SSH proxy feature).
[ Daniel Lindgren ]
* New upstream version (4.0.0.0):
- Update Swedish translation.
[ Ezra Bühler ]
* New upstream version (4.0.0.0):
- Make it possible to resume a session using the keyboard only.
Also fix the tab order in the resume session dialog by
changing the focus policy of the main window. (Fixes: #80).
[ Heinz-M. Graesing ]
* New upstream version (4.0.0.0):
- Update refurbished X2Go Logo set. License for the X2Go Logos is GPL-2.0+.
The inner X2Go logo background is now white (non-transparent) which should
fix poor display results for X2Go icons in application menus using a dark
theme. (Fixes: #59).
[ Jan Engelhardt ]
* New upstream version (4.0.0.0):
- Fix Debian-like Qt path (qmake will handle it internally).
[ Oleksandr Shneyder ]
* New upstream version (4.0.0.0):
- Translation files updated.
- Russian translation updated.
- Add support for pgp cards in broker mode.
- Fix displaying ssh proxy box in session settings if sessions type
changed. (Fixes: #61).
- Init config.brokerAutologin with false. (Fixes: #72).
- Make sure x2goclient closes if broker has no sessions. Fixes
appearing session profile dialog if client is configured to
minimize to systray. (Fixes: #73).
- Update license headers.
- Add "author" entry in UI files.
- Add OpenSSL license exception.
[ Ricardo Diaz ]
* New upstream version (4.0.0.0):
- Update Spanish translation file.
[ Mike Gabriel ]
* New upstream version (4.0.0.0):
- Update German translation file.
- Get rid of br html tags in client<->broker communication (Fixes: #81).
- Bump version to 4.0.0.0 (for Baikal bundle release).
[ Terje Andersen ]
* New upstream version (4.0.0.0):
- Update Bokmal (Norway) translation file.
-- Mike Gabriel Sun, 30 Dec 2012 15:34:02 +0100
x2goclient (3.99.3.0-0~x2go1) unstable; urgency=low
[ Mike Gabriel ]
* New upstream version (3.99.3.0):
- Rebuild i18n files, add x2goclient_dk.ts for the new
Danish translator (Christoffer Krakou).
- Update German translation.
- Run X2Go-proxied RDP session with fullscreen mode as sessions
of X2Go session type "D". (Fixes: #22)
- Allow pass-through of username and password for X2Go-proxied RDP
sessions. The strings X2GO_USER and X2GO_PASSWORD in rdpoptions
will be replaced by username+password enter into X2Go Clients
login dialog. Only replace username+password if they received a
value from the login widget of the main window.
- Drop i18n idea to translate English to English.
- Fix creation of session profile icon on desktop. The .desktop
files need the x-bit set. Also: add a compatibility profile name
rewrite for PyHoca-GUI profile names containing a slash, PyHoca-GUI
uses a slash as separator character for submenu cascades.
- Use ,,printf'' instead of ,,echo -e'' (Bashism). Fixes creation of
xinerama.conf files.
- Add XFCE as possible session type. (Fixes: #51)
* /debian/control:
+ Maintainer change in package: X2Go Developers .
+ Add rdesktop and xfreerdp to Recommends.
+ Priority: optional.
+ Bin:package x2goplugin-provider: depend on x2goplugin.
* New bin:package (all): x2goplugin-provider. Provide basic Apache2
configuration for a demo x2goplugin website.
* Bump Standards version to 3.9.3.
[ Daniel Lindgren ]
* New upstream version (3.99.3.0):
- Update Swedish translation.
[ Terje Andersen ]
* New upstream version (3.99.3.0):
- Update Norwegian Bokmal translation.
[ Christoffer Krakou ]
* New upstream version (3.99.3.0):
- Add Danish translation to x2goclient.
- Proof read Danish translation.
- Update DirectRDP in Danish translation.
[ Oleksandr Shneyder ]
* New upstream version (3.99.3.0):
- Add settings for direct RDP connection.
- Implement direct RDP connection using standalone client.
- Build direct RDP feature only for linux.
- Add DEFINES += __linux__ to project file when building linux binaries
(need to define Q_OS_LINUX in moc generator).
- Update "ts" files.
- Fixed label "SSH port" and "RDP port" to "SSH port:" and "RDP port:".
Update "ts" files once again.
- Add translation for label "RDP port:". Update "ts" files updated
Russian translation.
- Add translation for checkbox "Direct RDP Connection" and update Russian
and German translation.
- Restart pulse server on windows if it crashed.
- Show "Advanced Options" button only if RDP session chosen.
- Fixing kbd focus issue for all kinds of sessions in thinclient mode.
(Fixes: #20).
- Add command line parameter --ssh-key and --autologin.
- Disable check box "use default sound port" if sound disabled.
- Add support for HTTP proxy - developed by Heinrich Schuchardt
(xypron.glpk@gmx.de). (Fixes: #34).
- Add support for SSH proxy in class SshMasterConnection.
- SshMasterConnection emit signal to GUI thread if it need a passphrase
to decrypt a ssh key. GUI thread use input dialog to read a passphrase
from user.
- Add support for SSH proxy (HTTP and SSH) to X2Go Client GUI.
- Clean some broker code.
- It is possible to add several ssh keys from commandline in form:
--ssh-key=[user@][server:][port:]
it can be useful for TCE or login over broker.
- Improve broker code, add support for "usebrokerpass" config variable to
use broker pass for ssh auth on X2Go server.
- Commandline options --broker-noauth.
- Support for SSH broker. --broker-user removed, use username in broker url
instead.
- Reduce listen interval for ssh-tunnel to 100 msec.
- Fix visibility of SSH-proxy box with direct RDP sessions.
- SshProcess is only usable over SshMasterConnection.
- Fixing SSH proxy support for Windows.
- Hide system tray icon before close.
- Fix error "Failed to resolve hostname" in plugin mode (Fixes: #55).
- Do not show "RDP Settings" group box in plugin mode (Fixes: #56).
[ Ricardo Diaz ]
* New upstream version (3.99.3.0):
- Add Spanish translation file.
- Update Spanish translation file.
-- Mike Gabriel Wed, 07 Nov 2012 16:07:43 +0100
x2goclient (3.99.2.2-0~x2go2) unstable; urgency=low
* Add Conflicts/Replaces for x2goclient-gtk.
-- Mike Gabriel Mon, 20 Aug 2012 09:58:47 +0200
x2goclient (3.99.2.2-0~x2go1) unstable; urgency=low
[ Mike Gabriel ]
* New upstream version (3.99.2.2):
- Drop Encoding key from .desktop file (as it is deprecated
according to latest FreeDesktop.org specs).
- Correct spelling for mis-spelled work ,,authentication''.
- Allow QMAKE_* parameters that are needed for hardening x2goclient
(see http://wiki.debian.org/Hardening).
- Provide CPPFLAGS for QMAKE_CFLAGS _and_ QMAKE_CXXFLAGS. Provide them as
first build parameters.
- Allow x2goclient to connect to user accounts that have other shells than
/bin/sh and alike configured as default shell. Also: removal bashisms in
shell execution commands.
- X2Go resume session slot: double click on a selected session is supposed
to resume that session. To make this feature functional for running
sessions the session has to be suspended first.
[ Oleksandr Shneyder ]
* New upstream version (3.99.2.2):
- Fixing X2Go Plugin
- Cleaning code: double click on running session. Instead of using function
"sleep" starting resume-session after suspend-session is returned.
-- Mike Gabriel Fri, 10 Aug 2012 10:08:52 +0200
x2goclient (3.99.2.1-0~x2go1) unstable; urgency=low
[ Oleksandr Shneyder ]
* New upstream version (3.99.2.1):
- Not starting smart card daemon before users are loaded in LDAP mode.
- Merging onmainwindow_part*.cpp into onmainwindow.cpp
- Support recent pulseuadio on windows
- removing %USERPROFILE%\.x2go\pulse\.pulse\%COMPUTERNAME%-runtime\pid
if exists under windows
- --user= set username in session mode if this field is blank
in session settings.
- --autostart= launch "app" by session start in "published
applications" mode
[ Daniel Lindgren ]
* New upstream version (3.99.2.1):
- Swedish i18n update for published applications.
[ Terje Andersen ]
* New upstream version (3.99.2.1):
- Norwegian (Bokmal) i18n update for published applications.
[ Stefan Baur ]
* New upstream version (3.99.2.1):
- German i18n update for published applications.
[ Mike Gabriel ]
* New upstream version (3.99.2.1):
- Add Ubuntu-2d (Unity) support to X2Go Client.
-- Mike Gabriel Fri, 08 Jun 2012 12:52:07 +0200
x2goclient (3.99.2.0-0~x2go1) unstable; urgency=low
[ Oleksandr Shneyder ]
* New upstream version (3.99.2.0):
- Support for "published applications".
Sponsored by Stefan Baur (http://www.baur-itcs.de).
- Command line argument "--session-conf=": path to alternative
session config.
- Fixed bug "light font colour on light background" by dark colour schema.
- Make X2Go system tray icon not transparent.
- Replace text on buttons "Application", "Share folder", "Suspend",
"Terminate" with icons to fit in dialog window.
- Support for SVG icons for published applications
- Set "nofocus" policy for tool buttons.
- Some improvements when using pgp card.
- Setting TCP_NODELAY for sockets on reverse tunnel and ssh session.
- Support for category X2Go-Top to display published applications on top
of application menu.
- Exporting PULSE_CLIENTCONFIG when running published applications.
-- Mike Gabriel Wed, 04 Apr 2012 11:52:07 +0200
x2goclient (3.99.1.1-0~x2go1) unstable; urgency=low
[ Oleksandr Shneyder ]
* New upstream version (3.99.1.1):
- not including on Q_OS_WIN platform.
- not updating Xinerama configuration in "fullscreen" mode.
- command line argument "--xinerama": use Xinerama by default.
- improved support for use in TCE
command line argument --thinclient - running without window manager
command line argument --haltbt - button to shutdown the thin client
- Fix comments in copyright headers.
[ Mike Gabriel ]
* New upstream version (3.99.1.1):
- Update copyright year in about window. Including all translations.
- Power button icon: make inner part transparent. Needed for people
with a dark GUI theme.
- Prettify x2goclient.pro.
[ Mihai Moldovan ]
* New upstream version (3.99.1.1):
- Use the Mac OS X 10.5 SDK instead 10.6 to remain compatible with
Leopard.
- Add .gitignore file.
- The default of a 10 seconds SSH connection timeout is pretty low,
especially when using tcp_wrappers with the identd option turned on.
Wait for a 60 seconds timeout.
- On Mac OS X connect to Xserver via Unix file socket.
- Properly set DISPLAY environment variable on Mac OS X.
[ Daniel Lindgren ]
* New upstream version (3.99.1.1):
- Update/improve Swedish translation after testing x2goclient on Windows.
-- Mike Gabriel Wed, 07 Mar 2012 20:42:36 +0100
x2goclient (3.99.1.0-0~x2go1) unstable; urgency=low
[ Mike Gabriel ]
* New upstream version (3.99.1.0):
- Update German translation file (thanks to Stefan Baur).
- Build .qm translation files on the fly during build.
- Fix for zh_TW translation: add qt_zh_TW.qm file from Qt4.8.
- Add language property to the French translation file.
- Update qt_.qm files from Qt4.8 (as in current Debian sid).
- Rename x2goclient_nb.ts to x2goclient_nb_no.ts.
- Update all translation files (lupdate), translate unfinished translation
tags in x2goclient_de.ts.
- Provide empty translation file x2goclient_en.ts.
- Fix misspelled word ,,Authentification'' -> ,,Authentication''.
- Fix misspelled word ,,recieved'' -> ,,received''.
- Update date and release version in man page.
[ Mihai Moldovan ]
* New upstream version (3.99.1.0):
- Mac OS patch: Raise the stack space to 2MB for secondary threads. It
previously used the 512KB system default.
[ Daniel Lindgren ]
* New upstream version (3.99.1.0):
- Add Swedish translation file.
- Fine-tune Swedish translation file.
[ Terje Andersen ]
* New upstream version (3.99.1.0):
- Add Norwegian (Bokmal) translation. Qt4 lacks Norwegian/Bokmal
support, so some of the widgets may stay in English.
- Fine-tune/fix Norwegian (Bokmal) translation.
[ Jan Engelhardt ]
* New upstream version (3.99.1.0):
- Use /cgi-bin/man/ path in web'ified man pages.
- Use ,,${MAKE}'' instead of ,,make'' in Makefile.
- Include in sshprocess.h to fix missing
struct sockaddr_in.
[ Oleksandr Shneyder ]
* New upstream version (3.99.1.0):
- Get new ports from x2goresume-session if reserved ports are busy
- Fix segmentation fault by failed SSH connection to X2Go server
-- Mike Gabriel Wed, 22 Feb 2012 14:49:49 +0100
x2goclient (3.99.0.6-0~x2go1) unstable; urgency=low
[ Oleksandr Shneyder ]
* New upstream version (3.99.0.6):
- Update copyright section in ssmasterconnection.h/cpp and
sshprocess.h/cpp.
- Traditional Chinese(zh_TW) translation for x2goclient from
Liu Arlo .
-- Mike Gabriel Wed, 01 Feb 2012 13:52:40 +0100
x2goclient (3.99.0.5-0~x2go1) unstable; urgency=low
[ Mike Gabriel ]
* New upstream version (3.99.0.5):
- Rename in human readable text strings ,,X2go'' to ,,X2Go''.
- Fix version string on man page.
[ Oleksandr Shneyder ]
* New upstream version (3.99.0.5):
- Waiting for SshMasterConnection thread to be finished before
deleting it (segfault by wrong authentication fix).
-- Mike Gabriel Fri, 27 Jan 2012 12:43:04 +0100
x2goclient (3.99.0.4-0~x2go1) unstable; urgency=low
[ Oleksandr Shneyder ]
* New upstream version (3.99.0.4):
- Enabled support for Xinerama
-- Mike Gabriel Wed, 18 Jan 2012 14:53:20 +0100
x2goclient (3.99.0.3-0~x2go4) unstable; urgency=low
[ Mike Gabriel ]
* Rename icon title in /debian/menu file.
* Also split package dependencies for x2goplugin.
* Add libxpm-dev as build-dependency.
* Revert version number in version.h and x2goplugin.rc to 3.99.0.3.
[ Guido Günther ]
* Split package dependencies for SSH server/client.
[ Oleksandr Shneyder ]
* New upstream version (3.99.0.3):
- LDAP: ssh port for every x2goserver can be specified in Server entry,
parameter "l"
- Change title of proxy window to session name
- Change icon of proxy window (only on Linux)
- Multi-display support: x2goclient can be configured to fit proxy window
on one of the existing displays.
- Multi-display support: support for xinerama (temporarily disabled--support
in x2goagent needed)
- Add -lXpm in project file.
-- Mike Gabriel Wed, 18 Jan 2012 14:50:31 +0100
x2goclient (3.99.0.2-0~x2go1) unstable; urgency=low
[ Oleksandr Shneyder ]
* New upstream version (3.99.0.2):
- QTcpSocket working not correct with some Antiviral software ( for example Avast) under windows. Fixing this by replacing it with Winsocks
- Connectivity test dialog to use with a broker
-- Mike Gabriel Fri, 25 Nov 2011 11:27:42 +0100
x2goclient (3.99.0.1-0~x2go1) unstable; urgency=low
* New upstream version (3.99.0.1):
- Set TCP_NODELAY (equals: turn Nagle off) for SSH graphical port forwarding
tunnel.
- Include cups/ppd.h in cupsprint.h, fixes build on Debian wheezy/sid.
- Add build_man/clean_man stanzas to Makefile.
* Explicitly use source format 3.0 (native).
* Build-depend on libssh-dev (>=0.4.7).
* Update menu file in /debian folder (rename title to ,,X2Go Client (Qt)'').
* Do not run man2html from rules file anymore.
-- Mike Gabriel Wed, 12 Oct 2011 11:11:50 +0200
x2goclient (3.99.0.0-0~x2go1) unstable; urgency=low
[ Oleksandr Shneyder ]
* fixed loadbalancing in LDAP mode on multiply X2Go servers
* fixed session crash by pulling out of smart card
-- Mike Gabriel Wed, 20 Jul 2011 16:33:08 +0200
x2goclient (3.0.1.21-0~x2go1) unstable; urgency=low
* changes in windows plugin
-- Oleksandr Shneyder Thu, 30 Jun 2011 18:45:25 +0200
x2goclient (3.0.1.20-0~x2go1) unstable; urgency=low
* support menu
* custom background
* custom icon on broker auth dialog
* fixed creation of desktop icons on windows
-- Oleksandr Shneyder Fri, 08 Apr 2011 19:18:30 +0200
x2goclient (3.0.1.19-0~x2go1) unstable; urgency=low
* Support to get sessions from for web broker
-- Oleksandr Shneyder Thu, 29 Mar 2011 18:34:08 +0200
x2goclient (3.0.1.18-0~x2go3) unstable; urgency=low
* Add ssh (server) as runtime dependency
* React to Debian bug #627990, prefer man2html-base over man2html.
* Use x2goumount-session instead of old x2goumount_session command.
-- Mike Gabriel Thu, 14 Jul 2011 09:07:59 +0200
x2goclient (3.0.1.18-0~x2go2) unstable; urgency=low
* adds man page skel (TODO: options)
* fixes all open lintian issues
-- Mike Gabriel Tue, 17 May 2011 20:16:55 +0200
x2goclient (3.0.1.18-0~x2go1) unstable; urgency=low
* change of version numbering pattern
* adds x2goclient-cli project as example file to x2goclient package
-- Mike Gabriel Tue, 22 Mar 2011 01:50:27 +0100
x2goclient (3.01-18) unstable; urgency=low
* Support for custom X-Servers under windows
-- Oleksandr Shneyder Thu, 17 Feb 2011 18:15:03 +0100
x2goclient (3.01-17) unstable; urgency=low
* Minimize X2Go Client to system tray thank Joachim Langenbach for patch
-- Oleksandr Shneyder Thu, 27 Jan 2011 12:32:29 +0100
x2goclient (3.01-16) unstable; urgency=low
* qtbrowserplugin sources shipped with x2goclient
* removed x2goclient.pri, export "X2GO_CLIENT_TARGET=plugin" to configure x2goplugin
-- Oleksandr Shneyder Thu, 13 Jan 2011 19:24:50 +0100
x2goclient (3.01-15) unstable; urgency=low
* add support for libssh-0.4.7
-- Oleksandr Shneyder Tue, 04 Jan 2011 18:48:43 +0100
x2goclient (3.01-14) unstable; urgency=low
* use libssh instead of ssh
-- Oleksandr Shneyder Fri, 03 Dec 2010 18:31:45 +0000
x2goclient (3.01-13) unstable; urgency=low
* workaround for "Full Screen" mode in windows
* x2goplugin based on qtbrowserplugin
* support for clipboard in windows
-- Oleksandr Shneyder Tue, 03 Aug 2010 17:12:05 +0200
x2goclient (3.01-12) unstable; urgency=low
* portable mode
-- Oleksandr Shneyder Thu, 29 Jul 2010 17:43:06 +0200
x2goclient (3.01-11) unstable; urgency=low
* plugin config options sound, exportfs, adsl, compression, quality, dpi, kbdlayout, kbdtype
-- Oleksandr Shneyder Tue, 29 Jun 2010 18:12:48 +0200
x2goclient (3.01-10) unstable; urgency=low
* plugin config options showstatusbar and showtoolbar
-- Oleksandr Shneyder Thu, 24 Jun 2010 18:48:27 +0200
x2goclient (3.01-9) unstable; urgency=low
* fixed dir export in LDAP mode
-- Oleksandr Shneyder Tue, 08 Jun 2010 17:14:11 +0200
x2goclient (3.01-8) unstable; urgency=low
* embeded mode for firefox plugin
* fixed "host key varification failed" message
* updated interface
* support for fs encodings
-- Oleksandr Shneyder Tue, 13 Apr 2010 18:15:30 +0200
x2goclient (3.01-7) unstable; urgency=low
* fixed connection to localhost
* fixed undefined shadow mode by ldap sessions
-- Oleksandr Shneyder Mon, 01 Feb 2010 19:19:54 +0100
x2goclient (3.01-6) unstable; urgency=low
* fixed ldap support
* shadow sessions
* xdmcp sessions
* commandline option for printing in LDAP mode
-- Oleksandr Shneyder Fri, 28 Jan 2010 19:38:11 +0100
x2goclient (3.01-5) unstable; urgency=low
* fixed gpg-card with older gpg version
-- Oleksandr Shneyder Fri, 27 Nov 2009 00:00:31 +0100
x2goclient (3.01-4) unstable; urgency=low
* set x2goagents dpi option
* fixed rsa/dsa keys with password
* session limit error message
* warning by terminating session
* fixed help message
* save pulseaudio client.conf and cookie on server
* in session directory not in ~/.pulse/client.conf
* (do not owerwrite local pulse settings for remote user)
* copy pulse cookie-file to remote system
* try to load module-native-protocol-tcp
* dependency for openssh-server in deb
* set keyboard layout by default
* add ssh option ServerAliveInterval=300
* check if port free when starting tunnel for nxproxy
* windows:
* Start own build of X Server
* Start one X server per x2goclient
* Start own build of PulseAudio
* Start one PulseAudio server per x2goclient
* Start one sshd per x2goclient
* printing and viewing pdf in windows using ShellExec
* make x2goclient work if username have spaces and unicode symbols
-- Oleksandr Shneyder Wed, 14 Oct 2009 10:10:25 +0200
x2goclient (3.01-3) unstable; urgency=low
* smart card works with gpg 2.0.11-1
-- Oleksandr Shneyder Thu, 24 Sep 2009 21:31:45 +0200
x2goclient (3.01-2) unstable; urgency=low
* Use x2goclient as SSH_ASKPASS program
-- Oleksandr Shneyder Fri, 31 Jul 2009 19:49:02 +0200
x2goclient (3.01-1) unstable; urgency=low
* create desktop icon
* start rdesktop session
* start LXDE session
* fixed error "ssh password with special symbols" thank Phillip Krause
-- Oleksandr Shneyder Mon, 15 Jun 2009 19:35:38 +0200
x2goclient (3.00-1) unstable; urgency=low
* Client side printing support
-- Oleksandr Shneyder Tue, 24 Feb 2009 21:50:45 +0100
x2goclient (2.99-3) unstable; urgency=low
* make sshfs mount work if user home is not in /home/
-- Oleksandr Shneyder Mon, 02 Feb 2009 22:05:49 +0100
x2goclient (2.99-2) unstable; urgency=low
* fixed ssh key in path with
-- Oleksandr Shneyder Mon, 26 Jan 2009 23:15:46 +0100
x2goclient (2.99-1) unstable; urgency=low
* PulseAudio support
* you can use running arts or esd daemons
* use blowfish cipher for ssh tunnels
* reverse ssh tunnel for fs export (sshfs)
-- Oleksandr Shneyder Thu, 15 Jan 2009 19:03:58 +0100
x2goclient (2.0.1-24) unstable; urgency=low
* command line options:
* --session= start session "session"
* --user= preselect user "username" (LDAP mode)
* --hide do not show x2goclient (start hidden)
-- Oleksandr Shneyder Tue, 09 Dec 2008 21:30:07 +0100
x2goclient (2.0.1-23) unstable; urgency=low
* fixed: use listed in ldap x2goserver for "x2gogetservers" request instead ldapserver itself
* fixed: do not display error by initldap in slot_rereadUsers
* fixed: libldap dependencies in package
-- Oleksandr Shneyder Mon, 08 Dec 2008 22:28:27 +0100
x2goclient (2.0.1-22) unstable; urgency=low
* xorg dependency in control file
-- Oleksandr Shneyder Tue, 25 Nov 2008 19:21:18 +0100
x2goclient (2.0.1-21) unstable; urgency=low
* fixed pass error with gpg card
-- Oleksandr Shneyder Thu, 20 Nov 2008 19:10:33 +0100
x2goclient (2.0.1-20) unstable; urgency=low
* fixed resizing by session selecting
-- Oleksandr Shneyder Wed, 19 Nov 2008 18:56:10 +0100
x2goclient (2.0.1-19) unstable; urgency=low
* Fixes in traslation
-- Oleksandr Shneyder Tue, 04 Nov 2008 19:57:59 +0100
x2goclient (2.0.1-18) unstable; urgency=low
* Fixed check for sudo config error
-- Oleksandr Shneyder Mon, 13 Oct 2008 22:20:21 +0200
x2goclient (2.0.1-17) unstable; urgency=low
* Fixed: command with arguments
* Error massages (sudo config, can't execute command)
-- Oleksandr Shneyder Thu, 09 Oct 2008 21:45:05 +0200
x2goclient (2.0.1-16) unstable; urgency=low
* LDAP factor
-- Oleksandr Shneyder Thu, 09 Oct 2008 21:52:21 +0200
x2goclient (2.0.1-15) unstable; urgency=low
* Fixed sess_tv columns
* Change Xmap for hildon
-- Oleksandr Shneyder Wed, 01 Oct 2008 22:57:35 +0200
x2goclient (2.0.1-14) unstable; urgency=low
* fixed editconnectiondialog
-- Oleksandr Shneyder Wed, 01 Oct 2008 21:18:08 +0200
x2goclient (2.0.1-13) unstable; urgency=low
* Fixed "black buttons" on button focus with new qt
-- Oleksandr Shneyder Mon, 16 Jun 2008 21:08:01 +0000
x2goclient (2.0.1-12) unstable; urgency=low
* Client ssh port in settings dialog
* Sound system selections in session dialog
* "Mini mode" for modes < "800x600"
-- Oleksandr Shneyder Fri, 14 Mar 2008 21:03:48 +0100
x2goclient (2.0.1-11) unstable; urgency=low
* Mac OS X support
* Fixed Error '"visual != -1" in file itemviews/qheaderview.cpp' by compiling with qt >=4.3
* Fixed mouse tracking on SessionButton
-- Oleksandr Shneyder Thu, 10 Jan 2008 21:54:24 +0100
x2goclient (2.0.1-10) unstable; urgency=low
* russian translation
-- Oleksandr Shneyder Mon, 1 Oct 2007 22:23:58 +0200
x2goclient (2.0.1-9) unstable; urgency=low
* Added widget for ssh port select in editsessiondialog
* ssh port to connect in command line options
* client ssh port (for sshfs) in command line options
-- Oleksandr Shneyder Fri, 21 Sep 2007 19:31:59 +0200
x2goclient (2.0.1-8) unstable; urgency=low
* Fixed export directories with " " in path
* Fixed SessionButton frame size by empty session
* Compare session and display color depth
* MS Windows support
-- Oleksandr Shneyder Thu, 13 Sep 2007 19:30:59 +0200
x2goclient (2.0.1-7) unstable; urgency=low
* esd support
-- Oleksandr Shneyder Tue, 7 Aug 2007 18:33:32 +0200
x2goclient (2.0.1-6) unstable; urgency=low
* OpenPGP smart cards support
-- Oleksandr Shneyder Fri, 3 Aug 2007 19:40:27 +0200
x2goclient (2.0.1-5) unstable; urgency=low
* extern auth (usb, smartcard) support
-- Oleksandr Shneyder Tue, 26 Jun 2007 21:54:48 +0200
x2goclient (2.0.1-4) unstable; urgency=low
* minimized reaction time by many LDAP users
-- Oleksandr Shneyder Thu, 1 Mar 2007 21:15:14 +0100
x2goclient (2.0.1-3) unstable; urgency=low
* Failover LDAP Server config
* reload new users from LDAP
-- Oleksandr Shneyder Thu, 1 Mar 2007 22:15:14 +0100
x2goclient (2.0.1-2) unstable; urgency=low
* Updated German translation
* Add "wrong password!" in ssh error message
-- Oleksandr Shneyder Mon, 26 Feb 2007 20:25:02 +0100
x2goclient (2.0.1-1) unstable; urgency=low
* Initial release
-- Oleksandr Shneyder Fri, 2 Feb 2007 21:36:59 +0100
x2goclient-4.0.1.1/debian/compat 0000644 0000000 0000000 00000000002 12214040350 013226 0 ustar 7
x2goclient-4.0.1.1/debian/control 0000644 0000000 0000000 00000006263 12214040350 013442 0 ustar Source: x2goclient
Section: x11
Priority: extra
Maintainer: X2Go Developers
Uploaders:
Oleksandr Shneyder ,
Mike Gabriel ,
Build-Depends:
debhelper (>= 7.0.50~),
libqt4-dev,
libldap2-dev,
libssh-dev (>= 0.4.7),
libcups2-dev,
libx11-dev,
libxpm-dev,
man2html-base | man2html,
Standards-Version: 3.9.4
Homepage: http://code.x2go.org/releases/source/x2goclient
Vcs-Git: git://code.x2go.org/x2goclient.git
Vcs-Browser: http://code.x2go.org/gitweb?p=x2goclient.git;a=summary
Package: x2goclient
Architecture: any
Depends:
${shlibs:Depends},
${misc:Depends},
libssh-4 (>= 0.4.7),
openssh-client,
nxproxy,
Recommends:
openssh-server,
rdesktop | freerdp-x11,
Suggests:
pinentry-x2go,
Conflicts:
x2goclient-gtk,
Replaces:
x2goclient-gtk,
Description: X2Go Client application (Qt4)
X2Go is a serverbased computing environment with
- session resuming
- low bandwidth support
- LDAP support
- client-side mass storage mounting support
- client-side printing support
- audio support
- authentication by smartcard and USB stick
.
x2goclient is a graphical client (Qt4) for the X2Go system.
You can use it to connect to running sessions and start new sessions.
Package: x2goclient-dbg
Priority: extra
Section: debug
Architecture: any
Depends: ${misc:Depends}, x2goclient (= ${binary:Version})
Description: X2Go Client application (Qt4), debug symbols
X2Go is a serverbased computing environment with
- session resuming
- low bandwidth support
- LDAP support
- client-side mass storage mounting support
- client-side printing support
- audio support
- authentication by smartcard and USB stick
.
x2goclient is a graphical client (Qt4) for the X2Go system.
You can use it to connect to running sessions and start new sessions
.
This package provides the debug symbols for the x2goclient application.
Package: x2goplugin
Architecture: any
Depends:
${shlibs:Depends},
${misc:Depends},
openssh-client,
nxproxy,
Recommends:
openssh-server,
rdesktop | freerdp-x11,
Suggests:
pinentry-x2go,
Description: X2Go Client (Qt4) as browser plugin
X2Go is a serverbased computing environment with
- session resuming
- low bandwidth support
- LDAP support
- client-side mass storage mounting support
- client-side printing support
- audio support
- authentication by smartcard and USB stick
.
x2goclient is a graphical client (qt4) for the X2Go system.
You can use it to connect to running sessions and start new sessions.
.
This package provides x2goclient as QtBrowser-based Mozilla plugin.
Package: x2goplugin-provider
Architecture: all
Depends:
${misc:Depends},
Recommends:
httpd | apache2,
Suggests:
x2goplugin,
Description: Provide X2Go Plugin via Apache webserver
X2Go is a serverbased computing environment with
- session resuming
- low bandwidth support
- LDAP support
- client-side mass storage mounting support
- client-side printing support
- audio support
- authentication by smartcard and USB stick
.
This package provides an example configuration for providing
the X2Go Plugin via an Apache webserver.
x2goclient-4.0.1.1/debian/copyright 0000644 0000000 0000000 00000013252 12214040350 013766 0 ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: x2goclient
Upstream-Contact: Oleksandr Shneyder
Source: http://wiki.x2go.org
Files: *
Copyright: 2005-2012, Oleksandr Shneyder
2005-2012, Heinz-Markus Graesing
2005-2012, obviously nice - http://www.obviouslynice.de
License: GPL-2+
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 package; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.
Comment:
Quoting from README.OpenSSL-Exception...
.
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations
* including the two.
* You must obey the GNU General Public License in all respects
* for all of the code used other than OpenSSL. If you modify
* file(s) with this exception, you may extend this exception to your
* version of the file(s), but you are not obligated to do so. If you
* do not wish to do so, delete this exception statement from your
* version. If you delete this exception statement from all source
* files in the program, then also delete it here.
Files: qtbrowserplugin-2.4_1-opensource/src/*
Copyright: 2009, Nokia Corporation and/or its subsidiary(-ies).
License: BSD-3-clause
Contact: Nokia Corporation (qt-info@nokia.com)
.
This file is part of a Qt Solutions component.
.
You may use this file under the terms of the BSD license as follows:
.
"Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
Files: Makefile.docupload
Copyright: 2010-2012, Mike Gabriel
License: GPL-3
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, version 3 of the License.
.
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, see .
.
On Debian systems, the full text of the GNU General Public
License version 3 can be found in the file
`/usr/share/common-licenses/GPL-3'.
Files: debian/*
Copyright: 2007, Oleksandr Shneyder
2011-2012, Reinhard Tartler
2011-2013, Mike Gabriel
License: GPL-2+
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 package; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.
x2goclient-4.0.1.1/debian/menu 0000644 0000000 0000000 00000000302 12214040350 012712 0 ustar ?package(x2goclient):\
needs="X11"\
section="Applications/Network/Communication"\
title="X2Go Client (Qt)"\
icon="/usr/share/x2goclient/icons/x2goclient.xpm"\
command="/usr/bin/x2goclient"
x2goclient-4.0.1.1/debian/rules 0000755 0000000 0000000 00000000775 12214040350 013121 0 ustar #!/usr/bin/make -f
export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
%:
dh $@ --parallel
override_dh_auto_clean:
dh_auto_clean
# clean stray .qm files that are not handled by clean rule in upstream Makefile
rm -Rf x2goclient_*.qm
override_dh_auto_install:
override_dh_strip:
dh_strip -p x2goclient --dbg-package=x2goclient-dbg
x2goclient-4.0.1.1/debian/source/format 0000644 0000000 0000000 00000000015 12214040350 014537 0 ustar 3.0 (native)
x2goclient-4.0.1.1/debian/x2goclient.dirs 0000644 0000000 0000000 00000000344 12214040350 014772 0 ustar usr/bin/
usr/share/x2goclient
usr/share/x2goclient/icons
usr/share/icons/hicolor/128x128/apps/
usr/share/icons/hicolor/16x16/apps/
usr/share/icons/hicolor/64x64/apps/
usr/share/icons/hicolor/32x32/apps/
usr/share/applications/
x2goclient-4.0.1.1/debian/x2goclient.docs 0000644 0000000 0000000 00000000016 12214040350 014755 0 ustar HOWTO.GPGCARD
x2goclient-4.0.1.1/debian/x2goclient.examples 0000644 0000000 0000000 00000000013 12214040350 015640 0 ustar examples/*
x2goclient-4.0.1.1/debian/x2goclient.install 0000644 0000000 0000000 00000001046 12214040350 015477 0 ustar client_build/x2goclient usr/bin
desktop/x2goclient.desktop usr/share/applications/
icons/x2goclient.xpm usr/share/x2goclient/icons/
icons/128x128/x2goclient.png usr/share/x2goclient/icons/
icons/128x128/x2gosession.png usr/share/x2goclient/icons/
icons/128x128/x2goclient.png usr/share/icons/hicolor/128x128/apps/
icons/16x16/x2goclient.png usr/share/icons/hicolor/16x16/apps/
icons/64x64/x2goclient.png usr/share/icons/hicolor/64x64/apps/
icons/32x32/x2goclient.png usr/share/icons/hicolor/32x32/apps/
x2goclient-4.0.1.1/debian/x2goclient.manpages 0000644 0000000 0000000 00000000026 12214040350 015621 0 ustar man/man1/x2goclient.1
x2goclient-4.0.1.1/debian/x2goplugin.dirs 0000644 0000000 0000000 00000000031 12214040350 015003 0 ustar usr/lib/mozilla/plugins/
x2goclient-4.0.1.1/debian/x2goplugin.install 0000644 0000000 0000000 00000000067 12214040350 015521 0 ustar plugin_build/libx2goplugin.so usr/lib/mozilla/plugins/
x2goclient-4.0.1.1/debian/x2goplugin-provider.dirs 0000644 0000000 0000000 00000000054 12214040350 016640 0 ustar etc/x2go/plugin-provider
etc/apache2/conf.d
x2goclient-4.0.1.1/debian/x2goplugin-provider.install 0000644 0000000 0000000 00000000147 12214040350 017350 0 ustar provider/etc/x2goplugin-apache.conf etc/x2go/
provider/share/x2goplugin.html etc/x2go/plugin-provider/
x2goclient-4.0.1.1/debian/x2goplugin-provider.links 0000644 0000000 0000000 00000000222 12214040350 017014 0 ustar etc/x2go/x2goplugin-apache.conf etc/apache2/conf.d/x2goplugin.conf
etc/x2go/plugin-provider/x2goplugin.html usr/share/x2go/plugin/x2goplugin.html
x2goclient-4.0.1.1/desktop/x2goclient.desktop 0000644 0000000 0000000 00000000400 12214040350 015722 0 ustar [Desktop Entry]
Version=1.0
Type=Application
Name=X2Go Client
Exec=x2goclient
Icon=x2goclient
StartupWMClass=x2goclient
X-Window-Icon=x2goclient
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
Terminal=false
Categories=Qt;KDE;Network;
x2goclient-4.0.1.1/Doxyfile 0000644 0000000 0000000 00000024020 12214040350 012312 0 ustar # Doxyfile 1.4.1-KDevelop
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = x2goclient
PROJECT_NUMBER = $VERSION$
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = /home/admin/
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = .
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox \
*.C \
*.CC \
*.C++ \
*.II \
*.I++ \
*.H \
*.HH \
*.H++ \
*.CS \
*.PHP \
*.PHP3 \
*.M \
*.MM \
*.C \
*.H \
*.tlh \
*.diff \
*.patch \
*.moc \
*.xpm \
*.dox
RECURSIVE = yes
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = .build_doxygen/doxygen/html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = .build_doxygen/doxygen/latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = .build_doxygen/doxygen/rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = YES
MAN_OUTPUT = .build_doxygen/man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = .build_doxygen/doxygen/xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE = x2goclient.tag
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
x2goclient-4.0.1.1/editconnectiondialog.cpp 0000644 0000000 0000000 00000012201 12214040350 015473 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "editconnectiondialog.h"
#include "x2goclientconfig.h"
#include "x2gologdebug.h"
#include "onmainwindow.h"
#include
#include
#include "sessionwidget.h"
#include "sharewidget.h"
#include "connectionwidget.h"
#include "settingswidget.h"
EditConnectionDialog::EditConnectionDialog ( QString id, QWidget * par,
int ind,Qt::WFlags f )
: QDialog ( par,f )
{
QVBoxLayout* ml=new QVBoxLayout ( this );
#ifdef Q_WS_HILDON
ml->setMargin ( 2 );
#endif
fr=new QTabWidget ( this );
ml->addWidget ( fr );
ONMainWindow* parent= ( ONMainWindow* ) par;
QFont fnt=font();
if ( parent->retMiniMode() )
#ifdef Q_WS_HILDON
fnt.setPointSize ( 10 );
#else
fnt.setPointSize ( 9 );
#endif
setFont ( fnt );
sessSet=new SessionWidget ( id,parent );
conSet=new ConnectionWidget ( id,parent );
otherSet=new SettingsWidget ( id,parent );
exportDir=new ShareWidget ( id,parent );
fr->addTab ( sessSet,tr ( "&Session" ) );
fr->addTab ( conSet,tr ( "&Connection" ) );
fr->addTab ( otherSet,tr ( "&Settings" ) );
fr->addTab ( exportDir,tr ( "&Shared folders" ) );
QPushButton* ok=new QPushButton ( tr ( "&OK" ),this );
QPushButton* cancel=new QPushButton ( tr ( "&Cancel" ),this );
QPushButton* def=new QPushButton ( tr ( "Defaults" ),this );
QHBoxLayout* bLay=new QHBoxLayout();
bLay->setSpacing ( 5 );
bLay->addStretch();
bLay->addWidget ( ok );
bLay->addWidget ( cancel );
bLay->addWidget ( def );
ml->addLayout ( bLay );
#ifdef Q_WS_HILDON
bLay->setMargin ( 2 );
#endif
setSizeGripEnabled ( true );
setWindowIcon ( QIcon ( parent->iconsPath ( "/32x32/edit.png" ) ) );
connect ( ok,SIGNAL ( clicked() ),this,SLOT ( accept() ) );
connect ( cancel,SIGNAL ( clicked() ),this,SLOT ( reject() ) );
connect ( def,SIGNAL ( clicked() ),this,SLOT ( slot_default() ) );
connect ( sessSet,SIGNAL ( nameChanged ( const QString & ) ),this,
SLOT ( slot_changeCaption ( const QString& ) ) );
connect ( this,SIGNAL ( accepted() ),this,SLOT ( slot_accepted() ) );
connect (sessSet, SIGNAL(directRDP(bool)), this, SLOT(slot_directRDP(bool)));
connect (sessSet,
SIGNAL(settingsChanged(QString,QString,QString)), otherSet,
SLOT(setServerSettings(QString,QString,QString)));
ok->setDefault ( true );
#ifdef Q_WS_HILDON
QSize sz=ok->sizeHint();
sz.setWidth ( ( int ) ( sz.width() /1.5 ) );
sz.setHeight ( ( int ) ( sz.height() /1.5 ) );
ok->setFixedSize ( sz );
sz=cancel->sizeHint();
sz.setWidth ( ( int ) ( sz.width() ) );
sz.setHeight ( ( int ) ( sz.height() /1.5 ) );
cancel->setFixedSize ( sz );
sz=def->sizeHint();
sz.setWidth ( ( int ) ( sz.width() ) );
sz.setHeight ( ( int ) ( sz.height() /1.5 ) );
def->setFixedSize ( sz );
#endif
if ( parent->retMiniMode() )
setContentsMargins ( 3,3,3,3 );
fr->setCurrentIndex ( ind );
slot_changeCaption(sessSet->sessionName());
#ifdef Q_OS_LINUX
sessSet->slot_rdpDirectClicked();
#endif
}
EditConnectionDialog::~EditConnectionDialog()
{}
void EditConnectionDialog::slot_changeCaption ( const QString& newName )
{
setWindowTitle ( tr ( "Session preferences - " ) +newName );
}
void EditConnectionDialog::slot_accepted()
{
conSet->saveSettings();
exportDir->saveSettings();
otherSet->saveSettings();
sessSet->saveSettings();
}
void EditConnectionDialog::slot_default()
{
switch ( fr->currentIndex() )
{
case 0:
{
sessSet->setDefaults();
}
break;
case 1:
{
conSet->setDefaults();
}
break;
case 2:
{
otherSet->setDefaults();
}
break;
case 3:
{
exportDir->setDefaults();
}
break;
}
}
#ifdef Q_OS_LINUX
void EditConnectionDialog::slot_directRDP(bool direct)
{
fr->setTabEnabled(1,!direct);
fr->setTabEnabled(3,!direct);
otherSet->setDirectRdp(direct);
}
#endif
x2goclient-4.0.1.1/editconnectiondialog.h 0000644 0000000 0000000 00000004327 12214040350 015152 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef EDITCONNECTIONDIALOG_H
#define EDITCONNECTIONDIALOG_H
#include "x2goclientconfig.h"
#include
#include
class QLineEdit;
class QPushButton;
class QCheckBox;
class QSpinBox;
class QComboBox;
class QRadioButton;
class QSlider;
class QLabel;
class QTabWidget;
class ONMainWindow;
class QStandardItemModel;
class QTreeView;
/**
@author Oleksandr Shneyder
*/
class SessionWidget;
class ConnectionWidget;
class SettingsWidget;
class ShareWidget;
class EditConnectionDialog : public QDialog
{
Q_OBJECT
public:
EditConnectionDialog ( QString id, QWidget * par, int ind=0,
Qt::WFlags f = 0 );
~EditConnectionDialog();
private:
QTabWidget *fr;
SessionWidget* sessSet;
ConnectionWidget* conSet;
SettingsWidget* otherSet;
ShareWidget* exportDir;
private slots:
void slot_changeCaption ( const QString& newName );
void slot_accepted();
void slot_default();
#ifdef Q_OS_LINUX
void slot_directRDP(bool direct);
#endif
};
#endif
x2goclient-4.0.1.1/examples/x2goclient-cli 0000755 0000000 0000000 00000032225 12214040350 015201 0 ustar #!/usr/bin/perl
############################################################################
# Copyright (C) 2006-2012 by Oleksandr Shneyder #
# oleksandr.shneyder@obviously-nice.de #
# #
# 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. #
############################################################################
use File::Path;
use Proc::Simple;
use Term::ReadPassword;
use Getopt::Long;
use strict;
my $user;
my $server;
my $geometry="fullscreen";
my $link="lan";
my $pack="16m-jpeg-9";
my $type="unix-kde";
my $stype="desktop";
my $kbdlay="us";
my $kbdtype="pc105/us";
my $setkbd="0";
my $accept=0;
my $sound=1;
my $cmd="startkde";
my $ssh_key=0;
my $port="22";
system ("rm -rf ~/.x2go/ssh/askpass*");
sub printpass
{
my $prog=shift;
my $pass=shift;
open (F,">$prog") or die "Couldn't open $prog for writing";
print F '#!/usr/bin/perl
$param=shift;';
print F " open (F,\">$prog.log\");";
print F ' print F $param;
close (F);
if($param =~ m/RSA key/)
{';
if($accept){
print F 'print "yes\n";';}
else{
print F 'print "no\n";';}
print F ' }
else
{';
print F " print \"$pass\\n\";
}";
close(F);
chmod (0700, $prog);
}
sub checkstat
{
my $prog=shift;
open (F,"<$prog.log") or return;
my @outp;
my $ln=;
for(my $i=0;$ln;$i++)
{
@outp[$i]=$ln;
$ln=;
}
close(F);
if(join(" ",@outp) =~ m/Are you sure you want to continue connecting/)
{
print "@outp[0]@outp[1]";
print "If you are sure you want to continue connecting, please launch this programm with --add-to-known-hosts yes\n";
exit;
}
}
sub hidepass
{
my $prog=shift;
open (F,">$prog") or die "Couldn't open $prog for writing";
print F "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
close(F);
}
my $pack_methods=
"nopack
8
64
256
512
4k
32k
64k
256k
2m
16m
256-rdp
256-rdp-compressed
32k-rdp
32k-rdp-compressed
64k-rdp
64k-rdp-compressed
16m-rdp
16m-rdp-compressed
rfb-hextile
rfb-tight
rfb-tight-compressed
8-tight
64-tight
256-tight
512-tight
4k-tight
32k-tight
64k-tight
256k-tight
2m-tight
16m-tight
8-jpeg-%
64-jpeg
256-jpeg
512-jpeg
4k-jpeg
32k-jpeg
64k-jpeg
256k-jpeg
2m-jpeg
16m-jpeg-%
8-png-jpeg-%
64-png-jpeg
256-png-jpeg
512-png-jpeg
4k-png-jpeg
32k-png-jpeg
64k-png-jpeg
256k-png-jpeg
2m-png-jpeg
16m-png-jpeg-%
8-png-%
64-png
256-png
512-png
4k-png
32k-png
64k-png
256k-png
2m-png
16m-png-%
16m-rgb-%
16m-rle-%";
sub printargs
{
print "Usage: $0 --user --server [Options]\nOptions:\
--help Print this message\
--help-pack Print availabel pack methods
--user Connect as user 'username'\
--server Connect to 'hostname'\
--command Run command 'cmd', default value 'startkde'
--port SSH port, default 22
--ssh-key Us 'fname' as a key for ssh connection
--add-to-known-hosts Add RSA key fingerprint to .ssh/known_hosts if authenticity of server can't be established, default value 'no'
--use-sound Start sound server and ssh tunel for sound connections, default value 'yes'
nxagent options:
--geometry x Set window size, default value 'fullscreen'
--link Set link type, default 'lan'
--pack Use pack method, default '16m-jpeg-9'
--session-type Session type, 'desktop' or 'application' default 'desktop'
--kbd-layout Use keyboard layout, default 'us'
--kbd-type Set Keyboard type, default 'pc105/us'\n";
exit;
}
sub printpack
{
my $m=$pack_methods;
$m=~s/%/[0-9]/g;
print "$m\n";
exit;
}
sub check_pack
{
my $p=shift;
if($p =~ m/%/)
{
return 0;
}
my @arr=split("-","$p");
my $pm=$pack_methods;
if(@arr>1)
{
my $qa=@arr[@arr-1];
my @vals=unpack('cc',$qa);
if($qa ge '0' && $qa le '9' && @vals == 1)
{
$pm=~s/%/$qa/g;
}
}
my @met=split("\n","$pm");
for(my $i=0;$i<@met;$i++)
{
if(@met[$i] eq $p)
{
return 1;
}
}
return 0;
}
sub getindex
{
my @sess=@_;
print("Number\tStatus\t\tCreation time\t\tDisplay\tClient IP\n");
for(my $i=1;$i<=@sess;$i++)
{
my @vals=split('\\|',"@sess[$i-1]");
my $status=@vals[4];
if(@vals[4] eq 'S')
{
$status='Suspended'
}
elsif(@vals[4] eq 'R')
{
$status='Running '
}
print "$i)\t$status\t@vals[5]\t@vals[2]\t@vals[7]\n";
}
print "Enter numer of session to resume or 'n' to start new session: ";
my $answ=;
chomp($answ);
if($answ > 0 && $answ <= @sess)
{
my @vals=split('\\|',"@sess[$answ-1]");
if(@vals[4] eq 'R')
{
print("Session is already running on @vals[7], continue? (y/n): ");
my $nansw=;
chomp($nansw);
if($nansw eq 'y')
{
return $answ;
}
else
{
return -1;
}
}
else
{
return $answ;
}
}
elsif ($answ eq "n")
{
return 0;
}
else
{
print "Input Error\n";
return -1;
}
}
GetOptions("user=s" => \$user,
"server=s" => \$server,
"command=s" => \$cmd,
"port=s" => \$port,
"ssh-key=s" => \$ssh_key,
"add-to-known-hosts=s" => \$accept,
"use-sound=s" => \$sound,
"geometry=s" => \$geometry,
"link=s" => \$link,
"pack=s" => \$pack,
"session-type=s" => \$stype,
"kbd-layout=s" => \$kbdlay,
"kbd-type=s" => \$kbdtype,
'help-pack' => \&printpack,
'help' => \&printargs) or printargs;
printargs unless (($user and $server));
if($ssh_key)
{
if ( ! -e $ssh_key)
{
print "Error, $ssh_key not exists\n";
exit;
}
}
if($kbdlay or $kbdtype)
{
$setkbd=1;
}
if(($link ne "modem" )&&($link ne "isdn")&&($link ne "adsl")&&($link ne "wan")&&($link ne "lan"))
{
print "Error parsing command line, wrong \"link\" argument\n";
printargs;
exit;
}
if(! check_pack($pack) )
{
print "Error parsing command line, wrong \"pack\" argument\n";
printargs;
exit;
}
if($accept)
{
if($accept eq "yes")
{
$accept=1;
}
elsif($accept eq "no")
{
$accept=0;
}
else
{
print "Error parsing command line, wrong \"add-to-known-hosts\" argument\n";
printargs;
exit;
}
}
if($sound != 1)
{
if($sound eq "yes")
{
$sound=1;
}
elsif($sound eq "no")
{
$sound=0;
}
else
{
print "Error parsing command line, wrong \"use-sound\" argument\n";
printargs;
exit;
}
}
my $nxroot="$ENV{'HOME'}/.x2go";
my $dirpath="$nxroot/ssh";
eval
{
mkpath($dirpath)
};
if ($@)
{
print "Couldn't create $dirpath: $@";
exit;
}
my $askpass="$dirpath/askpass";
my $pass;
my $sessions;
if(!$ssh_key)
{
$pass=read_password('Password:');
printpass $askpass,$pass;
$sessions=`DISPLAY=:0 SSH_ASKPASS=$askpass setsid ssh -p $port $user\@$server "export HOSTNAME&&x2golistsessions"`;
hidepass $askpass;
checkstat $askpass;
}
else
{
$sessions=`ssh -p $port -i $ssh_key $user\@$server "export HOSTNAME&&x2golistsessions"`;
}
my @sess=split("\n","$sessions");
my $newses=0;
my $snum=-1;#index of session+1,-1 - error, -0 - new session
if (@sess == 0)
{
$newses=1;
}
else
{
my @lines=split('\\|',"@sess[0]");
my $status=@lines[4];
if($status eq 'S' && @sess == 1)
{
$snum=0;
}
else
{
while($snum==-1)
{
$snum=getindex(@sess);
}
if($snum == 0)
{
$newses=1;
}
else
{
$snum--;
}
}
}
my $disp;
my $snd_port;
my $gr_port;
my $cookie;
my $agentpid;
my $sname;
my $t="D";
if( $stype eq "application" )
{
$t="R";
}
if($newses)
{
my $outp;
if(! $ssh_key)
{
printpass $askpass,$pass;
$outp=`DISPLAY=:0 SSH_ASKPASS=$askpass setsid ssh -p $port $user\@$server "x2gostartagent $geometry $link $pack $type $kbdlay $kbdtype $setkbd $t"`;
hidepass $askpass;
checkstat $askpass;
}
else
{
$outp=`ssh -p $port -i $ssh_key $user\@$server "x2gostartagent $geometry $link $pack $type $kbdlay $kbdtype $setkbd $t"`;
}
my @lines=split("\n","$outp");
$disp=@lines[0];
$cookie=@lines[1];
$agentpid=@lines[2];
$sname=@lines[3];
$gr_port=@lines[4];
$snd_port=@lines[5];
# print ":$disp $cookie $agentpid $sname $gr_port $snd_port\n";
}
else
{
my @lines=split('\\|',"@sess[$snum]");
$agentpid=@lines[0];
$sname=@lines[1];
$disp=@lines[2];
my $status=@lines[4];
$cookie=@lines[6];
$gr_port=@lines[8];
$snd_port=@lines[9];
if($status eq 'R')
{
if(! $ssh_key)
{
printpass $askpass,$pass;
system("DISPLAY=:0 SSH_ASKPASS=$askpass setsid ssh -p $port $user\@$server \"setsid x2gosuspend-session $sname\"");
hidepass $askpass;
checkstat $askpass;
}
else
{
system("ssh -p $port -i $ssh_key $user\@$server \"setsid x2gosuspend-session $sname\"");
}
sleep (1);
}
if(! $ssh_key)
{
printpass $askpass,$pass;
system("DISPLAY=:0 SSH_ASKPASS=$askpass setsid ssh -p $port $user\@$server \"setsid x2goresume-session $sname $geometry $link $pack $kbdlay $kbdtype $setkbd\"");
hidepass $askpass;
checkstat $askpass;
}
else
{
system("ssh -p $port -i $ssh_key $user\@$server \"setsid x2goresume-session $sname $geometry $link $pack $kbdlay $kbdtype $setkbd\"");
}
}
my $tunnel = Proc::Simple->new();
my $snd_tun;
my $snd_server;
if($sound)
{
$snd_tun= Proc::Simple->new();
$snd_server= Proc::Simple->new();
$snd_server->start("artsd -u -N -p $snd_port");
}
if( !$ssh_key)
{
printpass $askpass,$pass;
$tunnel->start("DISPLAY=:0 SSH_ASKPASS=$askpass setsid ssh -p $port -N -L $gr_port:localhost:$gr_port $user\@$server");
if($sound)
{
$snd_tun->start("DISPLAY=:0 SSH_ASKPASS=$askpass setsid ssh -p $port -N -R $snd_port:localhost:$snd_port $user\@$server");
}
}
else
{
$tunnel->start("ssh -p $port -i $ssh_key -N -L $gr_port:localhost:$gr_port $user\@$server");
if($sound)
{
$snd_tun->start("ssh -p $port -i $ssh_key -N -R $snd_port:localhost:$snd_port $user\@$server");
}
}
sleep 2;
$dirpath="$nxroot/S-$sname";
eval
{
mkpath($dirpath)
};
if ($@)
{
print "Couldn't create $dirpath: $@";
hidepass $askpass;
exit;
}
my $nx_host="nx/nx,composite=1,root=$nxroot,connect=localhost,cookie=$cookie,port=$gr_port,errors=$dirpath/session";
open (FILE,">$dirpath/options")or die "Couldnt't open $dirpath/options for writing";
print FILE "$nx_host:$disp";
close (FILE);
my $proxy = Proc::Simple->new();
$proxy->start("LD_LIBRARY_PATH=\$X2GO_LIB nxproxy -S nx/nx,options=$dirpath/options:$disp 2>>$dirpath/session");
if($newses)
{
if(! $ssh_key)
{
system("DISPLAY=:0 SSH_ASKPASS=$askpass setsid ssh -p $port $user\@$server \"setsid x2goruncommand $disp $agentpid $sname $snd_port $cmd arts $t >& /dev/null & exit \"");
}
else
{
system("ssh -p $port -i $ssh_key $user\@$server \"setsid x2goruncommand $disp $agentpid $sname $snd_port $cmd arts $t>& /dev/null & exit \"");
}
}
#hidepass $askpass;
#checkstat $askpass;
while($proxy->poll())
{
sleep(1);
}
$tunnel->kill();
if($sound)
{
$snd_server->kill();
$snd_tun->kill();
}
system ("rm -rf ~/.x2go/ssh/askpass*");
x2goclient-4.0.1.1/exportdialog.cpp 0000644 0000000 0000000 00000012216 12214040350 014015 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "x2goclientconfig.h"
#include "exportdialog.h"
#include "editconnectiondialog.h"
#include
#include
#include
#include
#include "x2gosettings.h"
#include
#include
#include
#include
#include "sessionbutton.h"
#include "onmainwindow.h"
#include
ExportDialog::ExportDialog ( QString sid,QWidget * par, Qt::WFlags f )
: QDialog ( par,f )
{
sessionId=sid;
QVBoxLayout* ml=new QVBoxLayout ( this );
QFrame *fr=new QFrame ( this );
QHBoxLayout* frLay=new QHBoxLayout ( fr );
parent= ( ONMainWindow* ) par;
QPushButton* cancel=new QPushButton ( tr ( "&Cancel" ),this );
QHBoxLayout* bLay=new QHBoxLayout();
sessions=new QListView ( fr );
frLay->addWidget ( sessions );
exportDir=new QPushButton ( tr ( "&share" ),fr );
editSession=new QPushButton ( tr ( "&Preferences ..." ),fr );
newDir=new QPushButton ( tr ( "&Custom folder ..." ),fr );
QVBoxLayout* actLay=new QVBoxLayout();
actLay->addWidget ( exportDir );
actLay->addWidget ( editSession );
actLay->addWidget ( newDir );
actLay->addStretch();
frLay->addLayout ( actLay );
QShortcut* sc=new QShortcut ( QKeySequence ( tr ( "Delete","Delete" ) ),
this );
connect ( cancel,SIGNAL ( clicked() ),this,SLOT ( close() ) );
connect ( sc,SIGNAL ( activated() ),exportDir,SIGNAL ( clicked() ) );
connect ( editSession,SIGNAL ( clicked() ),this,SLOT ( slot_edit() ) );
connect ( newDir,SIGNAL ( clicked() ),this,SLOT ( slotNew() ) );
connect ( exportDir,SIGNAL ( clicked() ),this,SLOT ( slot_accept() ) );
bLay->setSpacing ( 5 );
bLay->addStretch();
bLay->addWidget ( cancel );
ml->addWidget ( fr );
ml->addLayout ( bLay );
fr->setFrameStyle ( QFrame::StyledPanel | QFrame::Raised );
fr->setLineWidth ( 2 );
setSizeGripEnabled ( true );
setWindowTitle ( tr ( "share folders" ) );
connect ( sessions,SIGNAL ( clicked ( const QModelIndex& ) ),
this,SLOT ( slot_activated ( const QModelIndex& ) ) );
connect ( sessions,SIGNAL ( doubleClicked ( const QModelIndex& ) ),
this,SLOT ( slot_dclicked ( const QModelIndex& ) ) );
loadSessions();
}
ExportDialog::~ExportDialog()
{}
void ExportDialog::loadSessions()
{
QStringListModel *model= ( QStringListModel* ) sessions->model();
if ( !model )
model=new QStringListModel();
sessions->setModel ( model );
QStringList dirs;
model->setStringList ( dirs );
X2goSettings st ( "sessions" );
QString exports=st.setting()->value ( sessionId+"/export",
( QVariant ) QString::null ).toString();
QStringList lst=exports.split ( ";",QString::SkipEmptyParts );
for ( int i=0;isetStringList ( dirs );
// removeSession->setEnabled(false);
exportDir->setEnabled ( false );
sessions->setEditTriggers ( QAbstractItemView::NoEditTriggers );
}
void ExportDialog::slot_activated ( const QModelIndex& )
{
// removeSession->setEnabled(true);
exportDir->setEnabled ( true );
}
void ExportDialog::slot_dclicked ( const QModelIndex& )
{
slot_accept();
}
void ExportDialog::slotNew()
{
directory=QString::null;
directory= QFileDialog::getExistingDirectory (
this,
tr ( "Select folder" ),
QDir::homePath() );
if ( directory!=QString::null )
accept();
}
void ExportDialog::slot_edit()
{
const QList* sess=parent->getSessionsList();
for ( int i=0;i< sess->size();++i )
{
if ( sess->at ( i )->id() ==sessionId )
{
parent->exportsEdit ( sess->at ( i ) );
break;
}
}
loadSessions();
}
void ExportDialog::slot_accept()
{
int ind=sessions->currentIndex().row();
if ( ind<0 )
return;
QStringListModel *model= ( QStringListModel* ) sessions->model();
directory=model->stringList() [ind];
accept();
}
x2goclient-4.0.1.1/exportdialog.h 0000644 0000000 0000000 00000004013 12214040350 013456 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#ifndef EXPORTDIALOG_H
#define EXPORTDIALOG_H
#include "x2goclientconfig.h"
#include
class QListView;
class QPushButton;
class QModelIndex;
class ONMainWindow;
/**
@author Oleksandr Shneyder
*/
class ExportDialog : public QDialog
{
Q_OBJECT
public:
ExportDialog(QString sid,QWidget * par, Qt::WFlags f = 0);
~ExportDialog();
QString getExport(){return directory;}
private:
QListView* sessions;
QPushButton* editSession;
QPushButton* exportDir;
QPushButton* newDir;
QString directory;
ONMainWindow* parent;
void loadSessions();
QString sessionId;
private slots:
void slot_activated(const QModelIndex& index);
void slotNew();
void slot_edit();
void slot_dclicked(const QModelIndex& index);
void slot_accept();
};
#endif
x2goclient-4.0.1.1/HOWTO.GPGCARD 0000644 0000000 0000000 00000010321 12214040350 012474 0 ustar x2goclient smartcard HOWTO:
1. gpg card configuration:
user@x2goclient$ gpg --card-edit
Application ID ...: D2760001240102000000000000420000
Version ..........: 2.0
Manufacturer .....: test card
Serial number ....: 00000042
Name of cardholder: [not set]
Language prefs ...: de
Sex ..............: unspecified
URL of public key : [not set]
Login data .......: [not set]
Private DO 1 .....: [not set]
Private DO 2 .....: [not set]
Signature PIN ....: forced
Max. PIN lengths .: 24 24 24
PIN retry counter : 3 0 3
Signature counter : 0
Signature key ....: [none]
Encryption key....: [none]
Authentication key: [none]
General key info..: [none]
Command> admin
Admin commands are allowed
Command> sex
Sex ((M)ale, (F)emale or space): M
gpg: 3 Admin PIN attempts remaining before card is permanently locked
Admin PIN
Command> login
Login data (account name): beispielb
Command> generate
Make off-card backup of encryption key? (Y/n) n
Please note that the factory settings of the PINs are
PIN = `123456' Admin PIN = `12345678'
You should change them using the command --change-pin
PIN
Please specify how long the key should be valid.
0 = key does not expire
= key expires in n days
w = key expires in n weeks
m = key expires in n months
y = key expires in n years
Key is valid for? (0)
Key does not expire at all
Is this correct? (y/N) y
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
"Heinrich Heine (Der Dichter) "
Real name: Bert Beispiel
Email address: bert.beispiel@x2go-test.org
Comment: Test user
You selected this USER-ID:
"Bert Beispiel (Test user) "
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
gpg: generating new key
gpg: please wait while key is being generated ...
gpg: key generation completed (17 seconds)
gpg: signatures created so far: 0
gpg: generating new key
gpg: please wait while key is being generated ...
gpg: key generation completed (14 seconds)
gpg: signatures created so far: 1
gpg: signatures created so far: 2
gpg: generating new key
gpg: please wait while key is being generated ...
gpg: key generation completed (13 seconds)
gpg: signatures created so far: 3
gpg: signatures created so far: 4
gpg: key 8CE52B35 marked as ultimately trusted
public and secret key created and signed.
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, classic trust model
gpg: depth: 0 valid: 8 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 8u
pub 1024R/8CE52B35 2009-09-24
Key fingerprint = 2475 8498 7FF4 2727 B476 F72E 7BF2 CFE9 8CE5 2B35
uid Bert Beispiel (Test user)
sub 1024R/C7151669 2009-09-24
sub 1024R/593801C0 2009-09-24
Command> quit
IMPORTANT: login Name is a name of user on remote system
2. configuring ssh connection
2.1 start gpg-agent with ssh support
Be sure, that pinentry-x2go is installed. For test purposes you can use other pinentry program, but for
x2goclient pinentry-x2go is requered (pinentry-x2go-gtk if you are using gtk version of x2goclient)
user@x2goclient$ gpg-agent --enable-ssh-support --daemon --pinentry-program /usr/bin/pinentry-x2go
GPG_AGENT_INFO=/tmp/gpg-Xh4lY7/S.gpg-agent:24620:1; export GPG_AGENT_INFO;
SSH_AUTH_SOCK=/tmp/gpg-LO41WU/S.gpg-agent.ssh; export SSH_AUTH_SOCK;
SSH_AGENT_PID=24620; export SSH_AGENT_PID;
2.2 export SSH environment variables (copy gpg-agent output in console)
user@x2goclient$ GPG_AGENT_INFO=/tmp/gpg-Xh4lY7/S.gpg-agent:24620:1; export GPG_AGENT_INFO;
user@x2goclient$ SSH_AUTH_SOCK=/tmp/gpg-LO41WU/S.gpg-agent.ssh; export SSH_AUTH_SOCK;
user@x2goclient$ SSH_AGENT_PID=24620; export SSH_AGENT_PID;
2.3 You can check the key on your smartcard with command:
user@x2goclient$ ssh-add -l
1024 ef:d5:8c:37:cb:38:01:8d:c2:30:00:ac:93:a2:43:98 cardno:000000000042 (RSA)
2.4 Copy public part of your key to remote computer
user@x2goclient$ ssh-copy-id beispielb@x2goserver
beispielb@x2goserver's password:
Now try logging into the machine, with "ssh 'beispielb@x2goserver'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
2.5 Testing ssh connection
x2goclient-4.0.1.1/httpbrokerclient.cpp 0000644 0000000 0000000 00000052504 12214040350 014703 0 ustar /**************************************************************************
* Copyright (C) 2005-2012 by Oleksandr Shneyder *
* o.shneyder@phoca-gmbh.de *
* *
* 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, see . *
***************************************************************************/
#include "httpbrokerclient.h"
#include
#include
#include
#include
#include
#include "x2gologdebug.h"
#include
#include
#include "onmainwindow.h"
#include "x2gosettings.h"
#include
#include
#include "SVGFrame.h"
#include "onmainwindow.h"
#include
#include
HttpBrokerClient::HttpBrokerClient ( ONMainWindow* wnd, ConfigFile* cfg )
{
config=cfg;
mainWindow=wnd;
sshConnection=0;
QUrl lurl ( config->brokerurl );
if(lurl.userName().length()>0)
config->brokerUser=lurl.userName();
if(config->brokerurl.indexOf("ssh://")==0)
{
sshBroker=true;
x2goDebug<<"host:"<sshBrokerBin=lurl.path();
}
else
{
sshBroker=false;
http=new QHttp ( this );
if ( config->brokerurl.indexOf ( "https://" ) ==0 )
http->setHost ( lurl.host(),QHttp::ConnectionModeHttps,
lurl.port ( 443 ) );
else
http->setHost ( lurl.host(),QHttp::ConnectionModeHttp,
lurl.port ( 80 ) );
connect ( http,SIGNAL ( requestFinished ( int,bool ) ),this,
SLOT ( slotRequestFinished ( int,bool ) ) );
connect ( http,SIGNAL ( sslErrors ( const QList& ) ),this,
SLOT ( slotSslErrors ( const QList& ) ) );
}
}
HttpBrokerClient::~HttpBrokerClient()
{
}
void HttpBrokerClient::createSshConnection()
{
QUrl lurl ( config->brokerurl );
sshConnection=new SshMasterConnection (this, lurl.host(), lurl.port(22),false,
config->brokerUser, config->brokerPass,config->brokerSshKey,config->brokerAutologin, false,false);
connect ( sshConnection, SIGNAL ( connectionOk(QString)), this, SLOT ( slotSshConnectionOk() ) );
connect ( sshConnection, SIGNAL ( serverAuthError ( int,QString, SshMasterConnection* ) ),this,
SLOT ( slotSshServerAuthError ( int,QString, SshMasterConnection* ) ) );
connect ( sshConnection, SIGNAL ( needPassPhrase(SshMasterConnection*)),this,
SLOT ( slotSshServerAuthPassphrase(SshMasterConnection*)) );
connect ( sshConnection, SIGNAL ( userAuthError ( QString ) ),this,SLOT ( slotSshUserAuthError ( QString ) ) );
connect ( sshConnection, SIGNAL ( connectionError(QString,QString)), this,
SLOT ( slotSshConnectionError ( QString,QString ) ) );
sshConnection->start();
}
void HttpBrokerClient::slotSshConnectionError(QString message, QString lastSessionError)
{
if ( sshConnection )
{
sshConnection->wait();
delete sshConnection;
sshConnection=0l;
}
QMessageBox::critical ( 0l,message,lastSessionError,
QMessageBox::Ok,
QMessageBox::NoButton );
}
void HttpBrokerClient::slotSshConnectionOk()
{
getUserSessions();
}
void HttpBrokerClient::slotSshServerAuthError(int error, QString sshMessage, SshMasterConnection* connection)
{
QString errMsg;
switch ( error )
{
case SSH_SERVER_KNOWN_CHANGED:
errMsg=tr ( "Host key for server changed.\nIt is now: " ) +sshMessage+"\n"+
tr ( "For security reasons, connection will be stopped" );
connection->writeKnownHosts(false);
connection->wait();
if(sshConnection && sshConnection !=connection)
{
sshConnection->wait();
delete sshConnection;
}
sshConnection=0;
slotSshUserAuthError ( errMsg );
return;
case SSH_SERVER_FOUND_OTHER:
errMsg=tr ( "The host key for this server was not found but an other"
"type of key exists.An attacker might change the default server key to"
"confuse your client into thinking the key does not exist" );
connection->writeKnownHosts(false);
connection->wait();
if(sshConnection && sshConnection !=connection)
{
sshConnection->wait();
delete sshConnection;
}
sshConnection=0;
slotSshUserAuthError ( errMsg );
return ;
case SSH_SERVER_ERROR:
connection->writeKnownHosts(false);
connection->wait();
if(sshConnection && sshConnection !=connection)
{
sshConnection->wait();
delete sshConnection;
}
sshConnection=0;
slotSshUserAuthError ( sshMessage );
return ;
case SSH_SERVER_FILE_NOT_FOUND:
errMsg=tr ( "Could not find known host file."
"If you accept the host key here, the file will be automatically created" );
break;
case SSH_SERVER_NOT_KNOWN:
errMsg=tr ( "The server is unknown. Do you trust the host key?\nPublic key hash: " ) +sshMessage;
break;
}
if ( QMessageBox::warning ( 0, tr ( "Host key verification failed" ),errMsg,tr ( "Yes" ), tr ( "No" ) ) !=0 )
{
connection->writeKnownHosts(false);
connection->wait();
if(sshConnection && sshConnection !=connection)
{
sshConnection->wait();
delete sshConnection;
}
sshConnection=0;
slotSshUserAuthError ( tr ( "Host key verification failed" ) );
return;
}
connection->writeKnownHosts(true);
connection->wait();
connection->start();
}
void HttpBrokerClient::slotSshServerAuthPassphrase(SshMasterConnection* connection)
{
bool ok;
QString phrase=QInputDialog::getText(0,connection->getUser()+"@"+connection->getHost()+":"+QString::number(connection->getPort()),
tr("Enter passphrase to decrypt a key"),QLineEdit::Password,QString::null, &ok);
if(!ok)
{
phrase=QString::null;
}
else
{
if(phrase==QString::null)
phrase="";
}
connection->setKeyPhrase(phrase);
}
void HttpBrokerClient::slotSshUserAuthError(QString error)
{
if ( sshConnection )
{
sshConnection->wait();
delete sshConnection;
sshConnection=0l;
}
QMessageBox::critical ( 0l,tr ( "Authentication failed" ),error,
QMessageBox::Ok,
QMessageBox::NoButton );
emit authFailed();
return;
}
void HttpBrokerClient::getUserSessions()
{
QString brokerUser=config->brokerUser;
if(mainWindow->getUsePGPCard())
brokerUser=mainWindow->getCardLogin();
config->sessiondata=QString::null;
if(!sshBroker)
{
QString req;
QTextStream ( &req ) <<
"task=listsessions&"<<
"user="<brokerPass<<"&"<<
"authid="<brokerUserId;
QUrl lurl ( config->brokerurl );
httpSessionAnswer.close();
httpSessionAnswer.setData ( 0,0 );
sessionsRequest=http->post ( lurl.path(),req.toUtf8(),&httpSessionAnswer );
}
else
{
if(!sshConnection)
{
createSshConnection();
return;
}
if (config->brokerUserId.length() > 0) {
sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+config->brokerUserId+ " --task listsessions",
this, SLOT ( slotListSessions ( bool, QString,int ) ));
} else {
sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --task listsessions",
this, SLOT ( slotListSessions ( bool, QString,int ) ));
}
}
}
void HttpBrokerClient::selectUserSession(const QString& session)
{
QString brokerUser=config->brokerUser;
if(mainWindow->getUsePGPCard())
brokerUser=mainWindow->getCardLogin();
if(!sshBroker)
{
QString req;
QTextStream ( &req ) <<
"task=selectsession&"<<
"sid="<brokerPass<<"&"<<
"authid="<brokerUserId;
QUrl lurl ( config->brokerurl );
httpSessionAnswer.close();
httpSessionAnswer.setData ( 0,0 );
selSessRequest=http->post ( lurl.path(),req.toUtf8(),&httpSessionAnswer );
}
else
{
if (config->brokerUserId.length() > 0) {
sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+config->brokerUserId+ " --task selectsession --sid \\\""+session+"\\\"",
this,SLOT ( slotSelectSession(bool,QString,int)));
} else {
sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --task selectsession --sid \\\""+session+"\\\"",
this,SLOT ( slotSelectSession(bool,QString,int)));
}
}
}
void HttpBrokerClient::changePassword(QString newPass)
{
newBrokerPass=newPass;
QString brokerUser=config->brokerUser;
if(mainWindow->getUsePGPCard())
brokerUser=mainWindow->getCardLogin();
if(!sshBroker)
{
QString req;
QTextStream ( &req ) <<
"task=setpass&"<<
"newpass="<brokerPass<<"&"<<
"authid="<brokerUserId;
QUrl lurl ( config->brokerurl );
httpSessionAnswer.close();
httpSessionAnswer.setData ( 0,0 );
chPassRequest=http->post ( lurl.path(),req.toUtf8(),&httpSessionAnswer );
}
else
{
if (config->brokerUserId.length() > 0) {
sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+config->brokerUserId+ " --task setpass --newpass "+newPass, this,
SLOT ( slotPassChanged(bool,QString,int)));
} else {
sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --task setpass --newpass "+newPass, this,
SLOT ( slotPassChanged(bool,QString,int)));
}
}
}
void HttpBrokerClient::testConnection()
{
if(!sshBroker)
{
QString req;
QTextStream ( &req ) <<
"task=testcon";
QUrl lurl ( config->brokerurl );
httpSessionAnswer.close();
httpSessionAnswer.setData ( 0,0 );
requestTime.start();
testConRequest=http->post ( lurl.path(),req.toUtf8(),&httpSessionAnswer );
}
else
{
if (config->brokerUserId.length() > 0) {
sshConnection->executeCommand(config->sshBrokerBin+" --authid "+config->brokerUserId+ " --task testcon",
this, SLOT ( slotSelectSession(bool,QString,int)));
} else {
sshConnection->executeCommand(config->sshBrokerBin+" --task testcon",
this, SLOT ( slotSelectSession(bool,QString,int)));
}
}
}
void HttpBrokerClient::createIniFile(const QString& raw_content)
{
QString content;
content = raw_content;
content.replace("
","\n");
x2goDebug<<"inifile content: "<1)
{
cont=lines[1];
cont=cont.split("END_USER_SESSIONS\n")[0];
}
mainWindow->config.iniFile=cont;
}
bool HttpBrokerClient::checkAccess(QString answer )
{
if (answer.indexOf("Access granted")==-1)
{
QMessageBox::critical (
0,tr ( "Error" ),
tr ( "Login failed!
"
"Please try again" ) );
emit authFailed();
return false;
}
config->brokerAuthenticated=true;
return true;
}
void HttpBrokerClient::slotConnectionTest(bool success, QString answer, int)
{
if(!success)
{
x2goDebug<errorString();
QMessageBox::critical(0,tr("Error"),http->errorString());
emit fatalHttpError();
return;
}
QString answer ( httpSessionAnswer.data() );
x2goDebug<<"cmd request answer: "<