Re: [Buster]: KDE wierdness: missing window titlebars + more

2018-08-27 Thread cyaiplexys




On 08/27/2018 04:55 PM, local10 wrote:

Hi,

Am experiencing a wierd issue with KDE after installing kde-standard package. 
KDE starts fine but shows an almost completely empty desktop: no taskbar, no 
launcher, no clock... just in the upper right conner there's a small rectangle  
that opens a menu allowing to add widgets and activities to the desktop. What's 
even stranger when ap app is launched its window does not even have a titlebar. 
There appears to be no way to minimize, maximize, move or even close the 
window. The app can be closed from its internal menu, if it has one, but that's 
about it.

Did I do something wrong or KDE is really that screwed up in testing at the 
moment?

Installed LXDE and LXDE performs as expected, normally looking windows, 
taskbar, etc.

Any ideas? Thanks


# aptitude show kde-standard
Package: kde-standard
Version: 5:102
State: installed
Automatically installed: no
Priority: optional
Section: metapackages
Maintainer: Debian Qt/KDE Maintainers mailto:debian-qt-...@lists.debian.org>>
Architecture: amd64
Uncompressed Size: 21.5 k
Depends: akregator (>= 4:17.12.3), ark (>= 4:17.08.3), dragonplayer (>= 4:17.08.3), gwenview (>= 
4:17.08.3), juk (>= 4:17.08.3), kaddressbook (>= 4:17.12.3), kate (>= 4:17.08.3), kcalc (>= 
4:17.08.3), kde-plasma-desktop (>= 5:102), kde-spectacle (>= 17.08.3), khelpcenter
  (>= 4:17.08.3), kmail (>= 4:17.12.3), knotes (>= 4:17.12.3), kopete (>= 4:17.08.3), 
korganizer (>= 4:17.12.3), kwalletmanager (>= 4:17.08.3), okular (>= 4:17.08.3), 
plasma-dataengines-addons (>= 4:5.10), plasma-pa (>= 5.10) | kmix (>= 4:17.08.3),
  plasma-runners-addons (>= 4:5.10), plasma-wallpapers-addons (>= 4:5.10), 
plasma-widgets-addons (>= 4:5.10), polkit-kde-agent-1 (>= 4:5.10), sweeper (>= 
4:17.08.3)
Recommends: konq-plugins (>= 4:17.08.3), plasma-nm (>= 4:5.10)


I had that happen not too long ago in Stretch. I just rebooted and it 
was OK.


You may want to also check your settings in Display - Compositor. You 
may have to change to a different rendering backend. Also you might want 
to uncheck any experimental options if you have them checked.


Sometimes though, when things update, old themes or window decorations 
aren't updated to support any new features. Try going back to the 
default window decoration and style. If it is in the default 
decoration/style maybe try a different one?





Re: Lightening Hit screwed boot sequence on Stretch

2018-08-21 Thread cyaiplexys

On 08/21/2018 02:26 PM, J.W. Foster wrote:
I have a stock Stretch system actually with  a multiple boot to 
different hard drives via grub2. It has been running well for over a 
year even longer since I rebuilt with new Motherboard and upgraded from 
Debian 8.I am currently able to boot a Windows 10 drive and 2 Debian 9 
drives. However the 3rd Debian 9 drive which is a server for a Mediawiki 
website will not boot properly. The weird thing is this occurred after 
we got a power surge that was not cancelled out completely by my 
filtering strips. (Yes I am ordering a UPS) Now the system gets to a 
point where it says it is trying to;  Started update UTMP about system 
runlevel changes.
  It locks up there and goes no further. I can start the boot sequence 
and get to a repair prompt as root in recovery mode. Problem is I have 
no knowledge of what to do there.  I do have full access to this disk 
from booting into one of the working drives. I just do not want to have 
to rebuild the entire database and Mediawiki server.
Any ideas, suggestions, tips whatever,  please pass them on to me. I 
think this is fixable, but have found nada on the web that seems exactly 
to apply.

Thanks!
John Foster


I think the very first thing I would do when in the recovery prompt is 
to use 'fsck' and see if there are errors (maybe something got 
corrupted) and go from there.


Also it could be that particular drive may be damaged from the power surge.



Re: Fail2Ban Question: Can I do this without restarting the service?

2018-08-17 Thread cyaiplexys

On 08/17/2018 04:58 PM, Dave Sherohman wrote:

[Snipped some useful info]


I *never ever* use port 22 for ssh. I pick some random port that I know
isn't going to be used for anything else on the server and set ssh to use
that port instead. How do I set ufw to use the ssh port of my choosing?


In the ufw rule, just change "port 22" to whatever port you actually run
it on.  The important thing, of course, is just that you don't block the
ssh port if you're doing this over ssh.


I more than likely would be sure I can log into ssh before blocking 
anything else.



That's not going to be possible to determine. I and the other admin (who
also doesn't know about this stuff) both connect remotely via ssh and we
both have dynamic IPs that are set (and changed) periodically (and at times
we have no idea) by our ISP. Neither of us can afford a static IP to our
homes.


If you collect your DHCP-assigned addresses across a few changes, you
should be able to guess pretty accurately at the range of possible
addresses you might be assigned.  Also, even with a single address, your
odds are pretty good if you just use the /24 CIDR block containing that
address, since most DHCP pools aren't going to be larger than that.

So, e.g., I'm currently at a hotel with IP address 83.244.xxx.85.  I
could almost certainly give access to the hotel's entire range of
dynamically-assigned IP addresses by allowing access from
83.244.xxx.0/24.


While I don't travel, the co-admin travels a LOT and doesn't always stay 
at hotels. Sometimes they are on the road, getting wifi other places, 
etc. So again, probably not possible to even get a good range.



Can I do this too?

ufw deny 22/tcp # Deny connection to port 22 (ssh default port)


You could, but there's generally no point because all ports are denied
by default.  You usually don't need to create specific deny rules unless
you have a port that you want to have open to the world, but then close
it for specific addresses, or if there's an IP address that you want to
allow access to all ports, except for a few specific ports.


But (unless I was mistaken) wasn't port 22 open by default for ssh? So 
wouldn't I have to block it once I change and open the other ssh port?



ufw allow [new-ssh-port]/tcp # Allow connection to new chosen ssh port


This would work, and would allow every IP address in the world to
connect to your custom ssh port.  (Which is not, IMO, a bad thing, but
your level of paranoia may vary.)


Well, seeing as how the co-admin needs to get in too, it may be 
necessary. Who knows what IP they will have as they travel.



Thing is, the bots hitting the server aren't getting 404 errors. They are
trying to do php XSite injection on Wordpress sites and hitting actual web
sites (HTTP 202).


It just so happens I have a jail like that on a couple of my servers,
too.  I have the filter in /etc/fail2ban/filter.d/http-get-dos.conf


[Snip very good info]

Thank you for this! That I think will come in very handy.


Based on what you've said so far, I expect you'll want to adjust the
maxretry/findtime/bantime values, but my experience has been that
banning offending IP addresses for 10 minutes generally seems to be
enough for them to give up and go bother someone else.


We have seen otherwise. Once the ban is lifted, they just resume 
hammering the site. I think that it's a bot that is automatic and 
doesn't check to see if it was banned or not. It'll just keep going at 
whatever is in it's list ad-infinitum.



Banning for months at a time is unlikely to be necessary unless

> you're dealing with a targeted attack.

Seems like we just might be, actually. About 4 IPs keep on it no matter 
what.


[Snipped more very useful info]


(though Ubuntu seems to do things differently for Debian but that's OK
since I would assume this stuff is the same for Debian and Ubuntu as
for fail2ban/ufw?)


I have limited experience with Ubuntu, but my impression is that their
differences (aside from release schedule) are primarily dealing with
end-user-focused applications.  Networking and firewall management are
deep enough in the guts that I'm 99% sure they'll be the same in both
distros.


That's good to hear that Debian stuff I learn here will also be good in 
case I need to make an Ubuntu server as well.




Re: Fail2Ban Question: Can I do this without restarting the service?

2018-08-17 Thread cyaiplexys

On 08/17/2018 01:59 PM, Brian wrote:

On Fri 17 Aug 2018 at 13:56:03 -0400, cyaiplexys wrote:


So do I have to sudo apt-get iptables or is that already installed?


dpkg -l iptables


Looks like it's in there:

$ dpkg -l iptables
Desired=Unknown/Install/Remove/Purge/Hold
| 
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   VersionArchitecture   Description
+++-==-==-==-=
ii  iptables   1.6.0+snapshot amd64  administration 
tools for packet filtering


Debian 9.5 Stretch.




Re: Fail2Ban Question: Can I do this without restarting the service?

2018-08-17 Thread cyaiplexys

On 08/17/2018 01:16 PM, john doe wrote:

On 8/17/2018 6:50 PM, cyaiplexys wrote:

On 08/17/2018 10:55 AM, Dave Sherohman wrote:

On Thu, Aug 16, 2018 at 02:07:02PM -0400, cyaiplexys wrote:

See, that all is way over my head. I don't understand this stuff as I'm
pretty much a total beginner in this.


OK, fair enough.  Let's see what help I can offer.


Greatly appreciated. :)


Does Debian and Debian based systems have the firewall installed and
running by default?


