/[pxelator]/lib/PXElator/x11.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/x11.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 226 by dpavlin, Sun Aug 16 21:10:42 2009 UTC revision 430 by dpavlin, Sun Sep 13 16:07:33 2009 UTC
# Line 22  close($rgb); Line 22  close($rgb);
22  sub xterm {  sub xterm {
23          my ( $name, $cmd ) = @_;          my ( $name, $cmd ) = @_;
24    
25            $name =~ s{\s+}{-}g;
26          my $screenrc = "/tmp/$name.screenrc";          my $screenrc = "/tmp/$name.screenrc";
         $screenrc =~ s{\s+}{-}g;  
27    
28          my ($autodetach,$detach) = $ENV{DISPLAY} ? ('off','') : ( 'on', 'detach' );          my ($autodetach,$detach) = $ENV{DISPLAY} ? ('off','') : ( 'on', 'detach' );
29    
# Line 52  $detach Line 52  $detach
52                  $hash += ord($_) foreach ( split //, $name );                  $hash += ord($_) foreach ( split //, $name );
53                  my $fg = $cols[ $hash % $#cols ];                  my $fg = $cols[ $hash % $#cols ];
54                  $exec = "xterm -fg $fg -T '$name' -n '$name' -e '$screen'";                  $exec = "xterm -fg $fg -T '$name' -n '$name' -e '$screen'";
 warn "XXXX $exec";  
55          } else {          } else {
56                  warn "system $screen";                  $exec = $cmd;
                 system $screen;  
                 return;  
57          }          }
58    
59          warn "exec $exec";          warn "exec $exec";

Legend:
Removed from v.226  
changed lines
  Added in v.430

  ViewVC Help
Powered by ViewVC 1.1.26