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
mewse
May 2, 2006

The user friendly way to flash sd cards was supposed to be etcher right? Because I tried that once and it didn't work for me so I went back to good old reliable win32diskimager.

And on this totally anecdotal experience I believe the pi foundation is better off with their own sd card writer.

mewse fucked around with this message at 22:06 on Mar 5, 2020

Adbot
ADBOT LOVES YOU

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Not a lot of functional difference between etcher and win32diskimager, I was just always sketched out that the entire community had coalesced around this random binary that has been floating around since 2010 with no updates and no known author that required administrator privileges

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Yeah the Pi foundation in general is pretty blind to how radically Linux has evolved in the last couple years. Raspbian for the Pi 4 and 3 should be a container-based system like CoreOS was, Fedora Silverblue is, etc. Write a disk image once to SD card as a very small immutable base filesystem. Add on an overlay filesystem that's read write and uses something like ostree to layer on applications (snaps, flatpaks, debs, rpms, etc), configuration and user data. Now upgrades to the immutable base OS are done in an OTA style--download the new base filesystem to a spare partition, reboot into it to verify it works, then permanently swap to the new partition. You'll never need to burn a SD card again and just keep upgrading in place. It's really silly that we're constantly burning new cards, manually changing wifi config files, etc.

Klyith
Aug 3, 2007

GBS Pledge Week

mewse posted:

And on this totally anecdotal experience I believe the pi foundation is better off with their own sd card writer.

Yeah when I set up my Pi the SD reader slot on my craptop kept failing to write the 64gb card I got, I feel like the slots on most laptops are real 5-cent afterthought jobs.

wolrah
May 8, 2006
what?

ante posted:

Not a lot of functional difference between etcher and win32diskimager, I was just always sketched out that the entire community had coalesced around this random binary that has been floating around since 2010 with no updates and no known author that required administrator privileges
The biggest difference IMO is that Etcher can flash an image contained within a compressed archive, where most of the other GUI tools and the *nix "dd" method require you to extract the raw image (in the latter case you can pipeline around that, but I can never remember the exact invocation). Considering how many SD/USB images are X gigabytes but most of that is blank space so the compressed version is a few hundred megs, it's really nice to not have to keep playing the extracted image shuffle on my laptop's small SSD.

mod sassinator posted:

Yeah the Pi foundation in general is pretty blind to how radically Linux has evolved in the last couple years. Raspbian for the Pi 4 and 3 should be a container-based system like CoreOS was, Fedora Silverblue is, etc. Write a disk image once to SD card as a very small immutable base filesystem. Add on an overlay filesystem that's read write and uses something like ostree to layer on applications (snaps, flatpaks, debs, rpms, etc), configuration and user data. Now upgrades to the immutable base OS are done in an OTA style--download the new base filesystem to a spare partition, reboot into it to verify it works, then permanently swap to the new partition. You'll never need to burn a SD card again and just keep upgrading in place. It's really silly that we're constantly burning new cards, manually changing wifi config files, etc.
I don't disagree that such a system would be nice, but it wouldn't be Raspbian. Raspbian is Debian for Raspberry Pi, and that's a good thing. Debian has a well developed, well understood ecosystem and thanks to Ubuntu there's a good chance that anyone who's ever played with Linux at least has a basic idea of how a Debian-family distro operates. There's definitely nothing wrong with having a well-understood mainstream distro as the default recommendation.

That said I would be all in favor of a new OS like you describe that's more optimized for the appliance-like uses most of us have for these things. OpenELEC/LibreELEC rolled their own setup that seems to have been adopted by a number of these sorts of projects that's pretty close, the base system is a read only image and a config partition is mounted as an overlay, but it's not really set up to support user installed applications, it's more of a pure appliance platform.

Skarsnik
Oct 21, 2008

I...AM...RUUUDE!




It was driving me crazy for ages but if anyone has been having issues with twitter images and embedding in the app, it appears to be an issue with cloudflare DoH. I was running it via cloudflared on my pihole and switching back to regular DNS sorted it

GruntyThrst
Oct 9, 2007

*clang*

So I bought a Pi 4b to have something neat to tinker around on while the plague is happening. I got it set up and running a PLEX server which is pretty neat but I did so entirely by copying commands from a how-to with no actual understanding of what I’m doing and how anything works.

What’s a good resource for an absolute beginner to learn basic Linux(?) stuff?

Warbird
May 23, 2012

America's Favorite Dumbass

Nostarch has some good books on Linux operations and how the bits and bops play ball together. The "best" way is general puttering around in my experience. Super duper pro tip for you that I wish someone had told me years and years ago: Press the Tab key to help autocomplete commands.

DIEGETIC SPACEMAN
Feb 25, 2007

fuck a car
i'll do a mothafuckin' walk-by

GruntyThrst posted:

So I bought a Pi 4b to have something neat to tinker around on while the plague is happening. I got it set up and running a PLEX server which is pretty neat but I did so entirely by copying commands from a how-to with no actual understanding of what I’m doing and how anything works.

What’s a good resource for an absolute beginner to learn basic Linux(?) stuff?

Warbird posted:

The "best" way is general puttering around in my experience.

I'm a lifelong Windows user finding myself in a similar situation (only difference is the plague's given me time to finish what I started), and just loving around aimlessly on a Linux desktop has helped immensely. The Pi's in my house are utility gadgets I'd rather not tinker with and break once they're running. So, I've turned to virtual machines. Currently running Ubuntu primarily, but it's also easy enough to just download a Raspbian virtual machine.

Warbird
May 23, 2012

America's Favorite Dumbass

Oh puttering with the GUIs like GNOME or Unity is a pretty good time and should get you where you need to go. I'd still recommend getting some time in with a terminal as most of what you'll be doing will be taking place there, but go at your own pace. (Holy poo poo though, use tab completion) If you're feeling really froggy I'd take a look at the Windows Linux Subsystem. The 2.0 version should be coming with the windows 2006 release in the coming weeks and lets you use all the fun Linux tools on your windows machine. Heck, Powershell has ssh built in these days and supports most common *nix commands now. Microsoft is super weird now and it's great.

insta
Jan 28, 2009

Warbird posted:

Oh puttering with the GUIs like GNOME or Unity is a pretty good time and should get you where you need to go. I'd still recommend getting some time in with a terminal as most of what you'll be doing will be taking place there, but go at your own pace. (Holy poo poo though, use tab completion) If you're feeling really froggy I'd take a look at the Windows Linux Subsystem. The 2.0 version should be coming with the windows 2006 release in the coming weeks and lets you use all the fun Linux tools on your windows machine. Heck, Powershell has ssh built in these days and supports most common *nix commands now. Microsoft is super weird now and it's great.

When I needed to learn Linux (back in ~ 2004), I just reformatted my only computer with Debian via burned CD. Nothing worked. Once everything worked I knew enough Linux to be dangerous.

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

There's a few online resources for learning linux stuff if you want to do them as sort of a course or at least a guide to follow with sections.
One I saw recommended in the past is https://linuxjourney.com/

TVs Ian
Jun 1, 2000

Such graceful, delicate creatures.

Warbird posted:

Super duper pro tip for you that I wish someone had told me years and years ago: Press the Tab key to help autocomplete commands.

Unrelated: I recently found that this works in the Windows 10 command prompt as well. I had to type some long file names and figured I’d try it. Sure enough, it worked.

Warbird
May 23, 2012

America's Favorite Dumbass

I worked in IT for the better part of a decade before I learned about it. It was the most interesting mix of pure joy and pure rage.

Skarsnik
Oct 21, 2008

I...AM...RUUUDE!




Warbird posted:

I worked in IT for the better part of a decade before I learned about it. It was the most interesting mix of pure joy and pure rage.

:gonk:

capitalcomma
Sep 9, 2001

A grim bloody fable, with an unhappy bloody end.
There are even different auto-tab behaviors in linux, if you try out different shells. Try downloading ZSH. When you tab-complete in it, it opens a list of options like BASH does, but you can actually navigate it.

I'm personally content with BASH, but I know admins who deploy ZSH to any box they work on cause they love it so much.

AlternateAccount
Apr 25, 2005
FYGM

TVs Ian posted:

Unrelated: I recently found that this works in the Windows 10 command prompt as well. I had to type some long file names and figured I’d try it. Sure enough, it worked.

Also works for powershell!

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Another handy tip for folks that might be new to bash and such, press up and down to cycle through a history of previous commands you typed. And press alt + left arrow or right arrow to go forward or backward a word instead of a character. This makes it super easy to grab a previous command and modify the directory, path, etc. and run it again.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Ctrl-w deletes the last word instead of character

Hadlock
Nov 9, 2004

There's a replacement for bash, it's called fish: https://github.com/fish-shell/fish-shell

Fish v2 was not great because it didn't support a lot of bash stuff

Fish v3 is ~99% bash compatible, for everything else you can run $ bash -c "myscript.sh"

Fish has some really cool autocomplete stuff, plus a ton of plugins, etc. I was hesitant to use another shell for a long time but the tab to autocomplete + fuzzy search is amazing



Also, this combo stacks fzf and ripgrep to do some impressive stuff with your history:

https://medium.com/@sidneyliebrand/how-fzf-and-ripgrep-improved-my-workflow-61c7ca212861

fzf has some cool fuzzy search for your history: https://github.com/junegunn/fzf/wiki/examples#command-history

Since fish has aliases, you can chain all this poo poo together to make common queries super efficient on the cmd line

Hadlock fucked around with this message at 22:10 on Mar 23, 2020

Sagebrush
Feb 26, 2012

yeah i really like fish

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Oh that reminds me I saw a great post about the benefits of fish shell and have been meaning to check it out: https://jvns.ca/blog/2017/04/23/the-fish-shell-is-awesome/

Hadlock
Nov 9, 2004

I was super hesitant about moving away from bash, but after ripping off the bandaid fish is all I use. Took me about 3 days go get used to it, it's "mostly the same" as basic bash, so not a lot to adjust to

Going back to bash I keep pounding on tab waiting for autocomplete to kick in, really hits home the improved quality of life of using something that's not tied to 20 years of backwards compatibility with previous versions of bash

The biggest problem I have is copy-pasting shell stuff from tutorials that use ${var} and fish inexplicably wants {$var}... i think this was fixed in v3, i'm still on v2 for a reason i can't quite remember, maybe wasn't available in homebrew last time I installed it(?)

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

Korn shell was popular in the late 90s. I blame KoRn.

ArcticZombie
Sep 15, 2010
I want to use Clang/LLVM to cross compile for the Raspberry Pi Zero W and no matter what I do, the binaries I produce wind up with illegal instructions. I'm using Clang 9 on Ubuntu and building with options like:
code:
clang --target=arm-linux-gnueabihf -mcpu=arm1176jzf-s \
      --sysroot=$SYSROOT -isystem $SYSROOT/usr/include/arm-linux-gnueabihf \
      -fuse-ld=lld ... 
and the binaries I produce end up with VLDR instructions, which aren't legal on the arm1176jzf-s.

I've tried to stop the generation of these instructions, passing arguments through to llc: -mllvm -mattr=-vfp2, VFP2 being the set of instructions which VLDR belongs to. Still, they are generated. How do you lot cross compile stuff for Raspberry Pi Zeros? I've no problem producing binaries for later Pis with the Cortex CPUs using this method.

ArcticZombie fucked around with this message at 21:03 on Mar 30, 2020

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
No experience with Clang, but most of the GCC strategies seem to involve forcing VFP, rather than disabling VFP2 - I guess try -mfpu=vfp or -mfpu=vfpv3-d16

ArcticZombie
Sep 15, 2010
Didn't work, but apparently this is a problem with the Clang/LLVM on Ubuntu 18.04 (it is running as a VM using multipass, not sure if it works native), because doing it straight up on my Mac produces binaries which work just fine.

Master Twig
Oct 25, 2007

I want to branch out and I'm going to stick with it.
I have a request for assistance involving a raspberry pi. Not sure if this is the right thread, but it seems my best option.

So, I have a Raspberry Pi that i have never used. A techie friend of mine gave it to me several years back and I never ended up using it. However, I now have a potential use for it and I have no idea how to get it to do what I want, though I believe it's something that someone who knows what they're doing would have no trouble pogramming.

I'm currently building an Escape Room. The theme is that the players are special agents infiltrating a mad scientist's lab, and they get trapped inside and he has initiated the self destruct mechanism. The goal being to disable the self destruct mechanism before it blow.

So, where I want the Pi to come into play, is to have it hooked up to a monitor with the countdown timer displayed. Beneath that would be an input box in which the players would have to enter the correct passcode to stop the timer. Enter the right code, the timer stops. The group wins. Enter the wrong code, and the clock goes down by 2 minutes. If the timer reaches zero, it would turn into an image of a bomb going off and have a bomb sound effect or something.

Is this something that could be easily done? Would it be easy for me to learn how to do it, with absolutely zero programming experience? Would any goons be willing to program it for me? If so, I'd be willing to pay you.

xtal
Jan 9, 2011

by Fluffdaddy
I think a lot of escape rooms use raspberry pis for exactly that purpose. I would plug it in to a monitor through HDMI, then use one of these for the keypad: https://www.amazon.com/Best-Sellers-Computers-Accessories-Numeric-Keypads/zgbs/pc/2998471011 (edited to add: the recent pi models have bluetooth which may make the keypad easier to connect)

At that point the pi doesn't need to be concerned with hardware at all, and the game logic is pretty trivial. You could write it in Python without programming experience. It might be hard to deploy without Linux experience though.

xtal fucked around with this message at 00:35 on Apr 6, 2020

Fantastic Foreskin
Jan 6, 2013

A golden helix streaked skyward from the Helvault. A thunderous explosion shattered the silver monolith and Avacyn emerged, free from her prison at last.

All you'd need is a full screen python console, if their only input is a numberpad I don't think the users could gently caress it up. I can't see setting it up being any more difficult than learning the basic programming to get it done.

Master Twig
Oct 25, 2007

I want to branch out and I'm going to stick with it.

ItBreathes posted:

All you'd need is a full screen python console, if their only input is a numberpad I don't think the users could gently caress it up. I can't see setting it up being any more difficult than learning the basic programming to get it done.

I'd be willing to try if it's not too complicated. I have absolutely no idea how to use linux or do any kind of programming at all. I'm literally starting from scratch here. Fortunately, I have nothing but time right now. I'll start scouring the internet for some tutorials. If anyone can toss me a few links that might help me get started, that would be useful.

Fantastic Foreskin
Jan 6, 2013

A golden helix streaked skyward from the Helvault. A thunderous explosion shattered the silver monolith and Avacyn emerged, free from her prison at last.

Master Twig posted:

I'd be willing to try if it's not too complicated. I have absolutely no idea how to use linux or do any kind of programming at all. I'm literally starting from scratch here. Fortunately, I have nothing but time right now. I'll start scouring the internet for some tutorials. If anyone can toss me a few links that might help me get started, that would be useful.

Unfortunately, my coding skills are only enough that I'm confident I could put together your program in an afternoon, after googling how to make a timer. I think I've looked at both Codeacademy and Khan academy, but basic programming like this is pretty simple.

To get it working on a pi is pretty straightforward, but I'll have to gently caress around with mine a bit to be 100% on what gets a presentation quality output.

Mantle
May 15, 2004

There's also an opportunity to do something cool with the gpio instead of using a monitor.

For example, you could set off a relay to trigger a smoke effect or a bang. You could also use a 7 segment display for the countdown timer. There should be tutorials for these online already and you just need to hook it up.

PokeJoe
Aug 24, 2004

hail cgatan


Yeah if you're gonna do the work of setting up the countdown on a tv display you could make a fake "bomb" with a countdown timer on it with a very similar amount of effort

Raymond T. Racing
Jun 11, 2019

Honestly, this is one of those things where I'd consider using a more microcontroller-y thing (i.e. arduino).

A lot harder for bad input to break things, use a seven segment display, not too bad

Raymond T. Racing
Jun 11, 2019

Something like this in a custom enclosure, with the arduino or the timer start button being in a accessible place for the staff member to get the timer going

https://learn.sparkfun.com/tutorials/using-the-serial-7-segment-display/all

Mr.Radar
Nov 5, 2005

You guys aren't going to believe this, but that guy is our games teacher.
Niel from RetroManCave interviewed Ebon Upton about how the Raspberry Pi was created:

https://www.youtube.com/watch?v=AUq7iyT9Hcg

mewse
May 2, 2006

Buff Hardback posted:

Honestly, this is one of those things where I'd consider using a more microcontroller-y thing (i.e. arduino).

A lot harder for bad input to break things, use a seven segment display, not too bad

Yeah when I read the question I googled "countdown timer arduino" and there are a bunch of example projects using 7 segment displays, some of them with keypads

Master Twig
Oct 25, 2007

I want to branch out and I'm going to stick with it.

Buff Hardback posted:

Something like this in a custom enclosure, with the arduino or the timer start button being in a accessible place for the staff member to get the timer going

https://learn.sparkfun.com/tutorials/using-the-serial-7-segment-display/all

So, all of this is definitely a fantastic idea that would be far cooler than just hooking it up a monitor. I don't think I want to go that route though.

Probably should have explained more about the escape room. This is just something I'm building in a couple rooms of my house, mostly for friends to go through. But I'll also be having it run for a fund raiser day for a local theater. Maybe only 60 people ever will ever actually do this. So, I'm not looking to have it be super professional. Also, I'm building this thing entirely on my own. Which also means the budget is pretty low.

So while that kind of display seems pretty cool, reading that page was really overwhelming and kind of like reading a foreign language to me. It looks like I'd have to buy the part, which isn't that expensive. But also a soldering gun, solder, wire, and then learn how to solder. Plus figure out how to build a box to contain all of this without having any tools other than a power drill and basic hand tools.

I know it's not nearly as cool, but I'd really rather just keep it to a display on a monitor, and imply the whole lab is going to explode.

Adbot
ADBOT LOVES YOU

Lockback
Sep 3, 2006

All days are nights to see till I see thee; and nights bright days when dreams do show me thee.

Master Twig posted:


I know it's not nearly as cool, but I'd really rather just keep it to a display on a monitor, and imply the whole lab is going to explode.


So you can follow something like this for a start, modifying the "wrong number" portion is reasonably easy to follow:
https://www.codespeedy.com/how-to-create-a-countdown-in-python/

I'd do this first on your PC to get used to programming Python.

Here is a tutorial to do a simple hello world for the Pi
https://www.seeedstudio.com/blog/2020/01/14/how-to-create-and-run-a-raspberry-pi-python-program-beginners-tutorial/

Do both of those and you should be able to get your code running on the Pi like you want.

If you haven't run little code bits like this block off a couple hours to experiment on this. Honestly, regardless of what you do for a living this is time well spent. Once you do this if you find this is something interesting you can build more complex things pretty easily

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