ubuntu multiple Simultaneous independent remote (desktop like ) connections

本文介绍如何在 Ubuntu 14.10 上配置 VNC 以支持多个独立的远程桌面连接。通过安装必要的软件包、设置用户权限、自定义启动脚本等步骤,实现多用户的远程访问。
vnc - ubuntu 14.10 multiple Simultaneous independent remote (desktop like ) connections - Ask Ubuntu

https://askubuntu.com/questions/581979/ubuntu-14-10-multiple-simultaneous-independent-remote-desktop-like-connection

Here are the things worked for me.. (success using this tute http://www.howtoforge.com/how-to-install-vnc-server-on-ubuntu-14.04 and kudose for Charles Tassell for right directions and advice)

What I did is as follows,

(1) run sudo apt-get update && sudo apt-get upgrade

(2)run sudo apt-get install gnome-core xfce4 vnc4server

(3)then add users (vncserver/unix)

sudo adduser test1   

(you will have to fill details afterwards for the user, I have added 3 users (test1, test2, test3 etc for vnc server)

(4)Then you have to switch users one by one and run vncserver and add password for vncuser login (I have three vnc users, so that i had to repeat this for all three user test 1, test2, test3)

su - test1

then run

vncserver

out put will be like this prompting for a vnc password..

You will require a password to access your desktops.

Password:
Verify:

xauth:  file /home/test1/.Xauthority does not exist
New 'server1:1 (test1)' desktop is server1:1
Creating default startup script /home/test1/.vnc/xstartup
Starting applications specified in /home/test1/.vnc/xstartup
Log file is /home/test1/.vnc/server1:1.log

(5) Important : you will have to replace /home/test1/.vnc/xstartup content with below (Else you will not get the desktop, instead you will stuck with blank screen without user interfaces or menus )

vim /home/test1/.vnc/xstartup

and add

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

(6) startup script for the vncserver was created using "Further I will make the startup script for the vncserver like this" section of this tute

sudo vim /etc/init.d/vncserver

and add below content..

#!/bin/bash

unset VNCSERVERARGS
VNCSERVERS=""
[ -f /etc/vncserver/vncservers.conf ] && . /etc/vncserver/vncservers.conf
prog=$"VNC server"
start() {
 . /lib/lsb/init-functions
 REQ_USER=$2
 echo -n $"Starting $prog: "
 ulimit -S -c 0 >/dev/null 2>&1
 RETVAL=0
 for display in ${VNCSERVERS}
 do
 export USER="${display##*:}"
 if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
 echo -n "${display} "
 unset BASH_ENV ENV
 DISP="${display%%:*}"
 export VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"
 su ${USER} -c "cd ~${USER} && [ -f .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}"
 fi
 done
}
stop() {
 . /lib/lsb/init-functions
 REQ_USER=$2
 echo -n $"Shutting down VNCServer: "
 for display in ${VNCSERVERS}
 do
 export USER="${display##*:}"
 if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
 echo -n "${display} "
 unset BASH_ENV ENV
 export USER="${display##*:}"
 su ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1
 fi
 done
 echo -e "\n"
 echo "VNCServer Stopped"
}
case "$1" in
start)
start $@
;;
stop)
stop $@
;;
restart|reload)
stop $@
sleep 3
start $@
;;
condrestart)
if [ -f /var/lock/subsys/vncserver ]; then
stop $@
sleep 3
start $@
fi
;;
status)
status Xvnc
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac

to make it an executable run the following..

chmod +x /etc/init.d/vncserver

(7) To make vnc desktop sessions allocated for users at start up automatically, create following script in /etc/vncserver

sudo mkdir -p /etc/vncserver
sudo vim /etc/vncserver/vncservers.conf

add this in vncservers.conf (this is because i have my users as test1, test2, test3 change it according to )

VNCSERVERS="3:test3 2:test2 1:test1"
VNCSERVERARGS[1]="-geometry 1024x768"
VNCSERVERARGS[2]="-geometry 1024x768"
VNCSERVERARGS[3]="-geometry 1024x768"

(8) Then run

sudo `update-rc.d vncserver defaults 99`

(9) reboot server (you are almost done by now) step 10 and the rest is how to login part

(10)download http://www.realvnc.com/download/viewer/

enter servername/ipaddress and session id for example my server is 172.16.70.17 and if i use 172.16.70.17:2 it will login to test2 user desktop.. and 172.16.70.17:3 will login to test3 user desktop like wise

make sure encryption to be selected "Prefer off"

pic

pic

Then you can access your desktop and applications in this manner..

pic

share improve this answer

在Verilog中,`signal has multiple simultaneous drivers` 问题通常意味着一个信号在同一时刻被多个源驱动,这是不允许的,因为硬件电路中一个节点不能同时有多个驱动源。以下是一些解决该问题的方法: #### 检查并统一赋值方式 确保对同一信号的赋值方式统一,避免在不同的 `always` 块或组合逻辑中对同一信号进行多次赋值。通常,组合逻辑使用阻塞赋值(`=`),时序逻辑使用非阻塞赋值(`<=`)。 **错误示例**: ```verilog module wrong_example ( input wire clk, input wire d1, input wire d2, output reg q ); always @(*) begin q = d1; // 组合逻辑赋值 end always @(posedge clk) begin q <= d2; // 时序逻辑赋值,导致多个驱动源 end endmodule ``` **修正后的示例**: ```verilog module correct_example ( input wire clk, input wire d1, input wire d2, output reg q ); reg temp; always @(*) begin temp = d1; // 组合逻辑使用阻塞赋值 end always @(posedge clk) begin q <= temp; // 时序逻辑使用非阻塞赋值 end endmodule ``` #### 使用多路选择器 如果需要根据不同的条件对信号进行赋值,可以使用多路选择器(MUX)来避免多个驱动源。 ```verilog module mux_example ( input wire clk, input wire sel, input wire d1, input wire d2, output reg q ); always @(posedge clk) begin if (sel) begin q <= d1; end else begin q <= d2; end end endmodule ``` #### 检查模块实例化 确保在模块实例化时,没有将同一个信号连接到多个不同的输出端口。 ```verilog module sub_module ( input wire in, output reg out ); always @(*) begin out = in; end endmodule module top_module ( input wire in, output wire out1, output wire out2 ); sub_module u1 (.in(in), .out(out1)); // 错误:将同一个输入连接到多个输出 // sub_module u2 (.in(in), .out(out2)); endmodule ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值