Is it possible to run a nested gnome-shell with a different user profile?

I’ve just started with gnome extension development and have been having a rough time using the nested gnome-shell.

The nested shell will sometimes disable the extension I’m working on, or enable it on my main shell after a restart. And it will try to sync my calendar and such, possibly leading to sluggishness.

So I was wondering if it where possible to run the shell with a different user profile to prevent these two shell instances from conflicting with each other.

Other suggestions are welcome too of course.

Side-note: Anyone else experiencing horizontal scroll on this site?

1 Like

As far as I know, there is now way to do that. At least no obvious way, since that would more or less mean logging in as “someone else” and then being able to access their D-Bus session, clipboard, input events, etc.

For most cases, running a nested shell should be good enough, although it’s definitely not fully isolated. If that’s what you need, your best bet is probably GNOME OS in a VM.

Ah, too bad, but good to know anyway, thanks.

I had tinkered a little with GNOME OS, but got confused about how I would sync my extension to the VM.
I’ll give it another look.

Launching gnome-shell in another VT also seems like a decent option.

I think the solution could be somewhat complex - one possible way is to run it inside a container that also replaces the home directory with a new user with the same userid (?). You are better off though doing it through gnome os and the default user.

I came across:

Which has a docker image setup with GNOME 3.

Maybe it can be run with the latest GNOME, but this really isn’t my cup of tea.
Same goes for GNOME OS/OSTree.
So I’ll stick to what I have for now.

On another note, I found I have to run GNOME through a VT like this, otherwise I don’t get proper logs:

XDG_SESSION_TYPE=wayland dbus-run-session gnome-session

Okay, okay…

I got something working using distrobox:

When creating a container they have an easy way of setting up a custom home directory through the --home parameter.

They have some instructions for setting up GNOME.
I only followed the first few steps and then installed gnome-shell instead.
Then I was able to run a nested shell instance.

I haven’t done any development with it yet, so still have to see if it is worth the effort.
Currently I don’t have a mouse cursor in the shell.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.