Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Paul MaudDib
May 3, 2006

TEAM NVIDIA:
FORUM POLICE

xtal posted:

This depends on how paranoid you want to be. Any common file transfer protocol that lets you write will also let you read and overwrite. You could rig together a program that takes input and writes it to a file, authorized by a shared secret, and not worry much if the secret was compromised. This may also be possible using the command option in authorized_keys?

that would vastly be my preference (letting standard unix user permissions work) versus any sort of homebrew thing that enables groups/anyone to write your files

Adbot
ADBOT LOVES YOU

xtal
Jan 9, 2011

by Fluffdaddy
What I do for this as a compromise is run sshd inside docker and expose the specific folder as a volume (basically ssh with chroot.) But you really shouldn't be afraid of building something this simple yourself, that is a good way to minimize your attack surface when your use case is highly specific.

huhu
Feb 24, 2006
Related to my previous question, I thought this would be simpler than ti is but I'm struggling in my Google search... what is the easiest way to get Python to automatically upload files to my server? I can do it manually in the terminal using SSH but I'd like to automate that part.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
https://wiki.python.org/moin/SecureShell

eightysixed
Sep 23, 2004

I always tell the truth. Even when I lie.
Can someone please tell me what I'm missing on upgrading my rPi 2 B to the new(ish) Pixel DE.

Running:
code:
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install -y rpi-chromium-mods
sudo apt-get install -y python-sense-emu python3-sense-emu
sudo apt-get install -y python-sense-emu-doc realvnc-vnc-viewer
Everything works fine, as it should. Hooking up the Pi to a monitor, I'm still on LXDE, same if I VNC in. What in the world am I missing here? Does it have anything to do with the fact that the OS is on a USB drive? I highly doubt it, as it obviously knows where to look for LXDE. On boot, I get the normal run of commands and all that, no splash screen and then directly into LXDE, not Pixel. What am I missing? This is aggravating.

edit: The only reason I don't want to do a full re-install is because the data on the thing, as well as the config, USB, external HDD settings, and auto-processes are perfect. Starting over is not an option :saddowns:

eightysixed fucked around with this message at 02:50 on Mar 11, 2017

MrPablo
Mar 21, 2003

I can confirm that the Northern Virginia Microcenter has the Pi Zero W in stock, and that it works fine with the latest Raspbian.

Only registered members can see post attachments!

hooah
Feb 6, 2006
WTF?
I thought I set up a cron job on my Pi3 to update pihole weekly, but it doesn't seem to work. This would be my first time working with cron. I did crontab -e and made the following addition: 0 1 * * 1 pihole -up, but I've found that it doesn't seem to actually be updating, since pihole -v tells me there is a newer version available. What might I have missed/done wrong?

xtal
Jan 9, 2011

by Fluffdaddy
You may need to specify the full path to the executable; cron runs in a more minimal context without loading bash_profile or anything like that. If that doesn't fix it then look at the output for the cronjob, which I believe is in /var/mail/yourname.

LochNessMonster
Feb 3, 2005

I need about three fitty


xtal posted:

You may need to specify the full path to the executable; cron runs in a more minimal context without loading bash_profile or anything like that. If that doesn't fix it then look at the output for the cronjob, which I believe is in /var/mail/yourname.

The cronjob is in /var/spool/cron/yourname and you are correct about specifying full path.

Log file can be found in /var/log/cron

LochNessMonster fucked around with this message at 21:48 on Mar 12, 2017

hooah
Feb 6, 2006
WTF?

LochNessMonster posted:

The cronjob is in /var/spool/cron/yourname and you are correct about specifying full path.

In Raspbian it's in /var/spool/cron/crontabs/yourname (although I couldn't cd to /crontabs - not even with sudo, I could still sudo less the crontab).

quote:

Log file can be found in /var/log/cron

Not in Raspbian :(

xtal
Jan 9, 2011

by Fluffdaddy
BTW this is a linux question and not raspberry pi question so that thread might be more helpful

LochNessMonster
Feb 3, 2005

I need about three fitty


hooah posted:

In Raspbian it's in /var/spool/cron/crontabs/yourname (although I couldn't cd to /crontabs - not even with sudo, I could still sudo less the crontab).


