Giter Site home page Giter Site logo

starrah / sunlogin-xhost-fix Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 1 KB

Linux 向日葵 无法在输入密码登录前开启远程控制的问题的解决方案。 适用于KDE+sddm。 使得开机后可以立即发起远程控制,不必须登录。

Shell 100.00%
sunlogin sunloginclient

sunlogin-xhost-fix's Introduction

向日葵+KDE(sddm)无法在输入密码登录前开启远程控制的问题的解决方案

适用问题

  • 使用KDE,以sddm作为Display Manager(除非你特殊调整过,KDE默认就是sddm)
  • 物理机完成用户登录、进入桌面后可以正常使用向日葵
  • 但如果不进行登录,在输入密码页面向日葵无法启动远程控制,一直卡在“正在进入远程桌面”

使用方法

只需克隆项目,sudo执行install.sh即可:

git clone https://github.com/Starrah/sunlogin-xhost-fix
cd sunlogin-xhost-fix
chmod u+x install.sh
sudo ./install.sh

若要卸载本程序,只需sudo执行项目中的uninstall.sh

问题分析

xhost是X server用于控制允许哪些client连入的机制。默认情况下,KDE只会允许本机的当前用户连入:

xhost
# 输出例如:
# access control enabled, only authorized clients can connect
# SI:localuser:ubuntu

向日葵远程控制的原理是用一个X client连接到X server。用户登录完成以后,这个X client是以用户的身份开启的,因而可以正常使用; 但是,在用户完成登录之前,向日葵所用的X client是以root这个用户开启的,因此在尝试连接时会被拒绝。 本程序的原理是在X server启动之后,立即执行xhost +SI:localuser:root,将root用户加入允许列表中。

sunlogin-xhost-fix's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.