[-] user224@lemmy.sdf.org -4 points 2 days ago

Cancer is probably the least dangerous living thing in Australia.

[-] user224@lemmy.sdf.org 24 points 2 days ago* (last edited 2 days ago)

Maybe a solution similar to this could work: https://github.com/nfcgate/nfcgate/blob/v2/doc/mode/Relay.md

Have the card at home sitting on a reader connected to your homelab, add NFC module to PinePhone and simply relay the traffic over network.

[-] user224@lemmy.sdf.org 4 points 2 days ago

Yeah, I already tried losetup unsuccessfully, but thanks anyway.

41
submitted 3 days ago* (last edited 3 days ago) by user224@lemmy.sdf.org to c/linux@programming.dev

...or whatever remains of it?

Yeah.
I finally found what I was searching for, usage of RW media similar to DVD-RAM. Only to find it's been removed from Linux Kernel: https://www.phoronix.com/news/Linux-To-Remove-pktcdvd

Worry not, something remains: https://www.kernel.org/doc/html/v6.1/cdrom/packet-writing.html

According to the DVD+RW specification, a drive supporting DVD+RW discs shall implement “true random writes with 2KB granularity”, which means that it should be possible to put any filesystem with a block size >= 2KB on such a disc.

And indeed, with DVD+RW disc, I can just do so. Even if it's really sub-optimal.

However, some drives don’t follow the specification and expect the host to perform aligned writes at 32KB boundaries. Other drives do follow the specification, but suffer bad performance problems if the writes are not 32KB aligned.

Anyway...

ext4 on DVD

So, yes. After initial format, I can just

mkfs.ext4 -b 2048 /dev/sr0

Might have been a coincidence as I just used an old disc and failing drive, but trying block size of 4096B made formatting extremely slow. No wonder, after inspecting the disc, it was clear the formatting fully re-wrote it, which didn't happen with 2048B BS.

tar

That worked as well. Exact command I used:

tar -vcf /dev/sr0 -b 4 files/

I am not sure if my setting for blocking factor made any sense whatsoever. I didn't retry this. As I said, old disc and drive. It would work in bursts, then get stuck for a long time. Writing ~500MB took roughly an hour.
Reading it worked well though.

Who needs an FS when you have tar.

Partition table on DVD - where the dreams fall apart

fdisk /dev/sr0

That... worked. I created GPT and added 2 partitions. After writing the changes, I reinserted the disc.
Aaaaaand... nothing.

You can see that there is indeed a GPT on that DVD+RW, which feels crazy. But, where are my partitions?
Looking in /dev, I found no mention of partitions.

ls /dev/sr0*
/dev/sr0

Let's check fdisk again:

fdisk -l /dev/sr0
Disk /dev/sr0: 4.38 GiB, 4700372992 bytes, 2295104 sectors
Disk model: DVDRAM GH24NS90
Units: sectors of 1 * 2048 = 2048 bytes
Sector size (logical/physical): 2048 bytes / 2048 bytes
I/O size (minimum/optimal): 2048 bytes / 2048 bytes
Disklabel type: gpt
Disk identifier: 6AE020A5-1F51-46A6-8741-C28915AF6208

Device      Start     End Sectors  Size Type
/dev/sr0p1    512  524799  524288    1G Microsoft basic data
/dev/sr0p2 524800 2294783 1769984  3.4G Linux filesystem

Hmmm. I didn't use root, so I got a hint from fdisk. I did re-insert the disc, so it should've been irrelevant now, but at least it pointed me to a potentially useful command.

# The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or partx(8).

sudo partx -av /dev/sr0
partition: none, disk: /dev/sr0, lower: 0, upper: 0
/dev/sr0: partition table type 'gpt' detected
range recount: max partno=2, lower=0, upper=0
partx: /dev/sr0: adding partition #1 failed: Invalid argument
partx: /dev/sr0: adding partition #2 failed: Invalid argument
partx: /dev/sr0: error adding partitions 1-2

Invalid argument?
Does it mean I can't load a partition table from a DVD?

LVM to the rescue? (no)

Short answer in this case:

sudo pvcreate -v /dev/sr0
  Cannot use /dev/sr0: device type is unknown

Finally at last, a disc directly playable with aplay

Obviously, I can write bytes to the disc, so this isn't special. But it feels cool.
I find it unfortunate that I can't simply take data of audio CD, playing it with aplay. But now I can at least do so with a DVD.

ffmpeg -i Stan\ LePard\ -\ Velkommen\ \(1996\).wav -f s16le -acodec pcm_s16le -ar 44100 -ac 2 tmp/velkommen.raw

And writing with dd

dd if=tmp/velkommen.raw bs=2048 status=progress of=/dev/sr0
57145344 bytes (57 MB, 54 MiB) copied, 16 s, 3.6 MB/s
27930+0 records in
27930+0 records out
57200640 bytes (57 MB, 55 MiB) copied, 33.49 s, 1.7 MB/s

It might be good to know this got stuck the first time at the end. So I used truncate to pad it with zeros to a multiple of 2KiB. Again, might have been a coincidence (sample size 2).

And finally, the dream is achieved:

aplay -f cd /dev/sr0
Playing raw data '/dev/sr0' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

Now I could perhaps try to make a script/program which would take list of files, convert them to raw PCM, record track byte offsets and other data (like track title), concatenate the audio, add the info data in some specific format, and also have a program/script to read the info and play the tracks!

Re-inventing the ~~wheel~~ disc.

[-] user224@lemmy.sdf.org 1 points 3 days ago

The world sucks right now for employment you might as well take a shot at a dream job because you never know what happens!

Well, I absolutely could get training for position of train driver.
Except...
As far as I know, you have to agree to a contract to work for that company for at least 5 years.
Otherwise, I'd have to pay them back for that training. How much?
I don't know what it's now. First I heard from someone, they mentioned it being EUR 21,000. But recently I overheard a train driver talking to a coworker about the training costing EUR 31,000.
Either way, in a country where the minimum wage is EUR 5.26/h... OOF.

Although I'd have to ask for official information, as this isn't mentioned in the advertising they do.
But it would explain the eternal shortage they seem to have.

[-] user224@lemmy.sdf.org 1 points 4 days ago* (last edited 4 days ago)

Sorry if I wasn't clear, I am not. I am just usually imagining what happens in edge cases. Since I am in an English study programme (I honestly find English easier in relation to IT) I get the same information the foreign students do.
And I can see how fucking shitty it is.
The problem is they didn't even translate the instructions to English, and further only gave them a 12 hour window until the deadline to figure things out. Ironically, the instructions highlight to really think about the decisions you make with the subjects selected (some expect prior knowledge you may not yet have). Think about it when? There's also limited number of students to be accepted for each subject on a first-come first-served basis. Basically, a game of battle royale, but there were no instructions, and the game has already begun.

73

I guess it's obvious why I am asking.

I am just too dumb for it. Like, genuinely. I only passed through HS because on final exam from literature the teacher gave me a full answer. Actually, I didn't even get that, she had to tell me "Write that down!" because I was just thinking "Why are you telling me that?"

In 1st semester I didn't pass 2 subjects. Now in 2nd one I only got to final exam of 1, which I'll have to retake and I don't feel like I'll pass it either. The only subject I was really interested in passing I didn't manage to get through due to me being late with assignments.
I am still planning to finish the last one just because I want to get rid of my Firefox tabs and I already spent 32 hours on it. The previous one took me 50 hours only for partially completing it. I estimate full completion at 65 hours, if I did that one, which I may do as well later.

Which isn't much time, actually. When I do the math based on credits, main part (time until exams) of first semester being 12 weeks, second 13 weeks, it averages out at 61h/week of work (combined lectures + seminars + expected study time and assignments).
2nd semester at 52h/week
1st semester at 71h/week.

Regardless of how I manage the exam, I won't pass to the second year.

Oh, it gets worse. I found out I was supposed to select my subjects for next year. They only sent us the email about that the day prior (2pm).
I skimmed it, OK, selection starts June 4th, went to check the UI, nothing there. Turns out, the selection deadline was on that same day, at 9pm, so I missed it by 3 hours.
Worse yet, though not applicable to me, the school also "thinks" of foreign students. In this case by notifying them only 12 hours before the deadline as well as informing them that the information in English is outdated (and that's all they did about it).

[-] user224@lemmy.sdf.org 1 points 5 days ago

... except for it being built on electron so it's a 300MB install.

[-] user224@lemmy.sdf.org 2 points 5 days ago* (last edited 5 days ago)

and you need to use a paid VPN

There's one possible disadvantage: accidentally selecting wrong profile. And suddenly I am looking at Monosodium Glutamate through university's VPN.

142

It's album named Virgin from Lorde. Not quite my taste of music, but the disc itself is pretty interesting.
Though it does have issues. Since the reflective layer is very thin, a lot of light passes through.

Even beaming through the lid:

Here's a blog post about it on Hackaday, also showing the lower signal amplitude compared to regular CD.
For me, so far it worked in 2 out of 4 CD players/drives. And I didn't even try with those that can't read CD-RW, as those can probably be crossed off right away.

Anyway, what happens when it's upside-down? Obviously, "doesn't work" is the answer. But at least we can see the lens dance a bit, trying to read the disc:

If you're worried about data consumption, this video is less than 300KB in size thanks to AV1. ^Although^ ^it^ ^took^ ^7^ ^minutes^ ^to^ ^encode...^

And something funny to add.
I ripped it once, there was weird noise, so I tried it again. I played random track, "David", and skipped through it. It sounded corrupted. So I tried playing it directly using VLC. Still the same. Thinking it was the drive, I tried my Discman. Same issue.
Is the disc bad?
But, after finally getting the track from the internet, I found it just sounds like that.

22

I think someone screwed up on "3 business days to pick up".

17

Software often has pretty good documentation. But real-world things don't.
And if I don't know exact steps to do something and what to expect, I just can't really push myself to try it the first time. That can be put into an interesting sentence.
"I can't do it because I haven't done it."

Recent example:
I want to take a bus. But I haven't yet used the company that operates these buses. I do have an RFID card with e-wallet that is compatible with this company. That is because they operate as intercity transport in the same region, and same tickets are valid there. Except for one line, the one I am most interested in.
Now comes the problem.
How am I supposed to board? How do I buy the ticket? On other lines, am I supposed to prove I have one?

Before I start with the issues of unknowns, I should mention I so far spent 3 hours trying to find the information. That includes searching for videos which may show what others do in the background. In one similar case I found the answer from a TV news report filmed near a bus stop, and my answer was in the background.

So, boarding. Is it front doors only, or do the doors not matter? I've seen both.
Purchasing the ticket: There was a mention of possible cash payment, buying the ticket "from the driver". I managed to find photos from inside the bus, and to further my confusion, there were 3 terminals. All of them RFID-compatible.
2 are ticket validators next to both doors.
1 is on-board computer (apprears to be TransData Vesna model) along with a ticket printer and RFID terminal, operated by bus driver.
If it was just one of those, I'd know what to do.
I found one video from that special line. The person presented a QR code of valid ticket to the driver before boarding. But I don't use that payment method.
But if it's front doors only, why are there validators in the rear? Or was that just something specific to this line?

Now, I could do the one obvious thing, ask the driver. But I really hate talking to people I don't know.
An alternative I am contemplating is sending an e-mail to the company with my questions. They do have one for customer questions.


This is always a problem if I don't know exact steps for something. And even then I am still really anxious before I actually do it for the fist time.

33

Top shows ping round trip time averaging 10.3 seconds, peaking at 21 seconds. Perhaps that would be good for pingfs.
Below, 59.5% packet loss can be seen with ping.

Last 2 screenshots is from apt update, which made me realize how much time I was wasting. 18.7MB downloaded in 9 minutes and 26 seconds, and 78.3MB took 31 minutes, 34 seconds.

But hey, I could still download a 3.5" floppy worth of data in just around 40 seconds.

Not deprioritized, not throttled. Just a carrier with barely any RF spectrum (in 4G, my phone doesn't do 5G) offering 300GB data pack and getting overloaded to death in some areas. (Every day)

77
submitted 2 months ago* (last edited 2 months ago) by user224@lemmy.sdf.org to c/linux@lemmy.ml

Proxmox is a virtualization platform based on Debian. It's not supposed to have a GUI, the management is either done via web UI or SSH.

But since it basically is just Debian with some more stuff, I installed Plasma on top of it.

It is also not supposed to use WiFi since that won't work with Linux bridges. But, after removing the adapter from /etc/network/interfaces (which gets automatically added any time I make a change through PVE web UI) and rebooting, I was able to make use of the adapter inside Plasma. And also create a bridge on proxmox, add IP to it, enable IP routing, and NAT everything coming from that subnet (used for VMs) through the WiFi adapter.

I just wish the noVNC could dynamically resize VM display like with VirtualBox after installing guest additions.

There is no use case. It can be done, that's it. I also tried to install Proxmox on my phone under Limbo PC emulator (QEMU-based), but I couldn't avoid random kernel panics during installation.

Also, Proxmox with 10GiB of available RAM (8+4, 2 for GPU), where the host uses up 3GiB is not really ideal. And on a weak dual-core CPU, on top of that.

Edit: But now I got an idea.
Now, there are issues. The simple solution will create multiple SSH connections that will never leave the laptop - that is - useless encryption, aside from other likely issues. The main thing is extremely easy set-up.
OK.
Thing 0: Exchange and authorize SSH keys between host and VMs.
Thing 1: Create another ext4 or whatever volume on LVM, and mount it on host (probably better to have VM with large disk - why should every VM have SSH access to host). This will be used for file sharing.
Thing 2: Mount it on all desired VMs using SSHFS.
Thing 3: Install waypipe (like ssh -X, but for Wayland) to VMs and host.
Thing 4: Create shortcuts on host desktop for desired GUI applications (which will run on VMs), prefixed by waypipe command. E.g.: waypipe -c none ssh user@debian-main.home.arpa firefox.

Waypipe works with vsock as well, which might be useful in this situation, but I have no idea how that's used, and if it is relevant here. Based on the man page, it does sound like it though.
But anyway, mostly just a concept.

26
submitted 2 months ago by user224@lemmy.sdf.org to c/linux@lemmy.ml

Idea

Primary laptop will run DE with 1 screen (its own).
Second laptop is to be used as a secondary (extended) monitor for primary laptop.
Both laptops will run Linux.

Tested solutions and their issues

krfb-virtualmonitor:

Creates virtual display and runs a VNC server, exactly as desired.
Issue: Slow as hell. FPS become SPF even on 0.3ms 1Gbps point-to-point connection.

KDE Connect virtual display

Creates virtual display and runs an RDP server, exactly as desired.
Issue(s): Really needs that high quality connection to run reasonably well. That isn't much of a problem, I can use a cable. The biggest problem is, no matter the settings, both with Remmina and KRDC the mouse pointer does not show up. Silly issue, but yeah.
Also, the Debian 13 KDE Connect package is too outdated to work with this, but I was able to use it in KDE Neon and Arch.


So, basically what I want exists, just with a major bug. Not seeing the mouse pointer is quite a problem.

Also, at first I hoped to use the already existing "network", my phone's hotspot. I can get 300Mbps and 3ms between phone and client. But between 2 clients? 400ms and with ping I see 1/3 of packets being duplicated.

181
submitted 2 months ago* (last edited 2 months ago) by user224@lemmy.sdf.org to c/funny@sh.itjust.works
36
81

If you want to modify a pointer to pointer you need to pass a pointer to pointer to pointer.

I am lost.

49

TOTP Authenticator
Browser
Terminal emulator
Wireguard client

I've had the weird idea to use libpam-google-authenticator for both SSH and Sudo.
Hell, for one machine I don't even know the password. I just set it to a long random string. If I need root access, I can get a code from my phone!
That means I open it A LOT.

At one point I also had 4FA for fun. Or 3FA depending on how you look at it.
On server - pubkey + password + TOTP
On client the private key additionally encrypted with a different password.
Anyway...

[-] user224@lemmy.sdf.org 194 points 1 year ago

I wondered how the hell it managed to fool LIDAR, well...

The stunt was meant to demonstrate the shortcomings of relying entirely on cameras — rather than the LIDAR and radar systems used by brands and autonomous vehicle makers other than Tesla.

[-] user224@lemmy.sdf.org 179 points 1 year ago

Her water had broken, she said. “I’m leaking out,” she told him. She grabbed a blanket and a few personal effects as a bright orange city dump truck pulled up to remove the makeshift bed.

“Am I being detained?” she asked.
“Yes, you’re being detained,” he shouted. “You’re being detained because you’re unlawfully camping.”

Stewart walked back to his car to write the citation as city workers finished loading the mattress into the garbage truck.
Once in the police vehicle, Stewart narrated to himself as his body camera recorded his comments.
“So I don’t for a second believe that this woman is going into labor,” he said.

He returned to find the woman sitting on the ground, with legs askew and labored breathing, waiting for the ambulance. Stewart hands her a citation, and she balls it up and tosses it aside as the ambulance arrives to take her to the hospital.

This sounds like I am reading some dystopian book, not news.

[-] user224@lemmy.sdf.org 407 points 2 years ago

He also had a three-page handwritten manifesto that included grievances with the US healthcare system, a document that spoke to the suspect's "motivation and mindset", officials said.

Publish it then.

[-] user224@lemmy.sdf.org 219 points 2 years ago

Sooo..., you'll literally need to use adblocker to use YouTube. Interesting.

[-] user224@lemmy.sdf.org 348 points 2 years ago

A highly compatible design with no ads, unnecessary images, videos, animations, scripts that goes straight to point delivering you exactly the information you need and nothing else? Something that's easily accessible even with old feature phones allowing older people to get information easily?
Simply something that loads instantly and just works?

Who would want that?

view more: next ›

user224

0 post score
0 comment score
joined 3 years ago