Go to advanced search

by knute
Mon Nov 06, 2017 10:08 pm
Forum: Beginners
Topic: HTML crontab
Replies: 1
Views: 270

Re: HTML crontab

Use pi's crontab, it works just fine.

1 * * * * env DISPLAY=:0.0 chromium-browser path/to/file.html
by knute
Mon Nov 06, 2017 4:52 pm
Forum: Beginners
Topic: Cannot get vsftpd to deny users
Replies: 6
Views: 1130

Re: Cannot get vsftpd to deny users

knute, Yes, I do (and did) understand that "that the vsftp program and ssh, which allows sftp connections, are not the same program". I think that at one point earlier on, I "assumed" that VSFTPD would control access by itself, irregardless of whether the connection was coming over FTP protocol or ...
by knute
Sun Nov 05, 2017 9:08 pm
Forum: Beginners
Topic: Cannot get vsftpd to deny users
Replies: 6
Views: 1130

Re: Cannot get vsftpd to deny users

Hi, Sorry that it's been awhile (a LONG while)... Ok, using the last suggestion, I was able to prevent everyone from sftp'ing in except for some users. Here's my status now: /etc/vsftpd.conf: listen=YES anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 nopriv_user=vsftpd virtual...
by knute
Fri Nov 03, 2017 7:20 pm
Forum: Beginners
Topic: Connect to a FTP on Windows
Replies: 10
Views: 5079

Re: Connect to a FTP on Windows

nesswaw wrote:
Fri Nov 03, 2017 9:24 am
For example the Linux LFTP client? Which allows for FTPS
Thanks
OK, use lftp. What is the issue? Maybe you could tell us why you need ftps?
by knute
Fri Nov 03, 2017 2:37 am
Forum: Beginners
Topic: Connect to a FTP on Windows
Replies: 10
Views: 5079

Re: Connect to a FTP on Windows

Hello, How to connect to a Windows FTP server (FileZilla Server) I tried the command "ftp" it can't find anything. I'm on Raspbian, do I need to install an ftp client? If yes, which one? Thank you in advance Raspbian doesn't come with an ftp client installed, you need to install it. sudo apt-get up...
by knute
Thu Nov 02, 2017 8:33 pm
Forum: General discussion
Topic: [SOLVED] Real Time AUDIO chat
Replies: 9
Views: 927

Re: Real Time AUDIO chat

