There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

linux

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

FlickeringScreens , in I'm Not a Programmer, but Here’s Why Linux Is My Daily Driver

The most “programming” I can do is make a basic scratch project and print(“Hello World!”) in python, but linux is great

Entropywins ,

How do you do that in python…

tuhriel ,

<span style="color:#62a35c;">print</span><span style="color:#323232;">(</span><span style="color:#183691;">"Hello World"</span><span style="color:#323232;">)
</span><span style="color:#323232;">
</span>

Save the file as script.py

And then execute it with

python3 script.py

EuroNutellaMan ,
@EuroNutellaMan@lemmy.world avatar

Impressive, you look like a very skilled programmer, management has told me you are now tasked with building a hyper-realistic virtual simulation of a Large Hadron Collider including detailed simulations of the lives of the actual workers and their families, you have a week or you’re fired by the firing squad, no you’re not allowed to ask why we need it or who we are or why we chose you and it is especially forbidden to ask for more time (and no you can’t ask why that is either). See you in a week, have a nice day :).

JackbyDev ,

I am ready to integrate with Open AI’s API develop an LLM.

JasonDJ , (edited )

This is bad practice.

More accurately it should look something like this:


<span style="color:#323232;"># Load sys library for exiting with status code
</span><span style="color:#323232;">import sys
</span><span style="color:#323232;">
</span><span style="color:#323232;">def sayHelloWorld(outPhrase: str="Hello World"):
</span><span style="color:#323232;">    # Main function, print a phrase and return NoneType
</span><span style="color:#323232;">    print(outPhrase)
</span><span style="color:#323232;">    return None
</span><span style="color:#323232;">
</span><span style="color:#323232;">if __name__=="__main__":
</span><span style="color:#323232;">    # Provide output and exit cleanly when run from shell
</span><span style="color:#323232;">    sayHelloWorld()
</span><span style="color:#323232;">    sys.exit(0)
</span><span style="color:#323232;">else:
</span><span style="color:#323232;">    # Exit with rc!=0 when not run from shell
</span><span style="color:#323232;">    sys.exit(1)
</span>
calcopiritus ,

Fellow pythonistas, how can I make this code more pythonic?

possiblylinux127 , in I'm trying to lspci > /sdc1 lspci.txt on recovery mode. What am I doing wrong? + help installing broadcom BCM4360 802.11ac network controller on debian

RPM fusion is for RPM distros only.

For Debian I’m kind of surprised it isn’t working. With the recent Debian policy change Debian now ships with non-free firmware in the installer. Theoretically it should be working.

Max_P , in Help with Custom EDID
@Max_P@lemmy.max-p.me avatar

Did you rebuild your initramfs? The files needs to be available pretty early during boot and that’s probably why it still seems the old one.

Artemis_Mystique OP ,

I just did using the dracut command, it didn’t change anything, is there another more simpler way to go about this without risking messing up my system?

Max_P ,
@Max_P@lemmy.max-p.me avatar

Dracut is the correct way to do this on Fedora so nothing else needs to be done. Then I’m not sure why it’s not taking it.

Goun , in Recommendation for a high-quality webcam for Linux

Wow, I’ve used a C920 and now a C930 and never had any issue, although I just do meetings.

I’m interested on seeing opinions too.

markstos OP ,

C920 is good enough for meetings. I solved the focus problem using the traditional Linux method of writing of udev rule which launches a timer when it’s plugged in, which periodically launches a systemd service, which runs a bash script to make sure it self-corrects at least every 5 minutes.


<span style="color:#323232;">❯ cat /etc/udev/rules.d/90-video4linux-webcam-config.rules
</span><span style="color:#323232;">KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0892", TAG+="systemd", RUN{program}="/bin/systemctl start video4linux-webcam-config@$env{MINOR}.timer" ENV{SYSTEMD_WANTS}="video4linux-webcam-config@$env{MINOR}.timer"
</span>