Not in Raspbian :(

Ah, I'm not running Raspbian, guess Debian does it slightly different.

Check /var/log/syslog, apperently Debian logs cron mesaages to syslog by default.

General_Failure
Apr 17, 2005
My Orange Pi PC2 arrived. Neat little thing. It's doing what I got the RPi3 for. aarch64 stuff.
Couldnt get the legacy kernel Ubuntu desktop to display anything on a monitor for some drat reason. Armbian mainline was released a few days ago for it. Uses a simplefb based xorg. Even though the kernel is still in its very early days I'm using it as a headless build / NFS server attached to my old usb external 60gb hard drive. So I can mess with things easily and build them.
I was hoping to use the OPi PC2 as a replacement mini desktop. My OPi PC does that currently, however is the target of an OS port.

By the way. I did an update on the RPi3 last night. It's been at least a month. WTF did they change? It's not a ponderous piece of poo poo any more!

Drone
Aug 22, 2003

Incredible machine
:smug:


Still haven't done anything with my spare Pi2 after I upgraded by RetroPie box to a Pi3. Has anyone personally done one of those projects to build a standalone internet radio, using either the LED or touchscreen TFT kit? I'm thinking that might be a fun thing to do, especially if I can find an old, cool-looking vintage radio that still has speakers that sound good and just switch the transistor (or tube?) guts out for a Pi, and find a creative way to integrate a screen into it.

Mainly thinking about something for the kitchen I guess.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

underage at the vape shop posted:

This sounds pretty cool, and unique, and a pretty easy way to get full marks if I can make it work. I think I could probably do it pretty quickly too, like once I figure out how to make it work for 1 item, I can just remake the maccas self serve kiosk. Only problem is that the touchscreen is kinda expensive (96 aud)

You can prototype it with just a regular display and mouse, the touchscreen just sends mouse events. (Right? Or are they "touch" events now?) Just keep in mind the dimensions of the touch screen when you're designing, so you can call your project out as being designed for it and working with it.

Also, if you can, make your thing a real app using a real native UI framework rather than a web page. That'll also count for a lot; tons of people can poo poo out a web page with database backing, far fewer can build real native software. Or hell, you could even use Javawhile non-Android Java UI development is pretty much dead, its concepts translate elsewhere, and it should perform just fine on a Pi3.

xtal
Jan 9, 2011

by Fluffdaddy
What camera should I get for all-day surveillance? Does that even exist, something that can record both during the day and at night? Or do people just get a day camera and turn lights on?

Paul MaudDib
May 3, 2006

TEAM NVIDIA:
FORUM POLICE

eschaton posted:

You can prototype it with just a regular display and mouse, the touchscreen just sends mouse events. (Right? Or are they "touch" events now?) Just keep in mind the dimensions of the touch screen when you're designing, so you can call your project out as being designed for it and working with it.

Also, if you can, make your thing a real app using a real native UI framework rather than a web page. That'll also count for a lot; tons of people can poo poo out a web page with database backing, far fewer can build real native software. Or hell, you could even use Javawhile non-Android Java UI development is pretty much dead, its concepts translate elsewhere, and it should perform just fine on a Pi3.

For personal projects... nowadays for simple interfaces I am leaning more and more heavily towards (n)curses-style libraries (if you've never used these: basically imagine like the Ubuntu alternate/non-graphical installer). It's a nice middle ground between raw console input and a full-on web-based browser interface.

There aren't any straight-up ncurses implementations for Java, but there is a full-native clone called Lanterna that I've played with a bit that is fairly OK. The other choice is Charva - which is a Swing renderer that runs in a console, so kind of an interesting hybrid of GUI and console. Looks pretty interesting.

Python might be a better choice for that kind of thing but I can't bring myself to start projects in it while knowing what I know about the GIL and the consequent limitations on threading your code down the road if you need to.

Spring/Thymeleaf is a nice stack for web stuff but there is a lot of dumb plumbing you need to do before you get down to coding poo poo (the good news: do it once, or find an archetype that does what you want, and you can just copy/paste it forever). Ruby is OK and Rails does a pretty good job of cutting out the burden of configuration and letting you get going asap, but I'm not a super big fan of dynamic typing for non-trivial projects.

Paul MaudDib fucked around with this message at 00:36 on Mar 15, 2017

Paul MaudDib
May 3, 2006

TEAM NVIDIA:
FORUM POLICE

xtal posted:

What camera should I get for all-day surveillance? Does that even exist, something that can record both during the day and at night? Or do people just get a day camera and turn lights on?

There's no such thing as a camera that can work without light. You can, however get cameras that have both a "day mode" and also a "night mode" where it's sensitive to infrared and has little IR LEDs that don't show up (much) in the visible spectrum. Illuminators don't work well through glass though (it tends to reflect the light back).

If you want to illuminate something outside, you can get IR LED/incandescent/halogen/whatever bulbs too.

Paul MaudDib fucked around with this message at 00:28 on Mar 15, 2017

xtal
Jan 9, 2011

by Fluffdaddy
I want to get a camera for indoor surveillance​ since I live on the ground floor downtown in a building with glass walls. But I figure if someone is going to smash into my place it will be at night and my lights will be off. So I guess what I'm wondering is how this was addressed by people who have thought about this more than me.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Do you think the burglars will operate in the dark, or turn lights on?

xtal
Jan 9, 2011

by Fluffdaddy
In my imagination they have flashlights

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

xtal posted:

In my imagination they have flashlights

Surveillance cameras come with ir illumination.

In my imagination, they have nvgs like in mission impossible.

Fitzy Fitz
May 14, 2005




Would an RPi be of any use to 17-year-old kid who loves tech but doesn't have a computer with access to the internet? My fiance's little brother has a mind for computers and loves "hacking" his electronics (smartphone, smartwatch, tablet), but he's in a rural spot without an actual PC or home internet (outside of his phone's data plan)... he could probably use the internet at a friend's house though.

Anyway, he would love a chance to play around with something more serious.

He's gonna be visiting us for a week or two, so we can get the thing set up here, but I've never used one before and don't know if he could get much out of it once he goes back home.

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

Fitzy Fitz posted:

Would an RPi be of any use to 17-year-old kid who loves tech but doesn't have a computer with access to the internet? My fiance's little brother has a mind for computers and loves "hacking" his electronics (smartphone, smartwatch, tablet), but he's in a rural spot without an actual PC or home internet (outside of his phone's data plan)... he could probably use the internet at a friend's house though.

Anyway, he would love a chance to play around with something more serious.

He's gonna be visiting us for a week or two, so we can get the thing set up here, but I've never used one before and don't know if he could get much out of it once he goes back home.

You would be better off giving him an older full-on laptop. Way more useful. Or even better, an older laptop and a Pi.

With just a Raspberry Pi and a phone, and occasionally going over to someone's house with a real computer, he'll have trouble handling things like an SD card for the Pi going bad and getting a new one formatted and set up. With a regular laptop to use with the Pi, he'll have a lot easier time setting up and using a lot of the stuff you can do with the Pi, as well as recovering from serious errors.

Paul MaudDib
May 3, 2006

TEAM NVIDIA:
FORUM POLICE

Fitzy Fitz posted:

Would an RPi be of any use to 17-year-old kid who loves tech but doesn't have a computer with access to the internet? My fiance's little brother has a mind for computers and loves "hacking" his electronics (smartphone, smartwatch, tablet), but he's in a rural spot without an actual PC or home internet (outside of his phone's data plan)... he could probably use the internet at a friend's house though.

Anyway, he would love a chance to play around with something more serious.

He's gonna be visiting us for a week or two, so we can get the thing set up here, but I've never used one before and don't know if he could get much out of it once he goes back home.

Sure, but it'll help if he has access to another computer. Also, without internet access he'll need to think hard about how he'll get packages for apt/python/etc that he needs to do his projects, but I guess that's the friend's house part.

Make sure he keeps backups of his SD card image in case he trashes it, because again, with no internet you don't want to be left with no system image and no way to restore it.

Maybe give him a Bus Pirate too if he's into small electronics projects. Can be used for all kinds of small embedded tasks.

Fitzy Fitz
May 14, 2005




The old laptop idea is good. I assume we could load it up with whatever software and backups he would need before he leaves.

Not really sure where to get an old laptop though. I can't spend a lot of money on this, hence the Raspberry Pi.

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

Fitzy Fitz posted:

The old laptop idea is good. I assume we could load it up with whatever software and backups he would need before he leaves.

Not really sure where to get an old laptop though. I can't spend a lot of money on this, hence the Raspberry Pi.

Well don't forget a raspberry pi already needs the power adapter, a suitable monitor/tv he can use, keyboard, mouse, a good SD card or two. That stuff adds up.

Your local goodwill or similar charity/thrift store should have cheap older laptops available for the $50-$200 range, and you might just ask around people you know to see if any of them have an old machine they aren't using anymore. Similarly, old desktops and matching monitors will be similarly cheap from those sorts of places, and would look fine too.

Platystemon
Feb 13, 2012

BREADS

xtal posted:

I want to get a camera for indoor surveillance​ since I live on the ground floor downtown in a building with glass walls. But I figure if someone is going to smash into my place it will be at night and my lights will be off. So I guess what I'm wondering is how this was addressed by people who have thought about this more than me.
https://www.youtube.com/watch?v=x_CiLZY-HGw

I dont know how old/cheap your building is, but putting a man‐sized hole in modern security glass is a serious undertaking.

xtal
Jan 9, 2011

by Fluffdaddy
Can I test that it's security glass without a sledgehammer because I really highly doubt it is

eta :can: I'm just going to get the ordinary day-time camera and maybe motion activated lights if i feel fancy

Paul MaudDib
May 3, 2006

TEAM NVIDIA:
FORUM POLICE

fishmech posted:

Well don't forget a raspberry pi already needs the power adapter, a suitable monitor/tv he can use, keyboard, mouse, a good SD card or two. That stuff adds up.

Your local goodwill or similar charity/thrift store should have cheap older laptops available for the $50-$200 range, and you might just ask around people you know to see if any of them have an old machine they aren't using anymore. Similarly, old desktops and matching monitors will be similarly cheap from those sorts of places, and would look fine too.

