x11vnc question

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

x11vnc question

emuhuron
Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

Don Cupp
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch <[hidden email]> wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

edwhardo
I seem to recall that it worked fine if you're running as root, but if you set ts_user to non-root, it wouldn't. I think I had it working via .xinitrc or autostart, but abandoned it because Teamviewer was desired. This was back around 5.2 or 5.3. I'll look to see if I have my diffs from that still.

For anyone who wants to try Teamviewer, it works if you're using version 8 or less and you have replace "readlink -e" with "readlink -f". After version 8 there are problems with the teamviewer ID regenerating on each boot. The ID used to be generated by MAC address, but they must use something else in addition now. e.g UUID of root fs.



On 1/12/2016 3:35 AM, Don Cupp wrote:
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch [hidden email] wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general




------------------------------------------------------------------------------


_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general


------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

emuhuron
Guys, I got x11vnc to work.  However, not in the manner that I expected.  The browser code may work (-httpdir /lib/www/html/x11vnc) as well--haven't tried it.  But, the real issue is where tsuser has access versus where the code for -usepw appears to point to.  The -usepw password location was only accessible if logged as root.  By changing the path in the command below to /home/tsuser/.vnc/passwd, and rebuilding the TS with the change included, the generic user tsuser could read the file when I typed in the encrypted password from my remote support pc.  I never gave tsuser root-level rights.  Also, I installed 2 different applications from my support desk pc and was able to connect to my test system via both (TightVNC and VNCViewer for Google Chrome).

in build.conf, I have provided a password for "param xorgvncpasswd ..."

##### check_x11vnc works with this code ##  SOLVED ###############
## location is /build/packages/xorg7vnc/bin/check_x11vnc
#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfbport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi
############# above code works ###############################

What didn't work:
I created a build folder in the xorg7vnc package at "/build/packages/xorg7vnc/build."  It didn't have one.  Then, I created a finalize file with the following code in it:

#################/build/packages/xorg7vnc/build/finalize###############
echo "/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &" >> /etc/skel/.xinitrc
# /usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &
#############  doesn't work at this time ########## FAILED #############

Even if the echo path was going to the wrong location, I expected the .xinitrc to be updated with the related string. It wasn't.  The assumption had been that by adding the build folder and finalize file, the ./build --allmodules would see the build folder, inspect the finalize file and perform the code within the file.  If you have any thoughts as to why the system didn't do anything with the xorg7vnc/build folder and file that I created, please let me know.






Brian Koch
IT Dept
City of Taylor, MI
(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Wed, Nov 30, 2016 at 5:07 PM, Ed <[hidden email]> wrote:
I seem to recall that it worked fine if you're running as root, but if you set ts_user to non-root, it wouldn't. I think I had it working via .xinitrc or autostart, but abandoned it because Teamviewer was desired. This was back around 5.2 or 5.3. I'll look to see if I have my diffs from that still.

For anyone who wants to try Teamviewer, it works if you're using version 8 or less and you have replace "readlink -e" with "readlink -f". After version 8 there are problems with the teamviewer ID regenerating on each boot. The ID used to be generated by MAC address, but they must use something else in addition now. e.g UUID of root fs.



On 1/12/2016 3:35 AM, Don Cupp wrote:
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch [hidden email] wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general




------------------------------------------------------------------------------


_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general


------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

Don Cupp
Might need the metric header to establish order in finalize processing.


Sent from Yahoo Mail for iPhone

On Thursday, December 1, 2016, 12:21 PM, Brian Koch <[hidden email]> wrote:

Guys, I got x11vnc to work.  However, not in the manner that I expected.  The browser code may work (-httpdir /lib/www/html/x11vnc) as well--haven't tried it.  But, the real issue is where tsuser has access versus where the code for -usepw appears to point to.  The -usepw password location was only accessible if logged as root.  By changing the path in the command below to /home/tsuser/.vnc/passwd, and rebuilding the TS with the change included, the generic user tsuser could read the file when I typed in the encrypted password from my remote support pc.  I never gave tsuser root-level rights.  Also, I installed 2 different applications from my support desk pc and was able to connect to my test system via both (TightVNC and VNCViewer for Google Chrome).

in build.conf, I have provided a password for "param xorgvncpasswd ..."

##### check_x11vnc works with this code ##  SOLVED ###############
## location is /build/packages/xorg7vnc/bin/check_x11vnc
#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfbport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi
############# above code works ###############################

What didn't work:
I created a build folder in the xorg7vnc package at "/build/packages/xorg7vnc/build."  It didn't have one.  Then, I created a finalize file with the following code in it:

#################/build/packages/xorg7vnc/build/finalize###############
echo "/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &" >> /etc/skel/.xinitrc
# /usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &
#############  doesn't work at this time ########## FAILED #############

Even if the echo path was going to the wrong location, I expected the .xinitrc to be updated with the related string. It wasn't.  The assumption had been that by adding the build folder and finalize file, the ./build --allmodules would see the build folder, inspect the finalize file and perform the code within the file.  If you have any thoughts as to why the system didn't do anything with the xorg7vnc/build folder and file that I created, please let me know.






Brian Koch
IT Dept
City of Taylor, MI
<a dir="ltr" href="tel:(734)%20374-1514" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="1">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Wed, Nov 30, 2016 at 5:07 PM, Ed <<a rel="nofollow" shape="rect" ymailto="mailto:thinstation@wardos.net" target="_blank" href="javascript:return">thinstation@...> wrote:
I seem to recall that it worked fine if you're running as root, but if you set ts_user to non-root, it wouldn't. I think I had it working via .xinitrc or autostart, but abandoned it because Teamviewer was desired. This was back around 5.2 or 5.3. I'll look to see if I have my diffs from that still.

For anyone who wants to try Teamviewer, it works if you're using version 8 or less and you have replace "readlink -e" with "readlink -f". After version 8 there are problems with the teamviewer ID regenerating on each boot. The ID used to be generated by MAC address, but they must use something else in addition now. e.g UUID of root fs.



On 1/12/2016 3:35 AM, Don Cupp wrote:
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch <a rel="nofollow" shape="rect" class="m_-1769428697329009414moz-txt-link-rfc2396E" ymailto="mailto:bkoch@ci.taylor.mi.us" target="_blank" href="javascript:return"><bkoch@...> wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
<a rel="nofollow" shape="rect" ymailto="mailto:Thinstation-general@lists.sourceforge.net" target="_blank" href="javascript:return">Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general




------------------------------ ------------------------------ ------------------


______________________________ _________________
Thinstation-general mailing list
<a rel="nofollow" shape="rect" class="m_-1769428697329009414moz-txt-link-abbreviated" ymailto="mailto:Thinstation-general@lists.sourceforge.net" target="_blank" href="javascript:return">Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
<a rel="nofollow" shape="rect" ymailto="mailto:Thinstation-general@lists.sourceforge.net" target="_blank" href="javascript:return">Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------------------------------------------------------
_______________________________________________
Thinstation-general mailing list
<a shape="rect" ymailto="mailto:Thinstation-general@lists.sourceforge.net" href="javascript:return">Thinstation-general@...
https://lists.sourceforge.net/lists/listinfo/thinstation-general

------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

trentasis
hi, is this issue solved in master branch?

I have the same error, in some situation vnc is not started...

2016-12-01 21:33 GMT+01:00 Don Cupp <[hidden email]>:
Might need the metric header to establish order in finalize processing.


Sent from Yahoo Mail for iPhone


On Thursday, December 1, 2016, 12:21 PM, Brian Koch <[hidden email]> wrote:

Guys, I got x11vnc to work.  However, not in the manner that I expected.  The browser code may work (-httpdir /lib/www/html/x11vnc) as well--haven't tried it.  But, the real issue is where tsuser has access versus where the code for -usepw appears to point to.  The -usepw password location was only accessible if logged as root.  By changing the path in the command below to /home/tsuser/.vnc/passwd, and rebuilding the TS with the change included, the generic user tsuser could read the file when I typed in the encrypted password from my remote support pc.  I never gave tsuser root-level rights.  Also, I installed 2 different applications from my support desk pc and was able to connect to my test system via both (TightVNC and VNCViewer for Google Chrome).

in build.conf, I have provided a password for "param xorgvncpasswd ..."

##### check_x11vnc works with this code ##  SOLVED ###############
## location is /build/packages/xorg7vnc/bin/check_x11vnc
#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfbport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi
############# above code works ###############################

What didn't work:
I created a build folder in the xorg7vnc package at "/build/packages/xorg7vnc/build."  It didn't have one.  Then, I created a finalize file with the following code in it:

#################/build/packages/xorg7vnc/build/finalize###############
echo "/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &" >> /etc/skel/.xinitrc
# /usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &
#############  doesn't work at this time ########## FAILED #############

Even if the echo path was going to the wrong location, I expected the .xinitrc to be updated with the related string. It wasn't.  The assumption had been that by adding the build folder and finalize file, the ./build --allmodules would see the build folder, inspect the finalize file and perform the code within the file.  If you have any thoughts as to why the system didn't do anything with the xorg7vnc/build folder and file that I created, please let me know.






Brian Koch
IT Dept
City of Taylor, MI
<a dir="ltr" href="tel:(734)%20374-1514" target="_blank">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Wed, Nov 30, 2016 at 5:07 PM, Ed <[hidden email]> wrote:
I seem to recall that it worked fine if you're running as root, but if you set ts_user to non-root, it wouldn't. I think I had it working via .xinitrc or autostart, but abandoned it because Teamviewer was desired. This was back around 5.2 or 5.3. I'll look to see if I have my diffs from that still.

For anyone who wants to try Teamviewer, it works if you're using version 8 or less and you have replace "readlink -e" with "readlink -f". After version 8 there are problems with the teamviewer ID regenerating on each boot. The ID used to be generated by MAC address, but they must use something else in addition now. e.g UUID of root fs.



On 1/12/2016 3:35 AM, Don Cupp wrote:
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch <[hidden email]> wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general




------------------------------ ------------------------------ ------------------


______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------------------------------------------------------
_______________________________________________
Thinstation-general mailing list
Thinstation-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/thinstation-general

------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

Don Cupp
I never got around creating a patch for master, so there is no fix in master. Maybe today.


Sent from Yahoo Mail for iPhone

On Sunday, January 29, 2017, 4:03 AM, Trenta sis <[hidden email]> wrote:

hi, is this issue solved in master branch?

I have the same error, in some situation vnc is not started...

2016-12-01 21:33 GMT+01:00 Don Cupp <<a rel="nofollow" shape="rect" ymailto="mailto:doncuppjr@yahoo.com" target="_blank" href="javascript:return">doncuppjr@...>:
Might need the metric header to establish order in finalize processing.


Sent from Yahoo Mail for iPhone


On Thursday, December 1, 2016, 12:21 PM, Brian Koch <<a rel="nofollow" shape="rect" ymailto="mailto:bkoch@ci.taylor.mi.us" target="_blank" href="javascript:return">bkoch@...> wrote:

Guys, I got x11vnc to work.  However, not in the manner that I expected.  The browser code may work (-httpdir /lib/www/html/x11vnc) as well--haven't tried it.  But, the real issue is where tsuser has access versus where the code for -usepw appears to point to.  The -usepw password location was only accessible if logged as root.  By changing the path in the command below to /home/tsuser/.vnc/passwd, and rebuilding the TS with the change included, the generic user tsuser could read the file when I typed in the encrypted password from my remote support pc.  I never gave tsuser root-level rights.  Also, I installed 2 different applications from my support desk pc and was able to connect to my test system via both (TightVNC and VNCViewer for Google Chrome).

in build.conf, I have provided a password for "param xorgvncpasswd ..."

##### check_x11vnc works with this code ##  SOLVED ###############
## location is /build/packages/xorg7vnc/bin/ check_x11vnc
#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfbport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi
############# above code works ############################## #

What didn't work:
I created a build folder in the xorg7vnc package at "/build/packages/xorg7vnc/ build."  It didn't have one.  Then, I created a finalize file with the following code in it:

#################/build/ packages/xorg7vnc/build/ finalize###############
echo "/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &" >> /etc/skel/.xinitrc
# /usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &
#############  doesn't work at this time ########## FAILED #############

Even if the echo path was going to the wrong location, I expected the .xinitrc to be updated with the related string. It wasn't.  The assumption had been that by adding the build folder and finalize file, the ./build --allmodules would see the build folder, inspect the finalize file and perform the code within the file.  If you have any thoughts as to why the system didn't do anything with the xorg7vnc/build folder and file that I created, please let me know.






Brian Koch
IT Dept
City of Taylor, MI
Please have a ticket put in if you need an issue resolved.

On Wed, Nov 30, 2016 at 5:07 PM, Ed <[hidden email]> wrote:
I seem to recall that it worked fine if you're running as root, but if you set ts_user to non-root, it wouldn't. I think I had it working via .xinitrc or autostart, but abandoned it because Teamviewer was desired. This was back around 5.2 or 5.3. I'll look to see if I have my diffs from that still.

For anyone who wants to try Teamviewer, it works if you're using version 8 or less and you have replace "readlink -e" with "readlink -f". After version 8 there are problems with the teamviewer ID regenerating on each boot. The ID used to be generated by MAC address, but they must use something else in addition now. e.g UUID of root fs.



On 1/12/2016 3:35 AM, Don Cupp wrote:
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch <[hidden email]> wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general




------------------------------ ------------------------------ ------------------


______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------ ------------------------------ ------------------
______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general

------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
<a rel="nofollow" shape="rect" ymailto="mailto:Thinstation-general@lists.sourceforge.net" target="_blank" href="javascript:return">Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
<a shape="rect" ymailto="mailto:Thinstation-general@lists.sourceforge.net" href="javascript:return">Thinstation-general@...
https://lists.sourceforge.net/lists/listinfo/thinstation-general

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

emuhuron
In reply to this post by trentasis
Yes.  I can look up my notes tomorrow

On Jan 29, 2017 7:03 AM, "Trenta sis" <[hidden email]> wrote:
hi, is this issue solved in master branch?

I have the same error, in some situation vnc is not started...

2016-12-01 21:33 GMT+01:00 Don Cupp <[hidden email]>:
Might need the metric header to establish order in finalize processing.


Sent from Yahoo Mail for iPhone


On Thursday, December 1, 2016, 12:21 PM, Brian Koch <[hidden email]> wrote:

Guys, I got x11vnc to work.  However, not in the manner that I expected.  The browser code may work (-httpdir /lib/www/html/x11vnc) as well--haven't tried it.  But, the real issue is where tsuser has access versus where the code for -usepw appears to point to.  The -usepw password location was only accessible if logged as root.  By changing the path in the command below to /home/tsuser/.vnc/passwd, and rebuilding the TS with the change included, the generic user tsuser could read the file when I typed in the encrypted password from my remote support pc.  I never gave tsuser root-level rights.  Also, I installed 2 different applications from my support desk pc and was able to connect to my test system via both (TightVNC and VNCViewer for Google Chrome).

in build.conf, I have provided a password for "param xorgvncpasswd ..."

##### check_x11vnc works with this code ##  SOLVED ###############
## location is /build/packages/xorg7vnc/bin/check_x11vnc
#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfbport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi
############# above code works ###############################

What didn't work:
I created a build folder in the xorg7vnc package at "/build/packages/xorg7vnc/build."  It didn't have one.  Then, I created a finalize file with the following code in it:

#################/build/packages/xorg7vnc/build/finalize###############
echo "/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &" >> /etc/skel/.xinitrc
# /usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &
#############  doesn't work at this time ########## FAILED #############

Even if the echo path was going to the wrong location, I expected the .xinitrc to be updated with the related string. It wasn't.  The assumption had been that by adding the build folder and finalize file, the ./build --allmodules would see the build folder, inspect the finalize file and perform the code within the file.  If you have any thoughts as to why the system didn't do anything with the xorg7vnc/build folder and file that I created, please let me know.






Brian Koch
IT Dept
City of Taylor, MI
<a dir="ltr" href="tel:(734)%20374-1514" target="_blank">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Wed, Nov 30, 2016 at 5:07 PM, Ed <[hidden email]> wrote:
I seem to recall that it worked fine if you're running as root, but if you set ts_user to non-root, it wouldn't. I think I had it working via .xinitrc or autostart, but abandoned it because Teamviewer was desired. This was back around 5.2 or 5.3. I'll look to see if I have my diffs from that still.

For anyone who wants to try Teamviewer, it works if you're using version 8 or less and you have replace "readlink -e" with "readlink -f". After version 8 there are problems with the teamviewer ID regenerating on each boot. The ID used to be generated by MAC address, but they must use something else in addition now. e.g UUID of root fs.



On 1/12/2016 3:35 AM, Don Cupp wrote:
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch <[hidden email]> wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general




------------------------------ ------------------------------ ------------------


______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------------------------------------------------------
_______________________________________________
Thinstation-general mailing list
[hidden email]ceforge.net
https://lists.sourceforge.net/lists/listinfo/thinstation-general

------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

emuhuron
I solved it in /build/packages/xorg7vnc/bin/check_x11vnc.  And, from the earlier email chain:  "in build.conf, I have provided a password for "param xorgvncpasswd ..."

#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi



Brian Koch
IT Dept
City of Taylor, MI
(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Sun, Jan 29, 2017 at 12:07 PM, Brian Koch <[hidden email]> wrote:
Yes.  I can look up my notes tomorrow

On Jan 29, 2017 7:03 AM, "Trenta sis" <[hidden email]> wrote:
hi, is this issue solved in master branch?

I have the same error, in some situation vnc is not started...

2016-12-01 21:33 GMT+01:00 Don Cupp <[hidden email]>:
Might need the metric header to establish order in finalize processing.


Sent from Yahoo Mail for iPhone


On Thursday, December 1, 2016, 12:21 PM, Brian Koch <[hidden email]> wrote:

Guys, I got x11vnc to work.  However, not in the manner that I expected.  The browser code may work (-httpdir /lib/www/html/x11vnc) as well--haven't tried it.  But, the real issue is where tsuser has access versus where the code for -usepw appears to point to.  The -usepw password location was only accessible if logged as root.  By changing the path in the command below to /home/tsuser/.vnc/passwd, and rebuilding the TS with the change included, the generic user tsuser could read the file when I typed in the encrypted password from my remote support pc.  I never gave tsuser root-level rights.  Also, I installed 2 different applications from my support desk pc and was able to connect to my test system via both (TightVNC and VNCViewer for Google Chrome).

in build.conf, I have provided a password for "param xorgvncpasswd ..."

##### check_x11vnc works with this code ##  SOLVED ###############
## location is /build/packages/xorg7vnc/bin/check_x11vnc
#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfbport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi
############# above code works ###############################

What didn't work:
I created a build folder in the xorg7vnc package at "/build/packages/xorg7vnc/build."  It didn't have one.  Then, I created a finalize file with the following code in it:

#################/build/packages/xorg7vnc/build/finalize###############
echo "/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &" >> /etc/skel/.xinitrc
# /usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &
#############  doesn't work at this time ########## FAILED #############

Even if the echo path was going to the wrong location, I expected the .xinitrc to be updated with the related string. It wasn't.  The assumption had been that by adding the build folder and finalize file, the ./build --allmodules would see the build folder, inspect the finalize file and perform the code within the file.  If you have any thoughts as to why the system didn't do anything with the xorg7vnc/build folder and file that I created, please let me know.






Brian Koch
IT Dept
City of Taylor, MI
<a dir="ltr" href="tel:(734)%20374-1514" target="_blank">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Wed, Nov 30, 2016 at 5:07 PM, Ed <[hidden email]> wrote:
I seem to recall that it worked fine if you're running as root, but if you set ts_user to non-root, it wouldn't. I think I had it working via .xinitrc or autostart, but abandoned it because Teamviewer was desired. This was back around 5.2 or 5.3. I'll look to see if I have my diffs from that still.

For anyone who wants to try Teamviewer, it works if you're using version 8 or less and you have replace "readlink -e" with "readlink -f". After version 8 there are problems with the teamviewer ID regenerating on each boot. The ID used to be generated by MAC address, but they must use something else in addition now. e.g UUID of root fs.



On 1/12/2016 3:35 AM, Don Cupp wrote:
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch <[hidden email]> wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general




------------------------------ ------------------------------ ------------------


______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------------------------------------------------------
_______________________________________________
Thinstation-general mailing list
[hidden email]ceforge.net
https://lists.sourceforge.net/lists/listinfo/thinstation-general

------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

trentasis
Hi Brian,

I have tested your change but is not working replacing

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &

I have test and seems that pwd is not set correctly,  /home/tsuser/.vnc/passwd does not contains any folder or file, and param xorgvncpasswd is set correctly...  How and where you configured vnc password to be stored in  /home/tsuser/.vnc/passwd , we don't have any file or folder in /home

with previous command from command line as root x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc & works!

Thanks


2017-01-30 16:25 GMT+01:00 Brian Koch <[hidden email]>:
I solved it in /build/packages/xorg7vnc/bin/check_x11vnc.  And, from the earlier email chain:  "in build.conf, I have provided a password for "param xorgvncpasswd ..."

#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi



Brian Koch
IT Dept
City of Taylor, MI
<a href="tel:(734)%20374-1514" value="+17343741514" target="_blank">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Sun, Jan 29, 2017 at 12:07 PM, Brian Koch <[hidden email]> wrote:
Yes.  I can look up my notes tomorrow

On Jan 29, 2017 7:03 AM, "Trenta sis" <[hidden email]> wrote:
hi, is this issue solved in master branch?

I have the same error, in some situation vnc is not started...

2016-12-01 21:33 GMT+01:00 Don Cupp <[hidden email]>:
Might need the metric header to establish order in finalize processing.


Sent from Yahoo Mail for iPhone


On Thursday, December 1, 2016, 12:21 PM, Brian Koch <[hidden email]> wrote:

Guys, I got x11vnc to work.  However, not in the manner that I expected.  The browser code may work (-httpdir /lib/www/html/x11vnc) as well--haven't tried it.  But, the real issue is where tsuser has access versus where the code for -usepw appears to point to.  The -usepw password location was only accessible if logged as root.  By changing the path in the command below to /home/tsuser/.vnc/passwd, and rebuilding the TS with the change included, the generic user tsuser could read the file when I typed in the encrypted password from my remote support pc.  I never gave tsuser root-level rights.  Also, I installed 2 different applications from my support desk pc and was able to connect to my test system via both (TightVNC and VNCViewer for Google Chrome).

in build.conf, I have provided a password for "param xorgvncpasswd ..."

##### check_x11vnc works with this code ##  SOLVED ###############
## location is /build/packages/xorg7vnc/bin/check_x11vnc
#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfbport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi
############# above code works ###############################

What didn't work:
I created a build folder in the xorg7vnc package at "/build/packages/xorg7vnc/build."  It didn't have one.  Then, I created a finalize file with the following code in it:

#################/build/packages/xorg7vnc/build/finalize###############
echo "/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &" >> /etc/skel/.xinitrc
# /usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &
#############  doesn't work at this time ########## FAILED #############

Even if the echo path was going to the wrong location, I expected the .xinitrc to be updated with the related string. It wasn't.  The assumption had been that by adding the build folder and finalize file, the ./build --allmodules would see the build folder, inspect the finalize file and perform the code within the file.  If you have any thoughts as to why the system didn't do anything with the xorg7vnc/build folder and file that I created, please let me know.






Brian Koch
IT Dept
City of Taylor, MI
<a dir="ltr" href="tel:(734)%20374-1514" target="_blank">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Wed, Nov 30, 2016 at 5:07 PM, Ed <[hidden email]> wrote:
I seem to recall that it worked fine if you're running as root, but if you set ts_user to non-root, it wouldn't. I think I had it working via .xinitrc or autostart, but abandoned it because Teamviewer was desired. This was back around 5.2 or 5.3. I'll look to see if I have my diffs from that still.

For anyone who wants to try Teamviewer, it works if you're using version 8 or less and you have replace "readlink -e" with "readlink -f". After version 8 there are problems with the teamviewer ID regenerating on each boot. The ID used to be generated by MAC address, but they must use something else in addition now. e.g UUID of root fs.



On 1/12/2016 3:35 AM, Don Cupp wrote:
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch <[hidden email]> wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general




------------------------------ ------------------------------ ------------------


______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------------------------------------------------------
_______________________________________________
Thinstation-general mailing list
[hidden email]ceforge.net
https://lists.sourceforge.net/lists/listinfo/thinstation-general

------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

emuhuron
check to see if your remote access password is "pleasechangeme" or whatever you changed tsuser to.  I believe my command grabbed the tsuser password field in the build.conf because I didn't want to pass admin rights to tsuser.


Brian Koch
IT Dept
City of Taylor, MI
(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Wed, Mar 15, 2017 at 7:43 AM, Trenta sis <[hidden email]> wrote:
Hi Brian,

I have tested your change but is not working replacing

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &

I have test and seems that pwd is not set correctly,  /home/tsuser/.vnc/passwd does not contains any folder or file, and param xorgvncpasswd is set correctly...  How and where you configured vnc password to be stored in  /home/tsuser/.vnc/passwd , we don't have any file or folder in /home

with previous command from command line as root x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc & works!

Thanks


2017-01-30 16:25 GMT+01:00 Brian Koch <[hidden email]>:
I solved it in /build/packages/xorg7vnc/bin/check_x11vnc.  And, from the earlier email chain:  "in build.conf, I have provided a password for "param xorgvncpasswd ..."

#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi



Brian Koch
IT Dept
City of Taylor, MI
<a href="tel:(734)%20374-1514" value="+17343741514" target="_blank">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Sun, Jan 29, 2017 at 12:07 PM, Brian Koch <[hidden email]> wrote:
Yes.  I can look up my notes tomorrow

On Jan 29, 2017 7:03 AM, "Trenta sis" <[hidden email]> wrote:
hi, is this issue solved in master branch?

I have the same error, in some situation vnc is not started...

2016-12-01 21:33 GMT+01:00 Don Cupp <[hidden email]>:
Might need the metric header to establish order in finalize processing.


Sent from Yahoo Mail for iPhone


On Thursday, December 1, 2016, 12:21 PM, Brian Koch <[hidden email]> wrote:

Guys, I got x11vnc to work.  However, not in the manner that I expected.  The browser code may work (-httpdir /lib/www/html/x11vnc) as well--haven't tried it.  But, the real issue is where tsuser has access versus where the code for -usepw appears to point to.  The -usepw password location was only accessible if logged as root.  By changing the path in the command below to /home/tsuser/.vnc/passwd, and rebuilding the TS with the change included, the generic user tsuser could read the file when I typed in the encrypted password from my remote support pc.  I never gave tsuser root-level rights.  Also, I installed 2 different applications from my support desk pc and was able to connect to my test system via both (TightVNC and VNCViewer for Google Chrome).

in build.conf, I have provided a password for "param xorgvncpasswd ..."

##### check_x11vnc works with this code ##  SOLVED ###############
## location is /build/packages/xorg7vnc/bin/check_x11vnc
#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfbport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi
############# above code works ###############################

What didn't work:
I created a build folder in the xorg7vnc package at "/build/packages/xorg7vnc/build."  It didn't have one.  Then, I created a finalize file with the following code in it:

#################/build/packages/xorg7vnc/build/finalize###############
echo "/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &" >> /etc/skel/.xinitrc
# /usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &
#############  doesn't work at this time ########## FAILED #############

Even if the echo path was going to the wrong location, I expected the .xinitrc to be updated with the related string. It wasn't.  The assumption had been that by adding the build folder and finalize file, the ./build --allmodules would see the build folder, inspect the finalize file and perform the code within the file.  If you have any thoughts as to why the system didn't do anything with the xorg7vnc/build folder and file that I created, please let me know.






Brian Koch
IT Dept
City of Taylor, MI
<a dir="ltr" href="tel:(734)%20374-1514" target="_blank">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Wed, Nov 30, 2016 at 5:07 PM, Ed <[hidden email]> wrote:
I seem to recall that it worked fine if you're running as root, but if you set ts_user to non-root, it wouldn't. I think I had it working via .xinitrc or autostart, but abandoned it because Teamviewer was desired. This was back around 5.2 or 5.3. I'll look to see if I have my diffs from that still.

For anyone who wants to try Teamviewer, it works if you're using version 8 or less and you have replace "readlink -e" with "readlink -f". After version 8 there are problems with the teamviewer ID regenerating on each boot. The ID used to be generated by MAC address, but they must use something else in addition now. e.g UUID of root fs.



On 1/12/2016 3:35 AM, Don Cupp wrote:
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch <[hidden email]> wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general




------------------------------ ------------------------------ ------------------


______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------------------------------------------------------
_______________________________________________
Thinstation-general mailing list
[hidden email]ceforge.net
https://lists.sourceforge.net/lists/listinfo/thinstation-general

------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general
Reply | Threaded
Open this post in threaded view
|

Re: x11vnc question

trentasis

2017-03-15 14:49 GMT+01:00 Brian Koch <[hidden email]>:
check to see if your remote access password is "pleasechangeme" or whatever you changed tsuser to.  I believe my command grabbed the tsuser password field in the build.conf because I didn't want to pass admin rights to tsuser.


Brian Koch
IT Dept
City of Taylor, MI
<a href="tel:(734)%20374-1514" value="+17343741514" target="_blank">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Wed, Mar 15, 2017 at 7:43 AM, Trenta sis <[hidden email]> wrote:
Hi Brian,

I have tested your change but is not working replacing

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &

I have test and seems that pwd is not set correctly,  /home/tsuser/.vnc/passwd does not contains any folder or file, and param xorgvncpasswd is set correctly...  How and where you configured vnc password to be stored in  /home/tsuser/.vnc/passwd , we don't have any file or folder in /home

with previous command from command line as root x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc & works!

Thanks


2017-01-30 16:25 GMT+01:00 Brian Koch <[hidden email]>:
I solved it in /build/packages/xorg7vnc/bin/check_x11vnc.  And, from the earlier email chain:  "in build.conf, I have provided a password for "param xorgvncpasswd ..."

#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi



Brian Koch
IT Dept
City of Taylor, MI
<a href="tel:(734)%20374-1514" value="+17343741514" target="_blank">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Sun, Jan 29, 2017 at 12:07 PM, Brian Koch <[hidden email]> wrote:
Yes.  I can look up my notes tomorrow

On Jan 29, 2017 7:03 AM, "Trenta sis" <[hidden email]> wrote:
hi, is this issue solved in master branch?

I have the same error, in some situation vnc is not started...

2016-12-01 21:33 GMT+01:00 Don Cupp <[hidden email]>:
Might need the metric header to establish order in finalize processing.


Sent from Yahoo Mail for iPhone


On Thursday, December 1, 2016, 12:21 PM, Brian Koch <[hidden email]> wrote:

Guys, I got x11vnc to work.  However, not in the manner that I expected.  The browser code may work (-httpdir /lib/www/html/x11vnc) as well--haven't tried it.  But, the real issue is where tsuser has access versus where the code for -usepw appears to point to.  The -usepw password location was only accessible if logged as root.  By changing the path in the command below to /home/tsuser/.vnc/passwd, and rebuilding the TS with the change included, the generic user tsuser could read the file when I typed in the encrypted password from my remote support pc.  I never gave tsuser root-level rights.  Also, I installed 2 different applications from my support desk pc and was able to connect to my test system via both (TightVNC and VNCViewer for Google Chrome).

in build.conf, I have provided a password for "param xorgvncpasswd ..."

##### check_x11vnc works with this code ##  SOLVED ###############
## location is /build/packages/xorg7vnc/bin/check_x11vnc
#!/bin/sh
if [ -z "`pidof x11vnc`" ]; then

/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth /home/tsuser/.vnc/passwd -o /var/log/x11vnc &
# x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &

#x11vnc -forever  -rfbport 5900 -q -usepw -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab
fi
############# above code works ###############################

What didn't work:
I created a build folder in the xorg7vnc package at "/build/packages/xorg7vnc/build."  It didn't have one.  Then, I created a finalize file with the following code in it:

#################/build/packages/xorg7vnc/build/finalize###############
echo "/usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &" >> /etc/skel/.xinitrc
# /usr/bin/x11vnc -forever -rfbport 5900 -rfbauth ~/.vnc/passwd -o /var/log/x11vnc &
#############  doesn't work at this time ########## FAILED #############

Even if the echo path was going to the wrong location, I expected the .xinitrc to be updated with the related string. It wasn't.  The assumption had been that by adding the build folder and finalize file, the ./build --allmodules would see the build folder, inspect the finalize file and perform the code within the file.  If you have any thoughts as to why the system didn't do anything with the xorg7vnc/build folder and file that I created, please let me know.






Brian Koch
IT Dept
City of Taylor, MI
<a dir="ltr" href="tel:(734)%20374-1514" target="_blank">(734) 374-1514 or Ext. 7550 (internal use)
Please have a ticket put in if you need an issue resolved.

On Wed, Nov 30, 2016 at 5:07 PM, Ed <[hidden email]> wrote:
I seem to recall that it worked fine if you're running as root, but if you set ts_user to non-root, it wouldn't. I think I had it working via .xinitrc or autostart, but abandoned it because Teamviewer was desired. This was back around 5.2 or 5.3. I'll look to see if I have my diffs from that still.

For anyone who wants to try Teamviewer, it works if you're using version 8 or less and you have replace "readlink -e" with "readlink -f". After version 8 there are problems with the teamviewer ID regenerating on each boot. The ID used to be generated by MAC address, but they must use something else in addition now. e.g UUID of root fs.



On 1/12/2016 3:35 AM, Don Cupp wrote:
I never use that package, so I never made it pretty, but basically whats happening, is that during init, a cron job is added to start x11vnc sometime in the future, as X is not yet available. The cron job calls that script periodically, and when X is available, but vnc is not started, to start vnc. I think someone came back later and said, start it with --forever, and remove the cron job. The whole approach is a little awkward, and I would prefer that vnc was started in .xinitrc


On Wednesday, November 30, 2016 7:38 AM, Brian Koch <[hidden email]> wrote:


Hello, x11vnc is not auto-starting in my build even though I have the package xorg7vnc as active. 

What is check_x11vnc doing in this script?

if [ -z "`pidof x11vnc`" ]; then
x11vnc -forever  -q -usepw -httpdir /lib/www/html/x11vnc -o /var/log/x11vnc &
  # Now we have got it started stop this cron nonsense:
  sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
  crontab /tmp/crontab
fi

I need the process to run so that I can remote in to support users when needed.  Shouldn't I need:

x11vnc -forever  -rfport 5900 -q -usepw -o /var/log/x11vnc &

if so, what is

"sed -i s/"*\/1 \* \* \* \* \/bin\/check_x11vnc"// /tmp/crontab
crontab /tmp/crontab" 

doing?

  

Brian Koch


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general




------------------------------ ------------------------------ ------------------


______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------ ------------------------------ ------------------

______________________________ _________________
Thinstation-general mailing list
Thinstation-general@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/thinstation- general


------------------------------------------------------------------------------
_______________________________________________
Thinstation-general mailing list
[hidden email]ceforge.net
https://lists.sourceforge.net/lists/listinfo/thinstation-general

------------------------------------------------------------------------------

_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Thinstation-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-general