Date: Sun, 16 Nov 2003 17:23:09 +0100 From: Franz Klammer <klammer@webonaut.com> To: Alexander Leidinger <Alexander@Leidinger.net> Cc: gnome@freebsd.org Subject: Re: Fwd: Re: gdesksets/files/patch-libdesklets::Network.py Message-ID: <3FB7A46D.1050204@webonaut.com> In-Reply-To: <20031114100638.08c69054.Alexander@Leidinger.net> References: <3FB3CA31.20309@webonaut.com> <opryk9v5m88ckrg5@smtp.central.cox.net> <3FB3D047.3010701@webonaut.com> <opryle9h1z8ckrg5@smtp.central.cox.net> <20031114100638.08c69054.Alexander@Leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------010800060204090706090502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit ok! now i've found why the function __do_sys not working: __do_sys is calling sysstart() to get the system boottime. but this function is removed from libdesklets/Sys.py. if i remove all relevant lines from __do_sys and from sysinfo.display i get now also the Load, Uptime and Idle time. Expect of course the boot time. attached a shar-file of gdesklet-sysinfo for review. some kown problems: - to make it run you need to activate libkse in /etc/libmap.conf - it doesn't/can't show the starttime and cpu-cache. - also it needs my libdesklet-modifications/-fixes to be able to configure it. franz. Alexander Leidinger wrote: >On Thu, 13 Nov 2003 14:30:43 -0600 >Jeremy Messenger <mezz7@cox.net> wrote: > > > >>>SysInfo-desklet >>> >>>it start's the thread, but i had to comment out following Sensor-line >>>in __init__.py::__get_sys_info_thread(): >>> >>> #self.__do_sys(signal, index) >>> >>>whatever this line does - it works without it ;-) >>> >>> > >Great work. > > thanks! :-) >Bye, >Alexander. > > > -- webonaut.com :: web technology klammer@webonaut.com :: http://webonaut.com/ fon +43-664-3434708 -- MIG_media intelligence group > agentur für werbung & neue medien A-5020 Salzburg > Linzergasse 21 Fon +43-662-453091-0 > Fax -99 office@mig.co.at > http://www.mig.co.at -- --------------010800060204090706090502 Content-Type: text/plain; name="sysinfo.shar" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sysinfo.shar" # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # gdesklets-sysinfo/ # gdesklets-sysinfo/Makefile # gdesklets-sysinfo/distinfo # gdesklets-sysinfo/pkg-descr # gdesklets-sysinfo/pkg-message # gdesklets-sysinfo/pkg-plist # gdesklets-sysinfo/files # gdesklets-sysinfo/files/patch-Install_SysInfo_Sensor.bin # gdesklets-sysinfo/files/patch-sysinfo.display # gdesklets-sysinfo/files/postbuild-patch-__init__.py # echo c - gdesklets-sysinfo/ mkdir -p gdesklets-sysinfo/ > /dev/null 2>&1 echo x - gdesklets-sysinfo/Makefile sed 's/^X//' >gdesklets-sysinfo/Makefile << 'END-of-gdesklets-sysinfo/Makefile' X# New ports collection makefile for: gdesklets-clock X# Date created: 13 November 2003 X# Whom: Franz Klammer <klammer@webonaut.com> X# X# $FreeBSD:$ X# X XPORTNAME= gdesklets-sysinfo XPORTVERSION= 0.21.2 XCATEGORIES= deskutils gnome XMASTER_SITES= http://gdesklets.gnomedesktop.org/files/ XDISTNAME= SysInfo-${PORTVERSION} XWRKSRC= ${WRKDIR}/${NAME} X XMAINTAINER= klammer@webonaut.com XCOMMENT= desklet shows various information about your system X XRUN_DEPENDS= ${X11BASE}/libdata/pkgconfig/gdesklets-core.pc:${PORTSDIR}/deskutils/gdesklets X X#USE_BZIP2= yes XUSE_X_PREFIX= yes XNAME= SysInfo X Xpost-extract: X @${MV} ${WRKDIR}/Install_${NAME}_Sensor.bin ${WRKSRC}/ X Xdo-build: X @${WRKSRC}/Install_${NAME}_Sensor.bin --nomsg ${WRKSRC} X @${PATCH} -sp0 < ${PATCHDIR}/postbuild-patch-__init__.py X @${FIND} ${WRKSRC} -name '*.orig' -delete X Xdo-install: X @${MKDIR} ${PREFIX}/share/gnome/gdesklets/Displays/${NAME} X @${CP} ${WRKSRC}/*.display ${PREFIX}/share/gnome/gdesklets/Displays/${NAME}/ X @${CP} -Rp ${WRKSRC}/gfx ${PREFIX}/share/gnome/gdesklets/Displays/${NAME}/ X @${CP} -Rp ${WRKSRC}/${NAME} ${PREFIX}/share/gnome/gdesklets/Sensors/ X @${CP} ${WRKSRC}/AUTHORS ${PREFIX}/share/gnome/gdesklets/Displays/${NAME}/ X @${LN} -s ${PREFIX}/share/gnome/gdesklets/Displays/${NAME}/AUTHORS \ X ${PREFIX}/share/gnome/gdesklets/Sensors/${NAME}/AUTHORS X Xpost-install: X @${CAT} ${PKGMESSAGE} X X.include <bsd.port.mk> END-of-gdesklets-sysinfo/Makefile echo x - gdesklets-sysinfo/distinfo sed 's/^X//' >gdesklets-sysinfo/distinfo << 'END-of-gdesklets-sysinfo/distinfo' XMD5 (SysInfo-0.21.2.tar.gz) = 588c0f52ee113fe8abaa384367753547 END-of-gdesklets-sysinfo/distinfo echo x - gdesklets-sysinfo/pkg-descr sed 's/^X//' >gdesklets-sysinfo/pkg-descr << 'END-of-gdesklets-sysinfo/pkg-descr' XSysInfo shows various information about your system. X XWWW: http://gdesklets.gnomedesktop.org/ END-of-gdesklets-sysinfo/pkg-descr echo x - gdesklets-sysinfo/pkg-message sed 's/^X//' >gdesklets-sysinfo/pkg-message << 'END-of-gdesklets-sysinfo/pkg-message' X## XTo view all installed applets: X X ls ${PREFIX}/share/gnome/gdesklets/Displays X XTo use those applets: X X gdesklets ${PREFIX}/share/gnome/gdesklets/Displays/${name}/${name}.display X XReplace ${name} with the correct name of the applets you want to use. X XNOTE: Be sure to login as your user when you use the gdesklets command, X as the configuration will be stored in the ~/.gdesklets/ directory. X## END-of-gdesklets-sysinfo/pkg-message echo x - gdesklets-sysinfo/pkg-plist sed 's/^X//' >gdesklets-sysinfo/pkg-plist << 'END-of-gdesklets-sysinfo/pkg-plist' Xshare/gnome/gdesklets/Displays/SysInfo/AUTHORS Xshare/gnome/gdesklets/Displays/SysInfo/gfx/bg.png Xshare/gnome/gdesklets/Displays/SysInfo/gfx/border-left.png Xshare/gnome/gdesklets/Displays/SysInfo/gfx/border-right.png Xshare/gnome/gdesklets/Displays/SysInfo/gfx/border-top.png Xshare/gnome/gdesklets/Displays/SysInfo/gfx/border-topleft.png Xshare/gnome/gdesklets/Displays/SysInfo/gfx/gauge-bg.png Xshare/gnome/gdesklets/Displays/SysInfo/gfx/gauge.png Xshare/gnome/gdesklets/Displays/SysInfo/gfx/gauge_h.png Xshare/gnome/gdesklets/Displays/SysInfo/sysinfo.display Xshare/gnome/gdesklets/Sensors/SysInfo/AUTHORS Xshare/gnome/gdesklets/Sensors/SysInfo/ChangeLog Xshare/gnome/gdesklets/Sensors/SysInfo/__init__.py Xshare/gnome/gdesklets/Sensors/SysInfo/gfx/SysInfo.png Xshare/gnome/gdesklets/Sensors/SysInfo/gfx/boot.png Xshare/gnome/gdesklets/Sensors/SysInfo/gfx/cpu.png Xshare/gnome/gdesklets/Sensors/SysInfo/gfx/hdd.png Xshare/gnome/gdesklets/Sensors/SysInfo/gfx/memory.png Xshare/gnome/gdesklets/Sensors/SysInfo/gfx/network.png X@dirrm share/gnome/gdesklets/Displays/SysInfo/gfx X@dirrm share/gnome/gdesklets/Displays/SysInfo X@dirrm share/gnome/gdesklets/Sensors/SysInfo/gfx X@dirrm share/gnome/gdesklets/Sensors/SysInfo END-of-gdesklets-sysinfo/pkg-plist echo c - gdesklets-sysinfo/files mkdir -p gdesklets-sysinfo/files > /dev/null 2>&1 echo x - gdesklets-sysinfo/files/patch-Install_SysInfo_Sensor.bin sed 's/^X//' >gdesklets-sysinfo/files/patch-Install_SysInfo_Sensor.bin << 'END-of-gdesklets-sysinfo/files/patch-Install_SysInfo_Sensor.bin' X--- Install_SysInfo_Sensor.bin.orig Thu Nov 13 17:37:51 2003 X+++ Install_SysInfo_Sensor.bin Thu Nov 13 17:38:37 2003 X@@ -75,15 +75,9 @@ X else: X cmd = "mkdir -p %(destination)s; cd %(destination)s; " \ X "LANG=C tar -xzvf %(tmp)s 2>&1" X- fail, out = commands.getstatusoutput(cmd % vars()) X+ commands.getstatusoutput(cmd % vars()) X os.unlink(tmp) X X- if (fail): X- if (no_message): print ERROR_TAR + out X- else: message(ERROR_TAR + out, "error") X- sys.exit(1) X- X- print out X if (not list_only): X if (no_message): print SUCCESS X else: message(SUCCESS, "info") END-of-gdesklets-sysinfo/files/patch-Install_SysInfo_Sensor.bin echo x - gdesklets-sysinfo/files/patch-sysinfo.display sed 's/^X//' >gdesklets-sysinfo/files/patch-sysinfo.display << 'END-of-gdesklets-sysinfo/files/patch-sysinfo.display' X--- sysinfo.display Fri Sep 12 22:38:01 2003 X+++ sysinfo.display Sun Nov 16 16:22:52 2003 X@@ -26,15 +26,15 @@ X watch="value=sys:value1, visible=sys:show1, font=sys:fonts, X color=sys:val_color"/> X X- <label id="key2" relative-to="key1, y" y="5" visible="false" X+ <!-- label id="key2" relative-to="key1, y" y="5" visible="false" X watch="value=sys:key2, visible=sys:show2, font=sys:fonts, X- color=sys:key_color"/> X+ color=sys:key_color"/ --> X X- <label id="value3" relative-to="key2, x" x="5" y="0" visible="false" X- watch="value=sys:value2, visible=sys:show2, font=sys:fonts, X+ <label id="value3" relative-to="key1, x" x="5" y="0" visible="false" X+ watch="value=sys:value1, visible=sys:show1, font=sys:fonts, X color=sys:val_color"/> X X- <label id="key3" relative-to="key2, y" y="5" visible="false" X+ <label id="key3" relative-to="key1, y" y="5" visible="false" X watch="value=sys:key3, visible=sys:show3, font=sys:fonts, X color=sys:key_color"/> X END-of-gdesklets-sysinfo/files/patch-sysinfo.display echo x - gdesklets-sysinfo/files/postbuild-patch-__init__.py sed 's/^X//' >gdesklets-sysinfo/files/postbuild-patch-__init__.py << 'END-of-gdesklets-sysinfo/files/postbuild-patch-__init__.py' X--- work/SysInfo/SysInfo/__init__.py Fri Sep 12 22:38:38 2003 X+++ work/SysInfo/SysInfo/__init__.py Sun Nov 16 16:17:14 2003 X@@ -203,8 +203,8 @@ X l5 = lib.sys.get_load_avg_5m() X l15 = lib.sys.get_load_avg_15m() X tasks, running = lib.sys.get_tasks() X- start = lib.sys.get_sysstart() X- d_start, h_start, m_start, s_start = lib.convert.secs_to_dhms(start) X+ #start = lib.sys.get_sysstart() X+ #d_start, h_start, m_start, s_start = lib.convert.secs_to_dhms(start) X uptime = lib.sys.get_uptime() X d, h, m, s = lib.convert.secs_to_dhms(uptime) X idletime = lib.sys.get_idletime() X@@ -215,10 +215,10 @@ X "SysInfo.png")) X signal.set("key1[%(index)d]" % vars(), _("Load:")) X signal.set("value1[%(index)d]" % vars(), str(l1) + " " + str(l5) + " " + str(l15)) X- signal.set("key2[%(index)d]" % vars(), _("Sysstart:")) X- signal.set("value2[%(index)d]" % vars(), str(h_start) + ":" + X- str(m_start) + ":" + X- str(s_start)) X+ #signal.set("key2[%(index)d]" % vars(), _("Sysstart:")) X+ #signal.set("value2[%(index)d]" % vars(), str(h_start) + ":" + X+ # str(m_start) + ":" + X+ # str(s_start)) X signal.set("key3[%(index)d]" % vars(), _("Uptime:")) X signal.set("value3[%(index)d]" % vars(), str(d) + "d " + \ X str(h) + "h " + str(m) + "m ") END-of-gdesklets-sysinfo/files/postbuild-patch-__init__.py exit --------------010800060204090706090502--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FB7A46D.1050204>