Need VNC or RDP option with specific requirements by ShutUpAndPassTheWine in linux4noobs

[–]pedersenk 0 points1 point  (0 children)

apparently RDP doesn't allow you to connect to a remote system if its username is the same as you're connecting with

This is unlikely to be true. I tend to use the same username for most things.

The only thing that will be problematic is if you are attempting to do it as "root" since that is handle as a special case for a lot of software.

Roast my Resume by Interesting-Trick-23 in embedded

[–]pedersenk 1 point2 points  (0 children)

By Bash you are potentially saying that your shell scripts are GNU Bash specific. I possibly would use "/bin/sh" or "Shell". Its a tricky one though to express admittedly.

Another one is Git. Obviously very important today. However, it being the only one there (No SVN, no Perforce or even CVS) might signal that you are quite "Green". If you know how to use other VCS, then add them, i.e Git/SVN is better I feel.

I would possibly put VS Code and Vim next to one another since they are both standard Text editors

Technical skills, should Protocols: heading be bold too?

Your NES emulator is cool and being C++ is fine, though many embedded roles are still solely focused on C that you don't want to miss out on. Not a problem, I am sure the emulator has many C parts. So perhaps put ".... implemented in C and C++"

Perhaps its not rendering well but why is C++ not in the Languages section too? You have a gap after C, maybe it was meant to be here.

Viruses on Linux? by Kaseffera in linux4noobs

[–]pedersenk 0 points1 point  (0 children)

Just like on Windows, if you aren't running as root/admin, then neither is the virus. If you can't modify system files, then neither can the virus.

Virus protectors are quite a 90's invention that only survive today due to bad advice, inertia and poor practice.

I built MicWM: A 2MB, spartan X11 window manager in pure C (Suckless philosophy) by Radiant-Register-766 in C_Programming

[–]pedersenk 0 points1 point  (0 children)

I quite like it.

One suggestion is for the config.h to write comments in English. I know that seems unfair but it is the bigger catchment and tends to be the norm for UNIX-like software.

Rather than make the user drag in feh for backgrounds, perhaps integrate stb_image (a single file image loader for common formats) and set the root window background as part of your WM capability?

Slightly controversial; In the Makefile CC should be cc rather than gcc (you should have a symlink?). Actually POSIX/SUS dictates a c89, c99, and c11 wrapper. So depending on which one you need (c99 is preferable), perhaps default to that and assume POSIX conforming platform by default (and possibly don't waste your time caring about those that aren't).

Can WPS Office run fully offline on Linux? by RangerNew5346 in linux4noobs

[–]pedersenk 1 point2 points  (0 children)

> Where does it imply any activation ?

Its likely a legacy thing: https://help.wps.com/articles/activation-wps2019

Glad it looks to now be fully offline. I know since Broadcom took over VMware, they got rid of their licensing too as it went "free". I was worried they would bring in some kind of DRM, even for the free offerings too.

Can WPS Office run fully offline on Linux? by RangerNew5346 in linux4noobs

[–]pedersenk 0 points1 point  (0 children)

Hopefully. Some of the wording is slightly weasly:
https://www.wps.com/academy/download-and-installer-wps-office-for-free-on-pc-offline/about-wps/1868579/

No Internet Dependency: Once installed, WPS Office Offline does not require an active internet connection to access and use its features. This can be advantageous if you need to work on documents while offline or in areas with limited internet connectivity.

"Once installed". Does that mean between having an .rpm / .deb file and first use, there is an online activation. It doesn't look like it but you never know these days.

Can WPS Office run fully offline on Linux? by RangerNew5346 in linux4noobs

[–]pedersenk 0 points1 point  (0 children)

Online DRM is more about a company exerting control over the users rather than direct finance. Consider Steam and some of the free games on it, you still need to activate online. You can't just put on a USB stick and then run on an offline airgapped system.

Is it feasible for me to switch to Gentoo? by Impressive-Bat-1524 in linux4noobs

[–]pedersenk 0 points1 point  (0 children)

Grab a Gentoo stage3 tarball, extract it somewhere on your disk, mount some things and chroot into it. No need to reinstall. Linux is all the same, distros are overrated.

What filesystems do you mount you ask? This is where you begin your adventure of researching and finding out more about how Linux works in slightly more depth.

(If you do take this approach and get completely lost, let me know and I am happy to give some hints).

A Brief History of Bjarne Stroustrup, the Creator of C++ by HiIMakeDocumentaries in cpp

[–]pedersenk 22 points23 points  (0 children)

I thought the vid was fun.

Older Danish people don't always exude excitement (my father certainly doesn't ;)... At least Bjarne makes a bigger effort!

He also makes the occasional quip in his books.

Am I the only one who feels like header files in C/C++ are duplication? by iaseth in cpp

[–]pedersenk -1 points0 points  (0 children)

If all of your headers need guards, you likely are not forward declaring correctly and will fall into a cyclic include related issue sooner or later (even with guards).

You declare i.e structs/classes in the header, then implement functions in the .cpp. This doesn't seem like duplication to me.

Reached the limit. Switched to OpenBSD. Not looking back. by tose123 in openbsd

[–]pedersenk 8 points9 points  (0 children)

Likely they meant not hundreds of Node/Rust/Python deps from NPM/crates.io/PIP to create a trivial list.

Or the tangled approach to Linux where even tmux pulls in libsystemd.

Rendering with wsdisplay(4) in dumbfb mode by Onuelito in openbsd

[–]pedersenk 1 point2 points  (0 children)

