diff -Nuar tcosmonitor.orig/tcos-devices-ng.conf tcosmonitor/tcos-devices-ng.conf --- tcosmonitor.orig/tcos-devices-ng.conf 2010-04-13 13:12:05.462262000 +0200 +++ tcosmonitor/tcos-devices-ng.conf 2010-08-03 10:55:57.536445323 +0200 @@ -14,7 +14,7 @@ #disable_hdd=1 # disable quit item -#disable_quit=1 +disable_quit=1 # can change mount point too # diff -Nuar tcosmonitor.orig/tcosmonitor/extensions/appsmsg.py tcosmonitor/tcosmonitor/extensions/appsmsg.py --- tcosmonitor.orig/tcosmonitor/extensions/appsmsg.py 2010-05-13 19:51:17.514945000 +0200 +++ tcosmonitor/tcosmonitor/extensions/appsmsg.py 2010-08-03 10:55:57.540218917 +0200 @@ -50,6 +50,9 @@ self.main.actions.button_action_exe=self.exe_app_all self.main.actions.button_action_text=self.send_msg_all + if shared.lab: + self.main.actions.button_action_share=self.exe_app_external + if os.path.isfile(shared.IMG_DIR + "menu_exec_custom.png"): img_exec="menu_exec_custom.png" else: diff -Nuar tcosmonitor.orig/tcosmonitor/Initialize.py tcosmonitor/tcosmonitor/Initialize.py --- tcosmonitor.orig/tcosmonitor/Initialize.py 2010-04-30 10:11:55.109071000 +0200 +++ tcosmonitor/tcosmonitor/Initialize.py 2010-08-03 10:55:57.544219007 +0200 @@ -70,12 +70,12 @@ self.ask_mode=None def on_viewtabs_change(self, widget, pointer, tabnum): - if tabnum != 0: - self.main.searchbutton.set_sensitive(False) - self.main.searchtxt.set_sensitive(False) - else: - self.main.searchbutton.set_sensitive(True) - self.main.searchtxt.set_sensitive(True) + #if tabnum != 0: + # self.main.searchbutton.set_sensitive(False) + # self.main.searchtxt.set_sensitive(False) + #else: + self.main.searchbutton.set_sensitive(True) + self.main.searchtxt.set_sensitive(True) def init_progressbar(self): self.main.progressbar=self.ui.get_object('progressbar') @@ -91,6 +91,15 @@ self.main.quitbutton = self.ui.get_object('quitbutton') self.main.quitbutton.connect('clicked', self.main.quitapp) + #if shared.lab: + if tcosmonitor.shared.lab: + if hasattr(self.main.quitbutton, 'set_tooltip_text'): + self.main.quitbutton.set_tooltip_text(_("Salir de Lliurex Lab")) + else: + tooltip = gtk.Tooltips() #deprecated + self.main.quitbutton.set_tooltip(tooltip,_("Salir de Lliurex Lab")) + + self.main.preferencesbutton = self.ui.get_object('preferencesbutton') self.main.preferencesbutton.connect('clicked', self.main.actions.on_preferencesbutton_click) @@ -153,10 +162,15 @@ self.main.button_text = self.ui.get_object('button_text') self.main.handlebox_text = self.ui.get_object('handlebox_text') self.main.button_text.connect('clicked', self.main.button_actions, "text") + + self.main.button_share = self.ui.get_object('button_share') + self.main.handlebox_share = self.ui.get_object('handlebox_share') + self.main.button_share.connect('clicked', self.main.button_actions, "share") + self.main.handlebox_share.hide() for button in ['button_audio', 'button_chat', 'button_list', 'button_video', - 'button_send', 'button_exe', 'button_text']: + 'button_send', 'button_exe', 'button_text', 'button_share']: if os.path.isfile(tcosmonitor.shared.IMG_DIR + "/%s_custom.png" %(button)): img=self.ui.get_object( button.replace("button", "image") ) @@ -189,6 +203,9 @@ img_icon="tcos-icon-32x32.png" self.main.abouttcos.set_icon_from_file(tcosmonitor.shared.IMG_DIR +img_icon) + if tcosmonitor.shared.lab: + self.main.abouttcos.set_icon_from_file(tcosmonitor.shared.IMG_DIR +'lliurex-lab.png') + self.main.abouttabs = self.aboutui.get_object('abouttabs') #self.main.abouttcos.connect("close", self.on_about_close) @@ -220,6 +237,9 @@ img_icon="tcos-logo.png" self.main.abouttcos_logo.set_from_file(tcosmonitor.shared.IMG_DIR +img_icon) + if tcosmonitor.shared.lab: + self.main.abouttcos_logo.set_from_file(tcosmonitor.shared.IMG_DIR +'tcos-lliurex-logo.png') + self.main.abouttcos_webbutton = self.aboutui.get_object('abouttcos_webbutton') self.main.abouttcos_webbutton.connect('clicked', self.main.actions.on_weburl_click) @@ -238,6 +258,13 @@ self.main.abouttcos_donatecheck.set_active(False) else: self.main.abouttcos_donatecheck.set_active(True) + + if tcosmonitor.shared.lab: + self.main.about_title = self.aboutui.get_object('label149') + self.main.about_title.set_markup( _("Lliurex Lab") ) + self.main.about_desc = self.aboutui.get_object('label123') + self.main.about_desc.set_markup( _("Lliurex Lab is a customized program\nbased on Mario Izquierdo TcosMonitor\nand Tcos monitoring tool.") ) + self.main.abouttcos.set_title( _("About Lliurex Lab") ) if __name__ == '__main__': diff -Nuar tcosmonitor.orig/tcosmonitor/shared.py tcosmonitor/tcosmonitor/shared.py --- tcosmonitor.orig/tcosmonitor/shared.py 2010-08-03 10:45:19.552254000 +0200 +++ tcosmonitor/tcosmonitor/shared.py 2010-08-03 10:55:57.544219007 +0200 @@ -54,6 +54,7 @@ # default debug value (overwrite with --debug or -d) debug=False +lab=False # default TCOS config file (default in this path, if installed use global) tcos_config_file="./tcos.conf" @@ -115,10 +116,10 @@ DefaultConfig=[ ["populate_list_at_startup", 0, "int"], #["work_as_cyber_mode", 0, "int"], -["refresh_interval", 0, "int"], +["refresh_interval", 2, "int"], ["cache_timeout", 0, "int"], -["actions_timeout", 0, "int"], -["scan_network_method", "netstat", "str"], +["actions_timeout", 10, "int"], +["scan_network_method", "nmap", "str"], ["scrot_size", 65, "int"], # % of screenshot ["miniscrot_size", 25, "int"], # % of screenshot ["xmlrpc_username", "user", "str"], @@ -133,25 +134,25 @@ ["networkinfo", 0, "int"], ["xorginfo", 0, "int"], ["soundserverinfo", 0, "int"], -["systemprocess", 0, "int"], +["systemprocess", 1, "int"], ["threadscontrol", 1, "int"], ["tcosmonitorversion", version, "str"], ["blockactioninthishost", 1, "int"], ["notshowwhentcosmonitor", 0, "int"], ["onlyshowtcos", 1, "int"], -["selectedhosts", 0, "int"], +["selectedhosts", 1, "int"], ["statichosts", "", "str"], ["ssh_remote_username", "root", "str"], ["vlc_method_send", "x264-MPEG4", "str"], -["show_donate", 1, "int"], +["show_donate", 0, "int"], ["visible_menus", "", "str"], ["visible_buttons_menus", "", "str"], -["enable_sslxmlrpc", 0, "int"], -["ports_tnc", "", "str"], -["listmode", "list", "str"], +["enable_sslxmlrpc", 1, "int"], +["ports_tnc", "3128", "str"], +["listmode", "both", "str"], ["menugroups", 1, "int"], ["positions", "", "str"], -["show_about", 1, "int"], +["show_about", 0, "int"], ] # @@ -216,7 +217,7 @@ # for enable exclude users, change to "tcosmonitor-exclude" dont_show_users_in_group="tcosmonitor-exclude" -check_tcosmonitor_user_group=False +check_tcosmonitor_user_group=True tnc_only_ports="no" @@ -353,7 +354,7 @@ "ck_menu_vnc":[ True, [7], [] ], "ck_menu_reboot":[ True, [2,3], [0,1] ], "ck_menu_screenshots":[ True, [8], [10]], -"ck_menu_shell":[ False, [9], []], +"ck_menu_shell":[ True, [9], []], "ck_menu_xorg":[ True, [10,11], [] ], "ck_menu_restartx":[ True, [12], [5] ], "ck_menu_exe":[ True, [13], [6] ], @@ -362,7 +363,7 @@ "ck_menu_video":[ True, [16], [11] ], "ck_menu_send":[ True, [17], [12] ], "ck_menu_demo":[ True, [18], [8] ], -"ck_menu_wakeonlan":[ False, [19], [13] ], +"ck_menu_wakeonlan":[ True, [19], [13] ], "ck_menu_conference":[ True, [24], [9,18] ], "ck_menu_net":[ True, [20,21],[14,15] ], "ck_menu_dpms":[ True, [22,23],[16,17] ], diff -Nuar tcosmonitor.orig/tcosmonitor/TcosActions.py tcosmonitor/tcosmonitor/TcosActions.py --- tcosmonitor.orig/tcosmonitor/TcosActions.py 2010-05-12 19:45:23.011697000 +0200 +++ tcosmonitor/tcosmonitor/TcosActions.py 2010-08-03 10:55:57.548219096 +0200 @@ -53,6 +53,7 @@ self.button_action_send=None self.button_action_exe=None self.button_action_text=None + if tcosmonitor.shared.lab: self.button_action_share=None self.excludes=0 self.lenclients=0 #self.model=self.main.init.model diff -Nuar tcosmonitor.orig/tcosmonitor/TcosPreferences.py tcosmonitor/tcosmonitor/TcosPreferences.py --- tcosmonitor.orig/tcosmonitor/TcosPreferences.py 2010-05-06 18:08:10.246840000 +0200 +++ tcosmonitor/tcosmonitor/TcosPreferences.py 2010-08-03 10:55:57.548219096 +0200 @@ -52,6 +52,9 @@ else: img_icon="tcos-icon-32x32.png" self.main.pref.set_icon_from_file(tcosmonitor.shared.IMG_DIR + img_icon) + + if tcosmonitor.shared.lab: + self.main.pref.set_icon_from_file(tcosmonitor.shared.IMG_DIR + 'lliurex-lab.png') # dont destroy window # http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq10.006.htp self.main.pref.connect('delete-event', self.prefwindow_close ) @@ -216,13 +219,19 @@ self.main.config.SetVar("visible_menus", ",".join(visible_menus) ) visible_buttons_menus=[] - for menu in tcosmonitor.shared.button_preferences_menus: - pref_name=menu.replace('ck_button_menu_', '') - widget=getattr(self.main, "pref_" + menu) - if widget.get_active(): - visible_buttons_menus.append("%s:1" %pref_name) - else: - visible_buttons_menus.append("%s:0" %pref_name) + if tcosmonitor.shared.lab: + visible_buttons_menus_txt=self.main.config.GetVar("visible_buttons_menus") + if visible_buttons_menus_txt != "": + visible_buttons_menus=visible_buttons_menus_txt.split(',') + else: + for menu in tcosmonitor.shared.button_preferences_menus: + pref_name=menu.replace('ck_button_menu_', '') + widget=getattr(self.main, "pref_" + menu) + if widget.get_active(): + visible_buttons_menus.append("%s:1" %pref_name) + else: + visible_buttons_menus.append("%s:0" %pref_name) + # convert array into string separated by comas self.main.config.SetVar("visible_buttons_menus", ",".join(visible_buttons_menus) ) @@ -298,6 +307,15 @@ def populate_pref(self): + if tcosmonitor.shared.lab: + #shared.lab=True + tcosmonitor.shared.icon_image_thin="idiomas.png" + tcosmonitor.shared.icon_image_standalone="idiomas.png" + if os.path.isfile(tcosmonitor.shared.IMG_DIR + "client_no_logged-custom.png"): + tcosmonitor.shared.icon_image_no_logged="client_no_logged-custom.png" + else: + tcosmonitor.shared.icon_image_no_logged="client_no_logged.png" + # set default for combos self.set_active_in_select(self.main.pref_combo_scan_method, \ self.main.config.GetVar("scan_network_method")) @@ -369,7 +387,11 @@ first_run=False total=0 - visible_buttons_menus_txt=self.main.config.GetVar("visible_buttons_menus") + if tcosmonitor.shared.lab: + visible_buttons_menus_txt="chat:1,list:1,audio:1,video:1,exe:1" + else: + visible_buttons_menus_txt=self.main.config.GetVar("visible_buttons_menus") + if visible_buttons_menus_txt != "": print_debug("visible_buttons_menus is not empty") visible_buttons_menus=visible_buttons_menus_txt.split(',') @@ -414,6 +436,17 @@ else: widget_button.hide() widget_pref.set_active(0) + if tcosmonitor.shared.lab: + widget_pref.set_sensitive(False) + else: + widget_pref.set_sensitive(True) + if tcosmonitor.shared.lab: + widget_button=getattr(self.main, "handlebox_" + "share") + widget_button.show() + total+=1 + else: + widget_button=getattr(self.main, "handlebox_" + "share") + widget_button.hide() if total == 0: self.main.toolbar2.hide() @@ -488,18 +521,18 @@ elif listmode == 'icons': self.main.viewtabs.set_property('show-tabs', False) self.main.viewtabs.set_current_page(1) - self.main.searchbutton.set_sensitive(False) - self.main.searchtxt.set_sensitive(False) + self.main.searchbutton.set_sensitive(True) + self.main.searchtxt.set_sensitive(True) elif listmode == 'class': self.main.viewtabs.set_property('show-tabs', False) self.main.viewtabs.set_current_page(2) - self.main.searchbutton.set_sensitive(False) - self.main.searchtxt.set_sensitive(False) + self.main.searchbutton.set_sensitive(True) + self.main.searchtxt.set_sensitive(True) else: self.main.viewtabs.set_property('show-tabs', True) self.main.viewtabs.set_current_page(2) - self.main.searchbutton.set_sensitive(False) - self.main.searchtxt.set_sensitive(False) + self.main.searchbutton.set_sensitive(True) + self.main.searchtxt.set_sensitive(True) print_debug("populate_pref() done") diff -Nuar tcosmonitor.orig/tcosmonitor.conf tcosmonitor/tcosmonitor.conf --- tcosmonitor.orig/tcosmonitor.conf 2010-04-13 13:12:05.462262000 +0200 +++ tcosmonitor/tcosmonitor.conf 2010-08-03 10:55:57.552218487 +0200 @@ -11,11 +11,11 @@ # for enable exclude users, change to "tcosmonitor-exclude" # put users in group tcosmonitor-exclude and these users # will not show in tcosmonitor -dont_show_users_in_group="" +dont_show_users_in_group="tcosmonitor-exclude" # Only allow to exec tcosmonitor when user is in group tcos # (values 0 disabled, 1 enabled) -check_tcosmonitor_user_group=0 +check_tcosmonitor_user_group=1 # Net controller (disable/enable internet) only block ports specified in Tcosmonitor->Preferences tnc_only_ports="no" diff -Nuar tcosmonitor.orig/tcosmonitor.desktop tcosmonitor/tcosmonitor.desktop --- tcosmonitor.orig/tcosmonitor.desktop 2010-04-13 13:12:05.462262000 +0200 +++ tcosmonitor/tcosmonitor.desktop 2010-08-03 10:55:57.552218487 +0200 @@ -1,14 +1,19 @@ [Desktop Entry] Version=1.0 Name=TcosMonitor +Name[ca]=TcosMonitor +Name[en_AU]=TcosMonitor +Name[en_CA]=TcosMonitor Name[en_GB]=TcosMonitor Name[es]=TcosMonitor -Comment=Thin client network monitor -Comment[en_GB]=Thin client network monitor -Comment[es]=Monitorizar una red de clientes ligeros +Name[qcv]=TcosMonitor +Comment=Client network monitor +Comment[en_GB]=Client network monitor +Comment[es]=Monitorizar una red de clientes +Comment[qcv]=Monitoritza una xarxa de clients Exec=/usr/bin/tcosmonitor $@ Terminal=false Type=Application Icon=/usr/share/pixmaps/tcos-icon-32x32.png GenericName[es_ES]=TcosMonitor -Categories=GNOME;Settings;System;DesktopSettings;Monitor +Categories=LliureX-Administration; diff -Nuar tcosmonitor.orig/tcosmonitor.py tcosmonitor/tcosmonitor.py --- tcosmonitor.orig/tcosmonitor.py 2010-04-27 14:48:18.173482000 +0200 +++ tcosmonitor/tcosmonitor.py 2010-08-03 10:55:57.552218487 +0200 @@ -107,7 +107,7 @@ try: - OPTS, ARGS = getopt.getopt(sys.argv[1:], ":hd", ["help", "debug"]) + OPTS, ARGS = getopt.getopt(sys.argv[1:], ":hd", ["help", "debug", "lliurex-lab"]) except getopt.error, msg: print (msg) print ("for command line options use tcosconfig --help") @@ -121,6 +121,8 @@ if o in ("-h", "--help"): usage() sys.exit() + if o in ("--lliurex-lab"): + shared.lab = True import tcosmonitor @@ -180,6 +182,10 @@ self.mainwindow.set_icon_from_file(shared.IMG_DIR +\ 'tcos-icon-32x32.png') + if shared.lab: + self.mainwindow.set_title( _("Lliurex Lab") ) + self.mainwindow.set_icon_from_file(shared.IMG_DIR +\ + 'lliurex-lab.png') self.is_fullscreen=False # close windows signals @@ -316,6 +322,9 @@ elif action == "text": if self.actions.button_action_text != None: self.actions.button_action_text() + elif action == "share": + if self.actions.button_action_share != None: + self.actions.button_action_share(None, "http://share/") return def search_host(self, widget): diff -Nuar tcosmonitor.orig/ui/tcosmonitor-prefwindow.ui tcosmonitor/ui/tcosmonitor-prefwindow.ui --- tcosmonitor.orig/ui/tcosmonitor-prefwindow.ui 2010-03-25 13:44:15.791255000 +0100 +++ tcosmonitor/ui/tcosmonitor-prefwindow.ui 2010-08-03 10:56:47.000000000 +0200 @@ -43,7 +43,6 @@ True 10 - vertical 10 @@ -787,7 +786,6 @@ True 10 - vertical 10 @@ -977,7 +975,6 @@ True 10 - vertical 10 @@ -994,7 +991,7 @@ True - 12 + 13 2 5 True @@ -1355,6 +1352,24 @@ + + + + + + Enable and disable Wine + True + False + True + True + + + 12 + 13 + GTK_FILL + + + False @@ -1400,7 +1415,6 @@ True 10 - vertical 10