Go to advanced search

by DougieLawson
Sun Jul 12, 2020 11:29 am
Forum: Beginners
Topic: Understanding the udev rules
Replies: 12
Views: 359

Re: Understanding the udev rules

Note that you can't start a long running process from udev. As soon as the udev processing is complete EVERY task spawned by udev that's still running is killed (without prejudice).
by DougieLawson
Sat Jul 11, 2020 4:39 pm
Forum: Troubleshooting
Topic: change default folder apache 2
Replies: 16
Views: 310

Re: change default folder apache 2

If it's NTFS mounted with uid=0 and gid=0 then only root can read files on it. You may need to use uid=www-data or gid=www-data to allow apache2 to access files.
by DougieLawson
Sat Jul 11, 2020 2:51 pm
Forum: General programming discussion
Topic: fallout 3 pipboy
Replies: 51
Views: 30067

Re: fallout 3 pipboy

I think it's a dead project. It's certainly cobwebware as there's been no updates at https://bitbucket.org/selectnone/raspipboy/commits/ since 6th July 2015 (five years ago).
by DougieLawson
Sat Jul 11, 2020 9:34 am
Forum: Raspberry Pi OS
Topic: udev rules don't run
Replies: 9
Views: 405

Re: udev rules don't run

So the rule says: # Automatically load the proper keymaps after the Remote Controller device # creation. # The keycode tables rules should be at /etc/rc_maps.cfg ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/ir-keytable -a /etc/rc_maps.cfg -s $name" Is lirc installed? Is dtoverlay=gpio-ir,gpio_pin=...
by DougieLawson
Fri Jul 10, 2020 10:40 pm
Forum: Raspberry Pi OS
Topic: The list of options you get when insert a USB device...
Replies: 3
Views: 181

Re: The list of options you get when insert a USB device...

Wouldn't it be nice if PCManFM worked the way it's designed and the design matched your expectations.

It really is a pile of crud and there must be something better out there.
by DougieLawson
Fri Jul 10, 2020 10:37 pm
Forum: Official Foundation Display
Topic: How do I turn on the display when it's off?
Replies: 4
Views: 520

Re: How do I turn on the display when it's off?

I'm using a Raspberry Pi 4B and the official 7" touch display. Both are powered independently. Scenario 1: I plug-in the screen, then I plug-in the Pi. Outcome: Everything works great! Scenario 2: I plug-in the Pi, then I plug-in the screen. Outcome: The screen does NOT come on. In scenario 2, how ...
by DougieLawson
Fri Jul 10, 2020 11:05 am
Forum: Python
Topic: atm - return required sum using minimum amount of 100, 50 and 20 banknotes
Replies: 7
Views: 326

Re: atm - return required sum using minimum amount of 100, 50 and 20 banknotes

Barmen are a breed apart, they'll be doing the mental arithmetic in the same way that the guy playing darts is adding up the arrows and subtracting from 501 (or the current remaining total) as each dart is played. The ATM has counters for everything. The self-scan in Tesco is the same (it's just an ...
by DougieLawson
Fri Jul 10, 2020 10:47 am
Forum: Troubleshooting
Topic: 'dmesg' error during boot...
Replies: 7
Views: 359

Re: 'dmesg' error during boot...

4k3or3et wrote:
Fri Jul 03, 2020 7:23 pm
I have allocated 512MB to GPU.
Cut that in half to 256M.
by DougieLawson
Fri Jul 10, 2020 10:44 am
Forum: Troubleshooting
Topic: change default folder apache 2
Replies: 16
Views: 310

Re: change default folder apache 2

Look in the /var/log/apache2/ logs. You should see the failure logged in there.

Is your /media filesystem FAT or VFAT or exFAT (a windows drive)? If it is then you need to change the owner (uid=) & group (gid=) parameters on your mount command. Take a look with a mount | grep media command.
by DougieLawson
Fri Jul 10, 2020 10:15 am
Forum: General discussion
Topic: how much continuous use can be given to a raspberry pi 3b
Replies: 10
Views: 405

Re: how much continuous use can be given to a raspberry pi 3b

Another thread where the OP didn't do any research. BTW, it's 24*365 or 24*7 (with an implied 52 weeks) not 24*7*365 (which is just less than seven years).

I wrote this today on the other thread. viewtopic.php?f=36&t=60362&p=1693904#p1693925
by DougieLawson
Fri Jul 10, 2020 10:03 am
Forum: Networking and servers
Topic: Can Rpi Runs 24/7 as a server for my point of sale [obsolete topic]
Replies: 12
Views: 28160

Re: Can Rpi Runs 24/7 as a server for my point of sale

Can we use raspberry pi 4 4gb has a web server and run the server 24*7 in 365 days I've had one run for 365 non-stop. Current record was 150 days (until Wednesday when I had to drop the power to do some electrical work on the house). There's three of my RPi1Bs that have been powered up constantly s...
by DougieLawson
Fri Jul 10, 2020 9:32 am
Forum: Python
Topic: atm - return required sum using minimum amount of 100, 50 and 20 banknotes
Replies: 7
Views: 326

Re: atm - return required sum using minimum amount of 100, 50 and 20 banknotes

Second, why start with the largest notes and work down - the 100s, then the 50s and end with the 20s? That's the way to make change. You have to hand over the fewest number of notes and coins that way. It makes it easier for the customer assistant behind the till to make change and count it out to ...
by DougieLawson
Fri Jul 10, 2020 8:57 am
Forum: Official Foundation Display
Topic: 7in Touchscreen from Rasperry Pi Shop
Replies: 3
Views: 509

Re: 7in Touchscreen from Rasperry Pi Shop

Is your RaspiOS installation up to date?

sudo apt update; sudo apt dist-upgrade -y; sudo reboot will get you to the 4.19.118 kernel, latest bootcode and latest RPi4B EEPROM.
by DougieLawson
Fri Jul 10, 2020 8:48 am
Forum: Networking and servers
Topic: Can I use Pi as second router configured to use different DNS service?
Replies: 10
Views: 470

Re: Can I use Pi as second router configured to use different DNS service?

You need to disable the DHCP server on your Netgear router. Then run your own DHCP server (which is used to push DNS settings to client machines) on your Raspberry Pi. With dhcpd and something like this in /etc/dhcpd.conf ( not dhcp c d.conf) # Sample /etc/dhcpd.conf # (add your comments here) defau...
by DougieLawson
Fri Jul 10, 2020 8:35 am
Forum: Troubleshooting
Topic: change default folder apache 2
Replies: 16
Views: 310

Re: change default folder apache 2

cri_pava wrote:
Fri Jul 10, 2020 8:27 am

i don't have a custom dns in this net . there is way to change the folder with a different settings that doesn't require changing dns ?
You can test it with a line in /etc/hosts

Code: Select all

127.0.0.1 cristiangiro.it
Or on Windows in C:\Windows\system32\drivers\etc

Code: Select all

192.168.1.103 cristiangiro.it
by DougieLawson
Fri Jul 10, 2020 8:29 am
Forum: Troubleshooting
Topic: My Buster version can't access DNS
Replies: 9
Views: 226

Re: My Buster version can't access DNS

robboz4 wrote:
Fri Jul 10, 2020 1:59 am

more /etc/resolv.conf

Code: Select all

# Generated by resolvconf
search 8.8.8.4
nameserver 192.168.1.1
The Google DNS is 8.8.8.8 or 8.8.4.4.
If you can't reach that there's alternatives at 1.1.1.1 & 9.9.9.9.
by DougieLawson
Fri Jul 10, 2020 8:17 am
Forum: Troubleshooting
Topic: Trying to run leafpad as sudo...getting an error
Replies: 11
Views: 330

Re: Trying to run leafpad as sudo...getting an error

I have run into an issue that searching has not helped. When I try to run "sudo leafpad index.php" It does not let me. I get a message saying leafpad: Cannot open display: Any ideas on why this may be happening? I'm connecting to the Pi via SSH. ssh (unless you're using mobaxterm) doesn't have a X ...
by DougieLawson
Fri Jul 10, 2020 8:13 am
Forum: C/C++
Topic: Get Reading from ADS1115
Replies: 45
Views: 3771

Re: Get Reading from ADS1115

dude, do you honestly think that the wiringPi code is for anything else than for the RPi? The wiringPi stuff was created (back in 2012) to make GPIO programming on an RPi look like an Arduino. So the folks who were familiar with Arduinos could get a head start on their new Raspberry. How can we con...
by DougieLawson
Thu Jul 09, 2020 10:16 pm
Forum: General discussion
Topic: USB Booting not working on RPI 3
Replies: 13
Views: 564

Re: USB Booting not working on RPI 3

HawaiianPi wrote:
Thu Jul 09, 2020 10:01 pm
jslegers wrote:
Wed Jul 08, 2020 3:49 pm
Maybe the USB Controller is a little buggy on my board.
Can you boot from an SD card and verify that the USB ports are working.
If you have a compatible USB SDCard reader you can try a bootable & tested SDCard as a USB boot device.
by DougieLawson
Thu Jul 09, 2020 10:12 pm
Forum: General discussion
Topic: Which OS is the fastest ?
Replies: 48
Views: 1887

Re: Which OS is the fastest ?

I'm using default pi OS and I think it is slow. How do you define "slow"? Are you comparing performance against some metric? Is it slow to boot? Slow to use? Slow to run your programs? Slow to write files? Slow to select/update databases? Slow to serve web pages? Slow to play videos or audio stream...
by DougieLawson
Thu Jul 09, 2020 10:06 pm
Forum: Beginners
Topic: How do I print a Python Program
Replies: 33
Views: 933

Re: How do I print a Python Program

RDS wrote:
Thu Jul 09, 2020 9:38 pm
DougieLawson wrote:
Thu Jul 09, 2020 9:29 pm
That sudo command was just to get the cups compatible lpr program installed.
Thanks. I only use it sparingly and only then if advised by someone I trust!
So not me then. With my efforts today (I just could not get things working on my mainframe) I don't trust me. :roll:
by DougieLawson
Thu Jul 09, 2020 10:04 pm
Forum: Troubleshooting
Topic: change default folder apache 2
Replies: 16
Views: 310

Re: change default folder apache 2

What's in /var/log/apache2/example.com_error.log that should tell you what's going wrong.
by DougieLawson
Thu Jul 09, 2020 9:29 pm
Forum: Beginners
Topic: How do I print a Python Program
Replies: 33
Views: 933

Re: How do I print a Python Program

That sudo command was just to get the cups compatible lpr program installed. It's a serious illness if you catch a dose of sudoitis, the prognosis is that you will ultimately result in destroying a filesystem when you least expect it (by sudo misuse).
by DougieLawson
Thu Jul 09, 2020 9:24 pm
Forum: Troubleshooting
Topic: Scanning for Viruses With Clamav Raspian Kills Scan Why?
Replies: 13
Views: 327

Re: Scanning for Viruses With Clamav Raspian Kills Scan Why?

Is there a specific reason for running ClamAV on a Raspberry? There's nothing it will detect that infects a Raspberry, ClamAV is designed for X86 servers sharing files with Windows users.

These days even the Windows Defender stuff built-in to Win10 is better than anything you can get with ClamAV.
by DougieLawson
Thu Jul 09, 2020 7:50 pm
Forum: Beginners
Topic: How do I print a Python Program
Replies: 33
Views: 933

Re: How do I print a Python Program

Printing command: "1pr'/home/pi/Desktop/prog1.py' 2>&1"Printing failed (exit status 0x7f00)/bin/sh: 1pr: not found It's (ell-pee-arrh) lpr /home/pi/Desktop/prog1.py 2>&1 not (wun-pee-arrh) 1pr'/home/pi/Desktop/prog1.py' 2>&1 You also need to run sudo apt install cups-bsd to get the lpr command inst...

Go to advanced search