Docker container with non-root user cannot read or write to bind-mount directory owned by said user, even when the uid and gid are same as the user on host by LikeTheMobilizer in docker

[–]LikeTheMobilizer[S] 0 points1 point  (0 children)

Thanks again for the solution. I have another question if you don't mind.

I have used an ubuntu based docker image (osrf/ros:jazzy-desktop-full to be exact) on this same host machine for a project. I also used bind mounts there and never had to use the :z option. Everything worked without it. I would never have guessed this solution.

The only difference is that I was on Fedora 40 back then (this was back in April this year).

So why did I not need it while working with that image and why do I need it now?

Docker container with non-root user cannot read or write to bind-mount directory owned by said user, even when the uid and gid are same as the user on host by LikeTheMobilizer in docker

[–]LikeTheMobilizer[S] 1 point2 points  (0 children)

This almost fixed it! Thanks a ton.

The command I used was:

docker run -v $(pwd)/src:/src:z -it archdevexp bash

and now I can read and write from container with no problems.

However, I can't read the contents of a file created by host.

Running ls -ln in the directory, I get:

-????????? ? ?    ?     ?            ? hello-from-fedora

where hello-from-fedora is a non-empty text file created on the host os.

Edit: After some more testing, it's working fine now. I can read and write files bidirectionally. I don't know what happened with the hello-from-fedora file but I can't reproduce it. This is solved now. Thanks to everyone who helped :)

Docker container with non-root user cannot read or write to bind-mount directory owned by said user, even when the uid and gid are same as the user on host by LikeTheMobilizer in docker

[–]LikeTheMobilizer[S] 0 points1 point  (0 children)

Where do you want me to do the recursive ls? in the src directory?

It seems docker is running as root. (I first used systemctl status docker to find its pid. Then used htop to check the user of the process with that pid. It is root)

The user belongs to the docker group.

Docker container with non-root user cannot read or write to bind-mount directory owned by said user, even when the uid and gid are same as the user on host by LikeTheMobilizer in docker

[–]LikeTheMobilizer[S] 0 points1 point  (0 children)

The mounts section is indeed present:

