Go to advanced search

by swampdog
Fri Dec 03, 2021 10:54 pm
Forum: Beginners
Topic: Raspberry Pi as a Pinter Manger/Server
Replies: 5
Views: 212

Re: Raspberry Pi as a Pinter Manger/Server

Unfortunately I no longer have the details but it's not impossible. I've a.. foo@pi10:~ $ lsusb | grep Sam Bus 001 Device 002: ID 04e8:329f Samsung Electronics Co., Ltd CLP-325 Color Laser Printer ..which has an rpiZW running CUPS attached to it via usb exposing itself over wifi. There's a folder I ...
by swampdog
Fri Dec 03, 2021 8:51 pm
Forum: Beginners
Topic: where is it installed?
Replies: 2
Views: 196

Re: where is it installed?

$ sudo apt-get install apt-file $ sudo apt-file update ..'apt-file update' best done at same time as "apt-get update/upgrade". That done.. foo@pi18:~ $ apt-file show python-pexpect python-pexpect: /usr/lib/python2.7/dist-packages/pexpect-4.6.0.egg-info python-pexpect: /usr/lib/python2.7/d...
by swampdog
Fri Dec 03, 2021 9:08 am
Forum: Advanced users
Topic: Does Anyone Have any Compiling Tips
Replies: 20
Views: 712

Re: Does Anyone Have any Compiling Tips

I know nothing of rust but if it builds in parallel (aka effectively "make -j`nproc`") then see if there's a way to drop that to "make -j1" - especially if utilises the gcc linker behind the scenes. eg: my new PC failed building my custom QT5 stuff whereupon I caught it using *7....
by swampdog
Fri Nov 26, 2021 10:55 am
Forum: Beginners
Topic: Samba error 104
Replies: 10
Views: 321

Re: Samba error 104

You need to be explicit. We're assuming your samba server is running on the rpi. If you can, fire up the 'smbclient' on the client machines. Hint: $ smbclient \\\\smb\\PUBLIC -U smb%PASSWORD ..should log you in ('q' to exit). Make this work on a box which *can* connect then try one which cannot. Yea...
by swampdog
Fri Nov 26, 2021 1:51 am
Forum: Beginners
Topic: Samba error 104
Replies: 10
Views: 321

Re: Samba error 104

For reference. Don't blindly paste this. It has two accounts but as I just ported samba on my NAS from centos6 (with selinux) to debian bullseye (without selinux) and I still need old access methods, it's what I came up with. I have a second NAS (no details here) which isn't the domain master but it...
by swampdog
Thu Nov 25, 2021 3:30 pm
Forum: Raspberry Pi OS
Topic: What is using all the disk space?
Replies: 7
Views: 295

Re: What is using all the disk space?

Have a look at 'mount'. Often this is caused by overmounting (eg: /foo/ had 1G stuff in it then you mount /dev/sdaX over /foo/ and 1Gb goes "missing") but in this case perhaps it's nothing more complex than 'swapon -s' using all the space? The 'top' command might reveal the culprit.
by swampdog
Thu Nov 25, 2021 3:17 pm
Forum: Advanced users
Topic: Cant connect my db in raspberry pi, with another computer
Replies: 2
Views: 196

Re: Cant connect my db in raspberry pi, with another computer

On the rpi make sure it is listening. This is the standard port.. $ netstat -ant | grep LIS | grep 3306 tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN ..and if you've a firewall in the way make sure port 3306 is allowed through it. No output means it isn't listening (on that port). This kind of approach will...
by swampdog
Thu Nov 25, 2021 3:39 am
Forum: Beginners
Topic: Backup to SSD
Replies: 5
Views: 247

Re: Backup to SSD

A custom 'rsync' is usually the way to go. However, being lazy, I do have 'timeshift' running on a couple of rpi4. I've mentioned it before but it would appear I'm the only one using it. I definitely used it once to restore the OS and possibly a second time to revert a bad update. I've been upgradin...
by swampdog
Thu Nov 25, 2021 2:47 am
Forum: C/C++
Topic: Suggestion for C/C++ IDE for Raspberry Pi 4 (2GB RAM) with debug and cmake support
Replies: 12
Views: 647

Re: Suggestion for C/C++ IDE for Raspberry Pi 4 (2GB RAM) with debug and cmake support

The OP asked about cmake support and no-one mentioned qtcreator hence my supplementary question. The qtcreator I've built from source will happily import "CMakeLists.txt" but this is relatively new. "File->Open File or Project" and just point it at aforementioned file and it'll u...
by swampdog
Wed Nov 24, 2021 3:48 pm
Forum: C/C++
Topic: Suggestion for C/C++ IDE for Raspberry Pi 4 (2GB RAM) with debug and cmake support
Replies: 12
Views: 647

Re: Suggestion for C/C++ IDE for Raspberry Pi 4 (2GB RAM) with debug and cmake support

Is the system qtcreator able to import cmake projects? It might be usable in 2Gb.
by swampdog
Wed Nov 24, 2021 3:42 pm
Forum: Off topic discussion
Topic: Cronjob to delete files
Replies: 6
Views: 559

Re: Cronjob to delete files

Ideally you need to find out what is responsible for not removing them and fix that. In the meantime it sounds like the 'find' command is what you need. It isn't simple. Hint: $ find /wrk -mindepth 1 -maxdepth 1 -type f -mtime +7 -mtime -28 -ls 45 600368 -rw-r--r-- 1 foo foo 614772736 Nov 2 23:06 /w...
by swampdog
Mon Nov 22, 2021 3:51 pm
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1170

Re: C++: extension of a class (e.g., string class)

I'll dream up a simple class over the weekend. The trouble with std::string is if you single step into your stringX class using (say) qtcreator the debugger will drive straight into template'd code such as std::basic_string<>. You only have to look at https://en.cppreference.com/w/cpp/string/basic_...
by swampdog
Thu Nov 18, 2021 1:50 pm
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1170

Re: C++: extension of a class (e.g., string class)

I'll dream up a simple class over the weekend. The trouble with std::string is if you single step into your stringX class using (say) qtcreator the debugger will drive straight into template'd code such as std::basic_string<>. You only have to look at https://en.cppreference.com/w/cpp/string/basic_s...
by swampdog
Thu Nov 18, 2021 11:30 am
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1170

Re: C++: extension of a class (e.g., string class)

Quick answer: const std::string & str_ (*this); Re: FOO Changes the code at compile time.. $ g++ -DFOO .. My last post demonstrated how to do it. That's the "dynamic_cast<>". Firstly, note.. class foo { public: //everything }; ..is the same as.. struct foo { //everything }; ..both are ...
by swampdog
Thu Nov 18, 2021 12:44 am
Forum: Networking and servers
Topic: DNS Nameserver Incorrect
Replies: 10
Views: 406

Re: DNS Nameserver Incorrect

I don't recall how Stretch does it. Perhaps commence by..

Code: Select all

$ ps -ef | grep dh
..then look in those files to see if what it got was corrupted. Is "resolvconf" mentioned in /etc/resolv.conf?
by swampdog
Wed Nov 17, 2021 11:52 pm
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1170

Re: C++: extension of a class (e.g., string class)

If we're sticking with inheritance then may as well make use of its features. Here's how to coerce std::string into doing most of the work. Add in a stringX(const std::string&) ctor and things gets a lot easier.. #include <cstdio> #include <string> struct stringX : std::string { #ifdef FOO strin...
by swampdog
Wed Nov 17, 2021 8:27 am
Forum: Off topic discussion
Topic: Controlling Power (12 VDC)
Replies: 14
Views: 576

Re: Controlling Power (12 VDC)

The relay solution is most practical but if you do decide to use an rpi, then you could program the respective driving light to flash morse code. "left/right" and after a suitable delay, change to "bored .. bored" :-)
by swampdog
Wed Nov 17, 2021 1:03 am
Forum: Troubleshooting
Topic: ArgonV2 box: Struggling with Bullseye - Date/Time not set, FIXED but a Question
Replies: 9
Views: 383

Re: Struggling with Bullseye - Date/Time not set, No WiFi Connect

One of my rpi4 I have set BOOT_ORDER=0xf142 (ie, network,usb,sdcard). It saves me having to remove the sdcard when I try something new.
by swampdog
Wed Nov 17, 2021 12:49 am
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1170

Re: C++: extension of a class (e.g., string class)

As mentioned, you've picked a bad thing to attempt to inherit from (ie the STL). Even if you create a class of your own there's a ton of stuff required to get it to work. This is just the tip of the iceberg.. #include <string> #include <iostream> class MyStr { private: std::string s; public: MyStr()...
by swampdog
Thu Nov 11, 2021 4:13 pm
Forum: Advanced users
Topic: NoMachine performance issues with bullseye
Replies: 1
Views: 202

Re: NoMachine performance issues with bullseye

Take this with a pinch of salt as I've not tried rpi bullseye until a few minutes ago(**). I used my custom install scripts which didn't fully succeed and I don't have the time to debug it. Part of that changes the uid of the "pi" user (I need "foo" to be uid=1000). However, the ...
by swampdog
Wed Nov 10, 2021 7:21 pm
Forum: Advanced users
Topic: C++ connection to database
Replies: 3
Views: 171

Re: C++ connection to database

Check which port is being used (default 3306). Check if a firewall is blocking. Use mysql command line to connect manually. Do it locally so you know the command works. Do it again remotely. Add code to check mysql_real_connect() then call mysql_error(). Fwiw, one of the most common faults is not se...
by swampdog
Thu Nov 04, 2021 6:01 pm
Forum: Troubleshooting
Topic: How to find out where a file is saved to
Replies: 9
Views: 260

Re: How to find out where a file is saved to

I don't have leafpad around and as it may not be mousepad let's be certain.. Start -> Accessories -> Text Editor (right click) -> Properties -> [General ] Target file: ? Also while you're there.. Start -> Accessories -> Text Editor (right click) -> Properties -> [Desktop Entry] Command: ? Working di...
by swampdog
Thu Nov 04, 2021 11:14 am
Forum: Raspberry Pi OS
Topic: KVM uefi/bios
Replies: 15
Views: 539

Re: KVM uefi/bios

I know you pass the kernel/initrd to KVM but that's not how 'virt-manager' works. Maybe this is why we've consistently been at cross-purposes! Has anyone here used virt-manager? It's higher level. You pass it a disk image. You *can* pass it a disc image. You can also pass it a kernel, initrd, rootf...
by swampdog
Thu Nov 04, 2021 11:00 am
Forum: Raspberry Pi OS
Topic: KVM uefi/bios
Replies: 15
Views: 539

Re: KVM uefi/bios

Heck, those files have references to windoze .dll files in 'em! uefi uses pe32 files for all of its executables thats the same thing used for .exe and .dll files but they instead run baremetal, and link into the uefi firmware, rather then running under a windows kernel That figures. Looks like I'm ...
by swampdog
Thu Nov 04, 2021 12:06 am
Forum: Raspberry Pi OS
Topic: KVM uefi/bios
Replies: 15
Views: 539

Re: KVM uefi/bios

I found this https://wiki.debian.org/Arm64Qemu in particular step 3.. qemu-system-aarch64 -m 2G -M virt -cpu max \ -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \ -drive if=none,file=debian-9.9.0-openstack-arm64.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 \ -device e1000,netdev=net0 -netdev use...

Go to advanced search