2021-05-12 18:02:27 +08:00
|
|
|
# Docker 安装 ROS Indigo 过程记录
|
|
|
|
|
2021-05-13 11:06:50 +08:00
|
|
|
## 1.安装基本环境
|
|
|
|
|
2021-05-12 18:02:27 +08:00
|
|
|
```bash
|
2021-05-13 11:06:50 +08:00
|
|
|
docker run -it --name=<container name> --privileged -p 5801:5901 -v <host dir>:<container dir> -v /dev/bus/usb:/dev/bus/usb ros:indigo /bin/bash
|
2021-05-12 18:02:27 +08:00
|
|
|
apt-get update
|
2021-05-13 11:06:50 +08:00
|
|
|
apt-get install vim xinit lightdm xubuntu-desktop xubuntu-default-settings xubuntu-artwork xubuntu-icon-theme vnc4server
|
2021-05-12 18:02:27 +08:00
|
|
|
dpkg-reconfigure lightdm
|
|
|
|
touch profile
|
|
|
|
vim profile
|
|
|
|
```
|
|
|
|
|
|
|
|
然后占体以下内容到 profile 文件中:
|
|
|
|
|
|
|
|
```base
|
|
|
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '
|
|
|
|
|
2021-05-13 11:06:50 +08:00
|
|
|
alias ls='ls --color=auto'
|
|
|
|
alias dir='dir --color=auto'
|
|
|
|
alias vidr='vdir --color=auto'
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
alias egrep='egrep --color=auto'
|
|
|
|
# some more ls aliases
|
2021-05-12 18:02:27 +08:00
|
|
|
alias ll='ls -alF'
|
|
|
|
alias la='ls -A'
|
|
|
|
alias l='ls -CF'
|
|
|
|
|
|
|
|
export LANG="en_US.UTF-8"
|
|
|
|
export LANGUAGE="en_US.UTF-8"
|
|
|
|
```
|
2021-05-13 11:06:50 +08:00
|
|
|
|
|
|
|
## 2.配置 VNC 服务
|
|
|
|
|
|
|
|
编辑 ~/.vnc/xstartup 内容如下:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Uncomment the following two lines for normal desktop:
|
|
|
|
# unset SESSION_MANAGER
|
|
|
|
# exec /etc/X11/xinit/xinitrc
|
|
|
|
|
|
|
|
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
|
|
|
|
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
|
|
|
|
xsetroot -solid grey
|
|
|
|
x-session-manager & xfdesktop & xfce4-panel & xfsettingsd & xfwm4 &
|
|
|
|
```
|
|
|
|
|
|
|
|
然后可通过以下命令控制 VNC 服务:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# 设置 VNC 访问密码
|
|
|
|
vncpasswd
|
|
|
|
# 开启 VNC 服务
|
|
|
|
vncserver :1 -geometry 1920x1080 -depth 24
|
|
|
|
# 停止 VNC 服务
|
|
|
|
vncserver -kill :1
|
|
|
|
```
|
|
|
|
|
|
|
|
运行 VNC 服务后可使用 Remmina 等进行远程访问。
|
|
|
|
|
|
|
|
## 3.内部参考关键字
|
|
|
|
|
|
|
|
1. VNC
|
|
|
|
2. Remmina
|