<span style="color:#323232;">❯ cat /etc/systemd/system/[email protected]
</span><span style="color:#323232;"># This file is managed by ansible-video4linux-webcam-config
</span><span style="color:#323232;">[Unit]
</span><span style="color:#323232;">Description=Periodically restart webcam config service
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Timer]
</span><span style="color:#323232;"># Unit= defaults to service matching .timer name
</span><span style="color:#323232;">OnActiveSec=30
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Install]
</span><span style="color:#323232;">WantedBy=timers.target
</span>

<span style="color:#323232;">❯ cat /etc/systemd/system/[email protected]
</span><span style="color:#323232;">[Unit]
</span><span style="color:#323232;">Description=Set webcam configs
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Service]
</span><span style="color:#323232;">Type=oneshot
</span><span style="color:#323232;">ExecStart=/bin/bash -c "/usr/local/bin/video4linux-webcam-config.sh %I"
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Install]
</span><span style="color:#323232;">WantedBy=multi-user.target
</span>

<span style="color:#323232;">❯ cat /usr/local/bin/video4linux-webcam-config.sh
</span><span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">
</span><span style="color:#323232;">if [[ $# -ne 1 ]]; then
</span><span style="color:#323232;">  echo "Expected minor device number as sole argument" 1>&2
</span><span style="color:#323232;">  exit 1
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">   v4l2-ctl -d $1 --set-ctrl focus_automatic_continuous=0
</span><span style="color:#323232;">  v4l2-ctl -d $1 --set-ctrl focus_absolute=0
</span>
TCB13 ,
@TCB13@lemmy.world avatar

I’m using a C920 on Debian and I don’t have focus issues. I remember that once it was permanently stuck out of focus but unplugging and plugging again fixed the issue. Never had any other issues in years.

BaumGeist ,

My c920 now glitches out and refuses to stream video after about 10 minutes of use (mic still works tho). After some unknown long period of time, it resets and works for another 10 minutes

Max_P ,
@Max_P@lemmy.max-p.me avatar

Yeah mine’s doing that too, and my dmesg is flooded with USB disconnect and reconnects.

The thing probably is overheating and shutting off. I believe I’ve seen videos of them catching fire too, not sure if it’s that one or another webcam that looks similar.

Mine’s on a USB hub with buttons for each port so I just leave its port off until I need the camera and only turn it on when needed.

czardestructo ,
@czardestructo@lemmy.world avatar

I have a c920 and it’s complete poop. Random hiccups and stutter and the auto focus fails.

tacostrange , in Recommendation for a high-quality webcam for Linux

I recently purchased the Anker PowerConf C200 2K webcam and it has been great on Linux. Crisp image and no issues with focusing. It’s currently on sale at Amazon

WMTYRO ,

I recently found out about Anker and I bought a wired ergonomic vertical mouse as I had been experiencing wrist pain recently. High quality for a very low price point, and from the looks of it most of their products are like that. Also helped with the wrist pain!

meekah ,
@meekah@lemmy.world avatar

Dunno why you got a down vote,vote what you’re saying aligns with my experience with Anker products as well

NeverNudeNo13 ,

I as well use a Anker powerconf camera and it’s fantastic… But you will need a windows machine if you want to modify firmware settings on it as their control app runs in windows. It does seem that once you modify those settings they are persistent within the hardware itself though and once you move it back to the Linux machine it should all be preserved.

Of course it’s possible someone has already closed that gap out already or maybe the app runs in wine.

tacostrange ,

I’ve been able to use cameractrls from flat hub to control it

NeverNudeNo13 ,

Nice thanks for that. I’ve been pretty happy with it right out of the box and haven’t really needed to do much to it, but nice to know there are options.

lol , (edited ) in Recommendation for a high-quality webcam for Linux
@lol@discuss.tchncs.de avatar

deleted_by_author

  • Loading...
  • markstos OP ,

    Yes. One thing that motivated me was comparing side-by-side the C920’s result with my iPhone’s webcam. My test subject is a black cat in a black cat bed. With the C920, it’s just one black blob. With the iPhone camera, you can at least see the distinction between the bed and the cat.

    TCB13 ,
    @TCB13@lemmy.world avatar

    Well, Apple is, Apple.

    Maybe a Logitech StreamCam will deliver better results for you? I don’t have complaints about my C920 but I don’t push it so far like you seem to do.

    sgibson5150 , in Fixes for some issues I faced while I switched to Bazzite / Aurora-dx

    I’m brand new to Fedora, having installed Bazzite myself just a few days ago. Did you happen to encounter an issue logging out of KDE? discussion.fedoraproject.org/t/…/119070

    tutus , in Issue with KDE Plasma 5 and Spotify

    I use Debian 12. I use Spotify. And I don’t have this issue.

    What I have had is various issues with kernel 6.1.0-21. I’m currently using 6.1.0-18 on my laptop and 6.1.0-15 on my desktop and the issue I had are gone. Because of my experience, I’d suggest trying those kennels.

    jlow , in Fixes for some issues I faced while I switched to Bazzite / Aurora-dx

    Though I personally don’t need this (atm) I love these kind of posts, thank you very much for taking the time to write it! Share the knowledge! 😸

    spittingimage , in I'm Not a Programmer, but Here’s Why Linux Is My Daily Driver
    @spittingimage@lemmy.world avatar

    I’m also not a programmer but here’s why Linux is my daily driver:

    I like it.

    crusty ,

    Gnome is so much more cozy than windows

    TheAnonymouseJoker ,
    @TheAnonymouseJoker@lemmy.ml avatar

    Windows 10 AME also feels very cozy, like Win 7, but its days are numbered unless I stop using internet on it.

    Even Windows users are shitting on 11 and questioning using Windows.

    JackbyDev ,

    Gods, I miss Windows 7 UI. I really dislike the push for everything to be flat nowadays. Aero, my beloved!

    floofloof ,

    KDE Plasma is so much more snappy and functional than Windows. Linux has lots of good options.

    swag_money ,

    cinnamon is so uhh default in Linux Mint and i like it

    mrvictory1 ,

    I love the diversity in this thread

    growingentropy ,

    I have no formal tech background, but I’m pretty damn good with it. And I like Arch and Debian with XFCE.

    mesamunefire , in Systemd 256.1 Maintenance Release Fixes Home Directory Deletion Bug

    Yeah that’s a big one.

    ogeist ,

    Oops

    AProfessional , in Systemd 256.1 Maintenance Release Fixes Home Directory Deletion Bug

    TL;DR for anybody worried. systemd-tmpfiles --purge was too broad in scope (and has a confusing name) so now you must be more specific when using it to avoid accidentally deleting things.

    slacktoid ,
    @slacktoid@lemmy.ml avatar

    But you should have read the docs completely and figured that out /s

    clutchtwopointzero , in Systemd 256.1 Maintenance Release Fixes Home Directory Deletion Bug

    using systemd instead of rm -Rf is not the Unix way!

    You999 , in Recommendation for a high-quality webcam for Linux

    You will get leagues better picture quality using a camlink/capture card and a camera with clean HDMI out. A gopro is a good budget option but a used DLSR or mirrorless camera is going to be the best. Some DSLR and mirrorless cameras support video out over usb so you don’t even need a capture card. Here’s a guide on getting it to work on Linux with a camera capability list inside the guide. If you do want to go the capture card route I hear elgato’s camlink works in Linux.

    velox_vulnus , (edited ) in Systemd 256.1 Maintenance Release Fixes Home Directory Deletion Bug

    “Linux kernel was a blot, so here’s our new kernel, written in system-langd, compiled using systemccd using the maked build system. Normal assembly was also a blot, so we came up with sasmd. The whole hardware is a blot, so we came up with hardwared. They’re all tightly integrated. The name of the company does not vibe with our vision, so we are renaming it to ibmd. Your brain is also a blot, so here’s braind. Now you can dump that outdated, prokaryotic fleshy crap and use systemd instead.”

    Imagine what would happen if one service goes down. Fucking hell, the Armageddon is real.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines