Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Openbox3: Gmail Checker Built into the Menu
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
rezza
Guru
Guru


Joined: 09 Apr 2003
Posts: 434
Location: Edinburgh, UK

PostPosted: Sun Sep 05, 2004 11:57 am    Post subject: Reply with quote

Hmm... when I try this script, it freezes m openbox completely, and I have to killall python to get it going again. I've tried just leaving it for a little while to see if it was logging in to gmail, but after 5 minutes I gave up. Any idea whats wrong? Everything seems to look fine on the config side of things....
_________________
screenshots
blog
Back to top
View user's profile Send private message
allucid
Veteran
Veteran


Joined: 02 Nov 2002
Posts: 1314
Location: atlanta

PostPosted: Sun Sep 05, 2004 6:02 pm    Post subject: Reply with quote

I had the same thing happen with the second script. It doesn't handle a lot of emails very well. Look the output openbox spits out (Ctrl+Alt+F1) to get an idea of what happened.
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Mon Sep 06, 2004 5:45 am    Post subject: Reply with quote

Yea the reason I'm offering the 1st script still is because if you have more than 6 or so emails in your inbox you're going to run into freezing/extensive delay problems. The 2nd script fetches ALL email in the inbox and filters and prints the ones in bold (unread).

I talked to the libgmail creator and he said faster times are achievable, I'm going to try some Disney magic (tm) later this week. He's thinking of adding a feature to libgmail itself, but until then I'm going to have to do a quick hack.
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
rezza
Guru
Guru


Joined: 09 Apr 2003
Posts: 434
Location: Edinburgh, UK

PostPosted: Wed Sep 08, 2004 7:57 am    Post subject: Reply with quote

Yep I'm going to stick with the first version for now, its an acceptable delay (1-2 seconds).

It doesn't just search through your inbox for unread mail though - it searches through archived stuff as well (if you archive something without reading it, it'll still be picked up as unread).
_________________
screenshots
blog
Back to top
View user's profile Send private message
angagon
n00b
n00b


Joined: 19 Mar 2003
Posts: 21
Location: Colorado Springs, CO

PostPosted: Fri Sep 10, 2004 2:03 am    Post subject: Reply with quote

Out of curiosity, what theme are you using in your gmail checker shots? And can I get it? Thanks.
_________________
"Not everyone knows Josiah Royce's definition of a liar as a man who willfully misplaces his ontological predicates, but everyone who has ever told a lie will recognize its accuracy."
Ch. 94: Truth - "The Great Ideas"
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Sat Sep 11, 2004 3:25 am    Post subject: Reply with quote

It's Tropic by me :D. You can get it at my website, the link is in the sig.
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
Ruzbeh
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 223

PostPosted: Sat Sep 11, 2004 7:16 pm    Post subject: Reply with quote

Damn, this is sweet.

Is it possible to have this with FVWM? 8O
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Sun Sep 12, 2004 2:20 am    Post subject: Reply with quote

I'm not sure, FVWM is a complex and inferior window manager with only 2 real theme creators. If anyone could do it, I'm sure they could. I'm only doing the openbox version though :P.
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
Ruzbeh
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 223

PostPosted: Sun Sep 12, 2004 3:57 pm    Post subject: Reply with quote

GaMMa wrote:
I'm not sure, FVWM is a complex and inferior window manager with only 2 real theme creators. If anyone could do it, I'm sure they could. I'm only doing the openbox version though :P.


FVWM > OpenBox FYI. ;)

It's gotta be possible!
Back to top
View user's profile Send private message
allucid
Veteran
Veteran


Joined: 02 Nov 2002
Posts: 1314
Location: atlanta

PostPosted: Sun Sep 12, 2004 5:55 pm    Post subject: Reply with quote

It is possible. FVWM supports pipe menus. All you have to do is change the menu format.
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Fri Sep 17, 2004 9:47 pm    Post subject: Reply with quote

Alright 0.0.3 has been released. This version caches the login data, so after you've logged in once drawing the menu should be faster. Thanks for follower for providing the majority of the code in this release.

NOTE: You MUST have the CVS version of libgmail.py for this script to work. Any bugs post here.

Also if changing to a different username/password make sure you remove the login.cache from the libgmail/script directory.

This released is FIXED! Redownload from the first post!
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
angagon
n00b
n00b


Joined: 19 Mar 2003
Posts: 21
Location: Colorado Springs, CO

PostPosted: Fri Sep 17, 2004 10:38 pm    Post subject: Reply with quote

Thanks for the theme info. I really like what you've done. :-)
_________________
"Not everyone knows Josiah Royce's definition of a liar as a man who willfully misplaces his ontological predicates, but everyone who has ever told a lie will recognize its accuracy."
Ch. 94: Truth - "The Great Ideas"
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Sat Sep 18, 2004 4:19 am    Post subject: Reply with quote

Did a quick release of 0.0.3.1 which adds a autologin feature when you click the menu item. If this doesn't work for a certain web browser say so here. I added 's around the URL.
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
nephros
Advocate
Advocate


Joined: 07 Feb 2003
Posts: 2139
Location: Graz, Austria (Europe - no kangaroos.)

PostPosted: Thu Sep 23, 2004 11:19 am    Post subject: Reply with quote

Here is a quick and messy pipe menu for POP3/IMAP and other fetchmail supported web mail services (this version uses gmx):

you need to specify a fetchmailrc file. I keep mine in ~/.config/openbox/pipes/fetchmailrc-$WEBMAILNAME, see below for an example.
Code:

#!/bin/sh
MESS=$(fetchmail -c -f ~/.config/openbox/pipes/fetchmailrc-gmx)
RETVAL=$?
MESS=$(echo $MESS | cut -d " " -f 1-2)


echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
echo "<openbox_pipe_menu>"

if [ $RETVAL = 1 ]; then
    echo "<menu id=\"gmx\" label=\"no mail\">"
else
    echo "<menu id=\"gmx\" label=\"$MESS\" >"
    echo "  <item label=\"Go there...\">"
    echo "    <action name=\"execute\"><execute>"
    echo "      opera -noraise -remote 'openURL(http://www.gmx.net/de/dienst/,new-page)' "
    echo "    </execute></action>"
    echo "  </item>"
fi

echo "</menu>"
echo "</openbox_pipe_menu>"

exit 0


example fetchmailrc-gmx:
Code:

poll mail.gmx.net with protocol auto
        user 'nephros@gmx.net' there with password 'I@m5()1337'



Perhaps someone will find this useful.
_________________
Please put [SOLVED] in your topic if you are a moron.
Back to top
View user's profile Send private message
allucid
Veteran
Veteran


Joined: 02 Nov 2002
Posts: 1314
Location: atlanta

PostPosted: Thu Sep 23, 2004 6:07 pm    Post subject: Reply with quote

I get an error with version 0.0.3.1. I am using libgmail.py version 1.36 from CVS.
Code:
File "/home/allucid/.config/openbox/scripts/gmail-openbox-0.0.3.1.py", line 39, in ?
    ga = libgmail.GmailAccount(name, pw)
AttributeError: 'module' object has no attribute 'GmailAccount'
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Fri Sep 24, 2004 1:53 am    Post subject: Reply with quote

Is libgmail.py in the same directory as the script itself? It doesn't seem like it's finding it. Also you need to grab the full .tar.gz file and replace libgmail.py with the cvs version.
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
allucid
Veteran
Veteran


Joined: 02 Nov 2002
Posts: 1314
Location: atlanta

PostPosted: Fri Sep 24, 2004 2:02 am    Post subject: Reply with quote

GaMMa wrote:
Is libgmail.py in the same directory as the script itself? It doesn't seem like it's finding it. Also you need to grab the full .tar.gz file and replace libgmail.py with the cvs version.

Thanks, for some reason I deleted all the other python files except libgmail.py.... :oops:
Back to top
View user's profile Send private message
Deranger
Veteran
Veteran


Joined: 26 Aug 2004
Posts: 1215

PostPosted: Thu Oct 07, 2004 12:20 pm    Post subject: Reply with quote

I just got Gmail account and tried this Pipe Menu. In a one single word: awesome :P
Back to top
View user's profile Send private message
allucid
Veteran
Veteran


Joined: 02 Nov 2002
Posts: 1314
Location: atlanta

PostPosted: Sat Oct 09, 2004 5:38 am    Post subject: Reply with quote

has anyone else been having problems with this lately?
Code:
$ ./gmail-openbox-0.0.3.1.py                               (allucid@blackmamba)
Traceback (most recent call last):
  File "./gmail-openbox-0.0.3.1.py", line 56, in ?
    msgtotals = ga.getUnreadMsgCount()
  File "/home/allucid/.config/openbox/scripts/libgmail.py", line 455, in getUnreadMsgCount
    q = "is:" + U_AS_SUBSET_UNREAD)
  File "/home/allucid/.config/openbox/scripts/libgmail.py", line 338, in _parseSearchResult
    return self._parsePage(_buildURL(**params))
  File "/home/allucid/.config/openbox/scripts/libgmail.py", line 309, in _parsePage
    items = _parsePage(self._retrievePage(urlOrRequest))
  File "/home/allucid/.config/openbox/scripts/libgmail.py", line 107, in _parsePage
    if itemsDict[D_VERSION] != js_version and not versionWarned:
KeyError: 'v'
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Mon Oct 11, 2004 3:07 am    Post subject: Reply with quote

allucid wrote:
has anyone else been having problems with this lately?
Code:
$ ./gmail-openbox-0.0.3.1.py                               (allucid@blackmamba)
Traceback (most recent call last):
  File "./gmail-openbox-0.0.3.1.py", line 56, in ?
    msgtotals = ga.getUnreadMsgCount()
  File "/home/allucid/.config/openbox/scripts/libgmail.py", line 455, in getUnreadMsgCount
    q = "is:" + U_AS_SUBSET_UNREAD)
  File "/home/allucid/.config/openbox/scripts/libgmail.py", line 338, in _parseSearchResult
    return self._parsePage(_buildURL(**params))
  File "/home/allucid/.config/openbox/scripts/libgmail.py", line 309, in _parsePage
    items = _parsePage(self._retrievePage(urlOrRequest))
  File "/home/allucid/.config/openbox/scripts/libgmail.py", line 107, in _parsePage
    if itemsDict[D_VERSION] != js_version and not versionWarned:
KeyError: 'v'


Did you try removing /tmp/gmail.cache? Over time the values stored in there "expire" and you have to get new cookie info. I think thats how I solved the problem when I had it.
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Wed Oct 13, 2004 4:12 am    Post subject: Reply with quote

Whoops, I just noticed that the link to the script was down... I reuploaded it.. I changed the gmail.cache location to ~. This is because keeping the file in /tmp isn't the brightest idea since pretty much any user has access to the file.

Err that gives an error message.. it's recommended you change the default /tmp
_________________
Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Back to top
View user's profile Send private message
frameRATE
Guru
Guru


Joined: 28 Apr 2003
Posts: 386
Location: Orange County California

PostPosted: Wed Oct 13, 2004 9:33 pm    Post subject: Reply with quote

this alone makes me want to switch to openbox
_________________

Linux User | 364705

howto install coldfusion mx 7 under gentoo
Back to top
View user's profile Send private message
sinisterdomestik
l33t
l33t


Joined: 28 Aug 2003
Posts: 685
Location: Texas

PostPosted: Mon Oct 18, 2004 1:33 am    Post subject: Reply with quote

this script is BADASS! i was always wonderin if there was an easier way than opening mozilla everytime. thanks
_________________
Thou shalt NEVER speak of removing thine Linux
Back to top
View user's profile Send private message
dweebs0r
Apprentice
Apprentice


Joined: 21 Jan 2003
Posts: 177

PostPosted: Sun Oct 31, 2004 9:15 pm    Post subject: Secure? Reply with quote

I have a question. I use and enjoy this script. Thanks for coding it.
However, my gmail account name and password are now completely unsecure. I shows up in my bash history and in the script itself.
Code:
cat ~/.bash_history | grep https


Any suggestions for making this more secure?

--Dweebs
Back to top
View user's profile Send private message
dweebs0r
Apprentice
Apprentice


Joined: 21 Jan 2003
Posts: 177

PostPosted: Sun Oct 31, 2004 11:02 pm    Post subject: Reply with quote

Hmm, I cant seem to duplicate this.

I'm not sure what I did to cause it to show in bash history but its not there now. Strange.

I'll keep looking.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum