소스 검색

vnc client to localhost for vdesk profile

timer
부모
커밋
ccc1ff8e03
9개의 변경된 파일38개의 추가작업 그리고 7개의 파일을 삭제
  1. +3
    -2
      defaults/main.yaml
  2. +5
    -0
      tasks/i3.yaml
  3. +2
    -2
      tasks/main.yaml
  4. +1
    -1
      tasks/vnc.yaml
  5. +15
    -0
      templates/i3/i3.null.config.j2
  6. +0
    -1
      templates/vnc/vncserver.service.j2
  7. +5
    -0
      templates/vnc/xsession.j2
  8. +1
    -1
      templates/workspaces/workspace.space.fish.j2
  9. +6
    -0
      templates/x11/xsession.j2

+ 3
- 2
defaults/main.yaml 파일 보기

@@ -12,8 +12,9 @@ kanboard_api_settings: "{{ lookup('file', '~/.kanboard_api_settings.json') }}"
# kanboard_api_url: https://kanboard.katyx.net/jsonrpc.php
# kanboard_api_user: ka
# kanboard_api_key: xxx
home_vdesk_started_and_enabled: false
home_vdesk_display_number: 47
home_vncserver_started_and_enabled: "{{ home_profile == 'vdesk' }}"
home_vncserver_display_number: 47
home_xsession_vncviewer: "{{ home_profile == 'vdesk' }}"

home_profile: desktop



+ 5
- 0
tasks/i3.yaml 파일 보기

@@ -10,6 +10,11 @@
src: i3/i3.config.j2
dest: ~/.config/i3/config

- name: i3 null config
template:
src: i3/i3.null.config.j2
dest: ~/.config/i3/null.config

- name: check i3 config
command: i3 -c ~/.config/i3/config -C
changed_when: false


+ 2
- 2
tasks/main.yaml 파일 보기

@@ -28,8 +28,8 @@

- name: enable and start vncserver user service
systemd:
name: vncserver@:{{home_vdesk_display_number}}.service
name: vncserver@:{{home_vncserver_display_number}}.service
state: started
enabled: true
scope: user
when: home_vdesk_started_and_enabled
when: home_vncserver_started_and_enabled

+ 1
- 1
tasks/vnc.yaml 파일 보기

@@ -45,6 +45,6 @@

- name: vnc xsession script
template:
src: x11/xsession.j2
src: vnc/xsession.j2
dest: ~/.vnc/xsession
mode: 0755

+ 15
- 0
templates/i3/i3.null.config.j2 파일 보기

@@ -0,0 +1,15 @@
{{ ansible_managed | comment }}

# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!

font pango:monospace 10

bar {
mode invisible
}

default_border none
hide_edge_borders both
workspace_layout tabbed

+ 0
- 1
templates/vnc/vncserver.service.j2 파일 보기

@@ -20,7 +20,6 @@ After=syslog.target network.target

[Service]
Type=forking
ExecStartPre=/usr/bin/vncserver -kill %i
ExecStart=/usr/bin/vncserver %i
ExecStop=/usr/bin/vncserver -kill %i



+ 5
- 0
templates/vnc/xsession.j2 파일 보기

@@ -0,0 +1,5 @@
#!/bin/sh

{{ansible_managed|comment}}

exec systemctl --user start --wait xsession.target

+ 1
- 1
templates/workspaces/workspace.space.fish.j2 파일 보기

@@ -3,7 +3,7 @@

{% if workspaces[workspace].type == "vdesk" %}

xtigervncviewer localhost:{{workspaces[workspace].display|default(home_vdesk_display_number)}} -via {{workspaces[workspace].host}} -PasswordFile ~/.vnc/passwd.{{workspaces[workspace].host}}
xtigervncviewer localhost:{{workspaces[workspace].display|default(home_vncserver_display_number)}} -via {{workspaces[workspace].host}} -PasswordFile ~/.vnc/passwd.{{workspaces[workspace].host}}

{% elif workspaces[workspace].type == "tmux" %}



+ 6
- 0
templates/x11/xsession.j2 파일 보기

@@ -2,4 +2,10 @@

{{ansible_managed|comment}}

{% if not home_xsession_vncviewer %}
exec systemctl --user start --wait xsession.target
{% else %}
systemctl --user start vncserver@:{{home_vncserver_display_number}}.service
i3 -c ~/.config/i3/null.config &
exec xtigervncviewer localhost:{{home_vncserver_display_number}} -PasswordFile ~/.vnc/passwd -FullScreen=1 -Maximize=1
{% endif %}