summaryrefslogtreecommitdiffstats
path: root/krfb/krfb_httpd
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /krfb/krfb_httpd
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krfb/krfb_httpd')
-rw-r--r--krfb/krfb_httpd/Makefile.am3
-rw-r--r--krfb/krfb_httpd/kinetd_krfb_httpd.desktop96
-rw-r--r--krfb/krfb_httpd/krfb_httpd75
3 files changed, 174 insertions, 0 deletions
diff --git a/krfb/krfb_httpd/Makefile.am b/krfb/krfb_httpd/Makefile.am
new file mode 100644
index 00000000..0ab9015c
--- /dev/null
+++ b/krfb/krfb_httpd/Makefile.am
@@ -0,0 +1,3 @@
+bin_SCRIPTS = krfb_httpd
+kde_services_DATA = kinetd_krfb_httpd.desktop
+
diff --git a/krfb/krfb_httpd/kinetd_krfb_httpd.desktop b/krfb/krfb_httpd/kinetd_krfb_httpd.desktop
new file mode 100644
index 00000000..b19b62a1
--- /dev/null
+++ b/krfb/krfb_httpd/kinetd_krfb_httpd.desktop
@@ -0,0 +1,96 @@
+[Desktop Entry]
+Type=Service
+
+ServiceTypes=KInetDModule
+Exec=krfb_httpd
+X-KDE-FactoryName=kinetd
+X-KDE-KINETD-id=krfb_httpd
+X-KDE-KINETD-port=5800
+X-KDE-KINETD-autoPortRange=10
+X-KDE-KINETD-enabled=false
+X-KDE-KINETD-argument=--kinetd
+X-KDE-KINETD-multiInstance=false
+X-KDE-KINETD-serviceLifetime=1200
+
+Name=KRfb Micro Httpd
+Name[ar]=KRfb ميكرو httpd
+Name[bg]=Микро уеб сървър (KRfb - httpd)
+Name[bn]=কে-আর-এফ-বি মাইক্রো এইচটিটিপিডি
+Name[cs]=KRfb mikro Httpd
+Name[cy]=Meicro-Httpd KRfb
+Name[da]=KRfb Micro-Httpd
+Name[de]=KRfb Mikro-Httpd
+Name[et]=KRfb mikro-httpd
+Name[fa]=ریزشبح قام KRfb
+Name[fr]=Micro serveur httpd de KRfb
+Name[gl]=KRfg Micro-Httpd
+Name[hi]=KRfb माइक्रो Httpd
+Name[hu]=KRfb mini-httpd
+Name[is]=KRfb Micro vefþjónn
+Name[ja]=KRfb マイクロ Httpd
+Name[kk]=KRfb шағын Httpd
+Name[ms]=Httpd Mikro KRfb
+Name[nb]=KRfb mikro- http-nisse
+Name[nds]=KRfb-Micro-Httpd
+Name[ne]=KRfb माइक्रो Httpd
+Name[nl]=KRfb micro webserver
+Name[nn]=KRfb-mikro-http-nisse
+Name[pl]=Mikroskopijny serwer HTTP dla KRfb
+Name[pt]=Micro Httpd do KRfb
+Name[ru]=KRfb микро Httpd
+Name[sv]=Krfb mikro-HTTP demon
+Name[tr]=KRfb Mini Httpd
+Name[uk]=KRfb мікро Httpd
+Name[zh_CN]=KRfb 微 Httpd
+Name[zh_HK]=KRfb 微型網頁伺服器
+Comment=A micro http daemon for krfb that serves the VNC viewer applet.
+Comment[ar]=مراقب httpd صغير لـkrfb الذي يخدم بريمج عرض VNC.
+Comment[bg]=Малък уеб сървър, който обслужва аплета за преглед на VNC
+Comment[bn]=কে-আর-এফ-বির জন্য একটি মাইক্রো এইচটিটিপি ডিমন যে ভি-এন-সি প্রদর্শক অ্যাপলেট সরবরাহ করে।
+Comment[bs]=Mikro HTTP demon za krfb koji služi za applet VNC preglednika.
+Comment[ca]=Un micro-dimoni http per a krfb que serveix l'aplet visor VNC.
+Comment[cs]=Mikro HTTP server pro krfb sloužící VNC prohlížeči.
+Comment[cy]=Meicro-daemon http sy'n gwasanaethu'r rhaglennig gwelydd VNC
+Comment[da]=En mikro http-dæmon for krfb der betjener VNC visningsappletten.
+Comment[de]=Ein Mikro-HTTP-Server für krfb, der als Miniprogramm zu VNC-Anzeige dient.
+Comment[el]=Ένας μικρός δαίμονας http για το krfb που εξυπηρετεί τη μικροεφαρμογή προβολής VNC.
+Comment[es]=Un micro demonio http para krfb que sirve de applet de visor VNC.
+Comment[et]=Mikro-HTTP deemon KRfb jaoks, mis teenindab VNC apletti.
+Comment[eu]=VNC ikustaile applet-a zerbitzatzen duen krfb-rako micro http deabrua.
+Comment[fa]=یک ریزشبح قام برای krfb، برای خدمت دادن به برنامک مشاهده‌گر VNC
+Comment[fi]=Pieni http-palvelin krfb-ohjelmalle, joka jakaa VNC-näyttäjäsovelmaa
+Comment[fr]=Un mini serveur http pour KRfb dédié à l'applet d'affichage de bureaux VNC.
+Comment[gl]=Un micro demo de HTTP para krfb que serve unha applet de visualización de VNC
+Comment[he]=שרת http זעיר עבור krfb שמשרת את יישומון תצוגת VNC.
+Comment[hi]=krfb के लिए एक माइक्रो एचटीटीपी डीमॉन जो वीएनसी व्यूअर ऐप्लेट को सर्व करता है.
+Comment[hu]=Mini HTTP-szolgáltatás a KRfb-hez, a VNC nézegető használatához.
+Comment[is]=Verulega lítill vefþjónn sem veitir aðgang í VNC.
+Comment[it]=Un micro demone http per krfb che server l'applet di VNC viewer.
+Comment[ja]=krfb 用のマイクロ http デーモン (VNC ビューアアプレットを提供)
+Comment[ka]=მიკრო http დემონი krfbსთვის, რომელიც ემსახურება VNC მხილველის აპლეტს.
+Comment[kk]=VNC қарау апплетті қамтамасыз ететін krfb үшін шағын http қызметі.
+Comment[km]=ដេមិន http តូច​មួយ​សម្រាប់ krfb ដែល​បម្រើ​អាប់ភ្លេត​មើល VNC ។
+Comment[lt]=Micro http tarnyba skirta krfb ir aptarnaujanti VNC žiūriklį.
+Comment[mk]=http-микродаемон за krfb кој служи на аплетот на VNC-прегледувачот.
+Comment[ms]=Daemon http miKro untuk krfb yang melayan aplet pelihat VNC.
+Comment[nb]=En bitteliten http-nisse for krfb som hjelper visningsprogrammet for VNC.
+Comment[nds]=En lierlütt HTTP-Dämoon för krfb, de as VNC-Kiekerlüttprogramm bruukt warrt.
+Comment[ne]=krfb का लागि माइक्रो http डेइमन जसले VNC दर्शक एप्लेट सेवा गर्दछ
+Comment[nl]=Een micro webserver voor krfb dat de VNC weergave-applet beschikbaar stelt.
+Comment[nn]=Ein ørliten http-nisse for krfb som hjelper visingsprogrammet for VNC.
+Comment[pl]=Mikroskopijny serwer HTTP dla KRfb obsługującego aplet przeglądarki VNC.
+Comment[pt]=Um micro-servidor de HTTP para o krfb que serve a 'applet' de visualização de VNC.
+Comment[pt_BR]=Um micro daemon de http, para o krfb, que serve o miniaplicativo de visualização do VNC.
+Comment[ru]=Микро-сервер http для krfb, который обслуживает аплет просмотра VNC.
+Comment[sk]=Mikro http démon pre krfb ktorý ovláda prehliadací applet VNC.
+Comment[sl]=Mikro http strežnik za krfb, ki streže ogledovalnikom VNC.
+Comment[sr]=Микро http демон за krfb који опслужује аплет VNC приказивача.
+Comment[sr@Latn]=Mikro http demon za krfb koji opslužuje aplet VNC prikazivača.
+Comment[sv]=En mikro-HTTP demon för Krfb som hanterar VNC-visningsminiprogrammet
+Comment[ta]=krfb க்கான நுண்ணிய http அது VNC சேவையை குறுப்பயன் பார்வையாளர்.
+Comment[tg]=Азозили micro http барои krfb, ки хидматрасони VNC апплети хидматрасон мебошад.
+Comment[tr]=VNC izleyici programcığını çalıştıran mini bir web sunucu.
+Comment[uk]=Мікродаемон http для krfb, який обслуговує аплет переглядача VNC.
+Comment[zh_CN]=支持 VNC 查看器小程序的 krfb 小 http 守护程序
+Comment[zh_HK]=用於 krfb,服務 VNC 檢視小程式的微型網頁伺服器
+Comment[zh_TW]=服務 VNC 的小型網頁伺服器
diff --git a/krfb/krfb_httpd/krfb_httpd b/krfb/krfb_httpd/krfb_httpd
new file mode 100644
index 00000000..ee30fd9e
--- /dev/null
+++ b/krfb/krfb_httpd/krfb_httpd
@@ -0,0 +1,75 @@
+#! /usr/bin/env bash
+
+if [ "$1" = "--kinetd" ]; then
+ # redirect stdin and stdout to the inetd socket.
+ exec <&$2 >&$2
+fi
+
+read request url httptype || exit 0
+url="${url/
+/}"
+httptype="${httptype/
+/}"
+
+if [ "x$httptype" != "x" ]; then
+ line="x"
+ while [ -n "$line" ]; do
+ read line || exit 0
+ line="${line/
+/}"
+ done
+fi
+# echo "url = $url, request = $request" >> /tmp/httpd.log
+case "$url" in
+/)
+ # We need the size of the display for the current applet.
+ size=`xdpyinfo -display :0| grep dimensions:|head -n 1|sed -e "s/.*dimensions: *//" -e "s/ pixels.*//"`
+ width=`echo $size|sed -e "s/x.*//"`
+ height=`echo $size|sed -e "s/.*x//"`
+ # The VNC menubar is 20 pixels high ...
+ height=$((height+20))
+
+ port=`dcop kded kinetd port krfb`
+ if [ "$port" == "-1" ]; then
+ port=5900
+ fi
+
+ ctype="text/html"
+ content="
+<HTML><HEAD><TITLE>$LOGNAME's desktop</TITLE></HEAD>
+<BODY>
+<APPLET CODE=VncViewer.class ARCHIVE=VncViewer.jar WIDTH=$width HEIGHT=$height>
+ <param name=PORT value=$port>
+</APPLET>
+</BODY></HTML>"
+ ;;
+*.jar|*.class)
+ # Use basename to make sure we have just a filename, not ../../...
+ url="`basename "$url"`"
+ ctype="application/octet-stream"
+ cfile="/usr/share/vnc/classes/$url"
+ content="FILE"
+ ;;
+esac
+
+if [ "x$httptype" != "x" ]; then
+ echo "HTTP/1.0 200 OK"
+ echo "Content-Type: $ctype"
+ if [ "$content" == "FILE" ]; then
+ clen=`wc -c "$cfile"`
+ else
+ clen=`echo "$content"|wc -c`
+ fi
+ echo "Content-Length: $clen"
+ echo "Connection: close"
+ echo
+fi
+
+if [ "$request" == "GET" ]; then
+ if [ "$content" == "FILE" ]; then
+ cat "$cfile"
+ else
+ echo "$content"
+ fi
+fi
+exit 0