1.向日葵官网下载rpm包

2.安装向日葵
使用dnf命令安装发现安装不成功,使用如下命令安装。
shell
sudo rpm -ivh SunloginClient_15.2.0.63064_x86_64.rpm --nofiledigest --nodigest
之后遇到了依赖问题。
shell
~/Downloads$ sudo rpm -ivh SunloginClient_15.2.0.63064_x86_64.rpm --nofiledigest --nodigest
error: Failed dependencies:
libXScrnSaver-devel is needed by sunloginclient-15.2.0.63064-1.x86_64
安装依赖:
bash
sudo dnf install libXScrnSaver-devel
再次安装:
lua
~/Downloads$ sudo rpm -ivh SunloginClient_15.2.0.63064_x86_64.rpm --nofiledigest --nodigest
Preparing... ################################# [100%]
package sunloginclient-15.2.0.63064-1.x86_64 is already installed
~/Downloads$ /usr/local/sunlogin/bin/sunloginclient
/usr/local/sunlogin/bin/sunloginclient: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
提示缺少libcrypt.so.1库,因为glibc的更新,这个库已经升级了,不自带.1版本,需要安装libxcrypt-compat。
bash
sudo dnf install libxcrypt-compat
然后继续安装,出现这些提示,可以不用管,这是向日葵的问题。
vbnet
lua::call() attempt to call global `on_quit' (not a function)
lua::call() attempt to call global `on_quit' (not a function)
lua::call() attempt to call global `on_quit' (not a function)
lua::call() attempt to call global `on_quit' (not a function)
(sunloginclient:7447): Gtk-CRITICAL **: 19:04:16.505: gtk_main_quit: assertion 'main_loops != NULL' failed
3.修改向日葵的文件
安装好之后可以看到/usr/local/sunlogin/下的文件。
bash
/usr/local/sunlogin$ ls
bin etc lib res rpminstall.sh rpmuninstall.sh scripts sunlogin.desktop
需要修改的文件有三个:
-
/usr/local/sunlogin/rpminstall.sh
-
/usr/local/sunlogin/scripts/start.sh
-
/usr/local/sunlogin/scripts/common.sh
首先修改/usr/local/sunlogin/rpminstall.sh ,找到第24行和40行,添加|| [ "$os_name" == "fedora" ]

然后修改/usr/local/sunlogin/scripts/start.sh,找到第92行,添加|| [ "$os_name" == "fedora" ]

最后修改/usr/local/sunlogin/scripts/common.sh,找到第95行,添加:
bash
elif [ $os_name == 'fedora' ]; then
96 os_version=`cat /etc/fedora-release | cut -d ' ' -f3`

4.修改之后再次执行脚本
sql
/usr/local/sunlogin$ sudo bash rpminstall.sh
sunloginclient: no process found
sunloginclient_linux: no process found
check operate system OK
cp: cannot create regular file '/etc/init.d/runsunloginclient': No such file or directory
Error:can not copy init file init_runsunloginclient
Installation failed
提示No such file or directory,这个服务的目录已经被弃用了,但是没关系,我们新建一个。
bash
sudo mkdir -p /etc/init.d/
sudo bash rpminstall.sh #再次执行
bash
/usr/local/sunlogin$ sudo bash rpminstall.sh
sunloginclient: no process found
sunloginclient_linux: no process found
check operate system OK
rpminstall.sh: line 50: /sbin/chkconfig: No such file or directory
rpminstall.sh: line 51: /sbin/chkconfig: No such file or directory
/etc/init.d/runsunloginclient: line 6: /etc/init.d/functions: No such file or directory
sunloginclient: no process found
/etc/init.d/runsunloginclient: line 6: /etc/init.d/functions: No such file or directory
[2025-11-13 20:55:11] - [LoadCefSymbolTable] -load libcef.so dlerror:libgconf-2.so.4: cannot open shared object file: No such file or directory
[main] service_main start.********************
[main] service_main start app.********************
InitConfig @ 1146
strCPU: Intel(R) Core(TM) i5-14600KF
遇到个依赖缺失:libgconf-2.so.4,因为gconf已被gsettings替代,所以一般系统上没有,安装GConf2即可。
shell
sudo dnf install GConf2 -y
sudo ./rpminstall.sh #再次执行
sudo /usr/local/sunlogin/bin/sunloginclient #直接执行向日葵软件
到这里就没问题了。
5.向日葵,启动!
由于用了比较老的服务,所以每次运行向日葵之前都要启动一下服务。
bash
/usr/local/sunlogin$ sudo /etc/init.d/runsunloginclient
/etc/init.d/runsunloginclient: line 6: /etc/init.d/functions: No such file or directory
Usage: /etc/init.d/runsunloginclient {start|stop|restart|condrestart|status}
sudo /etc/init.d/runsunloginclient start #启动服务
然后启动向日葵!

6.sunlogin.service服务
上面代码还在用init.d,这种现在都不怎么用了,现在用systemd服务,自己写一个systemd服务,省时省事。
bash
touch /etc/systemd/system/sunlogin.service
sudo vim /etc/systemd/system/sunlogin.service
#sunlogin.service
[Unit]
Description=Sunlogin Remote Client
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/sunlogin/bin/oray_rundaemon
Restart=on-failure
User=root
[Install]
WantedBy=multi-user.target
执行下面的命令,启动服务。
- sudo systemctl daemon-reload
- sudo systemctl enable sunlogin #自启
- sudo systemctl start sunlogin #启动