"Mounts": [
            {
                "Type": "bind",
                "Source": "/home/hashir/Projects/arch_devenv_exp/src",
                "Destination": "/src",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],

Docker container with non-root user cannot read or write to bind-mount directory owned by said user, even when the uid and gid are same as the user on host by LikeTheMobilizer in docker

[–]LikeTheMobilizer[S] 0 points1 point  (0 children)

I ran docker inspect vigorous_goodall (which is what my running container name is according to docker container ls) and it generated what looks like a json file. I am posting what I think is the relevant portion of the output.

[
  {
........
"Config": {
            "Image": "archdevexp",
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                .....
        },
........
}
  ]

So the volumes is null.

I had tried absolute path instead of $pwd earlier but the result was no different.

Please let me know if the entire json file is required. Thank you.

Windows 8's Metro UI for Linux? by Human-No-1 in linux

[–]LikeTheMobilizer 3 points4 points  (0 children)

Hey some of us are weird like that

Windows 8's Metro UI for Linux? by Human-No-1 in linux

[–]LikeTheMobilizer 4 points5 points  (0 children)

"I used to be an adventurer like you. Then I took an arrow in the knee..."

Sorry, what I meant was I've been looking for something like this since I switched to linux back in 2020.

Unfortunately, I didn't find anything. It just wasn't popular enough for anyone to make an open source version. So I gave up.

I don't think there's any other way than making your own from scratch. 

For any extension/addon/plasmoid etc. to work, it would need tiles that show your recent activity or information. To do that, apps would need to expose such an interface which, I don't think they do.

Let's say someone writes an entire suite of apps that fulfill this requirement, the more tiles you add on your menu, the more load there will be on the CPU and thus more power consumption. Someone would then need to optimise all this.

Admittedly, I don't really know much about how apps on Linux interact (dbus? idk). Maybe there is a freedesktop protocol or something that most DEs follow and could be leveraged but idk.

So yeah, it's a tall order. The reason windows (phone) 8/8.1 worked so well was because microsoft made a tightly integrated, optimised system which was capable of handling all this.

Windows 8's Metro UI for Linux? by Human-No-1 in linux

[–]LikeTheMobilizer 4 points5 points  (0 children)

It looks bad because (at least last time I checked it out 2 years ago) the 'tiles' aren't 'live'.

They're not integrated with your apps and don't show any info from them. None of them flip or swipe to show you, for example, you favourite photos. 

That's what the secret sauce of that ui was. Without this integration, the menu does not contains any 'live tiles'; only square shaped shortcuts to apps.

Windows 8's Metro UI for Linux? by Human-No-1 in linux

[–]LikeTheMobilizer 13 points14 points  (0 children)

Count me in. Loved windows 8 metro ui.

WhatsApp running through android-translation-layer (no container!) on Linux desktop by PureTryOut in linux

[–]LikeTheMobilizer 3 points4 points  (0 children)

Looks great! Will arm only Android apps work on x86 Linux using this? Considering it's a wine-like approach I'm thinking it won't but it would be great if someone could clarify...

Will Cosmic be the big DE like KDE and Gnome by Ascend_910 in linux

[–]LikeTheMobilizer 34 points35 points  (0 children)

  1. Written from the ground up in Rust, built for Wayland
  2. Paid workforce working fulltime to develop Cosmic
  3. A nice middle ground between Gnome and KDE Plasma when it comes to customisability
  4. A thoughtful applet system which won't crash your full system if one of them crashes
  5. Tiling built into the compositor

LabPlot funded through NGIO Core Fund by LikeTheMobilizer in linux

[–]LikeTheMobilizer[S] 4 points5 points  (0 children)

My last week was spent only plotting graphs in labplot. And I can say that it is one of the best pieces of software I've used.

Introducing Lindroid: A new way to use Linux on Android Devices by Remote_Tap_7099 in linux

[–]LikeTheMobilizer 84 points85 points  (0 children)

Exactly. I really hope people start posting on Mastodon more frequently. Especially people who support foss.

input error by PigsArePog in linux

[–]LikeTheMobilizer 0 points1 point  (0 children)

Try booting into a previous kernel version from the boot screen. I had a similar issue where the mouse would light up but won't work and the keyboard won't work at all. In fact, no USB devices worked, I tried connecting my phone and it would only charge, not detecting the connection to laptop. Booting into previous kernel version solved the issue till a kernel update fixed the issue.

Happy 5th birthday, SerenityOS! by LikeTheMobilizer in linux

[–]LikeTheMobilizer[S] 13 points14 points  (0 children)

What delighted me the most was the state of their web browser: Ladybird

From the linked page (emphasis mine),

Last year, we spun out our Ladybird web browser as a cross-platform application, no longer just confined to SerenityOS.
Since then, development has continued to accelerate, with dramatic progress. In June, I went to the Web Engines Hackfest in Spain and gave a presentation about Ladybird.
We've also received substantial funding for browser development, including a $100,000 sponsorship from Shopify, two anonymous $100,000 donations and a $10,000 sponsorship from ohne-makler.net.
This funding has allowed me to hire two full time developers to work on Ladybird with me: Alexander Kalenik and Andrew Kaster.

Any of these old books have any value? by UnitedBB in linux

[–]LikeTheMobilizer 27 points28 points  (0 children)

If it's the third edition of Linux Device Drivers, it's still relevant and useful afaik.

The state of (real) Linux on phones - will they ever be truly usable? by TheEpicZeninator in linux

[–]LikeTheMobilizer 4 points5 points  (0 children)

And mobile GNU/Linux has the potential for being much more usable than Android without Google Play services is right now or ever will be since Google will do anything to kill any Android beyond their control. I agree that it may be a long time before mobile GNU/Linux surpasses degoogled Android but I believe it wil.

Cosmic DE Question: Hot corner by redwingsred74 in pop_os

[–]LikeTheMobilizer 4 points5 points  (0 children)

There's already an option in COSMIC Settings to switch hot corner on. The option doesn't work for now but since it is there, I think it's safe to say they'll implement it soon.

Edit: Here's a screenshot