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
Vavrek
Mar 2, 2013

I like your style hombre, but this is no laughing matter. Assault on a police officer. Theft of police property. Illegal possession of a firearm. FIVE counts of attempted murder. That comes to... 29 dollars and 40 cents. Cash, cheque, or credit card?

ante posted:

What the gently caress, don't buy that, just cut up a 30 cent USB cable from eBay and solder on some female headers.

I did mention the cable+wire cutter method. Had mediocre luck with it in the past, but also not had much practice. I think of it as the zero-cost option, because I assume wire cutters and USB cables are just present, at all times, in sufficient amounts.

Adbot
ADBOT LOVES YOU

nmfree
Aug 15, 2001

The Greater Goon: Breaking Hearts and Chains since 2006

Alehkhs posted:

Is there anyone out there with a Pi2 and a 90-degree micro usb power cable/adapter (something like this)?

I want to know how much width is added with the 90-degree power cable. I have a project in mind, but it has a hard limit on width of 6.3cm. The Pi2 supposedly begins at 5.7cm, and the power port is on the side. :ohdear:
I measured, and the 90° adapter I have sticks out 11-12mm.

Alehkhs
Oct 6, 2010

The Sorrow of Poets

nmfree posted:

I measured, and the 90° adapter I have sticks out 11-12mm.

drat. Thanks for checking though!

Well, all I'm looking to do is basically set up a trail camera running off of a usb charger - which will hopefully run the thing for close to a day(?). It'll be watching always, but only record when it senses movement. Would I even need a Pi2 for that, or would a PiA or PiB be better/fine (the Pi B+ is when the power port moved)?

Also, anyone have any experience with that sort of remote-powering and motion-sensory? I know there's been a couple camera projects, but they seemed to wire back into a house and continuously stream/record.

Alehkhs fucked around with this message at 18:12 on Oct 2, 2015

A Proper Uppercut
Sep 30, 2008

Moey posted:

Nice! I would love to do this at one point (once I have a bar to plop it on).

Hey, I'm working on one of those too! I'm making a few modifications though (namely making it a bit wider). Drawing the whole thing up in Sketchup is really helping.

Still not sure how the marquee is attached though.

Floor is lava
May 14, 2007

Fallen Rib

A Proper Uppercut posted:

Hey, I'm working on one of those too! I'm making a few modifications though (namely making it a bit wider). Drawing the whole thing up in Sketchup is really helping.

Still not sure how the marquee is attached though.

I went with a widescreen monitor. Should give move room for splitting the two player setup. My stepfather heard about my project and wants me to build him one with the old Williams classic arcade setup.

Look at this abomination:

A Proper Uppercut
Sep 30, 2008

floor is lava posted:

I went with a widescreen monitor. Should give move room for splitting the two player setup. My stepfather heard about my project and wants me to build him one with the old Williams classic arcade setup.

Look at this abomination:


Haha that's so 80's/early 90's, drat.

I didn't go with a widescreen just because I didn't want black bars or poo poo to be stretched out. Maybe my thinking was wrong on that. I'm just hoping having a few more inches on either side of the 4:3 monitor won't look dumb. Hell it was only $30 on ebay either way.

Does the MAME thread not exist anymore?

A Proper Uppercut fucked around with this message at 20:50 on Oct 2, 2015

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

Alehkhs posted:

drat. Thanks for checking though!

Well, all I'm looking to do is basically set up a trail camera running off of a usb charger - which will hopefully run the thing for close to a day(?). It'll be watching always, but only record when it senses movement. Would I even need a Pi2 for that, or would a PiA or PiB be better/fine (the Pi B+ is when the power port moved)?

Also, anyone have any experience with that sort of remote-powering and motion-sensory? I know there's been a couple camera projects, but they seemed to wire back into a house and continuously stream/record.

The one time I checked, I was able to run a Pi B+ for ~7 hours off one of those cell chargers that hold two li-ion batteries. That was doing nothing but hooked up to a TV showing the desktop. You'll get significantly lower usage if you're taking pictures and doing processing on them or whatever. Just something to help you ballpark the size of the stack of batteries you'll need.


I also recommend you use one of the Pi Cameras, and search around for how others have done motion sensing. Without any research, I personally would use OpenCV to take a picture every minute or whatever and compare differences to decide whether or not to store it, but people that have actually sat down and thought about it might have come up with way better solutions. I think the A had one of the camera connectors? If it did, that's the one you'll want to go with, probably. Image processing will take longer, but lower power usage overall.

