Git Product home page Git Product logo

Comments (42)

t-8ch avatar t-8ch commented on June 14, 2024 4

@51v4n I have a small program (hack) that uses libmutter to expose the dbus service without actually starting the window manager.
(It applies its settings though).

https://gist.github.com/t-8ch/5e59f5a5eff265ad429c779000511f0a

The whole thing is fairly terrible (and may break with future versions of mutter) but seems to work for now.

from i3-gnome.

t-8ch avatar t-8ch commented on June 14, 2024 3

The org.gnome.Mutter.DisplayConfig dbus service is provided by mutter/libmutter.
This is a window manager library used by gnome-shell.
We would need a way to have libmutter only glue this dbus interface to xrandr without actually doing all the window management stuff i3 should do.

(This would also enable colord support with i3)

from i3-gnome.

ydallilar avatar ydallilar commented on June 14, 2024 3

I have been struggling with similar things and found the workaround with gnome-flashback. I just run it in my i3 config. Gnome-flashback is specifically designed to recover some functionality already moved to mutter or gnome-shell. So, it comes with some features built in but easy to disable if you want to. For example, I use mate daemons for power management and notifications. And it provides its own org.gnome.mutter.DisplayConfig so I dont think you actually need to use libmutter.

from i3-gnome.

dustinwilson avatar dustinwilson commented on June 14, 2024 2

I am getting a segfault when clicking on "Devices" in gnome-control-center on a fresh Manjaro install in a virtual machine:

(gnome-control-center:86775): GLib-GObject-CRITICAL **: 08:21:15.394: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
Segmentation fault (core dumped)

Is that related to the issue here with the Displays panel? It does not segfault when using i3-gnome-flashback. Is the solution to run flashback to get access to the panel like with this?

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024 1

Hi,
That's because it's a missing component from the session.
Let me look around to figure out and fix this.

Meanwhile i suggest you to do your settings under GNOME

Thanks for let me know.

from i3-gnome.

damko avatar damko commented on June 14, 2024 1

I'm starting thinking that you've enabled some gnome-shell components that can not be launched but that somehow gets launched.
Google about this org.gnome.Mutter.DisplayConfig component to understand what it is. Then look around in the autostart folder for some .desktop file trying to load that component.
This could be a start.
And good luck for your final!

from i3-gnome.

t-8ch avatar t-8ch commented on June 14, 2024 1

@mist I am not sure anymore (can look later) but assume strongly that it should be before initializing libmutter.

from i3-gnome.

muktupavels avatar muktupavels commented on June 14, 2024 1

These days you can not replace window manager in GNOME or GNOME Classic session. GNOME Shell is more then window manager...

One option is to use GNOME Flashback that still use old components - gnome-panel, gnome-applets, metacity and new module gnome-flashback that is used to provide required functionality that has been moved to gnome-shell and/or to mutter/libmutter.

https://gitlab.gnome.org/GNOME/gnome-flashback/blob/master/data/sessions/Makefile.am
*.session files are auto-generated here if you want to see what are required components for GNOME Flashback session. You want replace metacity with i3-gnome. If you don't use gnome-panel you can remove it. Other things you probably want to keep.

GNOME_SHELL_SESSION_MODE=classic in gnome-session-i3 is not needed, it is used by gnome-shell, but you are not starting/using it.

DesktopNames in i3-gnome-xsession.desktop must be DesktopNames=GNOME-Flashback;GNOME; if you are using GNOME Flashback.

from i3-gnome.

ydallilar avatar ydallilar commented on June 14, 2024 1

https://gitlab.gnome.org/GNOME/gnome-flashback/blob/master/data/sessions/Makefile.am
*.session files are auto-generated here if you want to see what are required components for GNOME Flashback session. You want replace metacity with i3-gnome. If you don't use gnome-panel you can remove it. Other things you probably want to keep.

GNOME_SHELL_SESSION_MODE=classic in gnome-session-i3 is not needed, it is used by gnome-shell, but you are not starting/using it.

DesktopNames in i3-gnome-xsession.desktop must be DesktopNames=GNOME-Flashback;GNOME; if you are using GNOME Flashback.

Yes, that should work as well. But, I vote for gnome-flashback being optional rather than the default.

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

I'll take time on this, i'm doing another important duties, next week will be about university projects. Thanks for the patient.

from i3-gnome.

damko avatar damko commented on June 14, 2024

I didn't have this exact issue but it's still related to the gnome-control-settings.

Try running this in a terminal:

env XDG_CURRENT_DESKTOP=GNOME gnome-control-center

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

@damko thanks for this, i did as you suggest and this is the output when i open the screen tab:

 ~ > env XDG_CURRENT_DESKTOP=GNOME gnome-control-center

(gnome-control-center:1703): display-cc-panel-WARNING **: Error calling GetCurrentState: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.Mutter.DisplayConfig" does not exist

from i3-gnome.

damko avatar damko commented on June 14, 2024

