Skip to content

u/FineBroccoli5

In this archive from Aug 2019 to Jun 2023

7
posts
1k
comments
1
media
2.6k
score
1 saved before deletion

Top posts

How does xargs actually work?

So I got bit curious as to how does xargs actaully know how to build the command with the arguments in the right place, etc. After reading the comments in it's source code, I came to the conclusion that it puts what ever you pipe in to it in different places of the command you supply it with, execut...

8 points5 comments
Open on Reddit

Top comments

So let's start from the bottom. Every OS has few layers (I will just talk about the main ones):

  • kernel - is at the bottom and talks to the hardware
  • API's - sits between the program that is using it and the kernel, they allow easier comunication between the two. You don't have to use them to make a program, as you can talk directly to the kernel
  • Userspace - here is where the user interacts with the programs/OS

Now to talk about desktop environments (DE's) in Linux:

DE's also have few layers: first is console (tty) then there is Xorg server and finnaly your DE.

If you didn't have a display manager (the login screen) installed your PC would boot in to a tty (you can swith to one right now with alt + ctrl + f1-6). Which is essentialy a terminal. From there you could start a display server, most distros use Xorg (there is also wayland but I will get to that in a bit) which is responsible for displaying your programs. DE's are just collections of programs that run on top of Xorg, every DE is going to have a window manager (WM) which allows you to move, resize, close, minimze, ... windows. A some sort of application menu, bar/dock and much more.

So in short, DE provides you with user friendly environment for interacting with your PC.

Could you build your own DE? Definetly! Remember how we talked about window managers? There is a lot of them, some are made for DE's like Mutter which is a WM of Gnome or Kwin for KDE Plasma. But there is a lot of them that are standalone (some DE specific can be used on theyr own too). Like OpenBox, bspwm, Qtile, awesome, fvwm, IceWM, DWM, sowm, ... All of them are bit different, some even come with a bar and or a app menu. It's a really deep rabbit hole, I recommend you look them up on Arch Wiki.

How does it (DE) work in terms of code ?

So as I said most of them are build on top Xorg which provides a API for window interaction (moving, closing resizing, etc.) This is only used by the WM. Rest of the programs relies on different API's.

I.e any distro that has Xorg can run any DE/WM (distros often have a list of tested/recommended DE's)

Also some DE's are made for specific distros e.x. Budgie on Solus, but since everything is opensource, there is nothing stopping anyone from installing Budgie on theyr distro of choice.

Now about Wayland:

Wayland is a display protocol not a server which is a key difference from Xorg.

Xorg can open programs without DE/WM because it's responsible for drawing the window even in the DE/WM. But with Wayland the DE/WM is the display server. (I hope that this made sense).

If you have more questions, ask!

89 points

Chromium is fully opensource, but has some Google stuff in it by default like Google sync (the backend or the server side of these services/features is not opensource tho) and ungoogled chromium just removes these services and etc.

But if you want to use a opensource browser, Firefox is much better choice, and has much better options for protecting your privacy then chromium.

36 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.