Naffer
Oct 26, 2004

Not a good chemist

Paul MaudDib posted:

Most people got blinded by the $35 (plus $75 of other stuff) pricetag and underestimated the performance implications, myself included. I think very few people anticipated how quickly they can burn up an SD card. You really really need to do the thing you linked to be assured of long-term stability.

I'm a big advocate for the Liva and Liva X right now. It's basically a Pi that uses an Intel Baytrail-M x86 processor, roughly in the low-end laptop class. Idles at about 4W and peaks at 12W with Prime95+Furmark. Not as low as a Pi, but it absolutely destroys even a Pi2 in performance. They have, USB 3.0, built-in wifi, eMMC drives on the board, and the Liva X variant actually offers an mSATA slot so you can put a real SSD on it too. The original Liva goes for $80-85 nowadays and the Liva X has been down around $95 a few times. Once you buy all the bullshit you need to make a Pi run stable, you're going to be spending at least that much anyway.

If you really want ARM for some reason I think you would be better off with one of the Pi clones that has an onboard mSATA/SATA channel and USB 3.0. Both of those make a huge difference in performance.

Of course, those devices are indebted to the Pi for taking the plunge and ushering in a whole new class of sub-$100 computers.

I bought a liva recently that I installed Ubuntu on and the performance has been great, but the case is a piece of garbage. When snapped shut the power button doesn't work correctly, and taking it back apart frequently results in broken clips. The green power LED on the front of mine was really poorly attached to the board and also doesn't work.

doctorfrog
Mar 14, 2007

Great.

Back to SD Card questions, I wonder if Raspbian is designed not to do unnecessary disk writes, like with log files and stuff? I know very little about Linux, so I don't know what the average stripped down Debian does in terms of background disk writes.

The lesson's clear not to use a Pi for anything mission critical, but I wonder if I shouldn't just image my RetriPie image right now. It's just sitting there, infected with some digital alheimers that's killing it day by day :ohdear:

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

doctorfrog posted:

Back to SD Card questions, I wonder if Raspbian is designed not to do unnecessary disk writes, like with log files and stuff? I know very little about Linux, so I don't know what the average stripped down Debian does in terms of background disk writes.
Nope!

quote:

The lesson's clear not to use a Pi for anything mission critical, but I wonder if I shouldn't just image my RetriPie image right now. It's just sitting there, infected with some digital alheimers that's killing it day by day :ohdear:

Yep!


I don't know if retropie saves high scores or anything, but you could also set everything on the SD card to read-only, if you're cool with all the implications of that

dreesemonkey
May 14, 2008
Pillbug
Hi thread, I was hoping you could point me in the right direction. I've been thinking of getting a Pi, but I'm not sure if I'd be better off with an arduino or something, and really I don't know the difference (computer vs. microprocessor).

I was going to use this as an opportunity to learn some new stuff like babby's first introduction to linux, mysql, apache, programming, electronics, etc.

My day job right now is a database developer, though I use a fisher price software (Filemaker) compared to the real stuff like SQL/Oracle. So I'm already familiar with database schemas and high-level programming, but it would be fun to learn something new.

Project Idea 1:
To start, I was going to try and have two temperature sensors log readings to a mysql database every minute / 5 minutes / whatever to basically just log the temperature in our house vs. our basement or outside. No real reason other than "hey this should be an easy enough intro".

Ultimately in a perfect world I would have a database logging all sorts of stuff, interacting with my calendar, weather and whatever other APIs so I could have a dashboard specific to me. Maybe I could monitor my electrical useage or process my YNAB data as well? All sorts of cool stuff!

Project Idea 2:
I'd like to have a device run a query against an existing existing database using ODBC/JDBC, and if there are "unread" records, then control a relay or whatever to turn a spinning police light on. The query would run every x seconds or so to determine whether the light should be on or off.

Now, I'm not sure what devices would best suit my needs. I have an old PC laying around that I could probably throw ubuntu on, after reading the last few pages of "Pi's are pretty much garbage" it's the way I'm leaning (for project 1 at least) since eventually it could be running mySQL/Apache and whatever else I have to throw at it. Project 2 would be fine with a Pi, but maybe it's better suited to an arduino? I don't know.