Old thinkpad T/W series are perfect for this. A decent W510 is like $150 on eBay and you get a semi-decent screen (1440x900 is the most common, some are lovely 1366x768 or 1920x1080) USB 3.0, first-gen Core i7, removable ODD for second HDD (boot from a cheap 240GB SSD), ExpressCard (rarely useful but it's there), eSATA, and a semi OK discrete GPU that'll do a bit better than the iGPUs of that vintage. Plus the keyboard of course.

The T-series are the same - just no discrete GPU (helps battery life a bit) and in some smaller sizes.

Both series give you some options for expansion, and wear like the proverbial brick shithouse - magnesium chassis and all that. I've literally stepped on mine once. However, battery life is obviously not as good as a modern LV/ULV processor.

But yeah, with either a RPi or a desktop he'll need a monitor and all that crap. The two options worth considering here are surfing AcerRecertified for a cheapo $40 20-in, or getting a Korean 27" 1440p panel for like $200 like a QNIX QX2710 Multi.

Friend
Aug 3, 2008

Pretending you're talking to someone who has never heard of a raspberry pi before and knows about code but doesn't know any. I have a pi zero with Retropie installed and it has been great, but last night I tried to update the packages or whatever and it got stuck, so I unplugged it. Now whenever I start it, a bunch of crap loads in the terminal but once it gets to the Emulation Station screen, I can't type anything and it doesn't recognize any controllers. F4, Alt F4, etc. does nothing. I have an image of the SD card on my mac (don't have access to a PC), but I can't figure out how to mount it and get saves/roms off. Any ideas?

Drone
Aug 22, 2003

Incredible machine
:smug:


Friend posted:

it got stuck, so I unplugged it

Ya done corrupted your SD card, you're outta luck.

I switched to storing my ROMs and savedata on a tiny little 128GB USB drive instead of keeping them on the SD card, so my poo poo is always completely safe from SD card corruption. If the SD does get corrupted, I just reflash it with a fresh image, and all of my stuff is still there when I plug it back in.

xtal
Jan 9, 2011

by Fluffdaddy
The SD card should really only be used by the OS for reasons including performance.

doctorfrog
Mar 14, 2007

Great.

I just use WinSCP to backup the profile to PC now and then, or the Samba share, which is ridiculously slow for some reason. I also just install the ROMs actually play, which helps keep the backups small.

Friend
Aug 3, 2008

Drone posted:

Ya done corrupted your SD card, you're outta luck.

I switched to storing my ROMs and savedata on a tiny little 128GB USB drive instead of keeping them on the SD card, so my poo poo is always completely safe from SD card corruption. If the SD does get corrupted, I just reflash it with a fresh image, and all of my stuff is still there when I plug it back in.

I assumed I had hosed up something with the unplug, but I hoped it was minor. It starts up totally normal except for a message that says
code:
[FAILED] Failed to start Load Kernel Modules.
Others online have fixed this by hitting alt-ctrl-F1 but that does nothing for me. So I'm definitely screwed?

Hadlock
Nov 9, 2004

Paul MaudDib posted:

Old thinkpad T/W series are perfect for this. A decent W510 is like $150 on eBay and you get a semi-decent screen (1440x900 is the most common, some are lovely 1366x768 or 1920x1080) USB 3.0, first-gen Core i7, removable ODD for second HDD (boot from a cheap 240GB SSD), ExpressCard (rarely useful but it's there), eSATA, and a semi OK discrete GPU that'll do a bit better than the iGPUs of that vintage. Plus the keyboard of course.

The T-series are the same - just no discrete GPU (helps battery life a bit) and in some smaller sizes.

Both series give you some options for expansion, and wear like the proverbial brick shithouse - magnesium chassis and all that. I've literally stepped on mine once. However, battery life is obviously not as good as a modern LV/ULV processor.

But yeah, with either a RPi or a desktop he'll need a monitor and all that crap. The two options worth considering here are surfing AcerRecertified for a cheapo $40 20-in, or getting a Korean 27" 1440p panel for like $200 like a QNIX QX2710 Multi.

This is the correct answer, buy a refurb T420 or something, he can hack/reflash the bios, all the parts come apart with the same size screw so he can have fun disassembling and reassembling it, and Thinkpads are legendary for their linux support. If it won't run on a Thinkpad, your OS has some very exotic hardware requirements. Should be able to get out the door for $150 with windows preinstalled. It will last him through college if he swaps in an SSD and replacement battery down the road. The T410 also works, that's the first model with the dual hyperthreaded (quad core) i5 and they're so cheap and plentiful you ought to be able to find someone giving them away for free.

Drone
Aug 22, 2003

Incredible machine
:smug:


Friend posted:

So I'm definitely screwed?

Yep. Just flash a fresh RetroPie image onto your microSD and move to using a setup like this and never look back: https://github.com/RetroPie/RetroPie-Setup/wiki/Running-ROMs-from-a-USB-drive

With the latest version of RetroPie it's super simple to set up (in the past it was kindof a pain) and there's no reason not to do it this way anymore. 128GB USB sticks can be both super tiny (I have teenytiny little Bluetooth-dongle-sized one from Samsung) and aren't terrible expensive at around 30 bucks.

doctorfrog
Mar 14, 2007

Great.

Drone posted:

Yep. Just flash a fresh RetroPie image onto your microSD and move to using a setup like this and never look back: https://github.com/RetroPie/RetroPie-Setup/wiki/Running-ROMs-from-a-USB-drive

With the latest version of RetroPie it's super simple to set up (in the past it was kindof a pain) and there's no reason not to do it this way anymore. 128GB USB sticks can be both super tiny (I have teenytiny little Bluetooth-dongle-sized one from Samsung) and aren't terrible expensive at around 30 bucks.

This is great. I used the USB service to load ROMs on the Pi in the past, and this is a nice extension of that. There's no reason not to do this now. Unless you don't have a USB drive, I guess.

xtal
Jan 9, 2011

by Fluffdaddy
My "NAS" is two 64GB USB keys in RAID 1

Adbot
ADBOT LOVES YOU

Portland Sucks
Dec 21, 2004
༼ つ ◕_◕ ༽つ
I'm about to finish work on a web scraping python script I'd like to keep running in the background for a couple of days. I've got a Pi3 sitting around I was thinking about using to host the process while dumping the stream to a DB on my NAS. Assuming I'm not overflowing the ram is the CPU on this thing going to be a potential bottle neck versus just hosting it on AWS?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply