mirror of
https://invent.kde.org/network/krfb
synced 2024-07-01 07:24:29 +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:
|
For 3.2:
|
||||||
- enhance RFB with SASL authentication (Kerberos)
|
- 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):
|
Todo (unscheduled features):
|
||||||
- NAT traversal support if I can find an acceptable implementation
|
- NAT traversal support if I can find an acceptable implementation
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>420</width>
|
<width>421</width>
|
||||||
<height>354</height>
|
<height>445</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="caption">
|
<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>
|
<string>Select this option to allow connecting without inviting. This is useful if you want to access your desktop remotely.</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</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">
|
<widget class="QCheckBox">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>confirmConnectionsCB</cstring>
|
<cstring>confirmConnectionsCB</cstring>
|
||||||
|
@ -159,7 +173,7 @@
|
||||||
<cstring>allowDesktopControlCB</cstring>
|
<cstring>allowDesktopControlCB</cstring>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<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>
|
||||||
<property name="whatsThis" stdset="0">
|
<property name="whatsThis" stdset="0">
|
||||||
<string>Enable this option to allow uninvited user to control your desktop (using mouse and keyboard).</string>
|
<string>Enable this option to allow uninvited user to control your desktop (using mouse and keyboard).</string>
|
||||||
|
@ -242,6 +256,12 @@
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>Expanding</enum>
|
<enum>Expanding</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeHint">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</vbox>
|
</vbox>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -362,6 +382,12 @@ Most VNC clients use a display number instead of the actual port. This display n
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>Expanding</enum>
|
<enum>Expanding</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeHint">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</vbox>
|
</vbox>
|
||||||
</widget>
|
</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->passwordInput, SIGNAL(textChanged(const QString&)), SLOT(configChanged()) );
|
||||||
connect(m_confWidget->allowUninvitedCB, SIGNAL(clicked()), 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->confirmConnectionsCB, SIGNAL(clicked()), SLOT(configChanged()) );
|
||||||
connect(m_confWidget->allowDesktopControlCB, SIGNAL(clicked()), SLOT(configChanged()) );
|
connect(m_confWidget->allowDesktopControlCB, SIGNAL(clicked()), SLOT(configChanged()) );
|
||||||
connect(m_confWidget->autoPortCB, SIGNAL(clicked()), SLOT(configChanged()) );
|
connect(m_confWidget->autoPortCB, SIGNAL(clicked()), SLOT(configChanged()) );
|
||||||
|
@ -117,6 +118,7 @@ void KcmKRfb::load() {
|
||||||
checkKInetd(kinetdAvailable, krfbAvailable);
|
checkKInetd(kinetdAvailable, krfbAvailable);
|
||||||
|
|
||||||
m_confWidget->allowUninvitedCB->setChecked(m_configuration.allowUninvitedConnections());
|
m_confWidget->allowUninvitedCB->setChecked(m_configuration.allowUninvitedConnections());
|
||||||
|
m_confWidget->enableSLPCB->setChecked(m_configuration.enableSLP());
|
||||||
m_confWidget->confirmConnectionsCB->setChecked(m_configuration.askOnConnect());
|
m_confWidget->confirmConnectionsCB->setChecked(m_configuration.askOnConnect());
|
||||||
m_confWidget->allowDesktopControlCB->setChecked(m_configuration.allowDesktopControl());
|
m_confWidget->allowDesktopControlCB->setChecked(m_configuration.allowDesktopControl());
|
||||||
m_confWidget->passwordInput->setText(m_configuration.password());
|
m_confWidget->passwordInput->setText(m_configuration.password());
|
||||||
|
@ -130,6 +132,7 @@ void KcmKRfb::save() {
|
||||||
m_configuration.update();
|
m_configuration.update();
|
||||||
bool allowUninvited = m_confWidget->allowUninvitedCB->isChecked();
|
bool allowUninvited = m_confWidget->allowUninvitedCB->isChecked();
|
||||||
m_configuration.setAllowUninvited(allowUninvited);
|
m_configuration.setAllowUninvited(allowUninvited);
|
||||||
|
m_configuration.setEnableSLP(m_confWidget->enableSLPCB->isChecked());
|
||||||
m_configuration.setAskOnConnect(m_confWidget->confirmConnectionsCB->isChecked());
|
m_configuration.setAskOnConnect(m_confWidget->confirmConnectionsCB->isChecked());
|
||||||
m_configuration.setAllowDesktopControl(m_confWidget->allowDesktopControlCB->isChecked());
|
m_configuration.setAllowDesktopControl(m_confWidget->allowDesktopControlCB->isChecked());
|
||||||
m_configuration.setPassword(m_confWidget->passwordInput->text());
|
m_configuration.setPassword(m_confWidget->passwordInput->text());
|
||||||
|
@ -145,6 +148,7 @@ void KcmKRfb::defaults() {
|
||||||
checkKInetd(kinetdAvailable, krfbAvailable);
|
checkKInetd(kinetdAvailable, krfbAvailable);
|
||||||
|
|
||||||
m_confWidget->allowUninvitedCB->setChecked(false);
|
m_confWidget->allowUninvitedCB->setChecked(false);
|
||||||
|
m_confWidget->enableSLPCB->setChecked(true);
|
||||||
m_confWidget->confirmConnectionsCB->setChecked(false);
|
m_confWidget->confirmConnectionsCB->setChecked(false);
|
||||||
m_confWidget->allowDesktopControlCB->setChecked(false);
|
m_confWidget->allowDesktopControlCB->setChecked(false);
|
||||||
m_confWidget->passwordInput->setText("");
|
m_confWidget->passwordInput->setText("");
|
||||||
|
|
|
@ -159,7 +159,7 @@ void Configuration::doKinetdConf() {
|
||||||
|
|
||||||
if (allowUninvitedFlag) {
|
if (allowUninvitedFlag) {
|
||||||
setKInetdEnabled(true);
|
setKInetdEnabled(true);
|
||||||
setKInetdServiceRegistrationEnabled(true);
|
setKInetdServiceRegistrationEnabled(enableSLPFlag);
|
||||||
getPortFromKInetd();
|
getPortFromKInetd();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -188,6 +188,7 @@ void Configuration::loadFromKConfig() {
|
||||||
|
|
||||||
KConfig c("krfbrc");
|
KConfig c("krfbrc");
|
||||||
allowUninvitedFlag = c.readBoolEntry("allowUninvited", false);
|
allowUninvitedFlag = c.readBoolEntry("allowUninvited", false);
|
||||||
|
enableSLPFlag = c.readBoolEntry("enableSLP", true);
|
||||||
askOnConnectFlag = c.readBoolEntry("confirmUninvitedConnection", true);
|
askOnConnectFlag = c.readBoolEntry("confirmUninvitedConnection", true);
|
||||||
allowDesktopControlFlag = c.readBoolEntry("allowDesktopControl", false);
|
allowDesktopControlFlag = c.readBoolEntry("allowDesktopControl", false);
|
||||||
preferredPortNum = c.readNumEntry("preferredPort", -1);
|
preferredPortNum = c.readNumEntry("preferredPort", -1);
|
||||||
|
@ -214,6 +215,7 @@ void Configuration::saveToKConfig() {
|
||||||
c.writeEntry("confirmUninvitedConnection", askOnConnectFlag);
|
c.writeEntry("confirmUninvitedConnection", askOnConnectFlag);
|
||||||
c.writeEntry("allowDesktopControl", allowDesktopControlFlag);
|
c.writeEntry("allowDesktopControl", allowDesktopControlFlag);
|
||||||
c.writeEntry("allowUninvited", allowUninvitedFlag);
|
c.writeEntry("allowUninvited", allowUninvitedFlag);
|
||||||
|
c.writeEntry("enableSLP", enableSLPFlag);
|
||||||
c.writeEntry("preferredPort", preferredPortNum);
|
c.writeEntry("preferredPort", preferredPortNum);
|
||||||
c.writeEntry("uninvitedPasswordCrypted", cryptStr(passwordString));
|
c.writeEntry("uninvitedPasswordCrypted", cryptStr(passwordString));
|
||||||
c.deleteEntry("uninvitedPassword");
|
c.deleteEntry("uninvitedPassword");
|
||||||
|
@ -303,6 +305,10 @@ bool Configuration::allowUninvitedConnections() const {
|
||||||
return allowUninvitedFlag;
|
return allowUninvitedFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Configuration::enableSLP() const {
|
||||||
|
return enableSLPFlag;
|
||||||
|
}
|
||||||
|
|
||||||
QString Configuration::password() const {
|
QString Configuration::password() const {
|
||||||
return passwordString;
|
return passwordString;
|
||||||
}
|
}
|
||||||
|
@ -315,6 +321,10 @@ void Configuration::setAllowUninvited(bool allowUninvited) {
|
||||||
allowUninvitedFlag = allowUninvited;
|
allowUninvitedFlag = allowUninvited;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Configuration::setEnableSLP(bool e) {
|
||||||
|
enableSLPFlag = e;
|
||||||
|
}
|
||||||
|
|
||||||
void Configuration::setAskOnConnect(bool askOnConnect)
|
void Configuration::setAskOnConnect(bool askOnConnect)
|
||||||
{
|
{
|
||||||
askOnConnectFlag = askOnConnect;
|
askOnConnectFlag = askOnConnect;
|
||||||
|
|
|
@ -77,12 +77,14 @@ public:
|
||||||
bool askOnConnect() const;
|
bool askOnConnect() const;
|
||||||
bool allowDesktopControl() const;
|
bool allowDesktopControl() const;
|
||||||
bool allowUninvitedConnections() const;
|
bool allowUninvitedConnections() const;
|
||||||
|
bool enableSLP() const;
|
||||||
QString password() const;
|
QString password() const;
|
||||||
QString hostname() const;
|
QString hostname() const;
|
||||||
int port() const;
|
int port() const;
|
||||||
int preferredPort() const;
|
int preferredPort() const;
|
||||||
|
|
||||||
void setAllowUninvited(bool allowUninvited);
|
void setAllowUninvited(bool allowUninvited);
|
||||||
|
void setEnableSLP(bool e);
|
||||||
void setAskOnConnect(bool askOnConnect);
|
void setAskOnConnect(bool askOnConnect);
|
||||||
void setPassword(QString password);
|
void setPassword(QString password);
|
||||||
void setPreferredPort(int p);
|
void setPreferredPort(int p);
|
||||||
|
@ -127,6 +129,7 @@ private:
|
||||||
bool askOnConnectFlag;
|
bool askOnConnectFlag;
|
||||||
bool allowDesktopControlFlag;
|
bool allowDesktopControlFlag;
|
||||||
bool allowUninvitedFlag;
|
bool allowUninvitedFlag;
|
||||||
|
bool enableSLPFlag;
|
||||||
|
|
||||||
int portNum, preferredPortNum;
|
int portNum, preferredPortNum;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user