ElCondemn
Aug 7, 2005


dreesemonkey posted:

Hi thread, I was hoping you could point me in the right direction. I've been thinking of getting a Pi, but I'm not sure if I'd be better off with an arduino or something, and really I don't know the difference (computer vs. microprocessor).

I was going to use this as an opportunity to learn some new stuff like babby's first introduction to linux, mysql, apache, programming, electronics, etc.

My day job right now is a database developer, though I use a fisher price software (Filemaker) compared to the real stuff like SQL/Oracle. So I'm already familiar with database schemas and high-level programming, but it would be fun to learn something new.

Project Idea 1:
To start, I was going to try and have two temperature sensors log readings to a mysql database every minute / 5 minutes / whatever to basically just log the temperature in our house vs. our basement or outside. No real reason other than "hey this should be an easy enough intro".

Ultimately in a perfect world I would have a database logging all sorts of stuff, interacting with my calendar, weather and whatever other APIs so I could have a dashboard specific to me. Maybe I could monitor my electrical useage or process my YNAB data as well? All sorts of cool stuff!

Project Idea 2:
I'd like to have a device run a query against an existing existing database using ODBC/JDBC, and if there are "unread" records, then control a relay or whatever to turn a spinning police light on. The query would run every x seconds or so to determine whether the light should be on or off.

Now, I'm not sure what devices would best suit my needs. I have an old PC laying around that I could probably throw ubuntu on, after reading the last few pages of "Pi's are pretty much garbage" it's the way I'm leaning (for project 1 at least) since eventually it could be running mySQL/Apache and whatever else I have to throw at it. Project 2 would be fine with a Pi, but maybe it's better suited to an arduino? I don't know.

Use your old PC as your database and use the RPi for your sensors etc. You could also get a ethernet shield and use an arduino for the monitors but it's a bit tougher to code. The PI is great for lots of stuff, but mostly it's just great for tinkering and testing, or making arduino type toys with higher level languages.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Yeah, it sounds like you're at the level where a Pi would be perfect for those projects. You don't need high reliability or anything, so you'll have a good time messing around. The problems you've been reading about are mostly overstated because we're trying to use it for serious projects where reflashing a card is a huge pain in the dick.


Arduinos are a different beast entirely, and much lower-level, so standalone database stuff like that would be a difficult and unusual and slightly difficult.


edit:
If you want to turn temperature/whatever logging into a Really Cool Thing, then set up Grafana with InfluxDB on your spare desktop running Ubuntu, and send all your datapoints there with your Pi.

ante fucked around with this message at 00:12 on Oct 6, 2015

Hadlock
Nov 9, 2004

Hadlock posted:

I guess AliExpress is selling a stripper model of the quad core Orange Pi for $18.53 shipped to the USA

http://www.aliexpress.com/item/Oran...44_5%2C201409_4

http://hackaday.com/2015/09/05/orange-is-the-new-15-pi/

Doesn't have built in WiFi and no SATA port, it also has only three USB ports, but it does have 4 cores and 1GB SDRAM, and the standard Pi 40 pin header, and runs stock Raspbian sd card images.



The biggest issue I have with it is that two of the holes it doesn't use the standard mounting holes that the A+ and B+ use - which means you will have to fab up 2 new mounts for whatever you bolt it to. At $18.50 that's still cheaper than an A+ which only has one USB port (33% as much) and 256mb ram (25% as much)

I would love to see an A++ with wifi onboard, quad core cpu and 1gb ram but this Orange Pi will suffice I guess. Ordered one to play around with.

Ok my Orange Pi PC came in but it won't boot if you feed it 5V DC in to the GPIO like the Pi will. I'm guessing it has something to do with the power switch being wired a certain way.

It doesn't take Mini USB for some reason (?!?) and instead uses some teensy tinsy 5V barrel adapter that's totally incompatible with all my Arduino barrel adapter stuff. Is there a way to roll your own barrel adapter? I'm tempted to just unsolder the barrel jack and replace it with two header pins and call it a day.

Thoughts?

durtan
Feb 21, 2006
Whoooaaaa
I'm sad to report the MotionPie software doesn't seem to be up to the task as a long-term security camera. I'm still optimistic finding the right settings will alleviate my problems, but I think I may be asking too much of it.

The software is too unstable. It can occasionally glitch out and ignore motion or forget to stop recording. I can't seem to find a way to get it to record 24/7, so I have it set taking a photo every five seconds and relying on motion-activated video to catch important events. This can (understandably) lead to 15,000+ photos a day, which was giving me around 1.5GB a day at full resolution including videos. This was a significant problem since large amounts of videos confused the web UI, causing timeouts and forcing me to delete archives through SSH to clear up enough space for it to allow photo preview again. It has also crashed several times for unknown issues and I've had to reboot it through SSH several times, long-term mounting could make this situation very complicated if the plug is in an inconvenient spot. Also, motion-detection seems to be very processor-heavy and I get maybe 3 frames/sec with motion-detection enabled regardless of any still-images being taken.

Finally, the biggest issue I'm struggling dealing with is that the software doesn't have an easy way to backup photos to another computer that I'm aware of. I'm currently looking into a workaround to this, but a security camera is useless if the videos can be stolen along with the camera. There are several positive things I like about this software: Time-lapse photos and wildlife observation can benefit very highly from a camera like this. I may be asking too much from his software and I know a one-man project that doesn't make financial gains is going to suffer from bugs, and the UI is pretty awesome to work with. I'm hoping to get some more time with the camera and try to find settings that work, but as of now it's currently recording the rain to make time-lapse videos during the day and it's pretty fun to watch, so I consider that a win.

G-Prime
Apr 30, 2003

Baby, when it's love,
if it's not rough it isn't fun.

durtan posted:

I'm sad to report the MotionPie software doesn't seem to be up to the task as a long-term security camera. I'm still optimistic finding the right settings will alleviate my problems, but I think I may be asking too much of it.

The software is too unstable. It can occasionally glitch out and ignore motion or forget to stop recording. I can't seem to find a way to get it to record 24/7, so I have it set taking a photo every five seconds and relying on motion-activated video to catch important events. This can (understandably) lead to 15,000+ photos a day, which was giving me around 1.5GB a day at full resolution including videos. This was a significant problem since large amounts of videos confused the web UI, causing timeouts and forcing me to delete archives through SSH to clear up enough space for it to allow photo preview again. It has also crashed several times for unknown issues and I've had to reboot it through SSH several times, long-term mounting could make this situation very complicated if the plug is in an inconvenient spot. Also, motion-detection seems to be very processor-heavy and I get maybe 3 frames/sec with motion-detection enabled regardless of any still-images being taken.

Finally, the biggest issue I'm struggling dealing with is that the software doesn't have an easy way to backup photos to another computer that I'm aware of. I'm currently looking into a workaround to this, but a security camera is useless if the videos can be stolen along with the camera. There are several positive things I like about this software: Time-lapse photos and wildlife observation can benefit very highly from a camera like this. I may be asking too much from his software and I know a one-man project that doesn't make financial gains is going to suffer from bugs, and the UI is pretty awesome to work with. I'm hoping to get some more time with the camera and try to find settings that work, but as of now it's currently recording the rain to make time-lapse videos during the day and it's pretty fun to watch, so I consider that a win.

The only one I can suggest something for is the backup. If you've got network access to it, set up a share on another machine on the same network, mount it on the Pi, and either have all of the data directly write to the remote machine (it may actually be faster than a local write, depending on what media you have attached), or set up a cron job to move data over to it periodically. And then another job for archiving/deleting.

eightysixed
Sep 23, 2004

I always tell the truth. Even when I lie.
Or, of course, rsync.

dreesemonkey
May 14, 2008
Pillbug

ElCondemn posted:

Use your old PC as your database and use the RPi for your sensors etc. You could also get a ethernet shield and use an arduino for the monitors but it's a bit tougher to code. The PI is great for lots of stuff, but mostly it's just great for tinkering and testing, or making arduino type toys with higher level languages.


ante posted:

Yeah, it sounds like you're at the level where a Pi would be perfect for those projects. You don't need high reliability or anything, so you'll have a good time messing around. The problems you've been reading about are mostly overstated because we're trying to use it for serious projects where reflashing a card is a huge pain in the dick.

Arduinos are a different beast entirely, and much lower-level, so standalone database stuff like that would be a difficult and unusual and slightly difficult.

edit:
If you want to turn temperature/whatever logging into a Really Cool Thing, then set up Grafana with InfluxDB on your spare desktop running Ubuntu, and send all your datapoints there with your Pi.

Thanks for the advice, is there any Pi model that I should avoid or just buy the best one?

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
There's really only the Pi 2 (same footprint as B+) and A+ now.

Get the Pi 2.

evol262
Nov 30, 2010
#!/usr/bin/perl

dreesemonkey posted:

Thanks for the advice, is there any Pi model that I should avoid or just buy the best one?

Gonna piggyback off this and say that there's absolutely no reason to use an old PC for the other stuff when you can run a VM on your current PC.

If you want something gruntier and always on, there are a bunch of <$100 boards that have SATA and enough memory to handle hobby databases while taking about the same amount of space and power as the pi, and running stock Ubuntu/Fedora images.

If you want something less sensitive, consider pairing it with a mic or a proximity sensor (IR, ultrasonic, lidar, whatever). Or just doing edge detection, which motionpie is hopefully doing with opencv, but I dunno

Hadlock
Nov 9, 2004

dreesemonkey posted:

Hi thread, I was hoping you could point me in the right direction. I've been thinking of getting a Pi, but I'm not sure if I'd be better off with an arduino or something, and really I don't know the difference (computer vs. microprocessor).

I was going to use this as an opportunity to learn some new stuff like babby's first introduction to linux, mysql, apache, programming, electronics, etc.

My day job right now is a database developer, though I use a fisher price software (Filemaker) compared to the real stuff like SQL/Oracle. So I'm already familiar with database schemas and high-level programming, but it would be fun to learn something new.

Yeah a Pi would work great for general linux hacking, a toaster can run linux on the command line. You could always just get a chromebook which already runs linux and drop down to the command line. Instant 12 hours battery life, great display, modern(ish) hardware. If you want to write your first python magnum opus or ruby on rails app talking to MariaDB, MySQL Postgresql etc on the back end you don't need much at all. When I was in middle and high school I loved having a bunch of displays on my desktop but today I find it kind of annoying.

A dedicated laptop for that sort of thing (if you're serious about it) might be better than a VM, but I encourage you to download VMWare and a copy of Mint (Ubuntu + a sane GUI) and get cracking there. You might be surprised how smooth VMWare runs on your home pc. If you're running Windows Pro you can just flip a switch and run Hyper-V from the desktop :awesomelon:

Methanar
Sep 26, 2013

by the sex ghost
I've made myself a script that I'll run with cron to regularly check if some of my services are running.

The script works but I don't know how I can elevate the permissions of the script so it can properly run the service httpd status command. What would be the proper way of doing this?

[user@linuxserver bin]$ service httpd status
httpd status unknown due to insufficient privileges.


[user@linuxserver bin]$ service sshd status
/etc/init.d/sshd: line 33: /etc/sysconfig/sshd: Permission denied
openssh-daemon (pid 1689) is running...


code:
service status sshd
if [ $? -ne 0 ]; then
    	echo 'sshd is down!' | mail -f /var/spool/mail/user
f
service status httpd
if [ $? -ne 0 ]; then
    	echo 'httpd is down!' | mail -f /var/spool/mail/user
fi

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Use the root crontab.

sudo crontab -e

evol262
Nov 30, 2010
#!/usr/bin/perl
Why?

code:
visudo
username ALL=NOPASSWD: /usr/sbin/service, /usr/bin/systemctl status
systemctl status is nicer for a variety of reasons, though.

Nicer still is to make a wrapper function. And bash can do this directly
code:
check() {
  systemctl status "$1".service || echo '$1 is down!" | mail -f /var/spool/mail/user
}

check httpd
check sshd
Note: questions like this are sometimes better suited to the Linux thread, where lots of responses will come out, but I think there's a lot of overlap.

suddenlyissoon
Feb 17, 2002

Don't be sad that I am gone.
I just got my first Pi (2) last night and am planning on using it as an emulator. I was having some issues with speed so I went in to the overclocking options and noticed it was set (or at least looked that way) to 600 or 700mhz. Pi 2 was listed and I selected it. Is it normal that you have to change that?

Methanar
Sep 26, 2013

by the sex ghost

evol262 posted:

Why?

code:
visudo
username ALL=NOPASSWD: /usr/sbin/service, /usr/bin/systemctl status

If I were to do something similar to this, won't it also give the user the ability to do something malicious like service httpd stop.

Say I was writing this script and passing it off to an assistant. I want this guy to be able to restart and check the status of services that require elevated privileges with my script but not necessarily stop services just typing on the command line.

I was looking at setuid but this looks like it'd be even worse. Anything run within that script would have elevated privileges. I could take give execute privileges without write privileges to the script so he can't put in

code:
alias loving=sudo
loving rm -rf *
but theres probably ways around that too.

When an executable file has been given the setuid attribute, normal users on the system who have permission to execute this file gain the privileges of the user who owns the file (commonly root) within the created process.

Ultimately I just ran the script through root's crontab rather than the basic user's crontab, which was exactly what I needed.

evol262
Nov 30, 2010
#!/usr/bin/perl

Methanar posted:

If I were to do something similar to this, won't it also give the user the ability to do something malicious like service httpd stop.

Say I was writing this script and passing it off to an assistant. I want this guy to be able to restart and check the status of services that require elevated privileges with my script but not necessarily stop services just typing on the command line.

I was looking at setuid but this looks like it'd be even worse. Anything run within that script would have elevated privileges. I could take give execute privileges without write privileges to the script so he can't put in
Yes, it will, which is a specific limitation that the order of systemctl's (and initctl's) arguments is intended to solve.

You could write a trivial wrapper which checks positional arguments and pukes if it's not "status" or "restart", then make that writable by root only, and give sudo access to it, but systemctl is just nicer if you have access to it. Is it Fedora or EL7?

Methanar posted:

When an executable file has been given the setuid attribute, normal users on the system who have permission to execute this file gain the privileges of the user who owns the file (commonly root) within the created process.

Ultimately I just ran the script through root's crontab rather than the basic user's crontab, which was exactly what I needed.

sudo doesn't care about aliases, but yeah, suid gives elevated privileges, which is why they're usually pretty restricted, and normal users can't write them. suid stuff is used all over the place in a default system, and making sure that users can't edit it and do whatever they want is a solved problem, and you know the answer: don't let users have write permissions.

I mean, sure, running it through root's crontab works. But if you were going to hand it off to an assistant and wanted him to be able to do some stuff, emailing him about stopped services doesn't help a lot.

More to the point, controlling access to things is pretty normal stuff. Sure, you can shove this in root's crontab. But then users who don't have root permissions can't check the status of the script, and can't restart services. It's not even close to the same problem. You asked for the "proper way" to elevate privileges, which is sudo access to systemctl/service (with a wrapper, if you don't want the user to the able to stop arbitrary services). Dumping it in root's crontab isn't really a proper way to do anything, unless your problem is "this needs root privileges". But then you already know you can run it as root, so what question did you answer?

Methanar
Sep 26, 2013

by the sex ghost

evol262 posted:

Yes, it will, which is a specific limitation that the order of systemctl's (and initctl's) arguments is intended to solve.

You could write a trivial wrapper which checks positional arguments and pukes if it's not "status" or "restart", then make that writable by root only, and give sudo access to it, but systemctl is just nicer if you have access to it. Is it Fedora or EL7?


sudo doesn't care about aliases, but yeah, suid gives elevated privileges, which is why they're usually pretty restricted, and normal users can't write them. suid stuff is used all over the place in a default system, and making sure that users can't edit it and do whatever they want is a solved problem, and you know the answer: don't let users have write permissions.

I mean, sure, running it through root's crontab works. But if you were going to hand it off to an assistant and wanted him to be able to do some stuff, emailing him about stopped services doesn't help a lot.

More to the point, controlling access to things is pretty normal stuff. Sure, you can shove this in root's crontab. But then users who don't have root permissions can't check the status of the script, and can't restart services. It's not even close to the same problem. You asked for the "proper way" to elevate privileges, which is sudo access to systemctl/service (with a wrapper, if you don't want the user to the able to stop arbitrary services). Dumping it in root's crontab isn't really a proper way to do anything, unless your problem is "this needs root privileges". But then you already know you can run it as root, so what question did you answer?

I'm not a Linux admin and don't know anything about Linux administration. I'm just screwing around and trying (poorly) to consider real world situations as I do this. In my case, since this isn't real production and I have root, my problems can be solved improperly by just crontabbing as root instead of a regular user.