@51v4n look into your gnome-session dir (/usr/share/gnome-session/sessions/).
There must be a .session file with the name of the session that you are currently using.
Open that file and look for the RequiredComponents line
Try to add or remove "org.gnome.Mutter.DisplayConfig" from it are reload gnome

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

@damko yup, i did it as well and org.gnome.Mutter.DisplayConfig wasn't there (specifically i3-gnome.session), so i added it and the session crashed turning back to login screen.

My apologizes for being late and unattend this, i'm in the middle of final university projects.

This will be fixed anyway, thanks to all of you for let me know.

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

@damko

I'm starting thinking that you've enabled some gnome-shell components that can not be launched but that somehow gets launched.

Actually, due to hours of getting to understand about session components i'm thinking the same (there's a lot of components loaded).

Google about this org.gnome.Mutter.DisplayConfig component to understand what it is. Then look around in the autostart folder for some .desktop file trying to load that component.
This could be a start.

On it! , let's find out.

And good luck for your final!

Thanks!

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

@t-8ch I agree with your words, it works only with mutter, this is why i'm taking time to fix it. To be honest this issue needs collaborators, it was opened about 3 months+ ago.

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

@t-8ch This is really cool!, thanks!, i build it and it fixes the issue!
At the moment i don't know how to integrate to the whole project but it works like a charm!.

I could update the README with your approach but there has to be a way to integrate with everything(?).

The whole thing is fairly terrible (and may break with future versions of mutter) but seems to work for now.

Not at all, it's a perfectly proof of concept, another way to understand the components of GNOME.

from i3-gnome.

t-8ch avatar t-8ch commented on June 14, 2024

@51v4n So I tried to integrate it.
When starting the program via the Gnome-Session (RequiresCondition) or the i3 config then my mouse cursor vanishes.
Putting in a sleep() "fixes" this.
The same effect also occurs when modifying the display via gnome-control-center.

It would be interesting if someone else also runs into this issue.

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

@t-8ch I'll add your approach on the rest of the project.

I can add you as a collaborator if you wish to test something else.

from i3-gnome.

t-8ch avatar t-8ch commented on June 14, 2024

@51v4n Feel free to use the code as you see fit.
I don't think having me as a contributor will be useful. I am still not sure if I actually want to use this hack.
Thanks for the offer though!

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

@t-8ch No problem, i understand, by the way thanks a lot for your sharing your snippet now i get more clearly what's going on.

from i3-gnome.

tarjei avatar tarjei commented on June 14, 2024

Just thought I'd note that @t-8ch's solution required the libmutter-1-dev package on ubuntu:
sudo apt-get install libmutter-1-dev

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

@tarjei thanks for let us know, i didn't required to install anything to test the code my self.

The point of that code is that, at least as a proof of concept, we learned that to get more integration under GNOME session we have to load the mutter's library, it's kind of tricky because we don't use GNOME's mutter so, with this piece of code we tell to GNOME session to load the mutter's library without start mutter (that's where i3-wm starts).

So thanks to that proof of concept, now i get more understanding about what's going on, i'm taking time to implement a solution.

Otherwise, if you have an approach it's welcome.

from i3-gnome.

mist avatar mist commented on June 14, 2024

@t-8ch Where do I have to put the sleep() in? Got the same problem with the vanishing cursor.

from i3-gnome.

mist avatar mist commented on June 14, 2024

@t-8ch I tried different ways, but none worked, the pointer is still vanishing. Maybe this has something to do with using libmutter-2 instead of libmutter-1? But it would be helpful to try your working version.

from i3-gnome.

t-8ch avatar t-8ch commented on June 14, 2024

@mist I took another look and it seems my version with the sleep has been lost in my rewrites.
How does it behave if you start the hack during a running session?
In my case it worked when started in an existing session but would not work when starting directly during session startup.
The led me to put the sleep in, which worked.

I could image that this is dependent on some internal implementation details, so different versions of libmutter may the cause for this difference.

from i3-gnome.

mist avatar mist commented on June 14, 2024

@t-8ch Well, I only tried starting it during the running session and the cursor vanishes, so the sleep probably won't fix anything about it :(

from i3-gnome.

NullVoxPopuli avatar NullVoxPopuli commented on June 14, 2024

is there a list of gnome session components to start when launching i3?

somethings that I've noticed the default gnome desktop offers that I would like to have in i3, but haven't yet figured out how:

  • auto monitor switching when plugging in a monitor
  • gnome-control-center Devices/Displays shouldn't be blank "Could not get sceren information"
    • wanted to use this to change backlight brightness

on the plus side, when I use i3, my .xinitrc is loaded, whereas in gnome, it's not.

$ gnome-shell --version
GNOME Shell 3.28.1

 $ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04 LTS
Release:	18.04
Codename:	bionic

 $ i3 --version
i3 version 4.15 (2018-03-10) © 2009 Michael Stapelberg and contributors

 $ uname -a
Linux macbuntu 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

from i3-gnome.

t-8ch avatar t-8ch commented on June 14, 2024

@NullVoxPopuli , well these are not managed as gnome session components but a core functionality of the gnome window manager (mutter).

from i3-gnome.

NullVoxPopuli avatar NullVoxPopuli commented on June 14, 2024

@NullVoxPopuli , well these are not managed as gnome session components but a core functionality of the gnome window manager (mutter).

that's disappointing. I would have thought they had all that separated out into different programs.

oh well. thanks for the info!

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

@pssncp142,
Interesting, didn't realize that gnome-flashback can give a hand on this particular case.

I just run it in my i3 config.

As simple as that? huh.

I just installed gnome-flashback and include it on the i3 config as you mention and it works!

So, here's another approach that works! i'll add it to the wiki as well to @t-8ch's approach.

At this point, this issue can be considered as fixed?

from i3-gnome.

mist avatar mist commented on June 14, 2024

Whoa! Awesome!
Thanks for this great hint!

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

@pssncp142 Thanks for sharing your workaround! now it is already available in 'Tips & Tricks': https://github.com/jcstr/i3-gnome/wiki/Tips-&-Tricks#gnome-flashback

from i3-gnome.

muktupavels avatar muktupavels commented on June 14, 2024

Is display configuration optional? Does i3 manage input settings and/or input sources?

from i3-gnome.

ydallilar avatar ydallilar commented on June 14, 2024

Is display configuration optional? Does i3 manage input settings and/or input sources?

Gnome-flashback options are:

~ gsettings list-keys org.gnome.gnome-flashback      
screenshot
sound-applet
status-notifier-watcher
end-session-dialog
automount-manager
screencast
audio-device-selection
idle-monitor
polkit
bluetooth-applet
notifications
power-applet
desktop-background
input-settings
screensaver
workarounds
input-sources
shell

I prefer idle-monitor, notifications, desktop-background, power-applet disabled. It is something to explore for everyone's taste. I am not sure if there is a way to prevent gnome-flashback managing display configuration. Also, if you are using synaptics, gnome mouse/touchpad settings pretty much useless since gnome uses libinput for default as far as I know.

from i3-gnome.

muktupavels avatar muktupavels commented on June 14, 2024

I know what options GNOME Flashback has...

You wrote - I vote for gnome-flashback being optional. If there is no gnome-flashback then you don't have display configuration, you don't have input sources and you don't have other things that has been removed from GNOME Settings Daemon. Of course if i3 sessions does not need these things then you don't need gnome-flashback.

Options to disable some parts are mostly because of one reason - older Ubuntu versions used GNOME Flashback with Unity Settings Daemon that still had things that has been removed from GNOME Settings Daemon.

You can not prevent it from managing display configuration - I removed that, because display configuration is not optional. Same is true for other things so in future most likely at least some options will disappear.

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

It is something to explore for everyone's taste.

I agree with that.

If there is no gnome-flashback then you don't have display configuration, you don't have input sources and you don't have other things that has been removed from GNOME Settings Daemon. Of course if i3 sessions does not need these things then you don't need gnome-flashback.

It's all about personal customization.

Just for context, this issue shows the gap that this tweak has, sadly every update i3-gnome breaks just because there are changes done regarding gnome-session.

I'll keep in mind that gnome-flashback will be reliable as the simplest solution to this issue until an update from GNOME (scheduled for September this year) break it again or some changes that it's not our business here.

The main reason i've been using this tweak is that it can be possible an integration with GNOME, far from extensions such as panels and other visual ones but it really helps with other components such as GNOME keyring out-of-the-box.

from i3-gnome.

NullVoxPopuli avatar NullVoxPopuli commented on June 14, 2024

Seems like something broke again? can anyone confirm? I have an ASUS laptap where I'm not using gnome-flashback and I can view the displays settings, but I recently got a new Dell XPS 15 for work, and the display settings aren't loading / can't find any displays.

from i3-gnome.

NullVoxPopuli avatar NullVoxPopuli commented on June 14, 2024

actually, scratch that. modifying one of the .desktop files with GNOME-Flashback doesn't work, but exec from i3/config does. all is well.

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

Curious, there are no updates from GNOME/i3wm yet?

... but exec from i3/config does. all is well.

Obvious to mention but you have to add it, regardless of the presence of GNOME.

from i3-gnome.

ydallilar avatar ydallilar commented on June 14, 2024

actually, scratch that. modifying one of the .desktop files with GNOME-Flashback doesn't work, but exec from i3/config does. all is well.

I couldn't do it myself, but apparently, there is a specific order of running the daemons. See the files in here: https://github.com/deuill/i3-gnome-flashback. This does work. Tested in arch linux.

from i3-gnome.

jcstr avatar jcstr commented on June 14, 2024

The reason I'm closing this is because it is pretty well documented through the comments, thanks to everyone here for taking the time and figure out a solution.

from i3-gnome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.