
argh...crishchun wrote:Looks like you're missing the LWP::UserAgent module. Download from here: http://search.cpan.org/~gaas/libwww-perl-5.803/ and install it.
Code: Select all
Checking for URI........... failed
Can't locate URI.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.5/i686-linux /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i686-linux /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.4/i686-linux /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.5/i686-linux /usr/lib/perl5/5.8.5 /usr/local/lib/site_perl /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux .) at Makefile.PL line 148, <STDIN> line 4.http://search.cpan.org/~gaas/URI-1.35/enigma_0Z wrote:argh...crishchun wrote:Looks like you're missing the LWP::UserAgent module. Download from here: http://search.cpan.org/~gaas/libwww-perl-5.803/ and install it.
that borks with:
Is there some perl package in portage that i'm just missing???Code: Select all
Checking for URI........... failed Can't locate URI.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.5/i686-linux /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i686-linux /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.4/i686-linux /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.5/i686-linux /usr/lib/perl5/5.8.5 /usr/local/lib/site_perl /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux .) at Makefile.PL line 148, <STDIN> line 4.
syntax error at ./gmail.pl line 10, near "my "
Execution of ./gmail.pl aborted due to compilation errors.
Hmm. I guess I had these modules already installed before and didn't take into account what other modules are needed. For the compilation error, I forgot to end line 10 with a semicolon. Here's gmail.pl.cptmorgan wrote:http://search.cpan.org/~gaas/URI-1.35/enigma_0Z wrote:argh...crishchun wrote:Looks like you're missing the LWP::UserAgent module. Download from here: http://search.cpan.org/~gaas/libwww-perl-5.803/ and install it.
that borks with:
Is there some perl package in portage that i'm just missing???Code: Select all
Checking for URI........... failed Can't locate URI.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.5/i686-linux /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i686-linux /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.4/i686-linux /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.5/i686-linux /usr/lib/perl5/5.8.5 /usr/local/lib/site_perl /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux .) at Makefile.PL line 148, <STDIN> line 4.
I had your same problem.... There is a bunch of other modules that needs to be installed too. Just search for them as they fail.
Now I get this when running gmail.plsyntax error at ./gmail.pl line 10, near "my "
Execution of ./gmail.pl aborted due to compilation errors.
Code: Select all
#!/usr/bin/perl
# gmail.pl
use Mail::Webmail::Gmail;
use GMail::Checker;
my $username = "user.name"; # your Gmail username
my $password = "password"; # your Gmail password
my $gmailfile = "/home/username/.torsmo/gmail.txt";
my $newmessages = 0;
my @subjects = ();
my $gwrapper = new GMail::Checker();
$gwrapper->login($username, $password);
my ($totalmessages, $usedspace) = $gwrapper->get_msg_nb_size();
$gwrapper->close();
my $gmail = Mail::Webmail::Gmail->new(
username => $username, password => $password, encrypt_session => 1
);
my ($usage, $capacity, $usagep) = $gmail->size_usage();
my $messages = $gmail->get_messages(
label => $Mail::Webmail::Gmail::FOLDERS{ 'INBOX' }
);
foreach ( @{ $messages } ) {
if ( $_->{ 'new' } ) {
$newmessages += 1;
my $subject = $_->{ 'subject' };
$subject =~ s/<(.*?)>//gi; # remove <b> tags
push(@subjects, $subject);
}
}
open(FD, "> " . $gmailfile) or die("Could not open file.\n");
print FD "totalmessages=" . $totalmessages . "\n";
print FD "newmessages=" . $newmessages . "\n";
print FD "status=Using " . $usage . " (" . $usagep . ") of " . $capacity . "\n";
for($i=0; $i<=$#subjects; $i++) {
print FD $subjects[$i] . "\n";
}
close(FD);Did you put your username with or without the "@gmail.com" ? Try without it.cptmorgan wrote:That fixed it but now it gives me....but the username/password works fine in firefox :/Wrong password, please check your settings.
Operation failed, connection to server is not established.
at ./gmail.pl line 15
The other weather script is from this thread: http://forums.gentoo.org/viewtopic.php? ... 54#2010554.cptmorgan wrote:also would you mind posting that other weather script that shows the current weather from your latest config ??
Code: Select all
ryan@bios7 ~/.xtorsmo $ torsmo -b
Could not open file. at /home/ryan/.xtorsmo/gmail_extract.pl line 14.
Could not open file. at /home/ryan/.xtorsmo/gmail_extract.pl line 14.
Could not open file. at /home/ryan/.xtorsmo/gmail_extract.pl line 14.
Could not open file. at /home/ryan/.xtorsmo/gmail_extract.pl line 14.
torsmo: drawing to root window
torsmo: drawing to double buffer
torsmo: forked to background, pid is 13927
Code: Select all
Output from command ~/.xtorsmo/gmail.pl ..
Operation failed, connection to server is not established.
at /home/ryan/.xtorsmo/gmail.pl line 15
Wrong password, please check your settings.
Requirements for GMail::Checkerlib qw(lib)
LWP::UserAgent
HTTP::Headers
HTTP::Cookies
HTTP::Request::Common
http://search.cpan.org/~gaas/libwww-perl-5.803/
Crypt::SSLeay
http://search.cpan.org/~chamas/Crypt-SSLeay-0.51/
Exporter
http://search.cpan.org/~nwclark/perl-5. ... xporter.pm
IO::Socket:SSL
http://search.cpan.org/~behroozi/
I'm not sure if it's possible to combine both. I know you can set the minimum width and height but it auto stretches according to the printouts. Since genlop has long printouts, I used a second torsmo window for it (.torsmo_genlop) just like you so that it wouldn't affect .torsmorc. But I'm running Nautilus so I had to create my torsmos in their own windows (own_window yes or the -o switch). It sucks because I have 2 torsmos on my taskbar but it works.blackdog wrote:Is there a way to set the width of the torsmo readout. I was trying to run the genlop log, but it stretches my whole torsmo layout. Running .torsmorc and .torsmorc2 seperately makes my screen flicker like mad. If I use the -b switch on both, they alternate readouts. The first for one second, the other for one second. Back and forth. I'd like to combine the two if possible.
Code: Select all
# torsmo configuration
background no
font -artwiz-lime-medium-r-normal-*-*-100-*-*-m-*-iso10646-*
use_xft no
update_interval 5.0
own_window yes
double_buffer yes
minimum_size 240 5
draw_shades no
draw_outline no
draw_borders no
stippled_borders 1
border_margin 4
border_width 1
default_color white
default_shade_color black
default_outline_color black
alignment bottom_left
gap_x 20
gap_y 36
no_buffers yes
uppercase no
TEXT
${color #FFB010}PORTAGE
$stippled_hr
${color #EE6363}LAST EMERGED:
$color${execi 180 sudo genlop -ln|tail -n 3}
${color #EE6363}LAST UNMERGED:
$color${execi 180 sudo genlop -un \.\*|grep \<\<\<|tail -n 3}
${color #EE6363}LAST SYNC:
$color${execi 180 date --date="`cat /var/cache/edb/dep/timestamp.chk`" +%c}
${color #EE6363}NEXT SYNC:
$color${execi 180 date --date="next friday 00:45" +%c}
What does your readout look like? If you look at the generated weather.xml, just pass in the tag of the info you want to weather.sh. If you don't like the *_string output, make your own using a combination of the tags you want.blackdog wrote:Lastly, and I think this has already been asked for, I'd like to update the readout of the weather current conditions. The default script give a really bad readout. How can that be formatted to show nicely on the screen.
Hmm.. I have no idea. I guess you can try to use Mail::Webmail::Gmail without encrypting the whole session.blackdog wrote:I'm also having the password issue.
ryan@bios7 ~/.xtorsmo $ torsmo -b
Could not open file. at /home/ryan/.xtorsmo/gmail_extract.pl line 14.
Could not open file. at /home/ryan/.xtorsmo/gmail_extract.pl line 14.
Could not open file. at /home/ryan/.xtorsmo/gmail_extract.pl line 14.
Could not open file. at /home/ryan/.xtorsmo/gmail_extract.pl line 14.
torsmo: drawing to root window
torsmo: drawing to double buffer
torsmo: forked to background, pid is 13927
Running the gmail.pl from Webmin says,
Output from command ~/.xtorsmo/gmail.pl ..
Operation failed, connection to server is not established.
at /home/ryan/.xtorsmo/gmail.pl line 15
Wrong password, please check your settings.
So the gmail.pl is failing to login, and faling to create gmail.txt. I checked my info and I'm not using @gmail.com, and my password is correct. Any ideas? I am trying this at work, so it could be network related, but I also have no problems going in through Firefox.
Code: Select all
#!/usr/bin/perl
use Mail::Webmail::Gmail;
use GMail::Checker;
my $username = "username"; # change
my $password = "password"; # change
my $gmailfile = "/home/crishchun/.torsmo/gmail.txt"; # change
my $newmessages = 0;
my @subjects = ();
my $gwrapper = new GMail::Checker();
$gwrapper->login($username, $password);
my ($totalmessages, $usedspace) = $gwrapper->get_msg_nb_size();
$gwrapper->close();
my $gmail = Mail::Webmail::Gmail->new(
username => $username, password => $password
);
my ($usage, $capacity, $usagep) = $gmail->size_usage();
my $messages = $gmail->get_messages(
label => $Mail::Webmail::Gmail::FOLDERS{ 'INBOX' }
);
foreach ( @{ $messages } ) {
if ( $_->{ 'new' } ) {
$newmessages += 1;
my $subject = $_->{ 'subject' };
$subject =~ s/<(.*?)>//gi;
push(@subjects, $subject);
}
}
open(FD, "> " . $gmailfile) or die("Could not open file.\n");
print FD "totalmessages=" . $totalmessages . "\n";
print "totalmessages=" . $totalmessages . "\n";
print FD "newmessages=" . $newmessages . "\n";
print "newmessages=" . $newmessages . "\n";
print FD "status=Using " . $usage . " (" . $usagep . ") of " . $capacity . "\n";
print "status=Using " . $usage . " (" . $usagep . ") of " . $capacity . "\n";
if($newmessages > 0) {
for($i=0; $i<=$#subjects; $i++) {
print FD $subjects[$i] . "\n";
print $subjects[$i] . "\n";
}
}
close(FD);
Code: Select all
${exec fortune -s | sed 's/[\t]/ /g'}
Code: Select all
TEXT
${color slategrey}Time $color${time %R %d.%m %a} ${color slategrey}Bat $color${exec powerstatus} ${color slategrey}DL $color${downspeed eth0}k ${color slategrey}UL $color$color${upspeed eth0}k ${color slategrey}FTP $color${exec ftptorsmo} ${color slategrey}Nibs $color${exec players} ${color slategrey}DF $color${fs_free /} ${color slategrey}RAM $color$memperc% ${color slategrey}Swap $color$swapperc% ${color slategrey}CPU $color$cpu% ${color slategrey}Music $color${exec mpdtitle}
Love that font for your torsmo. I'm going to use your battery % script. The time remaining is pretty unreliable.bruciemoose wrote:For the battery as a percentage instead of (unreliable) time:
http://people.pwf.cam.ac.uk/adb47/scripts/powerstatus
I like your battery script too. Thanks.bruciemoose wrote:
For the battery as a percentage instead of (unreliable) time:
http://people.pwf.cam.ac.uk/adb47/scripts/powerstatus
Code: Select all
if grep -q 'state: charging' /proc/acpi/battery/$bat/state ; then
echo -n "Charging - "
else
echo -n " "
if grep -q on-line /proc/acpi/ac_adapter/AC/state ; then
echo "AC"
exit 0
fi
fi

I have no idea if there's any way to give a more detailed error. I don't understand why it won't work for you. Actually appending "@gmail.com" doesn't work. Are you sure your password is correct? Case-sensitive?cptmorgan wrote:crishchun: Ive tried both with the "@gmail.com" and without and had no luck. Also the new script without ssl gives the same error. Is there anyway to give a more detailed error ??
Code: Select all
#!/usr/bin/perl
# checker.pl
use GMail::Checker;
my $username = "username"; # change
my $password = "password"; # change
my $gwrapper = new GMail::Checker();
$gwrapper->login($username, $password);
my ($totalmessages, $usedspace) = $gwrapper->get_msg_nb_size();
$gwrapper->close();
print "totalmessages=" . $totalmessages . "\n";
print "usedspace=" . $usedspace . "\n";Code: Select all
ryan@bios7 ~/.xtorsmo $ ./checker.pl
Wrong password, please check your settings.
Operation failed, connection to server is not established.
at ./checker.pl line 11
I don't know the best way to post this, but here's the output of:blackdog wrote:It looks like I'm having the same problem.crishchun, what do you have in /usr/lib/perl5/site_perl/5.8.6/? I want to see if I have all the perl modules that I need. Assuming that is where they are all amassed, that is.Code: Select all
ryan@bios7 ~/.xtorsmo $ ./checker.pl Wrong password, please check your settings. Operation failed, connection to server is not established. at ./checker.pl line 11
Thanks!
Code: Select all
crishchun@apertur3 ~ $ ls -lR /usr/lib/perl5/site_perl/5.8.5I just spaced mine out until they lined up the way I wanted.Tyir wrote:And how did he get all the :'s to line up with such a nice font?
Code: Select all
xftfont aquafont -10
background yes
update_interval 1
own_window no
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
border_margin 0
border_width 1
default_color white
default_shade_color black
default_outline_color black
alignment bottom_right
gap_x 10
gap_y 26
no_buffers yes
uppercase no
TEXT
${color}Junebug
${kernel}
${color #fd8e01}${hr}
${color}${time %A %m.%d.%y}
${color #fd8e01}${hr}
${color #f4f402}CPU
${color}Load ${color #f4f402} $cpu%
${color}UpTime ${color #f4f402}$uptime
${color}Process ${color #f4f402}${processes}
${color}Running ${color #f4f402}${running_processes}
${color #fd8e01}${hr}
${color #f4f402}MEMORY
${color}RAM ${color #f4f402} $mem/$memmax
${color}Swap ${color #f4f402} $swap/$swapmax
${color #fd8e01}${hr}
${color #f4f402}FILE SYSTEM
${color}Root ${color #f4f402}${fs_used /}/${fs_size /}
${color}Store ${color #f4f402}${fs_used /mnt/storage/}/${fs_size /mnt/storage/}
${color #fd8e01}${hr}
${color #f4f402}NETWORK
${color}Up ${color #f4f402} ${upspeed eth0} k/s
${color}Down ${color #f4f402} ${downspeed eth0} k/s
Code: Select all
ryan@bios7 /usr/lib/perl5/site_perl/5.8.6 $ ll
total 124
drwxr-xr-x 2 root root 72 Feb 16 10:09 Bundle
drwxr-xr-x 2 root root 80 Feb 16 10:09 File
drwxr-xr-x 2 root root 80 Feb 15 09:40 GMail
drwxr-xr-x 2 root root 104 Feb 16 10:09 HTML
drwxr-xr-x 5 root root 400 Feb 16 10:09 HTTP
drwxr-xr-x 3 root root 72 Feb 15 09:40 IO
drwxr-xr-x 4 root root 408 Feb 16 10:09 LWP
-r--r--r-- 1 root root 21386 Dec 11 10:41 LWP.pm
drwxr-xr-x 3 root root 72 Feb 16 10:11 Mail
drwxr-xr-x 3 root root 120 Feb 16 10:09 Net
drwxr-xr-x 4 root root 1160 Feb 16 09:38 URI
-r--r--r-- 1 root root 30307 Nov 5 09:17 URI.pm
drwxr-xr-x 3 root root 112 Feb 16 10:09 WWW
drwxr-xr-x 14 root root 27360 Feb 16 10:11 i686-linux
-r--r--r-- 1 root root 9136 Nov 30 06:33 lwpcook.pod
-r--r--r-- 1 root root 25458 Nov 30 06:35 lwptut.pod
Ya Im still having the same issue just using Gmail:Checker.... Weird.blackdog wrote:It looks like I'm having the same problem.crishchun, what do you have in /usr/lib/perl5/site_perl/5.8.6/? I want to see if I have all the perl modules that I need. Assuming that is where they are all amassed, that is.Code: Select all
ryan@bios7 ~/.xtorsmo $ ./checker.pl Wrong password, please check your settings. Operation failed, connection to server is not established. at ./checker.pl line 11
Thanks!
Edit:
The gmail server is down right now, so that could be part of my problem. I'll check it again and update my progress.
