-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Artwork
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login



Sponsoring


-
- Content .- Fans (4) .- Knowledge Base  . 

tail

   1.0  

Plasmoid Script

Score 82%
tail
zoom


tail
zoom


Minimum required   PyKDE/PyQt
Downloads:  574
Submitted:  Jan 5 2010
Updated:  Apr 29 2011

Description:

Simple plasmoid similar to command-line \"tail -f\" command - tracking changes in files and notifying about new lines.

Main goal was to track /var/log/emerge.log on Gentoo linux, but it functions just as well for any other file.

this version is almost complete: basic functionality is already there - it tracks the changes and displays notifications.

tracking several files means creating several instances of this plasmoid.

There are other plasmoids that would track the output of shell command - this one was build for sheer simlicity and convenience.




Changelog:

1.0
- fixed some minor bugs
- tested on KDE-4.6.2 (Fedora-based)

1.0b4
- cleaned-up configuration screen
- added notification pooling to work around "KNotify spamming".

1.0b3
- added configuration option for KNotify message length

1.0b2
- forced data reload on startup. Now the state should be preserved fine between sessions.

1.0b1
- added configuration options and config preservation

1.0a3
- fixed spamming via KNotify. Now it tries to truly follow file and not dump contents of last 4K of file

1.0a2
- added exception handling for cases of missing /var/log/emerge.log (sorry to non-getnoo folks ;) )




LicenseGPL
(tail.plasma)
Send to a friend
Subscribe
Other  Artwork  from dmakovey
Report inappropriate content



-

 Error

 
 by mreloads on: Jan 6 2010
 
Score 50%

[first@MyComp ~]$ plasmoidviewer tail
Traceback (most recent call last):
File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 53, in init
self.pyapplet = self.module.main.CreateApplet(None)
File "/home/first/.kde/share/apps/plasma/plasmoids/tail/contents/code/main.py", line 171, in CreateApplet
return Tail(parent)
File "/home/first/.kde/share/apps/plasma/plasmoids/tail/contents/code/main.py", line 64, in __init__
self.follow=Follow('/var/log/emerge.log',size=10,lookback=14096)
File "/home/first/.kde/share/apps/plasma/plasmoids/tail/contents/code/main.py", line 16, in __init__
self.file=open(self.filename,'r')
IOError: [Errno 2] No such file or directory: '/var/log/emerge.log'
[first@MyComp ~]$ touch /var/log/emerge.log
touch: cannot touch `/var/log/emerge.log': Permission denied
[first@MyComp ~]$ su -c "touch /var/log/emerge.log"
[first@MyComp ~]$ su -c "chown -R first /var/log/emerge.log"
[first@MyComp ~]$ plasmoidviewer tail
[first@MyComp ~]$

In short, this plasmoid requires a file /var/log/emerge.log to be present in order to run at all. Creation of that file requires root privileges.

Also plasmoid name is a bit misleading because it can only display text files.


Reply to this

-

 Re: Error

 
 by dmakovey on: Jan 6 2010
 
Score 50%

just realized it last night myself :) I'll upload a2 revision shortly.


Reply to this

-

 Re: Error

 
 by dmakovey on: Jan 7 2010
 
Score 50%

re:misleading name

although you could use command line "tail" to trail binary files I haven't come across such usage. most tail uses are around text files - thus the name for the applet :)


Reply to this

-

 Re: Re: Error

 
 by mreloads on: Jan 7 2010
 
Score 50%

Well, you're probably right about that, but it would be nice for plasmoid to display some command's output. Of course, that can be also achieved by defining cron job which then outputs command to text file, but such approach wouldn't be that convenient.


Reply to this

-

 Re: Re: Re: Error

 
 by dmakovey on: Jan 7 2010
 
Score 50%

what you may be looking for is:

http://kde-look.org/content/show.php/STDIN+Plasmoid?content=92309

but for my purposes I wanted just the "tail" part to keep it simle and tidy :)


Reply to this

-

 Error on KDE 4.4 RC2

 
 by sblinux on: Feb 9 2010
 
Score 50%

Got the following error trying to run it on KDE 4.4 RC2

plasmoidviewer tail.plasmoid
plasmoidviewer(19838)/plasma main: setting FormFactor to "planar"
plasmoidviewer(19838)/plasma main: setting Location to "floating"
plasmoidviewer(19838)/plasma main: setting containment to "null"
plasmoidviewer(19838)/plasma main: setting auth policy
plasmoidviewer(19838)/plasma main: just load applet
plasmoidviewer(19838)/plasma FullView::addApplet: adding applet "tail.plasmoid" in "null"
plasmoidviewer(19838)/libplasma Plasma::CoronaPrivate::addContainment: loading of containment "null" failed.
plasmoidviewer(19838)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-sbrown/ksycoca4"
plasmoidviewer(19838)/libplasma Plasma::AppletPrivate::init: Check your constructor! You probably want to be passing in a Service::Ptr or a QVariantList with a valid storageid as arg[0].
plasmoidviewer(19838)/libplasma Plasma::Applet::load: offers is empty for "tail.plasmoid"
plasmoidviewer(19838)/libplasma Plasma::ContainmentPrivate::addApplet: Applet "tail.plasmoid" could not be loaded.
plasmoidviewer(19838)/libplasma Plasma::AppletPrivate::init: Check your constructor! You probably want to be passing in a Service::Ptr or a QVariantList with a valid storageid as arg[0].
plasmoidviewer(19838)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)


Reply to this

-

 Re: Error on KDE 4.4 RC2

 
 by dmakovey on: Feb 9 2010
 
Score 50%

hmm. looks suspiciously like problem in KDE bindings for python. I've got no KDE 4.4 box yet to confirm. Once 4.4 goes live I'll upgrade and check it out. Thanks for early warning!


Reply to this

-

 Re: Error on KDE 4.4 RC2

 
 by dmakovey on: Feb 9 2010
 
Score 50%

Looks like RC2 is borked to begin with:

http://forum.kde.org/viewtopic.php?f=67&t=85368


Reply to this

-
.

 howto

 
 by nowhereman158 on: Feb 25 2011
 
Score 50%

How do you use this thing? It's sitting on my desktop saying "No file specified" and there's nothing in the settings that allows to specify which file to watch.

Debian squeeze / KDE 4.4.5


Reply to this

-

 Re: howto

 
 by dmakovey on: Feb 26 2011
 
Score 50%

right-click and go to "Tail settings"


Reply to this

-

 Re: Re: howto

 
 by Epimetheus11 on: Apr 21 2011
 
Score 50%

Seems broken (with Kde 4.6.2), there is no field to enter a file name?

Anyway, from the source code it's clear that the applet requires a TailFileName field in ~/.kde/share/config/plasma-desktop-appletsrc

So if others run into this they only have to configure the number of entries they want, then search the config file for TailSize and add the TailFileName entry there.


Reply to this

-

 Re: Re: Re: howto

 
 by dmakovey on: Apr 26 2011
 
Score 50%

Just uploaded 1.0 that works on my KDE-4.6.2 setup (Fedora-14 with KDE-testing repo). Let me know if it helps.


Reply to this

-

 Nice. Two wishes:

 
 by Wonko on: Apr 27 2011
 
Score 50%

Nice, although similar to the filewatcher plasmoid. Two things I want to suggest:

1) Configurable font. I would like to make the font somewhat smaller.

2) An option to act like tail --follow=name. Tail -f normally follows the inode, so when the file is being renamed (e.g. by logrotate), the new file will not be monitored.


Reply to this

-

 Re: Nice. Two wishes:

 
 by dmakovey on: Apr 29 2011
 
Score 50%

I'll take a look - font is relatively easy, inode tracking may be a bit tricky as I'd have to change how I'm tracking things. But looks doable.


Reply to this

-
.

 No text field for file

 
 by xaccrocheur on: Jul 2 2011
 
Score 50%

I'm afraid your new version is no longer backwards-compatible with KDE 4.4.* the combo gadget for selecting the file is gone :(
That's too bad, because it's reaaly good.

Suggestions :

  • search for a word and color it

  • in config window :
    string to search for <field> change color to <color menu> (simple, basic 8 colors)

  • Merge several logs together

  • in config window :

    Log 1 <field + openfile button>
    Log 2 <field + openfile button>
    Log 3 <field + openfile button>
    Separate : <radio button yes/no>
    Separator character : <restricted text field>|<basic "-, _, # menu>

    Thank you very much for your time/work


    Reply to this

    -

     Re: No text field for file

     
     by dmakovey on: Jul 3 2011
     
    Score 50%

    I'll take a look, but I have no access to 4.4 anyplace (I do have older version kicking around so I can post it too if needed).


    Reply to this

    -

     refresh after clear file / remote files

     
     by rhsoftware on: Jul 14 2011
     
    Score 50%

    hi

    really a nice tool but it needs some improvements

    after "> file" to reset it will no longer refresh in the current session and should be cleared too

    some years ago i solved this by using "tail -n 10" to get the latest 10 lines and call this in a fixed interval

    if file does not exist at session start (remote mount points - would also be solved by using "tail -n lines" in a fixed interval with supressing errors


    Reply to this

    -
    .

     Re: refresh after clear file / remote files

     
     by unknownSpirit on: Jul 15 2011
     
    Score 50%

    "after "> file" to reset it will no longer refresh in the current session and should be cleared too"
    Depends on what you write to the file.
    On my system (ubuntu with old kde) it works.
    If you remove the file the plasmoid will stop. However, it won't continue if your observed data is restored. That's a bit annoying.


    Reply to this

    -

     Re: Re: refresh after clear file / remote files

     
     by rhsoftware on: Jul 15 2011
     
    Score 50%

    "> file" writes nothing to it, it makes the file empty and the plasmaoid will show the old content forever

    i think "tail -f" is not really relieable and should be replaced with "tail -n", this would not be a problem if the mount-point is even temorary not available


    Reply to this

    Add commentBack






    -

    -
    How do you like Plasma 5?
     The best KDE Desktop ever.
     Definitely a nice improvement.
     Not decided yet. Haven't tried it yet.
     I do not like some of the changes.
     KDE is taking the wrong way.
     I am still sticking with KDE 3.5.
     I have no opinion, but wanted to vote anyway.

    resultmore




     
     
     Who we are
    Contact
    More about us
    Frequently Asked Questions
    Register
    Twitter
    Blog
    Explore
    Artwork
    Jobs
    Knowledge
    Events
    People
    Updates on identi.ca
    Updates on Twitter
    Facebook App
    Content RSS   
    News RSS   
    Discussion RSS   
    Events RSS   

    Participate
    Groups
    Forum
    Add Artwork
    Public API
    About KDE-Look.org
    Legal Notice
    Spreadshirt Shop
    CafePress Shop
    Advertising
    Sponsor us
    Report Abuse
     

    Copyright 2001-2014 KDE-Look.org Team  
    All rights reserved. KDE-Look.org is not liable for any content or goods on this site.
    All contributors are responsible for the lawfulness of their uploads.
    KDE and K Desktop Environment are trademarks of KDE e.V.