[Dorset] Wolves Talk: John Alexander - Making Hardware Work, -02-10.

2021-02-06 Thread Ralph Corderoy
Hi,

The Wolverhampton LUG is holding talks online and has invited anyone
else from other LUGs to attend if they're interested.  I'll pass the
details of the first one on, but for others it's probably best to follow
Wolves LUG yourself if interested.  https://wolveslug.org.uk

--- Forwarded Message

From: Adam Sweet
Date: Sat, 6 Feb 2021 14:46:43 +
Message-ID: 

Hi guys

Since there were no objections to my posting this here and one
suggestion that I should, details for our inaugural monthly talk below.
Please adapt and share as you see fit for your list.

John Alexander will be giving a talk on the evening of 10th Feb
entitled:

Making it work - how to break incompatibility and dependency hell for
your hardware without mashing your desktop.

This will be an overview of Linux features you can use to get awkward,
custom or unusual hardware working without destroying your system or
descending into madness.

John is a regular with the Wolves, Shropshire, Birmingham and NoVa LUGs
with an interest in Linux, amateur radio, satellites, hardware hacking
and *attending all the LUGs*.

Please share it with any other relevant groups and on your  to help us bootstrap an
audience for future events.

We had planned to use Jitsi but since we're opening this out to a wider
audience we've fallen back on Zoom. Sorry if that cuts anyone out.

Date:Meeting starts at 19:30 GMT, Weds 10th February.
 The talk will start around 20:30.
Location:https://us02web.zoom.us/j/89432551454
Meeting ID:  894 3255 1454

No password required for this but guests will need to wait in the
virtual lobby before being allowed in.

There's a Meetup link here if people want to say they're coming:
https://www.meetup.com/novalug/events/276191485/

Regards,

Adam Sweet
Wolves LUG

--- End of Forwarded Message

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Microsoft on Raspberry Pi

2021-02-06 Thread Andrew
Possibly not. I haven't upgraded as the one program I use on that 
machine doesn't have a package for Raspbian Buster.
Looks like there might be an Ubuntu PPA for it though, so I'll have to 
give that a go at some point.

Ubuntu Server 64-bit will run perfectly with 1 GB RAM, right?

--

Andrew.


On 06/02/2021 16:08, Hamish McIntyre-Bhatty wrote:

Is Raspbian stretch still supported?

Last I heard they don't really support anything except the latest
version of Raspbian.



--
 Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Terry Coles
On Saturday, 6 February 2021 16:05:19 GMT Ralph Corderoy wrote:
> The web version has a chapter on deploying to Ubuntu Linux, which is
> similar to Debian and thus Raspbian, and then touches on the Pi and its
> Raspbian at the end.
> https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvii-deplo
> yment-on-linux

I'll look into that.

> I would expect these would be readable by ‘other’ because Python is
> system wide and the page you're following uses ‘sudo pip3 install flask
> uwsgi’ which again looks like it is available to all users by being run
> as root.

Yes.  However, when I was developing the Flask App and testing it with the 
Flask Development Server, I wasn't installing Python Modules using pip3 sudo.

> You're configuring the server and thus your Python code to run as user
> www-data and group www-data.  Consider if a process with that user and
> group can access your ‘html’ directory and read files within it.
> If not, does ‘other’ need to be given r-x on the directories and r-- on
> the files?  You can test this a bit with
> 
> sudo su -g www-data www-data -c 'wc foo.py'
> 
> which will try and read foo.py as that user and group.
> 
> It depends how locked down you're trying to make access to the Python
> source.  I suspect not very, so www-data being classed as ‘other’ for
> searching and reading could be fine.
> https://en.wikipedia.org/wiki/File-system_permissions#Permissions

Thanks.  I'll look into this too.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] HP Printers and Flash

2021-02-06 Thread Terry Coles
On Saturday, 6 February 2021 16:06:53 GMT Hamish McIntyre-Bhatty wrote:
> I actually didn't know there was a web interface. Do I need to do
> anything to secure that?

In the long term you probably will probably need to give it a fixed IP address, 
but initially just point your browser at the IP Address that it has been 
allocated by your router's DHCP server.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Microsoft on Raspberry Pi

2021-02-06 Thread Hamish McIntyre-Bhatty
Is Raspbian stretch still supported?

Last I heard they don't really support anything except the latest
version of Raspbian.

Hamish