No.  For general-purpose firewalling, I would suggest installing ufw
(`sudo apt-get install ufw`), as it's much simpler to manage than using
iptables (the underlying firewall control scheme used by both ufw and
fail2ban to communicate with the kernel) directly.

After installing ufw, the following commands should get you started (all
of them need to be run with sudo or from a root shell):


If I'm following you so far, ufw is a firewall like iptables? Or a 
replacement for iptables?




No -- ufw is a "front end" to iptables.
Ufw is easy to configure and will translate to a format understood by 
iptables.


In other words, "iptables" is the firewall and UFW, Shorewall ... allows 
you to control that wall between you and the internet.


Also, a server without firewall capibility should never be facing internet.


So do I have to sudo apt-get iptables or is that already installed?

[other very useful stuff snipped...]



Re: Fail2Ban Question: Can I do this without restarting the service?

2018-08-17 Thread cyaiplexys

On 08/17/2018 10:55 AM, Dave Sherohman wrote:

On Thu, Aug 16, 2018 at 02:07:02PM -0400, cyaiplexys wrote:

See, that all is way over my head. I don't understand this stuff as I'm
pretty much a total beginner in this.


OK, fair enough.  Let's see what help I can offer.


Greatly appreciated. :)


Does Debian and Debian based systems have the firewall installed and
running by default?


No.  For general-purpose firewalling, I would suggest installing ufw
(`sudo apt-get install ufw`), as it's much simpler to manage than using
iptables (the underlying firewall control scheme used by both ufw and
fail2ban to communicate with the kernel) directly.

After installing ufw, the following commands should get you started (all
of them need to be run with sudo or from a root shell):


If I'm following you so far, ufw is a firewall like iptables? Or a 
replacement for iptables?



ufw allow to any port 22 from [your IP address] proto tcp
(If you're using ssh to connect to the server, you *must* do this one
before enabling the firewall, or else you'll lock yourself out. 


I *never ever* use port 22 for ssh. I pick some random port that I know 
isn't going to be used for anything else on the server and set ssh to 
use that port instead. How do I set ufw to use the ssh port of my choosing?


> If you need to connect with ssh from multiple addresses, you can
> either run it multiple times with different addresses, or specify a
> network in CIDR notation.)

That's not going to be possible to determine. I and the other admin (who 
also doesn't know about this stuff) both connect remotely via ssh and we 
both have dynamic IPs that are set (and changed) periodically (and at 
times we have no idea) by our ISP. Neither of us can afford a static IP 
to our homes.



ufw enable
(Starts the firewall.)

ufw logging off
(...because it will otherwise flood your logs with reports of pretty
much every packet recieved on the network interface.)

ufw allow 80,443/tcp
(Opens port 80 (http) and 443 (https) for connections from anywhere on
the internet.)

> Repeat the last one with the appropriate port numbers for any other
> service that you want to make publicly available.

Can I do this too?

ufw deny 22/tcp # Deny connection to port 22 (ssh default port)
ufw allow [new-ssh-port]/tcp # Allow connection to new chosen ssh port


I hvae no idea how to jail or whatever in fail2ban. Sounds that's what I
want to do. Detect IP addresses hitting the server 1000 times in an hour and
then ban those for a good long while (week sounds good).


That's pretty much exactly what fail2ban is intended to do.  A "jail" is
just fail2ban's term for a rule for what activities aren't allowed and
how to handle IP addresses which break the rule.

Unfortunately, adding a custom jail requires changes to multiple files,
but I can at least give you specific details on how to create this
particular one.  Again, these files need to be created or edited using
sudo or from a root shell.

First, you need to create a filter definition.  Create the file
/etc/fail2ban/filter.d/apache-missing-local.conf containing:

---
[Definition]
failregex =  [^ ]+ [^ ]+ \[[^]]+\] "[^"]+" 40[04] [0-9]+
---

Lines matching the failregex (an apache log line for a 404 error) count
as "failures".


Thing is, the bots hitting the server aren't getting 404 errors. They 
are trying to do php XSite injection on Wordpress sites and hitting 
actual web sites (HTTP 202).



Next, you need to define a jail which uses that filter.  Create the file
/etc/fail2ban/jail.local (or edit it if it exists, but I don't think it
exists by default) and add:

