Go to advanced search

by swampdog
Tue Feb 11, 2020 6:35 am
Forum: Beginners
Topic: How to connect my raspi in other pc database
Replies: 1
Views: 157

Re: How to connect my raspi in other pc database

I'm not familiar with the package you're using (or python) but it looks like the database login failed. On your laptop see if you can execute.. mysql -u <USER> -p<PASS> -h 127.0.0.1 -D mysql -e "select user,host,password from user" ..noting there's a space between "-u <USER>" but not between -p<PASS...
by swampdog
Mon Feb 10, 2020 5:01 pm
Forum: Raspberry Pi OS
Topic: sending email via my German ISP 1und1
Replies: 3
Views: 721

Re: sending email via my German ISP 1und1

You'll have to figure out exactly what your ISP requires for a valid mail and emulate that. It can be tricky because many ISP's don't tell you the precise error because it helps spammers. That said, your "From:" line is blank. If you are able to compile code then https://github.com/muquit/mailsend/ ...
by swampdog
Mon Feb 10, 2020 7:52 am
Forum: Advanced users
Topic: Should I leave my USB drives in /media/ or fight with the system to put them in /mnt/ ?
Replies: 21
Views: 1374

Re: Should I leave my USB drives in /media/ or fight with the system to put them in /mnt/ ?

At the risk of getting bogged down in details again.. generally speaking.. "/etc/fstab" is the oldest way of doing it. Typically, if the drive cannot be found the system will not boot. The automounter is there for transient things. The systemd is the newer way of doing things. Unlike your experience...
by swampdog
Mon Feb 10, 2020 5:15 am
Forum: Troubleshooting
Topic: Buster Lite: neither iptables nor nftables work properly
Replies: 9
Views: 2041

Re: Buster Lite: neither iptables nor nftables work properly

While getting up to speed on nftables is on my ever-growing ToDo list, I am currently using iptables, and it works fine on Buster Lite. The only package I have installed is 'iptables'. Here's the output from sudo apt search iptables : iptables/stable,now 1.8.2-4 armhf [installed] administration too...
by swampdog
Mon Feb 10, 2020 4:50 am
Forum: Raspberry Pi OS
Topic: Cannot update FreeType2
Replies: 3
Views: 460

Re: Cannot update FreeType2

freetype-config isn't installed by default anymore, pkg-config is the preferred way of querying packages, e.g. FT2_CFLAGS=$(pkg-config --cflags freetype2) FT2_LIBS=$(pkg-config --libs freetype2) That makes sense. We appear to have lost the OP. I don't know what they were building but I've also just...
by swampdog
Thu Feb 06, 2020 4:59 pm
Forum: Troubleshooting
Topic: Buster Lite: neither iptables nor nftables work properly
Replies: 9
Views: 2041

Re: Buster Lite: neither iptables nor nftables work properly

I've no experience of nftables but from its description it sounds like you want to pick it or iptables, not both. I'd go for a fresh install. The command "sudo iptables -L -n" should work out of the box. You can then follow any linux iptables tutorial - there's nothing raspbian specific.
by swampdog
Thu Feb 06, 2020 4:47 pm
Forum: Raspberry Pi OS
Topic: Cannot update FreeType2
Replies: 3
Views: 460

Re: Cannot update FreeType2

Have a look inside "config.log". There will be more information on why the test failed. Hmm, on a second look something odd is going on. There's no 'freetype-config' on my rpi4. On my linux box.. foo@sdu ~/usr/src/T/freetype2 $ apt-file search freetype-config emscripten: /usr/share/emscripten/tests/...
by swampdog
Thu Feb 06, 2020 2:34 pm
Forum: Advanced users
Topic: use SD Card Copier in batch mode
Replies: 8
Views: 1527

Re: use SD Card Copier in batch mode

You'll never be certain backing up a live system that it'll be restorable. That said, with usual caveats like pausing databases etc, you can 'rsync' the sdcard off somewhere (very loosely "sudo rsync -aux / /mnt/" where /mnt points to some external device). Pay much attention to the rsync manual bec...
by swampdog
Thu Feb 06, 2020 2:00 pm
Forum: Troubleshooting
Topic: Buster Lite: neither iptables nor nftables work properly
Replies: 9
Views: 2041

Re: Buster Lite: neither iptables nor nftables work properly

I don't recall having to do anything doing anything odd getting iptables to work. foo@pi20:~ $ uname -r && sudo iptables -L -n 4.19.93-v7l+ Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED ACCEP...
by swampdog
Thu Feb 06, 2020 6:54 am
Forum: C/C++
Topic: QtCreator 4.10 (building)
Replies: 1
Views: 411

QtCreator 4.10 (building)

I've just noticed a problem. The end result is not remembering the kits. It appears to be saving them okay but overriding those settings when qtcreator reloads. It occurs under linux also which is fortunate as I can rebuild quicker. However, much time googling and I've not seen anything on this issu...
by swampdog
Tue Feb 04, 2020 8:36 pm
Forum: Advanced users
Topic: Restricting Linux to say 3 cores.
Replies: 3
Views: 707

Re: Restricting Linux to say 3 cores.

Not quite what you want but may be close enough.. foo@pi19:~ $ apropos affinity pthread_attr_getaffinity_np (3) - set/get CPU affinity attribute in thread at... pthread_attr_setaffinity_np (3) - set/get CPU affinity attribute in thread at... pthread_getaffinity_np (3) - set/get CPU affinity of a thr...
by swampdog
Thu Jan 30, 2020 8:10 am
Forum: Beginners
Topic: zoneminder: command not found
Replies: 1
Views: 240

Re: zoneminder: command not found

This https://zoneminder.readthedocs.io/en/latest/ appears to require a LAMP stack. Have a look round the forums for how to set up a web server and php and mysql/mariab. LAMP=LinuxApacheMySqlPhp btw.
by swampdog
Tue Jan 28, 2020 1:56 pm
Forum: C/C++
Topic: Cross compiling, distcc & virtual machines
Replies: 2
Views: 610

Re: Cross compiling, distcc & virtual machines

Doh! I meant to use 'lscpu'. I'm always doing that. :-|
by swampdog
Mon Jan 27, 2020 11:06 pm
Forum: Other programming languages
Topic: Convert C# to Python 3
Replies: 66
Views: 9541

Re: Convert C# to Python 3

Thanks swampdog for explaining "|++" & "++|" So, something like for(j=0; j<10; j++) is a for loop where j starts at zero till greater than 10 and automatically incremented? Close. It starts at zero then stops at ten (j<10). The loop is actually rather simple.. for ( // do once only at the beginning...
by swampdog
Mon Jan 27, 2020 5:58 pm
Forum: Other programming languages
Topic: Convert C# to Python 3
Replies: 66
Views: 9541

Re: Convert C# to Python 3

Just in case it crops up so you don't get "out by one" errors in translation, the C increment and decrement operators can occur in two forms:

"i++" looks at the value of "i" then increments it.
"++i" increments the value of "i" then looks at it.
by swampdog
Mon Jan 27, 2020 4:59 am
Forum: General discussion
Topic: Kids are getting smarter
Replies: 15
Views: 1161

Re: Kids are getting smarter

I run DNS/DHCP on an rpi. When my wife insisted on win10 for gaming I have it set so her machine gets an HTTP proxy via squid (on a different server but can go on a pi). Not that it would stop her doing anything if she cared to bypass it but more so we can see what junk is travelling. There's also a...
by swampdog
Mon Jan 27, 2020 12:44 am
Forum: Advanced users
Topic: How to power up external Hard Disk
Replies: 5
Views: 684

Re: How to power up external Hard Disk

Another thing to bear in mind with an older drive and how it's connected, if the drive spins down it may not wake up again. You can fudge your way around that problem by periodically touching a file on that disk. I use standalone caddies but that box is for backups. You'd likely want something more ...
by swampdog
Sun Jan 26, 2020 6:40 pm
Forum: C/C++
Topic: Cross Compile Does Not Find Standard Headers
Replies: 2
Views: 589

Re: Cross Compile Does Not Find Standard Headers

I don't know if this link will turn out useful..
https://docs.conda.io/projects/conda-bu ... tools.html
Scroll down to "An aside on CMake and sysroots".

Much as I'm trying to get with the cmake idea, it throws up some bizarre faults. It makes it difficult to like it. :-|
by swampdog
Sat Jan 25, 2020 4:47 am
Forum: C/C++
Topic: Cross compiling, distcc & virtual machines
Replies: 2
Views: 610

Cross compiling, distcc & virtual machines

Hi Folks, Here's some rough timings using distcc (non pump) to pass off compilation phase to VM's. Secs DISTCC_HOSTS 1892 localhost/1 772 localhost/4 233 xghhpc xgsdu localhost 246 xghhpc xgsdu localhost/3 215 xghhpc xgsdu xgsdn xgsdn1 xgsdn2 arc/3 localhost/3 169 xghhpc xgsdu xgsdn xgsdn1 xgsdn2 ar...
by swampdog
Fri Jan 24, 2020 5:21 pm
Forum: Other programming languages
Topic: Convert C# to Python 3
Replies: 66
Views: 9541

Re: Convert C# to Python 3

This link will provide everything except the kit. It is all of the information I have. The link's empty. No files at all. “ZF-BA-C4.rar” is drawing a blank. Search engines assume I'm looking for ZF automotive transmissions. The link is working for me. This appears to be the only code in that archiv...
by swampdog
Fri Jan 24, 2020 6:13 am
Forum: Beginners
Topic: Transfer an operating set up on microSD to external USB3 SSD drive (RP 4)
Replies: 7
Views: 2771

Re: Transfer an operating set up on microSD to external USB3 SSD drive (RP 4)

Things get a bit easier if you can shut it down. Just clone the sdcard to the USB then change the /boot/cmdline.txt accordingly. It ain't that simple. Do you mean the /boot.cmdline.txt on the SD card or the one on the HDD? With or without the SD card present? Hint: probably with as the 4B doesn't c...
by swampdog
Fri Jan 24, 2020 5:58 am
Forum: Beginners
Topic: [Solved]Unable to resize external SSD partition
Replies: 34
Views: 1499

Re: Unable to resize external SSD partition

Failure to chmod +x would not result in "Command not found". It would result in "Permission denied". Edit: This seems to be a bug in sudo . The behavior is as I reported if you just test directly from the shell, but when you run it by sudo, it seems sudo collapses all errors into a single bucket: "...
by swampdog
Thu Jan 23, 2020 4:28 pm
Forum: Off topic discussion
Topic: finding out the best way to bookmark links and websites - which tool do you use!?
Replies: 16
Views: 5484

Re: finding out the best way to bookmark links and websites - which tool do you use!?

This pile of junk is still sat on my internal webserver for really important links.. <?php //------------------------------------------------------------------------------ class qlPage { //private var $qldir; var $ufile; var $title; var $bcol ="#ff9933"; var $tablewidth ="85%"; var $td1L ="<td><cent...
by swampdog
Thu Jan 23, 2020 3:13 pm
Forum: Beginners
Topic: Pi4 how do we install apps on external drive
Replies: 8
Views: 974

Re: Pi4 how do we install apps on external drive

Is the 500Gb drive going to be *permanently* attached?
by swampdog
Thu Jan 23, 2020 3:07 pm
Forum: Beginners
Topic: Transfer an operating set up on microSD to external USB3 SSD drive (RP 4)
Replies: 7
Views: 2771

Re: Transfer an operating set up on microSD to external USB3 SSD drive (RP 4)

It's possible to do it with a running OS but you need to be familiar with linux, mountpoints and rsync and be able to make decisions on the fly (like shutting down services). Things get a bit easier if you can shut it down. Just clone the sdcard to the USB then change the /boot/cmdline.txt according...

Go to advanced search