Giter Site home page Giter Site logo

jnu_ruijie's Introduction

暨南大学Linux锐捷

常规下载并执行脚本

这个仓库主要记录了如何在ubuntu22.04系统下创建锐捷启动的快捷方式,并且无窗口后台运行。

如何在ubuntu22.04系统下启动锐捷联网就不赘述了,主要流程如下

  1. 在这个链接下载zip压缩包并解压。

  2. 按照里面的readme文件如下操作

     chmod +x ./rjsupplicant.sh
     sudo ./rjsupplicant.sh -a 1 -d 1 -u 你的学号 -p 你的密码
    

创建桌面快捷无后台执行

这里需要创建3个文件

  1. ruijie.sh脚本文件来后台运行rjsupplicant.sh
  2. ruijie_wrapper.sh脚本文件来封装ruijie.sh(直接执行ruijie.sh会无法正常后台执行,原因未知)。
  3. ruijie.desktop桌面快捷来执行ruijie_wrapper.sh,实现双击桌面快捷即可。

ruijie.desktop文件内容如下

[Desktop Entry]
Version=1.0
Exec= <ruijie_wrapper.sh文件绝对路径>
Name=Ruijie
GenericName=SSH Server
Comment=Connect to My Server
Encoding=UTF-8
Terminal=true
Type=Application
Icon= <这个仓库附带logo的绝对路径(不需要可以删除这行)>
Categories=Application;Network;

ruijie.wrapper.sh文件内容如下

#!/bin/bash
cd <ruijie.sh文件绝对路径>
sudo ./ruijie.sh

ruijie.sh文件内容如下

#!/bin/bash
cd <rjsupplicant.sh文件绝对路径>

echo "Turn on/off Ruijie? [On/off]"
read Operation

if [[ -n $Operation && ${Operation,,} = 'off' ]]
then
    sudo ./rjsupplicant.sh -q
else
(sudo ./rjsupplicant.sh -a 1 -d 1 -u 你的学号 -p 你的密码 &)
fi

以上步骤完成之后直接双击桌面ruijie.desktop文件即可,这里双击后会需要输入密码,然后选择是开启还是关闭锐捷。

jnu_ruijie's People

Contributors

haohualv 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.