On 06/02/2021 15:17, Andrew wrote:
> I can confirm that this problem does exist with Raspbian Buster, even
> on the lite version:
>
> Preparing to unpack .../14-raspberrypi-sys-mods_20210125_armhf.deb ...
> Unpacking raspberrypi-sys-mods (20210125) over (20201026) ...
> Setting up raspberrypi-sys-mods (20210125) ...
> Adding vscode repo...
>
>
> $ cat /etc/apt/sources.list.d/vscode.list
> ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
> # You may comment out this entry, but any other modifications may be
> lost.
> deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code
> stable main
>
> /etc/apt/trusted.gpg.d/microsoft.gpg got created.
>
> The problem doesn't seem to exist on Raspbian Stretch, at least not yet.
>
> Microsoft bought GitHub. Or "Microsoft GitHub" as it should be called
> now. I don't think they can buy Git its self as it is open-source
> software.
>


signature.asc
Description: OpenPGP digital signature
-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] HP Printers and Flash

2021-02-06 Thread Hamish McIntyre-Bhatty
I actually didn't know there was a web interface. Do I need to do
anything to secure that?

Hamish

On 06/02/2021 11:09, Tim wrote:
> I am using a Laser jet Pro M277 (Scanner copier printer) and it loads
> the web interface for me OK.
>
>
> Tim H
>
> On 06/02/2021 10:59, Hamish McIntyre-Bhatty wrote:
>> Not for me at least - HPLIP-GUI is Qt based and works with CUPS, not had
>> any issues.
>>
>> Hamish
>>
>> On 06/02/2021 10:57, PeterMerchant wrote:
>>> In a discussion with friends yesterday, they discussed the problems of
>>> communicating with HP printers from W10 now that Flash has been
>>> killed, because apparently HP drivers use it.  Is this a problem from
>>> Linux? I expect not, but if I come across a printer it would be good
>>> to know.
>>>
>>> Peter
>>>
>>>
>>>


signature.asc
Description: OpenPGP digital signature
-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Ralph Corderoy
Hi Terry,

> I used sudo chown -hR www-data:www-data: /home/pi/html/

So unless ‘other’ has permission to write to directories, etc., user pi
will find it awkward to update that area, as you found.

> > Understand the aim: your web-server Python code will be running as
> > user and group www-data so the user, group, and permissions of what
> > it needs to access have to be compatible.
>
> I think I understood that; see above.  The question I had was how do
> I get the needed python modules accessible to the running code?

First determine if they're not accessible...

> When you say scrapping it all; do you mean starting from scratch and
> NOT following the instructions in the link I gave.  The problem is
> that I would still need some guidance from somewhere on how to deploy
> my Flask App under nginx.

No, sorry, I mean stick with that for installing nginx, etc., and
pointing it at a /home/pi directory which holds your server's code.
Just don't mess with the default permissions on the new directory it
creates as it doesn't explain why and isn't clear on what it's doing.

> Various text books and web tutorials talk about this, but they tend to
> be specific to the things they are interested in (Miguel Grinberg's
> book majors on deploying into the cloud and in particular AWS).

The web version has a chapter on deploying to Ubuntu Linux, which is
similar to Debian and thus Raspbian, and then touches on the Pi and its
Raspbian at the end.
https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvii-deployment-on-linux

> > Your Python source code needs to be readable to nginx and its
> > children so it can be opened and read to be interpreted by Python
> > and run.  What other I/O to local disk does your program do?  If you
> > don't change anything from the defaults, what doesn't work?
>
> Apart from importing a number of flask and python modules

I would expect these would be readable by ‘other’ because Python is
system wide and the page you're following uses ‘sudo pip3 install flask
uwsgi’ which again looks like it is available to all users by being run
as root.

> the main external I/O is to write to a logs directory which is outside
> the html directory at /home/ pi/logs.  I'll be looking into that.

You're configuring the server and thus your Python code to run as user
www-data and group www-data.  Consider if a process with that user and
group can access your ‘html’ directory and read files within it.
If not, does ‘other’ need to be given r-x on the directories and r-- on
the files?  You can test this a bit with

sudo su -g www-data www-data -c 'wc foo.py'

which will try and read foo.py as that user and group.

It depends how locked down you're trying to make access to the Python
source.  I suspect not very, so www-data being classed as ‘other’ for
searching and reading could be fine.
https://en.wikipedia.org/wiki/File-system_permissions#Permissions

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Microsoft on Raspberry Pi

2021-02-06 Thread Ralph Corderoy
Hi Andrew,

> deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable 
> main

https://github.com/VSCodium/vscodium#why looks relevant and interesting.
I think they ship binaries.
https://github.com/VSCodium/vscodium/releases

I'm surprised Debian doesn't do something similar to provide their own
build to give users the choice.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Router Wifi configs

2021-02-06 Thread Andrew
The SSID/key can be the same on any/all WLAN bands. (There's 60 GHz too 
now, apparently.)
All the wireless networks I deal with have the same SSID and key on 2.4 
GHz and 5 GHz. This includes a place with more than 10 WAPs all on the 
same network.


Old WLAN devices did have problems handing off to a different access 
point with the same SSID, but that was years ago, before 5 GHz existed.


As Ralph said, having the same SSID and key on 2.4 GHz and 5 GHz allows 
band steering. This appears to usually mean that the access point will 
get wireless clients to prefer 5 GHz as there is more bandwidth there 
and the signals generally travel less far, which means greater frequency 
re-use and more bandwidth for everyone.


I would assume that when 60 GHz devices become popular, band steering 
will prefer 60 GHz as the bandwidth there is huge, and the coverage is 
in the region of 10 metres.


I've also got a few WAPs set up with 2.4 GHz and 5 GHz using both WPA2 
and WPA3, all on the same SSID and key. That seems to work fine too.


--

Andrew.


--
 Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Microsoft on Raspberry Pi

2021-02-06 Thread Andrew
I can confirm that this problem does exist with Raspbian Buster, even on 
the lite version:


Preparing to unpack .../14-raspberrypi-sys-mods_20210125_armhf.deb ...
Unpacking raspberrypi-sys-mods (20210125) over (20201026) ...
Setting up raspberrypi-sys-mods (20210125) ...
Adding vscode repo...


$ cat /etc/apt/sources.list.d/vscode.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code 
stable main


/etc/apt/trusted.gpg.d/microsoft.gpg got created.

The problem doesn't seem to exist on Raspbian Stretch, at least not yet.

Microsoft bought GitHub. Or "Microsoft GitHub" as it should be called 
now. I don't think they can buy Git its self as it is open-source software.


--

Andrew.


--
 Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Ralph Corderoy
Hi Terry,

> I've always thought of remotes as being something like GitLab.

No, it just means repositories which aren't this one which have branches
you want to track.  A remote can be on the same machine in a nearby
directory.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Terry Coles
On Saturday, 6 February 2021 14:38:56 GMT Ralph Corderoy wrote:
> Why not git-push(1) on the PC to Pi.  Or git-pull(1) on the Pi from the
> PC.  GitLab need not be the only remote repository.
> https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes

I'll look into that.  I've always thought of remotes as being something like 
GitLab.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Ralph Corderoy
Hi Hamish,

Hamish wrote:
> Maybe you could set up a VM for testing locally, and then deploy
> production versions via gitlab?
>
> Or use a testing branch and the merge to master once all is done and
> tested.

In reply to Terry:
> > The problem with that is that I would need to push intermediate
> > versions from my desktop to GitLab or do or my development directly
> > on the Pi.

Why not git-push(1) on the PC to Pi.  Or git-pull(1) on the Pi from the
PC.  GitLab need not be the only remote repository.
https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Terry Coles
On Saturday, 6 February 2021 13:45:35 GMT Ralph Corderoy wrote:
> That's confused.  It claims to be setting ‘its group owner’ but uses
> chown(1) which changes the owner.  chgrp(1) would change the group.
> There is no such thing as a ‘group owner’ so what was intended and why?

If you don't know, I certainly don't :-)
 
> How?  Knowing the command would help spot problems.

I used sudo chown -hR www-data:www-data: /home/pi/html/

This moved the directory and all its contents into the www-data group and 
owned by www-data.

> That suggests the permissions like read, write and execute, don't marry
> with the user and group of the process which is making the accesses,
> i.e. nginx and its offspring.  The group, for example, can't just be
> changed without considering those as they work in concert.

Well I assumed that the reason for the group and ownership change was related 
to allowing nginx proper access.  I also assumed that the problems came about 
because the python modules that the Flask App was trying to load were 
inaccessible to code running under the ownership of the www-data group.

> Understand the aim: your web-server Python code will be running as user
> and group www-data so the user, group, and permissions of what it needs
> to access have to be compatible.

I think I understood that; see above.  The question I had was how do I get the 
needed python modules accessible to the running code?

> You seem to be piling wrong things up instead of scrapping it all and
> working out what's required, if anything, different from user pi's
> default permissions based on its umask.

When you say scrapping it all; do you mean starting from scratch and NOT 
following the instructions in the link I gave.  The problem is that I would 
still need some guidance from somewhere on how to deploy my Flask App under 
nginx.

Various text books and web tutorials talk about this, but they tend to be 
specific to the things they are interested in (Miguel Grinberg's book majors on 
deploying into the cloud and in particular AWS).  The Raspberry Pi tutorial 
looked ideal, but I now realise that it is extremely limited because his 
testsite App doesn't actually do anything.  In particular it doesn't import 
any python modules apart from flask itself.

> Your Python source code needs to be readable to nginx and its children
> so it can be opened and read to be interpreted by Python and run.  What
> other I/O to local disk does your program do?  If you don't change
> anything from the defaults, what doesn't work?

Apart from importing a number of flask and python modules the main external I/O 
is to write to a logs directory which is outside the html directory at /home/
pi/logs.  I'll be looking into that.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Microsoft on Raspberry Pi

2021-02-06 Thread Keith Edmunds
On Sat, 6 Feb 2021 10:54:41 +, petermerch...@hotmail.com said:

> Of course I am aware that M$ now owns Git, and this seems to me to be
> underhanded extending their reach.

Microsoft does not own git.

Do we have to refer to "Microsoft" as "M$"? Seems unnecessary.
-- 
Linux Tips: https://www.tiger-computing.co.uk/category/techtips/

-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Hamish MB
Hmm,

Maybe you could set up a VM for testing locally, and then deploy production 
versions via gitlab?

Or use a testing branch and the merge to master once all is done and tested.

Hamish
On 6 Feb 2021, at 13:19, Terry Coles 
mailto:d-...@hadrian-way.co.uk>> wrote:

On Saturday, 6 February 2021 13:02:14 GMT Hamish MB wrote:
 Best to set it up so you can just use git pull I imagine, if possible

The problem with that is that I would need to push intermediate versions from
my desktop to GitLab or do or my development directly on the Pi.

I prefer to do the initial work on the code using Thonny on my desktop because
I find that it gives me better visibility of the errors that can be detected
before deployment.  (That's not to say that I can't get the same information
from the shell, it's just that I find it easier to interpret in Thonny.)  Once
I have a version that passes those tests, I scp it to the Pi and only push the
code when I reach a point where the code is running without error (maybe with
missing functionality but no bugs).

BTW.  I have realised that if I scp the file(s) to /home/pi/ and then sudo cp
them to /home/pi/html, they take on the www-data ownership and I don't need to
do the extra chown.  I can live with that.
-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Ralph Corderoy
Hi Terry,

> > Can anyone suggest a way forward with this issue.  My Flask code has
> > been working well while I've been testing it using the Flask
> > Development Server, so I decided to deploy it on nginx.  To do this
> > I followed the Tutorial at:
> >
> > https://www.raspberrypi-spy.co.uk/2018/12/running-flask-under-nginx-raspberry-pi/

That's not a tutorial.  It's a ‘paste this’.  :-)

> > In Step 4 of this, the user is instructed to change the group owner
> > of the Flask App to www-data.

Not quite.

Create an example Flask app by first creating a folder called
“flasktest” :

mkdir flasktest

and setting its group owner to “www-data” :

sudo chown www-data /home/pi/flasktest

That's confused.  It claims to be setting ‘its group owner’ but uses
chown(1) which changes the owner.  chgrp(1) would change the group.
There is no such thing as a ‘group owner’ so what was intended and why?

> > My main programs are installed in the directory /home/ pi/ and the
> > Flask App is installed into the directory /home/pi/html so I
> > recursively changed everything in html (including html itself) to be
> > in the www-data group.

How?  Knowing the command would help spot problems.

> > This caused all sorts of problems, including not being able to
> > import some of the modules used by the Flask App.

That suggests the permissions like read, write and execute, don't marry
with the user and group of the process which is making the accesses,
i.e. nginx and its offspring.  The group, for example, can't just be
changed without considering those as they work in concert.

> > What do I need to do to get this to work?

Understand the aim: your web-server Python code will be running as user
and group www-data so the user, group, and permissions of what it needs
to access have to be compatible.  Which does not necessarily mean
everything should be www-data:www-data rwxrwxrwx.

> I may have partially solved this.  Since in the Tutorial the
> application directory is created before the App is download directly
> to it using wget, I assume that the contents of the directory will
> inherit the group ownership

That's an incorrect assumption.  New directory entries only take on the
group of the directory rather than the program's effective group if the
‘set-gid’ bit of the directory is set.

$ mkdir d
$ ls -ld d
drwxr-xr-x 2 ralph ralph 4096 Feb  6 13:39 d
$ chmod g+s d
$ ls -ld d
drwxrwsr-x 2 ralph ralph 4096 Feb  6 13:39 d
$

> so I have used chown -hR to change both the owner and group name from
> pi.  It appears to work.
>
> The question I now have, is that what is intended?  Copying updates to
> the html directory becomes a bit problematic, because of permissions
> errors.  I presume that I will have to use sudo to copy updated files
> there and chown to change the ownership from root to www-data.
>
> Or am I totally up the creek?

You seem to be piling wrong things up instead of scrapping it all and
working out what's required, if anything, different from user pi's
default permissions based on its umask.

Your Python source code needs to be readable to nginx and its children
so it can be opened and read to be interpreted by Python and run.  What
other I/O to local disk does your program do?  If you don't change
anything from the defaults, what doesn't work?

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Terry Coles
On Saturday, 6 February 2021 13:02:14 GMT Hamish MB wrote:
> Best to set it up so you can just use git pull I imagine, if possible

The problem with that is that I would need to push intermediate versions from 
my desktop to GitLab or do or my development directly on the Pi.

I prefer to do the initial work on the code using Thonny on my desktop because 
I find that it gives me better visibility of the errors that can be detected 
before deployment.  (That's not to say that I can't get the same information 
from the shell, it's just that I find it easier to interpret in Thonny.)  Once 
I have a version that passes those tests, I scp it to the Pi and only push the 
code when I reach a point where the code is running without error (maybe with 
missing functionality but no bugs).

BTW.  I have realised that if I scp the file(s) to /home/pi/ and then sudo cp 
them to /home/pi/html, they take on the www-data ownership and I don't need to 
do the extra chown.  I can live with that.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Hamish MB
Best to set it up so you can just use git pull I imagine, if possible
On 6 Feb 2021, at 11:40, Terry Coles 
mailto:d-...@hadrian-way.co.uk>> wrote:

On Saturday, 6 February 2021 10:55:23 GMT Terry Coles wrote:
 What do I need to do to get this to work?

I may have partially solved this.  Since in the Tutorial the application
directory is created before the App is download directly to it using wget, I
assume that the contents of the directory will inherit the group ownership, so
I have used chown -hR to change both the owner and group name from pi.  It
appears to work.

The question I now have, is that what is intended?  Copying updates to the
html directory becomes a bit problematic, because of permissions errors.  I
presume that I will have to use sudo to copy updated files there and chown to
change the ownership from root to www-data.

Or am I totally up the creek?
-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Permissions Quandary with nginx

2021-02-06 Thread Terry Coles
On Saturday, 6 February 2021 10:55:23 GMT Terry Coles wrote:
> What do I need to do to get this to work?

I may have partially solved this.  Since in the Tutorial the application 
directory is created before the App is download directly to it using wget, I 
assume that the contents of the directory will inherit the group ownership, so 
I have used chown -hR to change both the owner and group name from pi.  It 
appears to work.

The question I now have, is that what is intended?  Copying updates to the 
html directory becomes a bit problematic, because of permissions errors.  I 
presume that I will have to use sudo to copy updated files there and chown to 
change the ownership from root to www-data.

Or am I totally up the creek?

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Router Wifi configs

2021-02-06 Thread Terry Coles
On Saturday, 6 February 2021 11:01:10 GMT PeterMerchant wrote:
> The question is, in a router that has both 2.4GHz and 5GHz capability,
> should the ESSID/security for these be different, or is it alright to have
> them both the same? Mine are both the same, and I have a computer that
> won't connect to the router.

I think that the SSIDs need to be different, how else can you choose between 
them when you try to connect?

I use a different SSID and Password for each of the three WiFi APs that I have 
here (two on the Router - 2.4GHz and 5GHz) and one on an extender.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] HP Printers and Flash

2021-02-06 Thread Terry Coles
On Saturday, 6 February 2021 11:09:29 GMT Tim wrote:
> I am using a Laser jet Pro M277 (Scanner copier printer) and it loads
> the web interface for me OK.

Both the Browser and HPLIP are working here with my HP OfficeJet Pro 7720.


-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] HP Printers and Flash

2021-02-06 Thread Tim
I am using a Laser jet Pro M277 (Scanner copier printer) and it loads 
the web interface for me OK.



Tim H

On 06/02/2021 10:59, Hamish McIntyre-Bhatty wrote:

Not for me at least - HPLIP-GUI is Qt based and works with CUPS, not had
any issues.

Hamish

On 06/02/2021 10:57, PeterMerchant wrote:

In a discussion with friends yesterday, they discussed the problems of
communicating with HP printers from W10 now that Flash has been
killed, because apparently HP drivers use it.  Is this a problem from
Linux? I expect not, but if I come across a printer it would be good
to know.

Peter




--
 Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] Router Wifi configs

2021-02-06 Thread PeterMerchant

The question is, in a router that has both 2.4GHz and 5GHz capability, should 
the ESSID/security for these be different, or is it alright to have them both 
the same? Mine are both the same, and I have a computer that won't connect to 
the router.

When I first set it up this way, my tablet connected/dropped out/reconnected 
and repeated this, so I changed routers.

Peter.


--
 Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] HP Printers and Flash

2021-02-06 Thread Hamish McIntyre-Bhatty
Not for me at least - HPLIP-GUI is Qt based and works with CUPS, not had
any issues.

Hamish

On 06/02/2021 10:57, PeterMerchant wrote:
> In a discussion with friends yesterday, they discussed the problems of
> communicating with HP printers from W10 now that Flash has been 
> killed, because apparently HP drivers use it.  Is this a problem from
> Linux? I expect not, but if I come across a printer it would be good
> to know.
>
> Peter
>
>


signature.asc
Description: OpenPGP digital signature
-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] HP Printers and Flash

2021-02-06 Thread PeterMerchant

In a discussion with friends yesterday, they discussed the problems of 
communicating with HP printers from W10 now that Flash has been  killed, 
because apparently HP drivers use it.  Is this a problem from Linux? I expect 
not, but if I come across a printer it would be good to know.

Peter


--
 Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] Permissions Quandary with nginx

2021-02-06 Thread Terry Coles
Hi,

Can anyone suggest a way forward with this issue.  My Flask code has been 
working well while I've been testing it using the Flask Development Server, so 
I decided to deploy it on nginx.  To do this I followed the Tutorial at:

https://www.raspberrypi-spy.co.uk/2018/12/running-flask-under-nginx-raspberry-pi/

In Step 4 of this, the user is instructed to change the group owner of the 
Flask App to www-data.  My main programs are installed in the directory /home/
pi/ and the Flask App is installed into the directory /home/pi/html so I 
recursively changed everything in html (including html itself) to be in the 
www-data group.  This caused all sorts of problems, including not being able 
to import some of the modules used by the Flask App.  I am currently running 
the Flask App with group ownership set to Pi while I sort out some of the 
needed functionality.

What do I need to do to get this to work?

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] Microsoft on Raspberry Pi

2021-02-06 Thread PeterMerchant

I came across this article on nixcraft and I wonder if I should be worried 
about it. I am well aware that M$ is becoming more linux friendly(?), but not 
sure that I want them prying into my Pi.


 _Heads up: Microsoft repo secretly installed on all Raspberry Pi’s Linux OS 
_

Raspberry Pi is a little useful computer for learning programming and building 
projects. It comes with Debian Linux based modified operating system called 
Raspbian. It is the most widely installed OS on RPi. In a recent update, the 
Raspberry Pi OS installed a Microsoft apt repository on all machines running 
Raspberry Pi OS without the person’s or admin’s knowledge. Every time a 
Raspbian device is updated by having this repo, it will ping a Microsoft 
server. Microsoft telemetry has a bad reputation in the Linux community. Let us 
see why and how this matters to Linux users.
[continue reading…] 


Of course I am aware that M$ now owns Git, and this seems to me to be 
underhanded extending their reach.

Peter

--
 Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk