Re: [DNG] Debianising my uploaded version of netman.

2015-12-09 Thread aitor_czr

Hi Svante and Edward,

Here is is my debian/control:|

|https://git.devuan.org/aitor_czr/netman/blob/gbp-master/debian/control

I specify the |fp-units-gfx-2.6.4|version number.

I would also separate netman-backend from netman-backend-dev.

  Aitor.

On 09/12/15 08:48, Svante Signell  wrote:

Hi Aitor et al,
>
>This seems to be a build dependency for the frontend. At least version
>fpc-source 2.6.2 is needed to compile the frontend. Process.inc
>exports RunCommand and this is used by the frontend.
>
>Do you know where I should document this requirement?
>

For a debian package you put that requirement in the debian/control file:
Source: netman-frontend?
Section: ...
Priority: optional?
Maintainer: ...
Uploaders: ...
Build-Depends:
...
fpc-source ( >=2.6.2),
...
Standards-Version: ...
Homepage: ...
Vcs-Git: ...
Vcs-Browser: ...

...


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] gcc error: "error: unknown type name,,, ‘GtkObject’"

2015-12-09 Thread aitor_czr

Hi Edward,

The following code reads line by line the textual output of 'backend 6':

#include 

main()
{
  FILE * fp;
  char str[1024];

  fp = popen ("/usr/lib/netman/bin/backend 6", "r");

  if (fp == NULL) return -1;

  fgets (str, 1024, fp);
  while (!feof (fp))
  {
printf ("%s", str);
fgets (str, 1024, fp);
  }
  pclose (fp);
  return 0;
}

I will have a look at your code.

Thanks,

   Aitor.

On 06/12/15 08:40, Edward Bartolo wrote:

Hi Aitor,

The best way for you is to use the backend's code for reference. What
you want is already implemented there. TProcesss was used to trap the
background cli commands output although there are instances where that
output is discarded.

What you need is this from the CLI backend's code (core_functions.c):
[ code snippet from getDefaultDevices() ]

FILE * shell_reader;
char scan_buffer[1024];

[...]

shell_reader = popen(command, "r");
if(!shell_reader) {
fprintf(
stderr,
"ERROR: getDefaultDevices(): "
"popen() failed (Error: %s)\n",
strerror(errno)
);

return -1;
}

char* ptr;
while((fgets(scan_buffer, 1024, shell_reader))) {
  ptr = (char*) scan_buffer;
if (strstr((char *) scan_buffer, "lo") == ptr)
continue;
else if (strstr((char *) scan_buffer, "wl") == ptr) {
snprintf(
_wl,
1024,
"%s",
(char*) scan_buffer
);
} else if (
strstr((char *) scan_buffer, "eth") == ptr ||
strstr((char *) scan_buffer, "en") == ptr 
) {
snprintf(
_eth,
1024,
"%s",
(char*) scan_buffer
);
}
}

pclose(shell_reader);


Ask again if you in the event you may need more help.


Edward


On 05/12/2015, aitor_czr  wrote:

>Hi Edward,
>
>I'm trying to scan the existing connections. As i can see in the
>TForm1.btnLoadExistingClick(Sender: TObject) method, you used 'TProcess'
>for running external applications. In C this must be replaced by the
>'system' command.
>
>Now i'm looking at the TProcess options. For example:
>
>   Proc.Executable := 'cat';
>   Proc.Parameters.Add('/etc/network/interfaces');
>   Proc.Options := [poUsePipes, poWaitOnExit];
>   Proc.Execute;
>
>Here are the definitions:
>
>http://olympiad.cs.uct.ac.za/docs/fpc-2.4.4/fcl/process/tprocess.options.html
>
>Cheers,
>
> Aitor.
>
>On 12/04/2015 01:00 PM, Edward Bartolo  wrote:

>>Hi Aitor,
>>
>>I succeeded to run my trial gtk3 application with events without
>>errors. I always wanted to learn coding GUI applications for Linux in
>>C/C++. This can be a good exercise.
>>
>>Edward
>>
>>
>>On 02/12/2015, aitor_czr   wrote:

>>> >Woow !!
>>> >
>>> >On 02/12/15 12:08, Edward Bartolo wrote:

 >>priv = (Private*) g_malloc (sizeof (struct _Private));


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Debianising my uploaded version of netman.

2015-12-09 Thread Steve Litt
On Tue, 08 Dec 2015 19:52:51 +
Rainer Weikusat  wrote:

> Edward Bartolo  writes:
> > I applied the patch suggested yesterday by Rainer *manually* by
> > editing files. I am lost here and I am hesitant to mess with git as
> > it can easily damage my sources.  
> 
> While I have some "areas of disagreement" with git, it isn't that
> bad. 

If you know it well, and if everyone else knows it well. I had some Git
problems on my first attempt to create the Devuan Dmenu documentation,
resulting in hours of rework.

> In particular, you can always use it to restore something to a
> prior state. 

If you know how.

> For the given problem, you could start with creating a
> branch for "debianization changes " and run dh_make on the branch and
> do any other ".deb-changes" there. 

But how would the average person know this?

GIT is everywhere, now. I need to stop being that guy who looks up a
few commands and dabbles with GIT, and start being a GIT expert. If a
local community college gave a semester GIT course, that would be what
I need. Failing that, a copy of "GIT For Dummies" would suffice, except
that there's no such book (and bozos unaware of trademark law label
their little tutorials as "GIT For Dummies", making things even more
difficult).

Anyone know a good source of GIT learning that's self-discoverable and
has a reasonable learning curve from know-nothing to expert?

Thanks,

SteveT

Steve Litt 
November 2015 featured book: Troubleshooting Techniques
 of the Successful Technologist
http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Debianising my uploaded version of netman.

2015-12-09 Thread dan pridgeon
This may help:
http://git-scm.com/book/en/v2 
  From: Steve Litt 
 To: dng@lists.dyne.org 
 Sent: Wednesday, December 9, 2015 9:37 AM
 Subject: Re: [DNG] Debianising my uploaded version of netman.
   
On Tue, 08 Dec 2015 19:52:51 +
Rainer Weikusat  wrote:

> Edward Bartolo  writes:
> > I applied the patch suggested yesterday by Rainer *manually* by
> > editing files. I am lost here and I am hesitant to mess with git as
> > it can easily damage my sources.  
> 
> While I have some "areas of disagreement" with git, it isn't that
> bad. 

If you know it well, and if everyone else knows it well. I had some Git
problems on my first attempt to create the Devuan Dmenu documentation,
resulting in hours of rework.

> In particular, you can always use it to restore something to a
> prior state. 

If you know how.

> For the given problem, you could start with creating a
> branch for "debianization changes " and run dh_make on the branch and
> do any other ".deb-changes" there. 

But how would the average person know this?

GIT is everywhere, now. I need to stop being that guy who looks up a
few commands and dabbles with GIT, and start being a GIT expert. If a
local community college gave a semester GIT course, that would be what
I need. Failing that, a copy of "GIT For Dummies" would suffice, except
that there's no such book (and bozos unaware of trademark law label
their little tutorials as "GIT For Dummies", making things even more
difficult).

Anyone know a good source of GIT learning that's self-discoverable and
has a reasonable learning curve from know-nothing to expert?

Thanks,

SteveT

Steve Litt 
November 2015 featured book: Troubleshooting Techniques
    of the Successful Technologist
http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


 ___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] gcc error: "error: unknown type name,,, ‘GtkObject’"

2015-12-09 Thread Rainer Weikusat
Edward Bartolo  writes:
> I think, the fgets outside the loop is not required. I think it can be
> done this way:
>
> #include 
>
> main()
> {
>   FILE * fp;
>   char str[1024];
>
>   fp = popen ("/usr/lib/netman/bin/backend 6", "r");
>
>   if (fp == NULL) return -1;
>
>   while (!feof (fp))
>   {
> fgets (str, 1024, fp);
> printf ("%s", str);
>   }
>   pclose (fp);
>   return 0;
> }

This doesn't work: It prints the last input line twice.

Rationale: feof(fp) won't be true until a read operation actually hit
the end of the file. This means it won't be true after fgets read the
last line. fgets will then be called again for the next iteration,
causing it to detect the EOF. This leaves the contents of str unmodified
which will thus get printed again. The simple way to avoid that would be
to handle the return value of fgets:


#include 

int main(void)
{
  FILE * fp;
  char str[1024];

  fp = popen ("cat /etc/passwd", "r");

  if (fp == NULL) return -1;

  while (fgets (str, 1024, fp))
printf ("%s", str);
  
  pclose (fp);
  return 0;
}


Omitting the return value of a function for a default of 'int' isn't
standard-conforming C anymore more and using () as synonym for "whatever
the caller desired to pass" is 'an obsolescent feature' (although
sometimes useful). The C way to denote an empty argument list is (void),
() means the same in C++.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] XFCE terminal alternatives?

2015-12-09 Thread Rowland Penny

On 09/12/15 17:11, Go Linux wrote:

On Wed, 12/9/15, dev  wrote:

  Subject: Re: [DNG] XFCE terminal alternatives?
  To: "dng" 
  Date: Wednesday, December 9, 2015, 10:58 AM
  

  PS:
   Found out today my DNG subscription was "disabled due to excessive
   bounces" so wasn't getting any mail off this list. Seems fixed now
   (after logging into gmail interface and clicking dng-request link to
   re-enable).
  



Several of us get those notices frequently.  After I get one, I always check 
the mail archives to make sure I haven't missed anything.

https://lists.dyne.org/lurker/mindex/d...@20380101.00..en.html

golinux
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


I got one, the only reason I could think why, was that gmail kept 
putting various emails into spam. There seemed to be no reason why gmail 
did this, so I added a gmail filter to not send any mail from dng to spam.


Rowland
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Debianising my uploaded version of netman.

2015-12-09 Thread aitor_czr

Hi Steve,

Here you are a good tutorial about GIT:

https://git-scm.com/book/en/v1

You can find also a lot of video tutorials in youtube.

Cheers,

   Aitor.

On 09/12/15 17:57, Steve Litt  wrote:

Anyone know a good source of GIT learning that's self-discoverable and
has a reasonable learning curve from know-nothing to expert?

Thanks,

SteveT


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] DNG/Gmail Bounces (was: XFCE terminal alternatives?)

2015-12-09 Thread Neo Futur
 hi all, concerning gmail/google apps bounces, I recently discovered :

https://support.google.com/mail/answer/6227174?hl=en
https://postmaster.google.com/

 this is relatively new and few people needed it un til now, but it
seems important to seup for anyone sending an important volume of
emails to gmail/google apps mail accounts, parlticularly mailing
lists, and this could be the reason for the problems this mailing list
have seen recently.


On Wed, Dec 9, 2015 at 1:51 PM, dev  wrote:
>
> On 12/09/2015 11:21 AM, Rowland Penny wrote:
>>
>> On 09/12/15 17:11, Go Linux wrote:
>>>
>>> On Wed, 12/9/15, dev  wrote:
>
> 
>>>
>>>
>>> Several of us get those notices frequently.  After I get one, I always
>>> check the mail archives to make sure I haven't missed anything.
>>
>>
>> I got one, the only reason I could think why, was that gmail kept
>> putting various emails into spam. There seemed to be no reason why gmail
>> did this, so I added a gmail filter to not send any mail from dng to spam.
>>
>
> As it turns out, I have many messages from dng in Gmail spam as well. I
> suspect you are correct. I've applied a filter as well. Hopefully preventing
> future problems.
>
> Thanks for the input.
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] DNG/Gmail Bounces (was: XFCE terminal alternatives?)

2015-12-09 Thread dev


On 12/09/2015 11:21 AM, Rowland Penny wrote:

On 09/12/15 17:11, Go Linux wrote:

On Wed, 12/9/15, dev  wrote:




Several of us get those notices frequently.  After I get one, I always
check the mail archives to make sure I haven't missed anything.


I got one, the only reason I could think why, was that gmail kept
putting various emails into spam. There seemed to be no reason why gmail
did this, so I added a gmail filter to not send any mail from dng to spam.



As it turns out, I have many messages from dng in Gmail spam as well. I 
suspect you are correct. I've applied a filter as well. Hopefully 
preventing future problems.


Thanks for the input.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] gitfalls (was: Debianising my uploaded version of netman.)

2015-12-09 Thread Rainer Weikusat
Steve Litt  writes:
> Rainer Weikusat  wrote:
>> Edward Bartolo  writes:
>> > I applied the patch suggested yesterday by Rainer *manually* by
>> > editing files. I am lost here and I am hesitant to mess with git as
>> > it can easily damage my sources.  
>> 
>> While I have some "areas of disagreement" with git, it isn't that
>> bad. 
>
> If you know it well, and if everyone else knows it well. I had some Git
> problems on my first attempt to create the Devuan Dmenu documentation,
> resulting in hours of rework.

How did you manage to do that?

(More general remark: Don't try to rediscover India by sailing westwards
in a leaky, wooden tub. If in doubt, ask someone).
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Debianising my uploaded version of netman.

2015-12-09 Thread Steve Litt
>   From: Steve Litt 
>  Subject: Re: [DNG] Debianising my uploaded version of netman.
>

> Anyone know a good source of GIT learning that's self-discoverable and
> has a reasonable learning curve from know-nothing to expert?


On Wed, 9 Dec 2015 16:57:01 + (UTC)
dan pridgeon  wrote:

> This may help:
> http://git-scm.com/book/en/v2 

Very nice! I've read a few pages, and so far, this appears to be
*exactly* what I needed. Thanks Dan, and you too Aitor, for
recommending this great book.

SteveT

Steve Litt 
November 2015 featured book: Troubleshooting Techniques
 of the Successful Technologist
http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] gcc error: "error: unknown type name,,, ‘GtkObject’"

2015-12-09 Thread Edward Bartolo
Hi Aitor,

I think, the fgets outside the loop is not required. I think it can be
done this way:

#include 

main()
{
  FILE * fp;
  char str[1024];

  fp = popen ("/usr/lib/netman/bin/backend 6", "r");

  if (fp == NULL) return -1;

  while (!feof (fp))
  {
fgets (str, 1024, fp);
printf ("%s", str);
  }
  pclose (fp);
  return 0;
}

The reasoning behind my version:
If file fp is 0 in length feof(fp) should return true (non zero) which
means the loop does not start. if fp is not zero in length the loop
starts, fgets reads the first line and printf print it to the screen.
This continues until feof(fp) returns non zero (true).

Edward

On 09/12/2015, aitor_czr  wrote:
> Hi Edward,
>
> The following code reads line by line the textual output of 'backend 6':
>
> #include 
>
> main()
> {
>FILE * fp;
>char str[1024];
>
>fp = popen ("/usr/lib/netman/bin/backend 6", "r");
>
>if (fp == NULL) return -1;
>
>fgets (str, 1024, fp);
>while (!feof (fp))
>{
>  printf ("%s", str);
>  fgets (str, 1024, fp);
>}
>pclose (fp);
>return 0;
> }
>
> I will have a look at your code.
>
> Thanks,
>
> Aitor.
>
> On 06/12/15 08:40, Edward Bartolo wrote:
>> Hi Aitor,
>>
>> The best way for you is to use the backend's code for reference. What
>> you want is already implemented there. TProcesss was used to trap the
>> background cli commands output although there are instances where that
>> output is discarded.
>>
>> What you need is this from the CLI backend's code (core_functions.c):
>> [ code snippet from getDefaultDevices() ]
>>
>> FILE * shell_reader;
>> char scan_buffer[1024];
>>
>> [...]
>>
>> shell_reader = popen(command, "r");
>>  if(!shell_reader) {
>>  fprintf(
>>  stderr,
>>  "ERROR: getDefaultDevices(): "
>>  "popen() failed (Error: %s)\n",
>>  strerror(errno)
>>  );
>>  
>>  return -1;
>>  }
>>  
>>  char* ptr;
>>  while((fgets(scan_buffer, 1024, shell_reader))) {
>>ptr = (char*) scan_buffer;
>>  if (strstr((char *) scan_buffer, "lo") == ptr)
>>  continue;
>>  else if (strstr((char *) scan_buffer, "wl") == ptr) {
>>  snprintf(
>>  _wl,
>>  1024,
>>  "%s",
>>  (char*) scan_buffer
>>  );
>>  } else if (
>>  strstr((char *) scan_buffer, "eth") == ptr ||
>>  strstr((char *) scan_buffer, "en") == ptr   
>>  ) {
>>  snprintf(
>>  _eth,
>>  1024,
>>  "%s",
>>  (char*) scan_buffer
>>  );
>>  }
>>  }
>>  
>>  pclose(shell_reader);
>>  
>>
>> Ask again if you in the event you may need more help.
>>
>>
>> Edward
>>
>>
>> On 05/12/2015, aitor_czr  wrote:
>>> >Hi Edward,
>>> >
>>> >I'm trying to scan the existing connections. As i can see in the
>>> >TForm1.btnLoadExistingClick(Sender: TObject) method, you used
>>> > 'TProcess'
>>> >for running external applications. In C this must be replaced by the
>>> >'system' command.
>>> >
>>> >Now i'm looking at the TProcess options. For example:
>>> >
>>> >   Proc.Executable := 'cat';
>>> >   Proc.Parameters.Add('/etc/network/interfaces');
>>> >   Proc.Options := [poUsePipes, poWaitOnExit];
>>> >   Proc.Execute;
>>> >
>>> >Here are the definitions:
>>> >
>>> >http://olympiad.cs.uct.ac.za/docs/fpc-2.4.4/fcl/process/tprocess.options.html
>>> >
>>> >Cheers,
>>> >
>>> > Aitor.
>>> >
>>> >On 12/04/2015 01:00 PM, Edward Bartolo  wrote:
 >>Hi Aitor,
 >>
 >>I succeeded to run my trial gtk3 application with events without
 >>errors. I always wanted to learn coding GUI applications for Linux in
 >>C/C++. This can be a good exercise.
 >>
 >>Edward
 >>
 >>
 >>On 02/12/2015, aitor_czr   wrote:
>> >>> >Woow !!
>> >>> >
>> >>> >On 02/12/15 12:08, Edward Bartolo wrote:
  >>priv = (Private*) g_malloc (sizeof (struct _Private));
>
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] XFCE terminal alternatives?

2015-12-09 Thread dev

Thanks for all the input!

Guake wasn't what I wanted so thought I'd install LXDE and have at it 
(as Steve mentioned). Seems OK so far even with xfce-terminal in 
dropdown mode. Time will tell.. hotkey configuration is a bit annoying 
but oh well. XML beats a registry any day ;)



PS:
Found out today my DNG subscription was "disabled due to excessive 
bounces" so wasn't getting any mail off this list. Seems fixed now 
(after logging into gmail interface and clicking dng-request link to 
re-enable).


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] XFCE terminal alternatives?

2015-12-09 Thread Go Linux
On Wed, 12/9/15, dev  wrote:

 Subject: Re: [DNG] XFCE terminal alternatives?
 To: "dng" 
 Date: Wednesday, December 9, 2015, 10:58 AM
 
>  PS:
>   Found out today my DNG subscription was "disabled due to excessive 
>   bounces" so wasn't getting any mail off this list. Seems fixed now 
>   (after logging into gmail interface and clicking dng-request link to 
>   re-enable).
>  



Several of us get those notices frequently.  After I get one, I always check 
the mail archives to make sure I haven't missed anything.

https://lists.dyne.org/lurker/mindex/d...@20380101.00..en.html

golinux
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng