sudo apt-get install xrdp
sudo apt-get install vnc4server tightvncserver
echo "xfce4-session" >~/.xsession
sudo gedit /etc/xrdp/startwm.sh  在. /etc/X11/Xsession 前一行插入
xfce4-session

sudo service xrdp restart

搞定,成功使用远程桌面连接图形界面, 保持上一次远程打开的图形桌面需增加如下
[xrdp8]
name=Reconnect
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=5910
  

解决:ftp命令行不支持目录下载
通过wget得到解决
#wget ftp://IP:PORT/XXX/* --ftp-user=xxx --ftp-password=xxx  -r

 
1.  得到系统中soft dog的信息

# modinfo softdog    
filename: /lib/modules/3.2.0-4-686-pae/kernel/drivers/watchdog/softdog.ko

2. 加载模块

# insmod /lib/modules/3.2.0-4-686-pae/kernel/drivers/watchdog/softdog.ko

3. 此刻可见/dev/watchdog, 或创建

# mknod /dev/watchdog c 10 130

4. 查看dev并赋予权限

# ls -l /dev/watchdog
crw------- 1 root root 10, 130 Mar 21 16:27 /dev/watchdog

# chmod o+rw /dev/watchdog

5. 测试使用watch dog

简单可写为:

# echo 0 > /dev/watchdog         ///从此刻起计时,启用watchdog

# echo -n V > /dev/watchdog    ///停用watchdog

6. 硬件与软件watchdog的区别 
硬件watchdog必须有硬件电路支持, 设备节点/dev/watchdog对应着真实的物理设备, 不同类型的硬件watchdog设备由相应的硬件驱动管理。软件watchdog由一内核模块softdog.ko 通过定时器机制实现,/dev/watchdog并不对应着真实的物理设备,只是为应用提供了一个与操作硬件watchdog相同的接口。

硬件watchdog比软件watchdog有更好的可靠性。 软件watchdog基于内核的定时器实现,当内核或中断出现异常时,软件watchdog将会失效。而硬件watchdog由自身的硬件电路控制, 独立于内核。无论当前系统状态如何,硬件watchdog在设定的时间间隔内没有被执行写操作,仍会重新启动系统

看门狗是混杂设备,所以主设备号是10,/include/linux/miscdevice.h 中定义他的次设备号为130

 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>

 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <termios.h>
 #include <errno.h>
 #include <signal.h>
 #include <time.h>
 #include <pthread.h>
 #include <sys/time.h>
 #include <linux/watchdog.h>
 #include <sys/ioctl.h>

 time_t  backTime;
 struct tm *pBackTime;
 int wt_fd;

 static void sigAlarm(int sig)
 {
     ';
     (void)time(&backTime);
     pBackTime= localtime(&backTime);
     printf("day: %d; hour: %d; min: %d; sec: %d\n", pBackTime->tm_mday, pBackTime->tm_hour, pBackTime->tm_min, pBackTime->tm_sec);

     write(wt_fd, &flag, ); //Reset Watchdog  喂狗
     alarm();
     return;
 }

 int main()
 {
        char flag = 'V';
        int ret;
        ;

        if(SIG_ERR == signal(SIGALRM, sigAlarm))
        {
            perror("signal (SIGALARM) error");
        }

        wt_fd = open("/dev/watchdog", O_RDWR);
        )
        {
            printf("Fail to open watchdog  device!\n");
        }
        else
        {
            write(wt_fd,NULL,);
            printf("Turn on Watch Dog\n");
            ret = ioctl(wt_fd, WDIOC_SETTIMEOUT, &timeout);
            if(EINVAL == ret)
            {
                 printf("EINVAL Returned\n");
            }
            else if(EFAULT == ret)
            {
                 printf("EFAULT Returned\n");
            }
             == ret)
            {
                 printf("Set timeout %d secs success\n", timeout);
            }
            else
            {
                 printf("Ret %d\n", ret);
            }
        }

        alarm();

        );

        write(wt_fd, &flag, );
        printf("Turned off Watch Dog\n");
        close(wt_fd);
        ;
 }

http://blog.sina.com.cn/s/blog_69a04cf401016gz4.html

xrdp远程 & watchdog 启用与测试 & WebRTC的更多相关文章

  1. ubuntu 13.04 xrdp 远程桌面连接问题[转载]

    本人ubuntu12.04,遇到了同样的问题,用一下方法解决了,mark一下. ubuntu 13.04 xrdp 远程桌面连接问题. win 7 远程桌面连接 ubuntu desktop 有几种办 ...

  2. 启用WCF测试客户端的相关技巧

    在Visual Studio之外打开WCF测试客户端有两种方法:第一种方法是到其所在路径(Visual Studio安装路径\Common7\IDE\WcfTestClient.exe)双击打开.第二 ...

  3. loadrunner 脚本开发-调用java jar文件远程操作Oracle数据库测试

    调用java jar文件远程操作Oracle数据库测试 by:授客 QQ:1033553122 测试环境 数据库:linux 下Oracle_11g_R2 Loadrunner:11 备注:想学ora ...

  4. Centos7安装Xrdp远程桌面

    Xrdp是Microsoft远程桌面协议RDP的一个开源实现,它允许以图像方式控制远程系统. 测试环境 服务端: CentOS Linux release 7.7.1908 (Core) 客户端: W ...

  5. Xrdp远程连接到CentOS7系统配置

    1         服务器端配置 1.1  查询是否已经安装epel库 打开已经安装了CentOS7的主机,以root用户登录,在桌面上打开一个终端,输入命令:rpm -qa|grep epel,查询 ...

  6. linux centos使用xrdp远程界面登陆

    redhat6 安装xrdp 直接使用windows远程桌面连接登陆 下面介绍实现方法: 第一步:下载源码包,并安装一些依赖的软件下载xrdp源码包 ​wget http://downloads.so ...

  7. Centos 6.5 安装Xrdp 远程桌面

    1. 安装源: Once you determine your architecture then you can install the correct EPEL repository with t ...

  8. C#实现远程开机(局域网测试通过)

    首先介绍相关知识. UDP协议 UDP 是User Datagram Protocol的简称, 中文名是用户数据报协议,是OSI(Open System Interconnection,开放式系统互联 ...

  9. HTTP.SYS远程代码执行漏洞测试(ms15-034)

    1.HTTP.SYS远程代码执行漏洞简介 首先漏洞编号:CVE-2015-1635(MS15-034 ) 远程执行代码漏洞存在于 HTTP 协议堆栈 (HTTP.sys) 中,当 HTTP.sys 未 ...

随机推荐

  1. shell脚本学习之$0,$?,$!等的特殊用法

    变量说明: $$ Shell本身的PID(ProcessID) $! Shell最后运行的后台Process的PID $? 最后运行的命令的结束代码(返回值) $- 使用Set命令设定的Flag一览 ...

  2. asp.net Linq 实现分组查询

    首先我们还是先建立一个person.cs类 public class person { public string name { get; set; } public int age { get; s ...

  3. DevExpress GridControl 中下拉框联动效果的实现(及支持文本框录入情况)

    先解释一下标题: grid中的某一列默认为文本框,根据需要动态的变更为下拉框,且支持动态变更数据源 需求是这样的: 有一些参数(A),这些参数又分别对应另外的参数(B),所以,先把A作为一列,B根据A ...

  4. 如何用.NET创建Windows服务

    我们将研究如何创建一个作为Windows服务的应用程序.内容包含什么是Windows服务,如何创建.安装和调试它们.会用到System.ServiceProcess.ServiceBase命名空间的类 ...

  5. [转] 博闻强识:了解CSS中的@ AT规则 ---张鑫旭

    by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=4900 大家可能在CS ...

  6. js 中对象属性的特性

    数据属性: 数据属性包含一个数据值的位置,在这个位置可以读取和写入值. 4个描述的行为特性: writable  表示能否修改属性的值.默认为true Enumerable 表示能否过过for in循 ...

  7. node 后台ajax文件(同时支持http、https)

    var http = require("http"), Url = require("url"), querystring = require('queryst ...

  8. 配置SHH集群

    ==特别要注意当前用户的问题== 1. 修改路由信息 vi /etc/hosts 10.211.55.15 hmaster1 10.211.55.16 hmaster2 10.211.55.17 hs ...

  9. jq实现瀑布流效果

    <!doctype html><html><head><meta http-equiv="Content-Type" content=&q ...

  10. [BZOJ 3585] mex 【莫队+分块】

    题目链接:BZOJ - 3585 题目分析 区间mex,即区间中没有出现的最小自然数. 那么我们使用一种莫队+分块的做法,使用莫队维护当前区间的每个数字的出现次数. 然后求mex用分块,将权值分块(显 ...