---
[apache-missing-local]
enabled  = true
port = http,https
filter   = apache-missing-local
logpath  = /var/log/apache2/*access*.log
maxretry = 1000
findtime = 3600
bantime  = 604800
ignoreip = 127.0.0.1
---


Aha! THIS makes sense to me now! :)


'port' is the list of ports to block when an address is put in the jail.
'logpath' is the list of logfiles to monitor for offending entries (in
this case, all log files in /var/log/apache2 with "access" in their
names).  'maxretry' is the number of times an address can break the rule
before getting jailed.  'findtime' is how long (in seconds, 3600 = 1
hour) the retries are remembered.  And 'bantime' is how long (in
seconds again, 604800 = 1 week) the address should remain jailed before
it is released and allowed to access your service again.


That I will need to be like a larger amount, like several months? 
*reaching for my calculator*.



'ignoreip' is a list of IP addresses which should never be blocked.


Can I separate a list with commas like done for port?


After setting up these files, you can either restart fail2ban or run
`sudo fail2ban-client reload` to activate the new jail.


When using 'reload', does that just ensure changes take effect *without* 
restarting fail2bain service, right?



I wish there was an easy tutorial for do

Re: Fail2Ban Question: Can I do this without restarting the service?

2018-08-16 Thread cyaiplexys

On 08/16/2018 01:00 PM, Dave Sherohman wrote:

On Wed, Aug 15, 2018 at 09:29:58PM -0400, cyaiplexys wrote:

Is there a better way to do this? I have a cron job that gathers IP
addresses that get more than 1,000 hits from the apache log file and that
gets put in the ip.blacklist.perm file.


If (as the filename implies) you want to block these addresses
permanently, then why are you using a tool designed to manage blocks
dynamically (fail2ban)?  Just use your preferred firewall management
tool to add a rule to block them outside of fail2ban.

For example, I manage my firewalls with ufw, so I would use 'ufw deny
from $IP_ADDR'.  It takes effect instantly, with no need to restart
anything, and will be persistent across reboots.

If you don't actually want them to be permanent, then you could instead
create a fail2ban jail which detects IP addresses which have generated
1000 incoming requests to ports 80/443 within the last 60 minutes (or
whatever timeframe your log analysis script looks at) and bans them for
a week (or however long you like), without needing to wait for the log
analysis script to run first.  And you can also whitelist certain IPs in
the jail config, if there are internal service monitoring machines or
whatever which legitimately generate levels of traffic which would
normally trigger a ban.



See, that all is way over my head. I don't understand this stuff as I'm 
pretty much a total beginner in this. Does Debian and Debian based 
systems have the firewall installed and running by default? Are there 
tutorials on how this stuff works?


I hvae no idea how to jail or whatever in fail2ban. Sounds that's what I 
want to do. Detect IP addresses hitting the server 1000 times in an hour 
and then ban those for a good long while (week sounds good). I have no 
clue how to do that. Also don't know how to whitelist.


I've googled. But the articles I've read were so confusing I had no idea 
where to start or what to do.


I wish there was an easy tutorial for doing these things.



Re: How to exclude Some but not All dot files?

2018-08-16 Thread cyaiplexys

On 08/16/2018 11:21 AM, Greg Wooledge wrote:

On Thu, Aug 16, 2018 at 11:19:29AM -0400, cyaiplexys wrote:

I actually have several accounts which I want to back up but not include all
the dot files. It would be too much to go into each account and run a
script. I would like to do it from one account.


Then do it from /home.

Or do it from / and use "home" as the starting point.  Rather than "/home".


Thank you. This worked like a charm and I didn't have to deal with those 
warning messages in tar. Learned something new. :)




Re: How to exclude Some but not All dot files?

2018-08-16 Thread cyaiplexys

On 08/16/2018 11:21 AM, Greg Wooledge wrote:

On Thu, Aug 16, 2018 at 11:19:29AM -0400, cyaiplexys wrote:

I actually have several accounts which I want to back up but not include all
the dot files. It would be too much to go into each account and run a
script. I would like to do it from one account.


Then do it from /home.

Or do it from / and use "home" as the starting point.  Rather than "/home".


That's something I never thought of, oddly. Good idea!



Re: How to exclude Some but not All dot files?

2018-08-16 Thread cyaiplexys

On 08/16/2018 10:45 AM, Greg Wooledge wrote:

On Thu, Aug 16, 2018 at 10:40:14AM -0400, cyaiplexys wrote:

tar -czf archive.tgz /home/me/dirToARchive/.
--exclude=/home/me/dirToARchive/.mysetuptemp
--exclude=/home/me/dirToARchive/.myotherdotfile
--exclude=/home/me/dirToARchive/.anotherdotfile

I found it doesn't matter if I put the --excludes before the -czf or after
everything, I still end up with EVERY dot file in the directory instead of
ONLY the ones that are NOT on the list.


wooledg:/tmp/x$ touch .good .bad1 .bad2
wooledg:/tmp/x$ tar czf ../foo.tgz --exclude ./.bad1 --exclude ./.bad2 .
wooledg:/tmp/x$ tar tzvf ../foo.tgz
drwxr-xr-x wooledg/voice 0 2018-08-16 10:43 ./
-rw-r--r-- wooledg/voice 0 2018-08-16 10:43 ./.good

I think your primary problem is that you are passing absolute paths
to tar.  This is evil.  You wouldn't want absolute paths in your tarball,
and in fact, GNU tar will chastise you for doing so, and then will strip
the leading slashes for you.  (Unix tar is not so forgiving.  It will
gleefully do exactly what you said, creating a tarball with absolute
paths in it, which means it cannot safely be extracted.)

Perhaps there is some kind of collision between the auto-stripping of
the leading slashes, and your --exclude patterns which still have those
leading slashes on them.


I actually have several accounts which I want to back up but not include 
all the dot files. It would be too much to go into each account and run 
a script. I would like to do it from one account.




How to exclude Some but not All dot files?

2018-08-16 Thread cyaiplexys
I'm trying to make a gzipped tarball. I want to exclude only a certain 
list of dot files but NOT ALL dot files (in other words tar the other 
dot files not on the list).


I have (this is just an example):

tar -czf archive.tgz /home/me/dirToARchive/. 
--exclude=/home/me/dirToARchive/.mysetuptemp 
--exclude=/home/me/dirToARchive/.myotherdotfile 
--exclude=/home/me/dirToARchive/.anotherdotfile


In the directory I want to Include *all other* dot files not in the 
--exclude above.


I found it doesn't matter if I put the --excludes before the -czf or 
after everything, I still end up with EVERY dot file in the directory 
instead of ONLY the ones that are NOT on the list.


I'm not great with tar, I admit.

Is there a way to do what I'm proposing?



Re: Fail2Ban Question: Can I do this without restarting the service?

2018-08-16 Thread cyaiplexys

On 08/16/2018 09:52 AM, john doe wrote:

On 8/16/2018 1:45 PM, cyaiplexys wrote:

On 08/16/2018 02:36 AM, john doe wrote:

On 8/16/2018 3:29 AM, cyaiplexys wrote:
I have a list of IP addresses I want to ban and I put them in 
/etc/fail2ban/action.d/iptables-multiport.conf as so:


cat /etc/fail2ban/ip.blacklist.perm | while read IP; do iptables -I 
fail2ban- 1 -s $IP -j DROP; done


(that was supposed to be all on one line, of course)

So, I have read that when you do things this way, you MUST restart 
fail2ban (sudo service fail2ban restart).


Is there a better way to do this? I have a cron job that gathers IP 
addresses that get more than 1,000 hits from the apache log file and 
that gets put in the ip.blacklist.perm file.


I know *nothing* about fail2ban. I just read of this technique via 
Google. But when using Google, I can't find another way to do this 
that doesn't require a restart of the service.


Any ideas on other ways to do this?



I would use ipset.
Googling "fail2ban ipset" gives some interesting stuff.



Thank you for the magic search term. :) I tried it and found at least 
3 articles I bookmarked for reading.


To query the status and start/stop/restart the service fail2ban, 
beginning with Debian 8 you would use 'systemd':

$ systemctl status/start/restart/stop fail2ban


Also increasing log verbosity when setting up fail2ban might not hurt.

https://www.digitalocean.com/community/tutorials/how-to-protect-an-apache-server-with-fail2ban-on-ubuntu-14-04 



The problem is, I want to update things *without* having to restart the 
fail2ban service for ever time I make a change. (I already know now to 
start/stop/restart).




Re: Fail2Ban Question: Can I do this without restarting the service?

2018-08-16 Thread cyaiplexys

On 08/16/2018 02:36 AM, john doe wrote:

On 8/16/2018 3:29 AM, cyaiplexys wrote:
I have a list of IP addresses I want to ban and I put them in 
/etc/fail2ban/action.d/iptables-multiport.conf as so:


cat /etc/fail2ban/ip.blacklist.perm | while read IP; do iptables -I 
fail2ban- 1 -s $IP -j DROP; done


(that was supposed to be all on one line, of course)

So, I have read that when you do things this way, you MUST restart 
fail2ban (sudo service fail2ban restart).


Is there a better way to do this? I have a cron job that gathers IP 
addresses that get more than 1,000 hits from the apache log file and 
that gets put in the ip.blacklist.perm file.


I know *nothing* about fail2ban. I just read of this technique via 
Google. But when using Google, I can't find another way to do this 
that doesn't require a restart of the service.


Any ideas on other ways to do this?



I would use ipset.
Googling "fail2ban ipset" gives some interesting stuff.



Thank you for the magic search term. :) I tried it and found at least 3 
articles I bookmarked for reading.




Fail2Ban Question: Can I do this without restarting the service?

2018-08-15 Thread cyaiplexys
I have a list of IP addresses I want to ban and I put them in 
/etc/fail2ban/action.d/iptables-multiport.conf as so:


cat /etc/fail2ban/ip.blacklist.perm | while read IP; do iptables -I 
fail2ban- 1 -s $IP -j DROP; done


(that was supposed to be all on one line, of course)

So, I have read that when you do things this way, you MUST restart 
fail2ban (sudo service fail2ban restart).


Is there a better way to do this? I have a cron job that gathers IP 
addresses that get more than 1,000 hits from the apache log file and 
that gets put in the ip.blacklist.perm file.


I know *nothing* about fail2ban. I just read of this technique via 
Google. But when using Google, I can't find another way to do this that 
doesn't require a restart of the service.


Any ideas on other ways to do this?



Re: mailing list vs "the futur"

2018-08-10 Thread cyaiplexys

On 08/10/2018 08:58 AM, The Wanderer wrote:

On 2018-08-10 at 08:29, Rich Kulawiec wrote:


On Fri, Aug 10, 2018 at 11:46:12AM -, Dan Purgert wrote:


Not familiar with procmail.  A quick perusal of the manpage seems
to indicate this is a local mail "processor" for sorting things, as
opposed to say something on the mailserver itself?


Correct.  Procmail uses a set of rules to decide what to go with messages
presented to it; those rules are usually based on the contents of message
headers, but don't have to be.  For example, for this mailing list:

:0:
 * ^X-Mailing-List:.*
 /home/rsk/linux/debian-user

Translating, this means that any message which has the specified header
will be appended to the file named in the last line.  (It would be nice
if the debian lists complied with RFC 2919 by using List-Id, but at least
this header works and is consistent throughout.)


Hm? The Debian mailing lists I'm on *do* have List-Id; that's how I
filter them into folders on my end, although I do it via Thunderbird's
built-in filtering mechanism rather than via procmail.


I use Thunderbird as well. Only I have set up a separate email account 
special for getting mail list messages, ads, etc. What I do then is set 
that account up to use collapsable threads. I delete all threads I don't 
think I'd be interested in and then keep the threads I think I want to 
read. I'm only on a couple Debian lists though (Security announcements 
being one, and this one and I think News). This Users one has the most 
activity but it really isn't too much trouble for me.


I also set up my email check to once every 720 minutes (12 hours). This 
way I'm not getting popups every 10 minutes that there's new messages 
while I'm trying to work or watch a tutorial video full screen or something.




Re: Cross-Platform Assembly Language Compilers?

2018-07-30 Thread cyaiplexys

On 07/27/2018 12:31 AM, Erik Christiansen wrote:

On 26.07.18 08:29, cyaiplexys wrote:

I'd like to try a native compiler but also I would like to have something I
could compile for Arduino (here we go again) and ARM and other CPUs as well.


$ apt-cache search avr | more
arduino - AVR development board IDE and built-in libraries
libavresample-dev - FFmpeg compatibility library for resampling -
development files
libavresample4 - FFmpeg compatibility library for resampling - runtime
files
gcc-avr - The GNU C compiler (cross compiler for avr)
avrdude-doc - documentation for avrdude
avr-libc - Standard C library for Atmel AVR development
gdb-avr - The GNU Debugger for avr
avrdude - software for programming Atmel AVR microcontrollers
binutils-avr - Binary utilities supporting Atmel's AVR targets


Awesome! I also will hope that there is an x86 assembler and maybe even 
an ARM assembler in there as well (I just want to tinker with assembly 
language for different types of systems).




Cross-Platform Assembly Language Compilers?

2018-07-26 Thread cyaiplexys
Thanks to a very nostalgic thread, now I'm curious about something else. 
Back in the day I used to do assembly language programming on a Tandy 
Color Computer 3 with Disk-based EDASM+.


I'm wondering what is the best assembler/compiler for the x86 (64-bit) 
system?


I'd like to try a native compiler but also I would like to have 
something I could compile for Arduino (here we go again) and ARM and 
other CPUs as well.


However, for now I'd like to just stick to x86. I would imagine that 
would be easiest since I could test right on the laptop. And it's 
something I've always wanted to learn.


I don't plan to really do anything major with it (we have C, Python, 
Perl and a host of other languages for real programs).




Re: If not "newbie" then ????

2018-07-26 Thread cyaiplexys
This is taking me down a memory lane I don't necessarily have but have 
heard about! Ah, the early days of computers!


On 07/23/2018 05:14 AM, Erik Christiansen wrote:

On 23.07.18 10:28, Eric S Fraga wrote:

On Sunday, 22 Jul 2018 at 05:39, Tom Browder wrote:

Sounds like there are a lot of fellow travelers here.  If you lean
more towards loving programming as I do (started in FORTRAN IV in
1961), you might check out the new world of Perl 6 (https://perl6.org)


Interesting.  I started way back when with FORTRAN 66 and APL but I have
moved on to Julia (julialang.org) these days.


In 1972 we were still submitting FORTRAN IV jobs on Hollerith punched
cards, to run on an ICL1901 24-bit mainframe, which half-filled a room
with its fridge-sized chain printer and big card reader and disk drives.

But the electrical engineering department had its own little HP2100A
16-bit minicomputer, with 16k words of 980 ns ferrite core memory. (Very
spiffy stuff, back then.) If you overwrote the punched tape bootloader
in the first dozen words or so of RAM, then you had to load it by hand
from the frontpanel switch register, word by word, in octal.

The three-chip 8080A CPU had become the single-chip 8085 by the time I
programmed it, before moving to the 8051 microcontroller, but sprinkling
13 of 'em in a system, 12 mask programmed, so no coding errors permitted,

My first home CPU was a TMS9900, which like the COSMAC had 16 x 16 bit
registers, but not on-chip. A pointer register set the location of the
register workspace in RAM, so that on interrupt or subroutine call,
changing one register gave a new set of registers instantly. It also had
a barrel shifter, rotating a register any number of bits in a single
instruction, optionally controlled by the 4 LSBs of R0. (Magic for
computing sine and cos by the CORDIC method.) And it had 16x16 multiply
and 32/16 divide.

But the contemporary COSMAC was well ahead of its time - a CMOS CPU in 1976.

Erik


This sounds a lot like a friend of mine who is much older than me, who 
used punch cards. Luckily I was a teen in the dawn of the 
microscomputing age. It was mostly cassette tape and for the rich and 
well off, the 5.25" floppy disk drive. I never encountered punch cards. 
I bet it was a PITA compared to today.


This also reminds me of the old days of assembly language programming on 
the CoCo 3 (68B09E CPU) using disk EDASAM+ I actually did a good bit of 
that (pun half intended).


Never learned x86 assembly.

I'm going to start another thread (much more on Debian topic I hope) 
about assemblers, as I'm curious about that too.


I guess I get curious about everything. See what you guys started? :P



Re: If not "newbie" then ????

2018-07-26 Thread cyaiplexys

On 07/22/2018 03:06 PM, Richard Owlett wrote:

On 07/22/2018 10:04 AM, cyaiplexys wrote:

On 07/21/2018 09:43 PM, Gene Heskett wrote:

Best wishes to you as well. I hope that I'm still playing around with 
this stuff at that age. I remember taking an online C++ course years 
ago and there was another student in the class that was 92. He was 
taking the course to help him stave off Alzheimer's! He did really 
good too. As for me, I got a 100% on my final exam. And here I am 
still not great at C or C++. No I didn't cheat. Brain cells up and 
aged on me since then!



The summer between my high school junior and senior years I had the 
opportunity to take a college level physics course. One of my classmates 
was positively elderly, being older than my parents - twas 70+ ;/


More seriously, for benefit of lurking "young whipper-snappers", stay 
physically *AND* mentally active. My mother, who got her RN in the 20's, 
did volunteer work at the Church Home and with social services outreach 
to children into her 90's. That kept her physically/socially active. As 
to mentally acuity, she pursued crossword puzzles, challenging my 
brother-in-law, a tenured full professor of history.


End of lecture.  *THINK*


I will take that advice to heart seriously. To you, I'm still a "young 
whipper-snapper" even at my age. :) I agree that keeping one's mind 
occupied keeps it sharp. Which is another reason I'll always be 
programming *something*. Back in the day I would try to learn everything 
about computers that I could. Even some rather odd and esoteric 
languages (like Liberty Basic and another not at all well known language 
called "euphoria" 
(https://en.wikipedia.org/wiki/Euphoria_(programming_language) way back 
when it first came out. That was a very interesting experience to say 
the least!


Ironically I never even tried Fortran, Cobol or Lisp. There's a good 
many out there I never even tried (yet, still).


Now I seem to be rather stuck to Python like I was with Visual Basic. 
Python is portable as well and with cython, one can compile to a binary 
(though I don't really do that with 99.999% of my Python scripts).





Re: Arduino and Python or gcc compiler?

2018-07-22 Thread cyaiplexys

On 07/22/2018 02:20 PM, Joe wrote:

...snip...


At the level of the Arduino, and what it is used for, the C required
isn't going to differ too much from Python. You're mostly going to
be bit-banging. If you know one modern procedural language, you can at
least potter around in others quite easily.


Judging by what others are saying plus what you say, it looks like 
sticking to C would actually be easier than trying to get it to work 
with Python.


...snip...


That's ok. I am getting good enough in Python (and have made my own
libraries at times) that if it's not there, I might be able to create
one. Thing is, Raspberry Pi seems more like a computer, rather than a
way to experiment controlling things (safely) like electronic
circuits on breadboards for the fun of it.


It is indeed. A Pi running a Debian desktop is painfully slow, but it
works. What it's surprisingly good at is running streaming software for
Internet TV, the system is optimised for high-definition HDMI output.
Google raspberry pi tv. You won't do that on an Arduino.


Good thing I don't have a need for running streaming software or 
anything like that. So that's not a problem.


...snip...


The kit comes with a LCD display, actually, and tutorials and
examples on using it. That I know I'll find interesting too. Ever
since I saw a video about LCD displays on a "The 8-bit guy" YouTube
video, I been wanting to toy around with those things.


Wait till you've had a bit of practice with them before you try writing
a driver for a new LCD display. The documentation for them is skimpy,
and you may need to guess a bit. I've made a few for the PIC 18F
series, which is comparable to this Atmel series.


I think what I'll be doing is just what is in the tutorials, at first. 
And toying around with what they have available. Looks like they already 
have a library built for the LCD display (it's a monochrome 20 x 40 or 
something like that) and some sample code on how to use it.



I am thinking this is going to be quite an interesting and fun hobby.



Certainly. My only work with the Arduino was using one as a graphics
co-processor for a PIC project to drive a 320x240 touch screen for a
camera control panel. There was a suitable Arduino library but not one
for the PIC, and time was in short supply. One drawback to the Arduino
here is that it doesn't have a lot of memory, so the screen fonts were
a bit chunky.


That's another thing I am noticing but a friend tells me I really won't 
need a lot of memory just for tinkering around with things. They do have 
a shield with an SD card reader/writer for it but my friend tells me 
that doesn't expand how much memory is available to store programs, but 
would only come in handy if you do a lot of writing of data or something.


Well, I guess you good folks got me straightened out. It looks like I 
won't need anything but what comes with the kit and the downloads to do 
the tinkering and will have to do it in C. I'll just forget about Python 
I guess. Not too big a problem.


I'm also amazed that Debian doesn't have much for the Arduino in the repo.




Re: Arduino and Python or gcc compiler?

2018-07-22 Thread cyaiplexys

On 07/22/2018 11:13 AM, Erik Christiansen wrote:

On 22.07.18 10:29, cyaiplexys wrote:

I think my mindset also came from my days of trying to program the WowWee
RoboSapien RS Media (ARM/Linux with Java). That was like a fully
programmable computer and robot all in one.


Then the full arduino environment will be more comfortable than raw C on
bare iron. While I program AVRs, including the ATmega328P used on most
arduino boards, in C and assembler, I understand that the arduino
environment provides a high level programming interface which allows
e.g. artists to write "sketches" to perform real-time tasks.


After watching some YouTube tutorials, I am starting to see that. The 
IDE isn't "real" C in that you're not directly compiling using gcc from 
the command line. It does everything for you behind the scenes. Not used 
to that since my old Windows days.



There is quite a bit of peripheral hardware on an ATmega328P, from
serial USART, through timer/counters useful for e.g. PWM motor control,
through multi-channel 10 bit Analogue to digital converter. The chip
datasheet is 440 pages in length, and learning to initialise and drive
the on-chip paraphernalia is a non-trivial task. The arduino environment
provides a library of drivers AIUI, to allow programming at the
application level, rather than writing your own drivers¹. It won't
necessarily give you the last microsecond of real-time performance, but
it should be a low-pain introduction. (Must be some reason for its
popularity, I figure.)


I got the starter kit with the Arduino UNO R3. Not knowing what that 
means yet (I need to read into that) I am assuming that ATmega328P is 
the Arduino MEGA and not the Arduino UNO R3? Or is it the CPU in all 
Arduinos? I'll have to look into that. I did find out a bit after my 
first post in this thread that Arduino isn't and ARM processor.



I don't mind using C, but am pretty bad at it. Maybe this is the time to
finally get better at it.


Learning two things at once is for self-driven stoics only, at least if
they're both non-trivial. Beginning with a friendly development
environment and application framework, complete with examples which
could be downloaded and used for tutorial purposes, avoids the pain of a
lot of stuff failing not because of coding errors, but because not yet
grokking the 440 pages of hardware spec left one bit in that other mode
enabling register unset, so it'll never work until you find the clue in
the doco.

There must be an arduino ML or forum, which would be a sanity saver.
Once master of that, then there's the AVRfreaks forum when the more
serious C journey begins.


I'll have to look into these forums and find one to join. I find forums 
and lists, etc. to be indispensable when learning new stuff. And also 
even if I am good with using something (like I am with Debian), still 
having some community based help had been very useful.



OK, there are one or two arduinos with ARM chips, but I don't count that
as original arduino.


Maybe that was the source of my confusion. But I think I'm sure that the 
Elegoo Super Starter Kit's Arduino UNO R3 is *not* ARM. They say it's 
100% compatible with original Arduino so I assume it's got the same 
processor as the original.



A raspberry Pi, running linux, would be a more familiar environment by
the sound of it. No problem running python there, but would there be
python I/O libraries?


That's ok. I am getting good enough in Python (and have made my own 
libraries at times) that if it's not there, I might be able to create 
one. Thing is, Raspberry Pi seems more like a computer, rather than a 
way to experiment controlling things (safely) like electronic circuits 
on breadboards for the fun of it.



¹ OK, drivers for e.g. 2x20 character LCDs can be found on the net, but
where there's an arduino LCD "shield" (plug-in daughterboard), there'll
be an arduino driver ready to use.

Erik


The kit comes with a LCD display, actually, and tutorials and examples 
on using it. That I know I'll find interesting too. Ever since I saw a 
video about LCD displays on a "The 8-bit guy" YouTube video, I been 
wanting to toy around with those things.


I am thinking this is going to be quite an interesting and fun hobby.



Re: If not "newbie" then ????

2018-07-22 Thread cyaiplexys

On 07/22/2018 09:06 AM, songbird wrote:

cyaiplexys wrote:
...

That's the one cool thing about this group and groups like it is the
conversations where you learn a little bit about those folks in the
group in between learning other useful things. Reminds me of the old
FidoNet days (and later newsgroup days - do they still even have either
anymore??)


   how do you think i'm reading/writing here?  via usenet
and gmane.  :)

   i'm more often on the gardening group these days.


I am reading these directly in Thunderbird as the posts get emailed to 
me. Since I normally just subscribe to the email lists, I don't even see 
the newsgroups anymore. Haven't been on one in years.



   my history with computers starts about 1978 and then
15yrs of nothing but computers at the university.  my
degree was computer science and i also worked as a
programmer, then i was project lead and then systems
programmer and did all sorts of things during a
conversion from the mainframe to the mini-computer
system.  also worked on a MS degree but never finished
it.

   i semi-retired about when the internet was just
taking off (in the mid-90s).  haven't worked much
since then, but did some months of being a computer
operator for a local business until i realized that
working two jobs was crazy, so i went back to the
part-time library job only until i quit that too.


I am semi-retired since last June (been a year already, time flies). I 
still work from home part time for a mom & pop web hosting company I've 
worked at for almost 15 years. It's a fun job (and sometimes a little 
challenging but not in a bad way). Keeps my brain cells from decaying 
too fast, I guess. :)



   some years later i still like tinkering at times
but it hasn't been until this spring i finally got a
new enough machine to be interesting in working on
a project of my own.  so i can learn python bits at
a time.  after learning so many computer languages
picking up another one is just not that interesting
any longer so i have to have some project which is
also interesting enough to keep me poking along.


I think I can understand at some point. Though I don't have any "new" 
machines. My ThinkPad T61 I got back in 2007 and the main machine (an HP 
g7 2010nr 17" laptop) is at least half that age. Both have been through 
upgrades and repairs. I have the ThinkPad on my work table getting ready 
to replace the fan. I already replaced the CPU in that one to a 2.x GHz 
and upgraded the RAM to the max 4GB. I run Debian Stretch on both (with 
KDE desktop) and for work and other things I use VirtualBox virtual 
machines for testing things. Both work quite well for what I need to do. 
I don't have any need for heavy graphics or video processing and don't 
play games on them. So an old system works good enough.



   with the gardening season being here i only have
time once in a while when it rains or i'm taking a
break from the heat.


   songbird


It's been one hot summer, too! I used to do gardening too but my health 
took more of a nose dive and can't really do that anymore. I do love 
nature though. It's a nice break from computers and tech. Variety is the 
spice of life!




Re: If not "newbie" then ????

2018-07-22 Thread cyaiplexys

On 07/22/2018 09:00 AM, Richard Owlett wrote:

On 07/22/2018 07:14 AM, Richard Owlett wrote:

On 07/21/2018 04:46 PM, cyaiplexys wrote:


Try CherryTree. I use that program for everything. It's 
cross-platform. I download it from the web site instead of using the 
version in the Debian Repo as the latest version fixes some annoying 
bugs (of which I kinda forgot what but would quickly be reminded if I 
used the repo version).


Think I found that bug.
The preferences dialog, which not match the online manual, does not 
have a means to adjust the font size :<


Now to see if I can recall how to install a downloaded.deb . Done it 
once or twice.


"dpkg -i" to the rescue.


I need to start learning to read ALL posts before responding, and I'd 
have sen you already figured it out. :)



I now have readable fonts.
However when doing the install it gives 2 strange lines.
Don't know if significant:
.
.
Processing triggers for shared-mime-info (1.8-1) ...
Unknown media type in type 'all/all'    <---
Unknown media type in type 'all/allfiles'    <---
Processing triggers for hicolor-icon-theme (0.15-1) ...


Those can be safely ignored, no problem. I get that all the time too 
ever since I started using Debian 7 I think it was (I used other distros 
like SolydKX and Ubuntu and those also do the same thing at times.)





Re: If not "newbie" then ????

2018-07-22 Thread cyaiplexys

On 07/22/2018 08:14 AM, Richard Owlett wrote:

On 07/21/2018 04:46 PM, cyaiplexys wrote:


Try CherryTree. I use that program for everything. It's 
cross-platform. I download it from the web site instead of using the 
version in the Debian Repo as the latest version fixes some annoying 
bugs (of which I kinda forgot what but would quickly be reminded if I 
used the repo version).


Think I found that bug.
The preferences dialog, which not match the online manual, does not have 
a means to adjust the font size :<


Now to see if I can recall how to install a downloaded.deb . Done it 
once or twice.


I never adjusted the font size, so I guess I never ran into that bug. 
But to install a debian, I use Gdebi GTK version (even though I use KDE) 
but you can do that from the command line as well with dpkg:


$ sudo dpkg -i [package.deb]




Re: If not "newbie" then ????

2018-07-22 Thread cyaiplexys

On 07/22/2018 04:07 AM, Richard Owlett wrote:

On 07/21/2018 04:46 PM, cyaiplexys wrote:

On 07/21/2018 11:42 AM, Richard Owlett wrote:

When I'm "ignorant" and know it, I refer to myself as a "newbie".
My first contact with Linux was when Squeeze was just introduced.
I've been around computers for a while [remember 12AX7 based CPU's?]. 
As a BSEE student 50+ years ago I took an introductory programming 
course. Later I programmed in 8080 assembler - at the time we were 
moving to 8085. As a consumer I ended up in the M$ land.


So, how would this group have me to refer to myself without claiming 
competency I just *DO NOT* have?


Wizard. With that many years of experience in computers in general,


Let's say I and computers have crossed paths a number of times. The only 
time I was hired for my computer competency ended in %$$%^&( ! ;/
When I did 8080 assembler, I was hired for my experience with low 
frequency millivolt signals and a project needed someone who wasn't 
awestruck by computers.


I think you earned at least that much. Actually, IMHO the answer 
should be "Whatever the hell you want to call yourself." :) IOW, it's 
entirely up to you.


If you are trying to find a label that everyone can understand you by, 
well, I don't know if labels really work that well since many people 
have many views on what a certain label even means.


It's not so much I'm looking for a label me, rather as a flag that the 
question is one a newbie would ask. I ask it because I'm missing some 
factoid that "everybody knows" but not I.


Well, a simple statement to the effect of "I am good with computers but 
this is one topic I'm not familiar with." type thing should do the 
trick, I would think. Or "I just started learning about this subject..."




What I do is try to briefly mention (if it's even necessary) that I 
have a lot of experience using Linux but am stumped on a certain 
problem as I don't often deal with that situation. No harm in that, I 
think. After all, Linux stuff is so vast that not everyone can know 
every single thing about it. Thus why we have these groups. :)


I've been programming for 35+ years myself. And been there when 
dial-up BBSs were a thing (I am sure you remember those) even before 
there was such a thing as "Internet".


P.S. I've saved ~6 years of useful posts from this group. I've been 
trying to figure out how to organize it in order to create a QWSBFA 
rather than a FAQ. QWSBFA=="Questions Which Should Be Frequently 
Asked" ;/


OWL ducks fer cover ;}


I assume you mean for your own computer (since anyone can use Google 
to search the lists).


Yes. Originally I saved them locally as a convenience - was on dial-up. 
Now, using SeaMonkey, I have a choice of tagging a post with a choice of 
 >30 tags (some times with multiple tags).


I use Thunderbird (which has the same feature) so I think I know where 
you're coming from. I do that with things too and then I eventually go 
through my Archives folder (where I place those tagged items) and get 
them moved off to my CherryTree notes or links.


Try CherryTree. I use that program for everything. It's 
cross-platform. I download it from the web site instead of using the 
version in the Debian Repo as the latest version fixes some annoying 
bugs (of which I kinda forgot what but would quickly be reminded if I 
used the repo version).


I browsed its manual then installed the version in the Debian Repo. It 
should address two problems:

   1. finding relevant posts.
   2. organizing my bookmarks folder. Like Topsy it just grew.


I think as long as you don't need it for code snippets, you should be 
OK. But the newer version may have new useful features. It depends on 
what you need. I think one annoyance was the background color on the 
code snippets. I keep a LOT of code snippets in various languages 
(especially for work).


I think that would be useful for categorizing questions and you can 
even search through them. If you want to save to PDF or HTML, it can 
export to those formats as well.


I've used CherryTree for everything from keeping code snippets to 
installation instructions to writing up tutorials (and exporting to 
HTML).




Re: If not "newbie" then ????

2018-07-22 Thread cyaiplexys

On 07/21/2018 09:43 PM, Gene Heskett wrote:

On Saturday 21 July 2018 18:01:07 cyaiplexys wrote:


On 07/21/2018 12:20 PM, Gene Heskett wrote:

On Saturday 21 July 2018 11:42:31 Richard Owlett wrote:

When I'm "ignorant" and know it, I refer to myself as a "newbie".
My first contact with Linux was when Squeeze was just introduced.
I've been around computers for a while [remember 12AX7 based
CPU's?].


No, but I recall seeing, in Iowa City in the very early 1950's, a
bit of a monster that had 12,000 12AU7's in it.  Used at the time to
grade the Iowa tests, the same one I had taken in school and got a
quite high score on. They had rigged a Harris Stream fed printing
press with a photocell at every mark location on the paper and were
calculating the scores from that.


As a BSEE student 50+ years ago I took an introductory programming
course. Later I programmed in 8080 assembler - at the time we were
moving to 8085. As a consumer I ended up in the M$ land.


I started with the rca 1802. Still an interesting architecture, one
that was able to function in several rads a minute of atomic
radiation. But I tried the z-80, found it wanting, then the 6809
which put me firmly on a unix like path, and to this day I still
don't have a winders box on the premises. Quite a few linux machines
though.


OS-9 Level II on a CoCo 3 by any chance?


Actually level 1.01 on a coco2.


I remember that as well. But I only had it because I snarfed up some old 
stuff when the local Radio Shack was liquidating. I also had a couple 
CoCo 2's. I never really did anything with Level I though since the 512K 
CoCo 3 and OS-9 Level II was my main system at the time.



I had one of those systems

So  do I but the two 1 Gb hard drives are seized from stiction.


I no longer have the CoCos unfortunatley. 1GB HDs on a CoCo? That would 
have been totally awesome! The most modern thing I had at the time was 
sticking a 3.5" 1.44MB floppy drive as the second drive in with the 
5.25" floppy drive in the FD-502 disk box. That way I could use the 
Tandy 1100FD laptop I had (which had the 1200 baud modem) to go on the 
BBSs and download CoCo/OS-9 stuff and then easily read it off the disk.



and then I went to DOS and Windows. That to me was a step down until
Slackware came along. Then Red Hat, then Mandrake ('scuze me...er...
Mandriva), then Mint, Then Solyd, now full on Debian. I only used
Ubuntu as a web server at work and in test VMs. Oh, and there was a
stint in there somewhere where I was dabbling on a real-life Unix
system.


We had an AT 3b2 in between motherboard fires for a network message
system for about 3 years, replaced by a pdp-11/23. It also was a major
pita, crashing for no reason and dec's incompetant service techs
replaced everything in it except the frame rail with the serial number
on it. I finally cajoled the network tech at CBS into trading my machine
for his test mule.  Worked fine, but my machine he then had was
worthless as a test mule, so we got, as did all the affiliates, at CBS
expense, an industrial IBM with an ARTIC card that actually did all the
work.  That, once I had edited the sat table, worked well until a newby
tech dialed into it one day and helpfully fixed my tables. Took me about
3 days of waving a 7 meter dish around to find all the birds again. That
got the phone line unplugged unless they called me ahead of time. Most
of its data by then was sent over the teletex path in the ntsc vertical
interval.  I was the CE at that tv station for the last 18 years I
worked. I had found my nitch.  And it was a good one, getting raises I
didn't have to ask for, so I was making about $15k a year more than any
other similar market sized station could afford.


Sweet job! I been working for a small mom & pop web hosting company for 
the nearly 15 years. Very easy stuff, actually, as I don't have much to 
do overall (boss is very laid back and also likes to do plenty of stuff 
himself). Before that I worked in electronic assembly jobs. Got out of 
that mostly due to chemicals, and non-OSHA-compliant companies getting 
away with (slow) murder. I think it was then that I decided to pursue a 
career in programming.



My ISP back in the day had "shell accounts" and a wizard (RIP)
who worked there took me under his wing and taught me how to use it
and saved my sorry butt when I screwed up. :)

The VERY FIRST computer I ever used was a teletype terminal on a DEC
Rainbow (TeleWriter) at the Jr. High School. I was one year too young
to technically be allowed to use it but they let me anyway. Only a few
whiz kids were allowed on it. Me? I couldn't do a damn thing with it
so gave up. :-/ Then I started tinkering with the Bell & Howell and
Apple Computers at the school. I think that came after I bugged my
parents for a computer and they came home from Radio Shack with a
Trash-80 Model III with 4K RAM, cassette interface (later CGP-115 4"
roll paper 4-color plotter).


I

Re: Arduino and Python or gcc compiler?

2018-07-22 Thread cyaiplexys

On 07/22/2018 06:20 AM, deloptes wrote:

cyaiplexys wrote:


Well, since I use Debian I assumed this would be a place to ask what to
get from the Debian repo that would help in achieving my goal. But you
do make a good point. I'll have to find some Arduino forums to ask some
questions in because I'm quite sure I'll have a lot of them.


Sure Arduino forums will be useful when you have specific Arduino questions.
Related to debian you have this page
https://wiki.debian.org/Arduino
It looks like it gives you the connection to the arduino board /dev/ttyACM0.

Next CPUs - IMO you definitely need to know for which CPU you develop code
https://www.arduino.cc/en/Products/Compare
but it could be that the IDE hides this.

Salt it with some background knowledge
https://www.arduino.cc/en/Tutorial/Foundations

It is not a one day exercise, but it may be fun.

>

I did AVR for a hobby. I bought few types of AVR chips a dev board, that I
had to soldier myself and a programmer (total cost ~ €25,-). It took me
some time to understand how the programmer is to be used with the board and
how it is intended to work on linux. I guess it was two weekends that I
spent reading and trying. Finally Enlightment was there and voila, I can
write, compile, flash and run the MCs. Altogether it spanned over 8 months
because of job and family. I think the total time spent was about 1 month
though.
So it depends on your level and skill. It might take months or hours, but at
the end you will be an expert.


When I get into these things, it might take me a few months to maybe 
even years to learn something new fully. And some things only take a 
weekend. Depends on what skills one needs to get going with it. I have 
35+ years programming experience in many different languages, and 
tinkered in electronics even as young as age 7. But the thing is, while 
I learned the basics (and when Google came around, Googled for stuff I 
didn't know that I needed to apply to a project), and even took a couple 
online courses in programming, I find it's a matter of use it or lose 
it. If I don't use it regularly (like I do with PHP, HTML, CSS, Perl, 
and Python in my job), then I tend to forget almost all I learned and 
kinda end up Googling for help with everything or looking up my code 
snippets and notes.


But at the same time, I enjoy tinkering with stuff, even if I might 
forget a year or two later. For my own hobbies, I just get curious about 
some of the "new" (I know this stuff has been around awhile) technology 
out there and like to see how it all works.


It might be also worth learning some C. 


I had done some C programming now and then (K & R C, ANSI C, Mix Power 
C, Borland C++, gcc, Visual C) and now anytime I do anything in C, I use 
gcc (and also valgrind, autotools, and I forgot what else I use but I 
use Kate for my editor for nearly everything and compile at command 
line). I still struggle with C because I don't use it much. However, I 
use a lot of stuff that has a similar structure to C such as perl and 
PHP. Funny thing is, I also learned Java but almost never use it!



I am not sure how python compiles low level code, but I guess it

> comes with overhead.

Python is a scripting language so natively it doesn't get compiled, 
really. To compile Python code to binary .so for like Python libraries 
(which is NOT required but there are some uses for doing so), I use a 
program called 'cython' (in the debian repos) that converts Python code 
to C code, then uses gcc to compile the resulting C code. Does a decent 
job of it for what I was doing.


> Given the amount of memory available, it might be wise to keep low
> footprint. Also you do not need to know a lot of details. Focus is on
> bitwise operations that are used when working with bits.

I actually haven't done much of that in *years* - since my OS9-Level II 
days. Got to brush up on that now.


> But there are very good examples, so if you have an understanding of
> the concept of C language, it shouldn't be a big challenge.
>
> good luck

Good to know. And thank you for all the really good information. I'm 
saving it for my "list to learn".




Re: Arduino and Python or gcc compiler?

2018-07-22 Thread cyaiplexys

On 07/22/2018 03:26 AM, Joe wrote:

Joe, please forgive me that I forgot to click "Reply to list". I have NO 
valid excuse why I keep doing stupid things like that. :(



On Sat, 21 Jul 2018 18:15:12 -0400
cyaiplexys  wrote:


I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker
with (it's on order as of when I'm writing this post).

I looked in the Debian repos for stuff on Arduino and didn't find
much (at least not of interest to me).

I did download the IDE from Elegoo and their tutorials and libraries.
But it's all in C/C++. While I do know C and C++ (to some extent),
I'm very bad at it (I admit to not using it very much, maybe once
every other blue moon and lately we haven't had any blue moons that
warranted using C).

I recently been doing stuff in Python (especially for work, which is
not Arduino related in any way). I am really getting to like Python.
I have created my own Python Libraries for other things (again
unrelated) and even compiled them to .so (binary) using the 'cython'
compiler.

While I could create C source of a Python script using cython, I
don't know how to compile the resulting C source and upload it to the
Arduino board. I would like to use gcc.

Is there a cross-platform compiler for Arduino and gcc that anyone
has had experience with that works or they can recommend?

Or some way to program in Python?




Sure if I was going there I wouldn't be after starting from here...

I've seen your later post, and you may indeed be overestimating what
the Arduino can do, it's basically a very well developed ecosystem for
a microcontroller, with lots of real-world interfaces available. Just
for tinkering with electronics, it's fine.

If you're after a more powerful (i.e. PC-like) tinkering gadget, you
might be better looking at the Raspberry Pi (Pi for Python) and the
subsequent similar devices. More expensive than the Arduino, but still
pretty cheap. The Pi runs more than one OS, but the Raspbian version of
Debian is probably most widely-used. The Pi also has a great many
interface devices available, and Python is the expected scripting
language.


I will probably end up with one of those sooner or later. A friend as a 
Pi (I thought Pi meant 3.14...)


I keep hearing about Arduino and Raspberry Pi and always wondered what 
they were all about. So I chose to experiment with Arduino first. I know 
*nothing* about either at the moment. Still in the learning, Googling, 
asking stupid questions, etc. phase. :)


I think my mindset also came from my days of trying to program the 
WowWee RoboSapien RS Media (ARM/Linux with Java). That was like a fully 
programmable computer and robot all in one.


I don't mind using C, but am pretty bad at it. Maybe this is the time to 
finally get better at it.




Re: Arduino and Python or gcc compiler?

2018-07-21 Thread cyaiplexys

On 07/21/2018 09:01 PM, David Christensen wrote:

On 07/21/18 15:15, cyaiplexys wrote:
I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker 
with (it's on order as of when I'm writing this post).


I looked in the Debian repos for stuff on Arduino and didn't find much 
(at least not of interest to me).


I did download the IDE from Elegoo and their tutorials and libraries. 
But it's all in C/C++. While I do know C and C++ (to some extent), I'm 
very bad at it (I admit to not using it very much, maybe once every 
other blue moon and lately we haven't had any blue moons that 
warranted using C).


I recently been doing stuff in Python (especially for work, which is 
not Arduino related in any way). I am really getting to like Python. I 
have created my own Python Libraries for other things (again 
unrelated) and even compiled them to .so (binary) using the 'cython' 
compiler.


While I could create C source of a Python script using cython, I don't 
know how to compile the resulting C source and upload it to the 
Arduino board. I would like to use gcc.


Is there a cross-platform compiler for Arduino and gcc that anyone has 
had experience with that works or they can recommend?


Or some way to program in Python?

I'll use C/C++ until I can figure the Python stuff out. But I really 
would like to be able to use Python at some point.


It sounds like your intended use is as a hobbyist (?).


Yes. I heard about it and got curious. I liked tinkering with 
electronics back in the day and kinda wondered what this is about. It's 
just basically for my own fun. I don't expect to make something the 
world can't live without or anything like that.



STFW for Arduino Uno R3: >
https://store.arduino.cc/arduino-uno-rev3

Microcontroller ATmega328P

Flash Memory 32 KB (ATmega328P) of which 0.5 KB used by bootloader

SRAM 2 KB (ATmega328P)

EEPROM 1 KB (ATmega328P)

Clock Speed 16 MHz



STFW for the CPU:

http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf 



The Atmel® picoPower® ATmega328/P is a low-power CMOS 8-bit
microcontroller based on the AVR® enhanced RISC architecture.

STFW for embedded Python:

https://www.usenix.org/system/files/conference/atc12/atc12-final30.pdf

This  paper  presents  one  mechanism  for  doing  so:
an  efficient  embedded  Python  run-time  system  named
Owl. The Owl system is a complete Python development
toolchain and run-time system for microcontrollers that
do not have enough resources to run a real operating sys-
tem, but are still capable of running sophisticated soft-
ware systems.  These microcontrollers typically operate
at 50–100 MHz, have 64–128 KB of SRAM, and have
up  to  512  KB  of  on-chip  flash.


Note that the frequency, RAM, and ROM requirements for embedded Python 
exceed what is provided by the Arduino Uno.  So, that explains why I 
also find no solutions for Python on the Arduino Uno R3.



If you want an embedded kit that can do Python (2 or 3?), your best bet 
is to get a kit that supports Python OOTB:


https://wiki.python.org/moin/EmbeddedPython


Getting a kit that supports Linux OOTB would give you even more options:

https://www.linux.com/news/top-10-open-source-linux-boards-under-200


Lots of info there. Well, glad it's possible. Looks like it'll take some 
doing though. Obviously there won't be anything in Debian's Repo for it 
like I hoped.


Thank you for giving me some ideas on what to look for. That'll keep me 
busy for awhile!




Re: Arduino and Python or gcc compiler?

2018-07-21 Thread cyaiplexys

On 07/21/2018 07:36 PM, deloptes wrote:

Hi, how old are you?
The way you wrote is supposing you are New Gen kid.


Why thank you! :) Actually, physically I'm over half a century old. I 
just try to keep a young mind. I'm a New Gen kid to all this new tech 
stuff though.



Anyway few answers inline

cyaiplexys wrote:


I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker
with (it's on order as of when I'm writing this post).

I looked in the Debian repos for stuff on Arduino and didn't find much
(at least not of interest to me).



What did you expect to find exactly?


*gulp* Python libraries? Cython compiler for the Arduino CPU?

When I wrote this I didn't know exactly what I'm getting into. I heard 
of Arduino and had the impression it's an ARM or ARM-type processor on a 
board and you can interact with your electronic circuits you build with 
it and a computer. After writing the post I went and looked up some 
YouTube tutorials for beginners. I probably should have done that first 
before inserting foot in mouth. :-/



I did download the IDE from Elegoo and their tutorials and libraries.
But it's all in C/C++. While I do know C and C++ (to some extent), I'm
very bad at it (I admit to not using it very much, maybe once every
other blue moon and lately we haven't had any blue moons that warranted
using C).



Well for low level programming mostly C is used actually.
New things to learn -> write a list with dependencies and priorities.

:

More to learn -> add to the list
I did not have a look at Arduino but played with AVR chip programming, so
sure there is for Arduino as well.


I'll remain hopeful. I'm going to have a long list of things I'll want 
to learn.



Or some way to program in Python?

I'll use C/C++ until I can figure the Python stuff out. But I really
would like to be able to use Python at some point.


Finally you are on the wrong user list. This is general debian user list and
we discuss only debian related questions.
IMO Arduino and related should be somewhere else.


Well, since I use Debian I assumed this would be a place to ask what to 
get from the Debian repo that would help in achieving my goal. But you 
do make a good point. I'll have to find some Arduino forums to ask some 
questions in because I'm quite sure I'll have a lot of them.




Arduino and Python or gcc compiler?

2018-07-21 Thread cyaiplexys
I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker 
with (it's on order as of when I'm writing this post).


I looked in the Debian repos for stuff on Arduino and didn't find much 
(at least not of interest to me).


I did download the IDE from Elegoo and their tutorials and libraries. 
But it's all in C/C++. While I do know C and C++ (to some extent), I'm 
very bad at it (I admit to not using it very much, maybe once every 
other blue moon and lately we haven't had any blue moons that warranted 
using C).


I recently been doing stuff in Python (especially for work, which is not 
Arduino related in any way). I am really getting to like Python. I have 
created my own Python Libraries for other things (again unrelated) and 
even compiled them to .so (binary) using the 'cython' compiler.


While I could create C source of a Python script using cython, I don't 
know how to compile the resulting C source and upload it to the Arduino 
board. I would like to use gcc.


Is there a cross-platform compiler for Arduino and gcc that anyone has 
had experience with that works or they can recommend?


Or some way to program in Python?

I'll use C/C++ until I can figure the Python stuff out. But I really 
would like to be able to use Python at some point.





Re: Re: If not "newbie" then ????

2018-07-21 Thread cyaiplexys

On 07/21/2018 12:20 PM, Gene Heskett wrote:

On Saturday 21 July 2018 11:42:31 Richard Owlett wrote:


When I'm "ignorant" and know it, I refer to myself as a "newbie".
My first contact with Linux was when Squeeze was just introduced.
I've been around computers for a while [remember 12AX7 based CPU's?].


No, but I recall seeing, in Iowa City in the very early 1950's, a bit of
a monster that had 12,000 12AU7's in it.  Used at the time to grade the
Iowa tests, the same one I had taken in school and got a quite high
score on. They had rigged a Harris Stream fed printing press with a
photocell at every mark location on the paper and were calculating the
scores from that.


As a BSEE student 50+ years ago I took an introductory programming
course. Later I programmed in 8080 assembler - at the time we were
moving to 8085. As a consumer I ended up in the M$ land.


I started with the rca 1802. Still an interesting architecture, one that
was able to function in several rads a minute of atomic radiation. But I
tried the z-80, found it wanting, then the 6809 which put me firmly on a
unix like path, and to this day I still don't have a winders box on the
premises. Quite a few linux machines though.


OS-9 Level II on a CoCo 3 by any chance? I had one of those systems and 
then I went to DOS and Windows. That to me was a step down until 
Slackware came along. Then Red Hat, then Mandrake ('scuze me...er... 
Mandriva), then Mint, Then Solyd, now full on Debian. I only used Ubuntu 
as a web server at work and in test VMs. Oh, and there was a stint in 
there somewhere where I was dabbling on a real-life Unix system. My ISP 
back in the day had "shell accounts" and a wizard (RIP) who worked there 
took me under his wing and taught me how to use it and saved my sorry 
butt when I screwed up. :)


The VERY FIRST computer I ever used was a teletype terminal on a DEC 
Rainbow (TeleWriter) at the Jr. High School. I was one year too young to 
technically be allowed to use it but they let me anyway. Only a few whiz 
kids were allowed on it. Me? I couldn't do a damn thing with it so gave 
up. :-/ Then I started tinkering with the Bell & Howell and Apple 
Computers at the school. I think that came after I bugged my parents for 
a computer and they came home from Radio Shack with a Trash-80 Model III 
with 4K RAM, cassette interface (later CGP-115 4" roll paper 4-color 
plotter). They never put disk drives in the thing. I spent HOURS 
programming stuff and got good enough to do labels for my dad's business 
and title screens for family videos (VHS - my dad would record the 
screen, and tape-splice VHS tapes). From there they gave me a Trash-80 
(called "Tandy" by then) PC-4 pocket computer. When I got a job I got a 
Tandy CoCo 3 and OS-9 Level II and let's just say that was the beginning 
of everything Unix-like for me. Though it was more a VAX/Unix blend I 
think. And Basic09 was more a Pascal/Basic blend.



And I'm still a new bee...  But a fading one due to the age of the wet
ram now.


I'm also a bee of some kind. Probably a drone or worker bee. I'll always 
be a bee of some kind though. I often find myself getting sidetracked 
and wanting to learn new things, not realizing just how old I got already!



So, how would this group have me to refer to myself without claiming
competency I just *DO NOT* have?

P.S. I've saved ~6 years of useful posts from this group. I've been
trying to figure out how to organize it in order to create a QWSBFA
rather than a FAQ. QWSBFA=="Questions Which Should Be Frequently
Asked" ;/



That sounds like a heck of a usefull project.


OWL ducks fer cover ;}

If you find a good cover, see if there's room for me too.


And me too, along with a good flame-retardant suit and a nice, cozy rock 
to hide under. ;->


That's the one cool thing about this group and groups like it is the 
conversations where you learn a little bit about those folks in the 
group in between learning other useful things. Reminds me of the old 
FidoNet days (and later newsgroup days - do they still even have either 
anymore??)


---
TAGLINE: "Wait-a-minit. Almonds don't have legs."



Re: If not "newbie" then ????

2018-07-21 Thread cyaiplexys

On 07/21/2018 11:42 AM, Richard Owlett wrote:

When I'm "ignorant" and know it, I refer to myself as a "newbie".
My first contact with Linux was when Squeeze was just introduced.
I've been around computers for a while [remember 12AX7 based CPU's?]. As 
a BSEE student 50+ years ago I took an introductory programming course. 
Later I programmed in 8080 assembler - at the time we were moving to 
8085. As a consumer I ended up in the M$ land.


So, how would this group have me to refer to myself without claiming 
competency I just *DO NOT* have?


Wizard. With that many years of experience in computers in general, I 
think you earned at least that much. Actually, IMHO the answer should be 
"Whatever the hell you want to call yourself." :) IOW, it's entirely up 
to you.


If you are trying to find a label that everyone can understand you by, 
well, I don't know if labels really work that well since many people 
have many views on what a certain label even means.


What I do is try to briefly mention (if it's even necessary) that I have 
a lot of experience using Linux but am stumped on a certain problem as I 
don't often deal with that situation. No harm in that, I think. After 
all, Linux stuff is so vast that not everyone can know every single 
thing about it. Thus why we have these groups. :)


I've been programming for 35+ years myself. And been there when dial-up 
BBSs were a thing (I am sure you remember those) even before there was 
such a thing as "Internet".


P.S. I've saved ~6 years of useful posts from this group. I've been 
trying to figure out how to organize it in order to create a QWSBFA 
rather than a FAQ. QWSBFA=="Questions Which Should Be Frequently Asked" ;/


OWL ducks fer cover ;}


I assume you mean for your own computer (since anyone can use Google to 
search the lists).


Try CherryTree. I use that program for everything. It's cross-platform. 
I download it from the web site instead of using the version in the 
Debian Repo as the latest version fixes some annoying bugs (of which I 
kinda forgot what but would quickly be reminded if I used the repo version).


I think that would be useful for categorizing questions and you can even 
search through them. If you want to save to PDF or HTML, it can export 
to those formats as well.


I've used CherryTree for everything from keeping code snippets to 
installation instructions to writing up tutorials (and exporting to HTML).






Re: Separate /home directories etc?

2018-07-11 Thread cyaiplexys

On 07/11/2018 01:10 AM, debian-user-digest-requ...@lists.debian.org wrote:

On 7/10/18 3:28 AM, Jonathan Dowland wrote:

On Fri, Jul 06, 2018 at 04:54:53PM -0400, Matthew Crews wrote:

Separate partitions
Pros: if your / partition drive fails, it does not take /home with it

You are conflating drives and partitions, here. Both partitions could be
on the same physical drive, and a drive failure would affect both in
that case.



True, the main reason you would want /home to be in a separate partition
is to put it on a separate physical drive. However, random file system
corruption could still theoretically take out the / partition without
actually damaging the device. In that case, /home being separate would
spare your data.

Another reason you would want a separate /home partition is to use a
separate file system. For example, you could run / as BTRFS, while /home
would be XFS or ext4.


Reminds me back in the day long ago when I used to dual-boot Windows and 
Linux. I had a /data partition (not /home) where I had formatted it 
NTFS. And that is where I put data I wanted to share between the two 
Operating Systems.




Re: Separate /home directories etc?

2018-07-07 Thread cyaiplexys

On 07/06/2018 07:40 PM, ntrfug wrote:

On Fri, 6 Jul 2018 15:47:37 -0500
Richard Owlett  wrote:


In response to a unrelated post to a LUG, I was asked if I had a
separate /home directory. Short answer -- no.

I abandoned WinXP when Jessie had become stable.
The installer defaults {I assume for cause} to putting every thing on
one partition/directory.

Where may I read about pros/cons ?
TIA



The home directory contains not only "personal data" but configuration
directories for all your apps.

I long ago settled on a middle-of-the-road solution--I have a partition
mounted on /home/ntrfug/files which contains all my "data" such as
email, photos, documents, non-distribution software, bank statements,
etc. I've been doing this for ~20 years and I still like it. I can
reinstall nuking the home directory to take advantage of updated
configurations but still keep my word processing documents, email, and
general umm, stuff.



New here. But not new to Linux. Been using Linux for a over 5 years as 
my main OS (and a good many years before that as dual-boot).


I too have went to a different solution than having a separate /home 
directory.


I used to have a separate /home directory back in the day. But I 
realized that anytime I wanted to reinstall or redo my system (upgrade 
major version seems to work better on a fresh install on my systems), I 
would have problems with some apps due to old and outdated 
configurations in my /home directory. So every time I went to do a 
(re)install, I ended up wiping the /home directory anyway (after backing 
up my data which I never had much of).


Now that I use laptops, I NEVER keep a lot of personal data on my hard 
drive. I keep only a few things needed daily or for work. But when I 
have done everything I need to for the day, I back up the data 
redundantly off the hard drive. This has come in handy numerous times 
when my main laptop died out or something went wrong where it was down 
for awhile. I just load the data onto the other laptop. That other one I 
don't keep any data on it since data changes and it would be a PITA to 
go lug it out and update that one as well with my personal data. USB 
sticks for data is easier to carry from one machine to another. I also 
keep an encrypted copy of my backups on the cloud at the same time I 
update my regular off-computer backups.


This means that I don't have to worry about data loss in case of theft, 
or hardware failure, and I can use any machine I need to. And if I 
upgrade or update, I don't have to worry about old configuration file 
formats needing to be overwritten or conflicting with newer versions of 
the programs.


I really don't have a lot of data either. My /home directory is only me 
and only around 66 GB. The majority of that is configuration files 
though. My actual personal data is around 2GB total.


In addition, I've written a python script to auto-install all my data so 
putting everything back on doesn't take long or much effort.


Frequent backups ensure I'll always have my data no matter what. And so 
this kinda removed my need for a separate /home directory.