Showing posts with label X. Show all posts
Showing posts with label X. Show all posts

Tuesday, 6 August 2013

vncserver on Amazon Linux on Amazon's AWS

NOTE: this first step may be outdated in new versions of Amazon Linux, which provides libjpeg-turbo.

First, get a good version of libjpeg-turbo:
  1. yum clean all
  2. yum --enablerepo=amzn-preview install libjpeg-turbo
  3. see: https://forums.aws.amazon.com/thread.jspa?threadID=121128
Necessary packages:
  1. gnutls-2.8.5-10.el6.x86_64.rpm
  2. libfontenc-1.0.5-2.el6.x86_64.rpm
  3. libtasn1-2.3-3.el6.x86_64.rpm
  4. libxdmcp-1.1.1-7.ram1.x86_64.rpm
  5. libXfont-1.4.5-2.el6.x86_64.rpm
  6. libxkbfile-1.0.6-1.1.el6.x86_64.rpm
  7. libXmu-1.1.1-2.el6.x86_64.rpm
  8. mesa-dri-drivers-9.0-0.7.el6.x86_64.rpm
  9. pixman-0.26.2-5.el6_4.x86_64.rpm
  10. tigervnc-license-1.3.0-16.el6.noarch.rpm
  11. tigervnc-server-1.3.0-16.el6.x86_64.rpm
  12. tigervnc-server-minimal-1.3.0-16.el6.x86_64.rpm
  13. xkeyboard-config-2.6-6.el6.noarch.rpm
  14. xorg-x11-proto-devel-7.6-25.el6.noarch.rpm
  15. xorg-x11-xauth-1.0.2-7.1.el6.x86_64.rpm
  16. xorg-x11-xkb-utils-7.7-4.el6.x86_64.rpm
Necessary packages for fluxbox:
  1. pyxdg-0.18-1.el6.noarch.rpm
Here's a link to all the packages needed: rpms

Start by trying to install tigervnc-server. That will fail. Follow the dependencies down, installing packages one by one as they come up. If they fail, install their dependencies first.

These packages were special cases
  1. mesa-dri-drivers-9.0-0.7.el6.x86_64.rpm
    1. just "--nodeps" install this one
    2. the libraries of the dependencies are never called from my experience
  2. libXtst-1.2.1-2.el6.x86_64.rpm
    1. there is a more recent version of this already in Amazon Linux, so just skip this one and "--nodeps" the parent package, which is libXmu-1.1.1-2.el6.x86_64.rpm
If not found, add location of libXdmcp.so.6 to /etc/ld.so.conf and run "ldconfig", e.g. locations is /usr/lib/libXdmcp.so.6 so add the line "/usr/lib".

Once I got the vncserver up with

  vncserver :66 -localhost

bizarrely, it was listening on port 5966 and some 6066 port. The 5966 port is the one you want.

See previous post on Redhat VNC for details, click here.

Saturday, 6 July 2013

Could not update ICEauthority file /home/myuser/.ICEauthority


Your home directory perms got messed up somehow
  1. sudo chown myuser:myuser /home/myuser
If it still doesn't work, this may be necessary as well
  1. sudo chmod 750 /home/myuser

Thursday, 27 June 2013

Redhat: vnc to remote server

NOTE: if the vncserver insists on starting on a port other than 5966, like 6099, wipe the ~/.vnc directory and start over again. If that doesn't help, change the second instance of 5966 below to 6066 in the port forwarding ssh command, e.g. '-L 5966:localhost:6066'.
  1.  as remote root on myhost
    1. yum install tigervnc
    2. yum install tigervnc-server
    3. yum install libXfont pixman
    4. yum install fluxbox
    5. yum install firefox
  2. as a remote user, myuser, on myhost
    1. vncserver :66 -localhost
      1. set a password, call it mypassword
  3. as local user
    1. ssh -L 5966:localhost:5966 myuser@myhost
      1. leave running and do next step in another local term
    2. vncviewer -encodings 'copyrect tight zrle hextile' localhost:5966
      1. authenticate with mypassword
  4. as a remote user, myuser, on myhost
    1. export DISPLAY=:66
    2. xterm &
    3. fluxbox &
    4. firefox &

Wednesday, 26 June 2013

xvfb


  1. sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
  2. sudo apt-get install xvfb
  3. sudo apt-get install xtightvncviewer
  4. apt-get install x11vnc
  5. sudo apt-get install fluxbox
  6. export DISPLAY=:1
  7. Xvfb :1 -screen 0 1024x768x16 &
  8. fluxbox &
  9. x11vnc -display :1 -bg -nopw -listen localhost -xkb
  10. export DISPLAY=:0
  11. vncviewer -encodings 'copyrect tight zrle hextile' localhost:5900
  12. you should see fluxbox running within another window which you can navigate
  13. try, for fun
    1. export DISPLAY=:1
    2. xterm
    3. pkill fluxbox
    4. fluxbox &
Gets weirder
  1. close the above vncviewer window
  2. x11vnc -display :1 -bg -nopw -listen localhost -xkb
  3. x11vnc -display :1 -bg -nopw -listen localhost -xkb
  4. x11vnc -display :1 -bg -nopw -listen localhost -xkb
  5. vncviewer -encodings 'copyrect tight zrle hextile' localhost:5900
  6. vncviewer -encodings 'copyrect tight zrle hextile' localhost:5901
  7. vncviewer -encodings 'copyrect tight zrle hextile' localhost:5902
Launch apps in the new display
  1. sudo apt-get install firefox
  2. DISPLAY=:1 firefox &
Note: if vncviewer is not available on the CLI, use xtightvncviewer instead, same thing

See: http://en.wikipedia.org/wiki/Xvfb

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...