I made a mistake when I made it sound like the assistant example and elevating script permissions were the same issue. They weren't. The assistant example and security questions were just a tangent thoughts I had reading over your post.

Thanks for your help and explanations.

evol262
Nov 30, 2010
#!/usr/bin/perl
I wrote a reply to this, but the forum outage ate it. I didn't take your statements literally, just trying to pay it forward and give suggestions for when/if you may want to make it more flexibile

durtan
Feb 21, 2006
Whoooaaaa
MotionPie update: It appears changing the settings to reduce the amount of timelapse photos taken a day from every 5 seconds to 30 seconds has improved stability a lot. I guess it's a no-brainer that creating 10k+ photos daily might be too much to handle. I'm now generating around 500MB a day of video and photos and I can still access everything without the GUI crapping out. I'm still stress-testing the software by not deleting anything and it seems to do fairly well. I may permanently mount this camera after all.

doctorfrog
Mar 14, 2007

Great.

Which torrent client should I use with my Pi? It's running RetroPie and minidlna, but is idle a whole bunch, and torrents will be pretty light, maybe a couple GB downloaded a week onto an external flash drive. I'll be controlling it via SSH, don't care about longevity.

Daztek
Jun 2, 2006



doctorfrog posted:

Which torrent client should I use with my Pi? It's running RetroPie and minidlna, but is idle a whole bunch, and torrents will be pretty light, maybe a couple GB downloaded a week onto an external flash drive. I'll be controlling it via SSH, don't care about longevity.

Probably Transmission since it has a terminal client. There's also Deluge which has a web interface, but people seem to have issues at times though.

waloo
Mar 15, 2002
Your Oedipus complex will prove your undoing.
I'm partial to rtorrent, which I just mess about with via ssh.

eightysixed
Sep 23, 2004

I always tell the truth. Even when I lie.
Yea, rtorrent is the answer. If you want a front end for it, use RuTorrent.

Paul MaudDib
May 3, 2006

TEAM NVIDIA:
FORUM POLICE
Is there a reason that Jetson TK1s go used for more than their retail? Is there something I'm missing, like fees / import duties (I'm US) / lead time?

From my perspective this makes even less sense since I talked to someone at a conference who told me that many (all?) of the first wave of units had lovely memory bandwidth until the chip physically warmed up to a sufficient temperature. So in theory those should go for even less than a new board.

Floor is lava
May 14, 2007

Fallen Rib
Huh, getting emails requesting I resell my odroid-c1 back to the company so they can resell it. That is a bit silly.

Floor is lava fucked around with this message at 15:14 on Oct 20, 2015

DammitJanet
Dec 26, 2006

Nice shootin', Tex.
I have a 23" HDMI monitor I'm not really using anymore, and I had the idea to turn it into a tabletop virtual pinball machine by building a new pinball-table-shaped case for it and running The Pinball Arcade in vertical mode and wiring some arcade buttons into the case and some other buttons for menu navigation. I've seen a lot of people build arcade emulator machines etc, but I haven't seen anyone tackle this concept. (I'm also aware that a Pi can run a physical pinball table, but that's not what I'm proposing here.)

There's no Linux version of TPA yet, but it's on Android, iOS, Steam, and just about every console. Am I hosed? Is the Pi even suitable for a job like this?

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
The Raspberry Pi can run Android and output stuff to HDMI and read switches, so unless there are significant processor requirements, I'm not seeing an issue



floor is lava posted:

Huh, getting emails requesting I resell my odroid-c1 back to the company so they can resell it. That is a bit silly.

Huh?

CashEnsign
Feb 7, 2015
Is it possible to make an app for Android that will sned push notifications and play music when a Pi sends it a signal?

Adbot
ADBOT LOVES YOU

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass

CashEnsign posted:

Is it possible to make an app for Android that will sned push notifications and play music when a Pi sends it a signal?

Yeah I would look at IFTTT (https://ifttt.com/). If you install their app on your Android device you can send it notifications, so that solves the Android notification half of it. Then check out their new Maker channel for an API to trigger IFTTT events so the Pi could tell IFTTT something happened, and then IFTTT would have a recipe that listens for that event from the Pi and sends an Android notification to your phone. You can do pretty much anything from IFTTT too--like send a SMS, tweet, etc.

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