mirror of
https://invent.kde.org/network/krfb
synced 2024-06-28 22:14:41 +00:00
Added KCM option to disable SLP announcements
svn path=/trunk/kdenetwork/krfb/; revision=168752
This commit is contained in:
parent
44c9c67df1
commit
cb9f1c9c96
2
TODO
2
TODO
|
@ -4,7 +4,7 @@ For 3.1:
|
|||
|
||||
For 3.2:
|
||||
- enhance RFB with SASL authentication (Kerberos)
|
||||
- encrypted connection (using SASL and/or SSL/TLS)
|
||||
- encrypted connections (using SASL and/or SSL/TLS)
|
||||
|
||||
Todo (unscheduled features):
|
||||
- NAT traversal support if I can find an acceptable implementation
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>420</width>
|
||||
<height>354</height>
|
||||
<width>421</width>
|
||||
<height>445</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
|
@ -143,6 +143,20 @@
|
|||
<string>Select this option to allow connecting without inviting. This is useful if you want to access your desktop remotely.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>enableSLPCB</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Announce &service on the network</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="whatsThis" stdset="0">
|
||||
<string>If you allow uninvited connections and enable this option, Desktop Sharing will announce the service and your identity on the local network, so people can find you and your computer.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>confirmConnectionsCB</cstring>
|
||||
|
@ -159,7 +173,7 @@
|
|||
<cstring>allowDesktopControlCB</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Allow u&ninvited connections to control the desktop</string>
|
||||
<string>A&llow uninvited connections to control the desktop</string>
|
||||
</property>
|
||||
<property name="whatsThis" stdset="0">
|
||||
<string>Enable this option to allow uninvited user to control your desktop (using mouse and keyboard).</string>
|
||||
|
@ -242,6 +256,12 @@
|
|||
<property name="sizeType">
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</vbox>
|
||||
</widget>
|
||||
|
@ -362,6 +382,12 @@ Most VNC clients use a display number instead of the actual port. This display n
|
|||
<property name="sizeType">
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</vbox>
|
||||
</widget>
|
||||
|
|
|
@ -66,6 +66,7 @@ KcmKRfb::KcmKRfb(QWidget *p, const char *name, const QStringList &) :
|
|||
|
||||
connect(m_confWidget->passwordInput, SIGNAL(textChanged(const QString&)), SLOT(configChanged()) );
|
||||
connect(m_confWidget->allowUninvitedCB, SIGNAL(clicked()), SLOT(configChanged()) );
|
||||
connect(m_confWidget->enableSLPCB, SIGNAL(clicked()), SLOT(configChanged()) );
|
||||
connect(m_confWidget->confirmConnectionsCB, SIGNAL(clicked()), SLOT(configChanged()) );
|
||||
connect(m_confWidget->allowDesktopControlCB, SIGNAL(clicked()), SLOT(configChanged()) );
|
||||
connect(m_confWidget->autoPortCB, SIGNAL(clicked()), SLOT(configChanged()) );
|
||||
|
@ -117,6 +118,7 @@ void KcmKRfb::load() {
|
|||
checkKInetd(kinetdAvailable, krfbAvailable);
|
||||
|
||||
m_confWidget->allowUninvitedCB->setChecked(m_configuration.allowUninvitedConnections());
|
||||
m_confWidget->enableSLPCB->setChecked(m_configuration.enableSLP());
|
||||
m_confWidget->confirmConnectionsCB->setChecked(m_configuration.askOnConnect());
|
||||
m_confWidget->allowDesktopControlCB->setChecked(m_configuration.allowDesktopControl());
|
||||
m_confWidget->passwordInput->setText(m_configuration.password());
|
||||
|
@ -130,6 +132,7 @@ void KcmKRfb::save() {
|
|||
m_configuration.update();
|
||||
bool allowUninvited = m_confWidget->allowUninvitedCB->isChecked();
|
||||
m_configuration.setAllowUninvited(allowUninvited);
|
||||
m_configuration.setEnableSLP(m_confWidget->enableSLPCB->isChecked());
|
||||
m_configuration.setAskOnConnect(m_confWidget->confirmConnectionsCB->isChecked());
|
||||
m_configuration.setAllowDesktopControl(m_confWidget->allowDesktopControlCB->isChecked());
|
||||
m_configuration.setPassword(m_confWidget->passwordInput->text());
|
||||
|
@ -145,6 +148,7 @@ void KcmKRfb::defaults() {
|
|||
checkKInetd(kinetdAvailable, krfbAvailable);
|
||||
|
||||
m_confWidget->allowUninvitedCB->setChecked(false);
|
||||
m_confWidget->enableSLPCB->setChecked(true);
|
||||
m_confWidget->confirmConnectionsCB->setChecked(false);
|
||||
m_confWidget->allowDesktopControlCB->setChecked(false);
|
||||
m_confWidget->passwordInput->setText("");
|
||||
|
|
|
@ -159,7 +159,7 @@ void Configuration::doKinetdConf() {
|
|||
|
||||
if (allowUninvitedFlag) {
|
||||
setKInetdEnabled(true);
|
||||
setKInetdServiceRegistrationEnabled(true);
|
||||
setKInetdServiceRegistrationEnabled(enableSLPFlag);
|
||||
getPortFromKInetd();
|
||||
return;
|
||||
}
|
||||
|
@ -188,6 +188,7 @@ void Configuration::loadFromKConfig() {
|
|||
|
||||
KConfig c("krfbrc");
|
||||
allowUninvitedFlag = c.readBoolEntry("allowUninvited", false);
|
||||
enableSLPFlag = c.readBoolEntry("enableSLP", true);
|
||||
askOnConnectFlag = c.readBoolEntry("confirmUninvitedConnection", true);
|
||||
allowDesktopControlFlag = c.readBoolEntry("allowDesktopControl", false);
|
||||
preferredPortNum = c.readNumEntry("preferredPort", -1);
|
||||
|
@ -214,6 +215,7 @@ void Configuration::saveToKConfig() {
|
|||
c.writeEntry("confirmUninvitedConnection", askOnConnectFlag);
|
||||
c.writeEntry("allowDesktopControl", allowDesktopControlFlag);
|
||||
c.writeEntry("allowUninvited", allowUninvitedFlag);
|
||||
c.writeEntry("enableSLP", enableSLPFlag);
|
||||
c.writeEntry("preferredPort", preferredPortNum);
|
||||
c.writeEntry("uninvitedPasswordCrypted", cryptStr(passwordString));
|
||||
c.deleteEntry("uninvitedPassword");
|
||||
|
@ -303,6 +305,10 @@ bool Configuration::allowUninvitedConnections() const {
|
|||
return allowUninvitedFlag;
|
||||
}
|
||||
|
||||
bool Configuration::enableSLP() const {
|
||||
return enableSLPFlag;
|
||||
}
|
||||
|
||||
QString Configuration::password() const {
|
||||
return passwordString;
|
||||
}
|
||||
|
@ -315,6 +321,10 @@ void Configuration::setAllowUninvited(bool allowUninvited) {
|
|||
allowUninvitedFlag = allowUninvited;
|
||||
}
|
||||
|
||||
void Configuration::setEnableSLP(bool e) {
|
||||
enableSLPFlag = e;
|
||||
}
|
||||
|
||||
void Configuration::setAskOnConnect(bool askOnConnect)
|
||||
{
|
||||
askOnConnectFlag = askOnConnect;
|
||||
|
|
|
@ -77,12 +77,14 @@ public:
|
|||
bool askOnConnect() const;
|
||||
bool allowDesktopControl() const;
|
||||
bool allowUninvitedConnections() const;
|
||||
bool enableSLP() const;
|
||||
QString password() const;
|
||||
QString hostname() const;
|
||||
int port() const;
|
||||
int preferredPort() const;
|
||||
|
||||
void setAllowUninvited(bool allowUninvited);
|
||||
void setEnableSLP(bool e);
|
||||
void setAskOnConnect(bool askOnConnect);
|
||||
void setPassword(QString password);
|
||||
void setPreferredPort(int p);
|
||||
|
@ -127,6 +129,7 @@ private:
|
|||
bool askOnConnectFlag;
|
||||
bool allowDesktopControlFlag;
|
||||
bool allowUninvitedFlag;
|
||||
bool enableSLPFlag;
|
||||
|
||||
int portNum, preferredPortNum;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user