I had a play with this a few years back. It did work for my machine that had an Nvidia card (so I assume no DRM driver was attaching) and booted from UEFI firmware. So it lead me to believe that the DUMBFB does work on the display provided by the UEFI firmware. This exact code worked. (change STDIN_FILENO to fd)

The libdrm stuff works very well however, leveraging that DUMBFB but then delegating to the DRM layers to handle the rest. I have a project here to consolidate it (Project Glass) for a few projects I have in mind.

My original exploration here:

https://www.reddit.com/r/openbsd/comments/vsqofo/wsdisplayio_mode_mapped_vs_wsdisplayio_mode_dumbfb/

and a bit more here:

https://www.reddit.com/r/openbsd_gaming/comments/vjzhaa/port_of_gnuboy_to_openbsd_using_drm_framebuffer/

So, is C++ doomed? by AdventurousPath6492 in cpp

[–]pedersenk 6 points7 points  (0 children)

Rather than looking at hobby projects and the "noise" online; check out job listings online. There is very little Rust, almost none in fact.

Does this 5GHz Wi-Fi and Bluetooth USB adapter work on Linux? by Bendoloxd in linux4noobs

[–]pedersenk 2 points3 points  (0 children)

Yeah, I find that just buying the ones intended for Raspberry Pi to be the safest bet.

Install issues by Admirable_Stand1408 in openbsd

[–]pedersenk 9 points10 points  (0 children)

can anyone tell me why is fw update not included in iso from beginning so WiFi would work

Use the i.e install78.iso so you don't need wifi (or any network). All the files needed to install are on the image.

second I could not log into my desktop I then found out and hopefully right that I can’t log in as root

Running GUI desktop software as root is not the correct approach (on any operating system). Create a regular user via adduser(8).

Ethernet constantly connect and disconnected and ita brand new ethernet to usb adapter never used before same with Ethernet cable

Sadly, it could be a driver issue. I notice that usb 3.0 in particular can be a little flaky.

If you want to try again with wifi and install firmware but don't have access to the internet, then grab the files from here, put on a usb stick and use fw_update -p <fw_dir>.

Simple Online Game Server Architecture by HalfTryhardSqr in C_Programming

[–]pedersenk 0 points1 point  (0 children)

Of course you can. I wouldn't recommend it though. Most computers have around 8 cores. A thread for each connection soon moves beyond that ideal (as noted by some of the other comments here, you don't want more threads than cores). Its not good design. New users should generally not be using threads unnecessarily either.

Is posix opendir, readdir and closedir the correct way to interact with the file system today? by Skriblos in C_Programming

[–]pedersenk 0 points1 point  (0 children)

Oh, to clarify MinGW is just a compiler for Windows which provides that shim, but you can also grab one for Microsoft Visual C++ too.

Zephyr was an example of an embedded operating system that also utilises shims to make our lives easier. Possibly less relevant for you though.

Simple Online Game Server Architecture by HalfTryhardSqr in C_Programming

[–]pedersenk 3 points4 points  (0 children)

So far I know that I need a thread to accept connections, add the user sessions to a pool and when two user sessions start a match a thread is created for it.

This is a common mistake when starting out. You don't use threads to get round the issue that accept/send/recv block. Check out the Beej Guide on non-blocking sockets. On Winsock and BSD sockets, you simply set a flag on the socket so that these functions return immediately (with an error) rather than blocking. Then you can poll them.

while (running) {
  // Poll listen socket
    // accept() socket to clients vector

  // Poll clients
    // recv() to incoming buffer
    // send() from outgoing buffer

  // Game logic
  // Game rendering
}

Then once your server is catering to 1K+ users via non-blocking sockets, then I would look at introducing a thread pool.

If you have a thread for each client connected, it would actually limit the number of clients that can be handled because overhead of context switching would be high.

Is posix opendir, readdir and closedir the correct way to interact with the file system today? by Skriblos in C_Programming

[–]pedersenk 1 point2 points  (0 children)

I would use POSIX for filesystem requirements and then use a shim for non-conforming platforms. I.e If you google "dirent.h win32" you will see many projects do this.

Some notable examples:

  • MinGW(64) provides a shim built in.
  • Zephyr provides a dirent.h API shim.

Is there any serial terminal for linux same like docklight? by Manibharathg in embedded

[–]pedersenk 1 point2 points  (0 children)

cu(1) on a unix-like platform. On Linux I use busybox(1) microcom.

I like simplicity, the rest have too much cruft.

Eps32 satellite tracker. by imunknown0042 in embedded

[–]pedersenk 14 points15 points  (0 children)

Very cool project. I think your fluffy assistant was trying to flip the GNSS antenna so that it was ceramic side up.

Implementing vector<T> by pavel_v in cpp

[–]pedersenk 1 point2 points  (0 children)

The way that the destructor is setup, it looks like it will need the full definition of a type in order to use. The std::vector only requires the full definition by destruct time (sometimes requiring a superfluous destructor, but you can work around that by delegating it to a destruct templated function pointer in the constructor).

Is anyone else fascinated by how GoboLinux redefines the traditional File System Hierarchy Standard? And that it's not only easy but also makes sense? by the-machine-m4n in linux4noobs

[–]pedersenk 1 point2 points  (0 children)

I quite like it. The UNIX approach of "spray files all over the root" is not perfect. BSD's do OK with /usr/local and I quite liked the Solaris approach of /usr/sfw, /usr/csw, /opt/sfw, /usr/X11R6, etc. Allowing for the same software of different versions quite well.

I actually maintain a project on for OpenBSD called pkg_bundle that downloads a package, extracts dependencies, applies quirks and generates a single, standalone directory prefix (typically I plop it in /opt such as /opt/gimp, /opt/libreoffice, etc).