How can i "refresh" the socket each time? while (true) { try { // DatagramSocket sock = new DatagramSocket(RX_PORT); // byte soundpacket[] = new byte[tempBuffer]; // DatagramPacket datagram = new DatagramPacket(soundpacket, soundpacket.length, // InetAddress.getByName(RX_IP),RX_PORT); sock.receive(...
by knute
Tue Oct 31, 2017 7:07 pm
Forum: Automation, sensing and robotics
Topic: Pi to Pi communication over Local network
Replies: 5
Views: 2202

Re: Pi to Pi communication over Local network

I don't know what python DLE 3.0 is so maybe disregard what I say. Datagrams are an inexpensive and fast way to transmit small bits of data over a network. I'm sure Python has methods for sending and receiving datagrams. Since the sender and the receiver are not connected there is very little overhe...
by knute
Mon Oct 30, 2017 7:33 pm
Forum: General discussion
Topic: Java - No line matching interface with USB
Replies: 10
Views: 1486

Re: Java - No line matching interface with USB

Could be this problem? https://wiki.linuxaudio.org/wiki/raspberrypi It is not clear what problem you are talking about here. I think the buffer for raspberry is small compared to a normal PC. It's very strange because the program works perfect on 2 normal computers. What buffer? What model Pi are y...
by knute
Sat Oct 28, 2017 6:34 pm
Forum: General discussion
Topic: Java - No line matching interface with USB
Replies: 10
Views: 1486

Re: Java - No line matching interface with USB

The program shows me this: line with format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported. so i have to search a shell command that lists to me all the audio format available for the usb audio card (with endianess, bit, frequency). That AudioFormat should be availab...
by knute
Fri Oct 27, 2017 9:49 pm
Forum: General discussion
Topic: Java - No line matching interface with USB
Replies: 10
Views: 1486

Re: Java - No line matching interface with USB

It's still not clear to me why you can't use the audio from one of the Pi ports. If it sounds bad, it's because data is bad or the Pi doesn't have enough processor. Which model Pi do you have? Why you would need a sound card if you are using cryptographic algorithms is not clear either. I think the ...
by knute
Thu Oct 26, 2017 10:55 pm
Forum: General discussion
Topic: Java - No line matching interface with USB
Replies: 10
Views: 1486

Re: No line matching interface TargetDataLine

I don't know about your sound card and how the audio out works with that. You have two options with the Pi for audio out, the HDMI port and the audio output port on the Pi itself. You can set which output to use with the raspi-config program. I have tested my Intercom program with both HDMI out and ...
by knute
Thu Oct 26, 2017 8:59 pm
Forum: General discussion
Topic: Java - No line matching interface with USB
Replies: 10
Views: 1486

Re: No line matching interface TargetDataLine

The problem is that in the Pi's audio system there are no microphone ports, I don't know why and it doesn't matter. You need to do as I suggested the last time you posted this and that is to just get a TargetDataLine and it will be the microphone. TargetDataLine line = AudioSystem.getTargetDataLine(...
by knute
Mon Oct 23, 2017 6:52 pm
Forum: Troubleshooting
Topic: Cannot connect with ssh using other user.
Replies: 2
Views: 473

Re: Cannot connect with ssh using other user.

Does the user exist on the RPi?
by knute
Sun Oct 22, 2017 7:47 pm
Forum: Advanced users
Topic: ufw and passive ftp?
Replies: 8
Views: 3563

Re: ufw and passive ftp?

Why not file it as a bug at: https://bugs.launchpad.net/ufw/ The other way to solve this seems to be to set /proc/sys/net/netfilter/nf_conntrack_helper = 1. That's the default on my Ubuntu server but it's 0 on the Pi. The problem with that is that it uses the scheme that is marked as insecure on th...
by knute
Sun Oct 22, 2017 4:41 pm
Forum: Advanced users
Topic: ufw and passive ftp?
Replies: 8
Views: 3563

Re: ufw and passive ftp?

I searched around on the internet and found an example of setting up a CT target. See https://home.regit.org/netfilter-en/secure-use-of-helpers/. Pretty much everything else I have found points to this article. I've tried putting it in the /etc/ufw/before.rules and I've tried just adding it with ip...
by knute
Sun Oct 22, 2017 3:52 pm
Forum: Advanced users
Topic: ufw and passive ftp?
Replies: 8
Views: 3563

Re: ufw and passive ftp?

What ephemeral ports does passive FTP use? Anything from 1024 to 65535 but we don't want to open those ports we want iptables to allow inbound connections from ftp clients once they have established a connection on the command port. But now I know why it isn't working. I found this in my syslog: Oc...
by knute
Fri Oct 20, 2017 8:15 pm
Forum: Advanced users
Topic: ufw and passive ftp?
Replies: 8
Views: 3563

Re: ufw and passive ftp?

sudo ufw enable sudo ufw allow ftp # this is to and from anywhere sudo ufw allow ftp from 77.88.99.100 sudo ufw deny ftp from 11.22.33.44 That works fine for active ftp but passive won't go through the firewall. Before we had ufw and just added iptables rules we added a rule that looked like: -A IN...
by knute
Fri Oct 20, 2017 3:52 pm
Forum: Troubleshooting
Topic: Configuration of VSFTPD : how to restrict access to a directory
Replies: 1
Views: 315

Re: Configuration of VSFTPD : how to restrict access to a directory

You can chroot the user, look in vsftpd.conf for the appropriate options. However there is no great risk in allowing your user to look around the directory tree. He can't access anything that doesn't belong to him or isn't world readable so there isn't a lot of damage that he can do.
by knute
Thu Oct 19, 2017 7:27 pm
Forum: Advanced users
Topic: ufw and passive ftp?
Replies: 8
Views: 3563

ufw and passive ftp?

Anybody know how to configure ufw to allow passive ftp connections through the firewall?

Thanks
by knute
Sun Oct 15, 2017 3:44 pm
Forum: Python
Topic: Comparing two images using PIL
Replies: 13
Views: 10679

Re: Comparing two images using PIL

Thanks for the information and for posting the video.
by knute
Sat Oct 14, 2017 11:21 pm
Forum: Python
Topic: Comparing two images using PIL
Replies: 13
Views: 10679

Re: Comparing two images using PIL

Sure. Luminance is just another word for grayscale. i.e. it's an array with a single (0-255) value at each pixel x,y location, so 2D. With PIL you can produce this using Image.convert('L') as in the example I posted. (I did it as the first operation as it's very quick to do and reduces the work of ...
by knute
Fri Oct 13, 2017 8:36 pm
Forum: Python
Topic: Comparing two images using PIL
Replies: 13
Views: 10679

Re: Comparing two images using PIL

Although your code example using the histogram doesn't do it, you can compare images by taking the length of the vector from pixel a to matching pixel b in RGB space but it's generally better and much faster to convert to luminance as suggested by @OutoftheBOTS and use the absolute value of the dif...
by knute
Fri Oct 13, 2017 7:19 pm
Forum: Java
Topic: ALSA - AudioSystem.isLineSupported FAILS with USB MIC
Replies: 2
Views: 1617

Re: ALSA - AudioSystem.isLineSupported FAILS with USB MIC

I'm not sure why that doesn't work but I've never been able to get a line from a Port that way (on Windows or Linux). If you want the microphone just get a TargetDataLine with the appropriate AudioFormat and it will be the microphone. Please see my Intercom program at knutejohnson.com/pi for some co...
by knute
Wed Oct 04, 2017 3:59 pm
Forum: Troubleshooting
Topic: ssh password-less login with rsa not working
Replies: 10
Views: 2283

Re: ssh password-less login with rsa not working

I have placed the public key in a file called authorized_keys with a permission of chmod 600 in the .ssh directory on my raspberry pi and I have my private key on the computer that I am using to connect to the pi, I am not using putty, I am using the terminal on my linux mint desktop It's not clear...
by knute
Mon Oct 02, 2017 1:49 pm
Forum: Troubleshooting
Topic: exec format error jar file
Replies: 11
Views: 1927

Re: exec format error jar file

I tried with java -jar file.jar, and throw me that error.. I use some pc with linux os 64 bit and works, maybe there is a problem? Is there any os 64 bit for raspberry? Show us the actual error and tell us the name of the program and who wrote it. I don't know if there is a 64 bit OS for the Pi but...

Go to advanced search