Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does "patch for wayland" actually do? #220

Closed
desertstsung opened this issue Sep 5, 2021 · 12 comments
Closed

What does "patch for wayland" actually do? #220

desertstsung opened this issue Sep 5, 2021 · 12 comments
Labels
question Further information is requested

Comments

@desertstsung
Copy link
Contributor

I login with X11, and then click something like "patch for wayland" in the left part of RustDesk GUI. However, the next time I get into GDM, there is no option for Wayland. After some seeking, I modified the /etc/gdm/custom.conf with doas, comment the WaylandEnable=false option. After that, I got the Wayland option in GDM, again.

So, my question is: When I click the "patch for wayland" or something in RustDesk under X11, are you actually modify the file /etc/gdm/custom.conf? If so, how can you do that without authentication?

OS: ArchLinux
kernel: 5.13.13-zen1-1-zen
Desktop Environment: GNOME 40.4.0

@desertstsung desertstsung added the question Further information is requested label Sep 5, 2021
@desertstsung
Copy link
Contributor Author

I'm sorry, I tried again and the function contains pkexec need authentication.

@desertstsung
Copy link
Contributor Author

But I still think this kind of "kill" is NOT "fix". The label Fix it should be Disable it. Source: class FixWayland: Reactor.Component

@rustdesk
Copy link
Owner

rustdesk commented Sep 6, 2021

Agree

@desertstsung
Copy link
Contributor Author

Agree

Thx. It's kind of easy job, so I want to fork this repository and pull request.

If I am honored to join in, my further step is going to check if there is a better way of logging in using X11 by default while keep Wayland remain, till the real implementation of Wayland fix is done.

@rustdesk
Copy link
Owner

rustdesk commented Sep 6, 2021

fork this repository and pull request

Welcome

@desertstsung
Copy link
Contributor Author

desertstsung commented Sep 7, 2021

if there is a better way of logging in using X11 by default while keep Wayland remain

There's a pseudo code of such implementation:

if current_session_is_wayland:
    valid_sessions = exec("ls -1 /usr/share/xsessions/").stdout()
    for valid_session in valid_sessions:
        if valid_session is ends with "xorg": session = valid_session
    if session is not valid:
        for valid_session in valid_sessions:
            if valid_session is ends with "wayland": session = valid_session - "wayland"
    target_file = "/var/lib/AccountsService/users/"+username()
    change "Session=*" into "Session="+session in target_file

After this step, user should log out, and then the default login session is "Xorg"
So, if needed, I'm going to work on this function

@desertstsung desertstsung reopened this Sep 7, 2021
@rustdesk
Copy link
Owner

rustdesk commented Sep 7, 2021

After this step, user should log out, and then the default login session is "Xorg"

Is ok for all Linux distributions? If so, please go ahead.

@desertstsung
Copy link
Contributor Author

I found that's ok in ArchLinux (my laptop) and Ubuntu-LTS(my workstation), therefore I'm looking for a rpm-based distro to verify. In addition, there's not enough info about other desktop environment, that's another difficaulty. Could you please offer me some kind help if you have some other environment?

Appendix:
valid sesssion of my Arch: gnome, gnome-classic, gnome-xorg
valid session of my Ubuntu: ubuntu, ubuntu-wayland

@rustdesk
Copy link
Owner

rustdesk commented Sep 7, 2021

I also only test Manjaro, Ubuntu and Fedora.

@desertstsung
Copy link
Contributor Author

Oh, It's a great help, I think that's enough. I'm going to work on it during my spare time.

@rustdesk
Copy link
Owner

"Fxi it" button is removed, because it is dangerous, many guys complain it.

@Nicba1010
Copy link

Any reason not to remove the code as well? you can always restore it from history, I feel uncomfortable running this even if the function isnt linked to anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants