WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Adding xvnc to .xsession  (Read 6370 times)

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Adding xvnc to .xsession
« on: January 31, 2011, 12:18:13 PM »
Hi!
I have three boot options: Xorg, Xvesa and xvnc. Xorg and Xvesa automatically adds the correct line to .xsession but xvnc doesn't. How can I achieve this?
« Last Edit: January 31, 2011, 03:33:35 PM by uggla »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Adding x11vnc to .xsession
« Reply #1 on: January 31, 2011, 01:29:09 PM »
x11vnc is not an X server. It will let you connect via VNC to an existing one (xorg or xvesa).

If you want a standalone VNC server, I recommend tightvnc. Note that it doesn't have the mentioned autoconfig either, because it is assumed the general user will not want their only display be vnc.
The only barriers that can stop you are the ones you create yourself.

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Adding x11vnc to .xsession
« Reply #2 on: January 31, 2011, 01:32:12 PM »
You can use x11vnc as a xserver without loading either Xorg or Xvesa.

http://forum.tinycorelinux.net/index.php?topic=7720.0
« Last Edit: January 31, 2011, 01:36:01 PM by uggla »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Adding x11vnc to .xsession
« Reply #3 on: January 31, 2011, 02:42:18 PM »
Xvnc != x11vnc.
The only barriers that can stop you are the ones you create yourself.

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Adding x11vnc to .xsession
« Reply #4 on: January 31, 2011, 03:32:54 PM »
Oops! Sorry I got confused (I'll change the thread title). Well, how can I add the right xvnc command to .xsession at boot?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Adding xvnc to .xsession
« Reply #5 on: January 31, 2011, 04:12:23 PM »
Personally I have ".xsession.Xvesa_base" ".xsession.Xorg" ".xsession.Xvesa_new" in backup; then I copy the appropriate one to .xsession
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Adding xvnc to .xsession
« Reply #6 on: February 01, 2011, 04:55:42 AM »
Would it work to create three different extensions with different .xsession that I put in xorg.lst, xvesa.lst, xvnc.lst?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Adding xvnc to .xsession
« Reply #7 on: February 01, 2011, 05:06:24 AM »
Not sure if an extension would be a good idea for a configuration file like .xsession

In any such case, you would have to exclude home/tc/.xsession from backup, to avoid overwriting the file.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Adding xvnc to .xsession
« Reply #8 on: February 01, 2011, 05:19:17 AM »
I have a persistent home, but if I would put it in backup the way you suggested can I place the copy command in bootlocal.sh and have the correct x start at boot?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Adding xvnc to .xsession
« Reply #9 on: February 01, 2011, 06:22:36 AM »
Edit .xsession to have the correct line for your VNC options, and add "echo Xvnc > /etc/sysconfig/desktop" to bootsync.sh. Untested, but should let you have your only display be VNC.
The only barriers that can stop you are the ones you create yourself.

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Adding xvnc to .xsession
« Reply #10 on: February 01, 2011, 06:36:36 AM »
But if I boot with xorg or xvesa won't my vnc options cause trouble? Do I still need three different .xsession files?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Adding xvnc to .xsession
« Reply #11 on: February 01, 2011, 07:09:37 AM »
It's not clear what you want here... If you want our help, do describe your situation in more detail.
The only barriers that can stop you are the ones you create yourself.

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Adding xvnc to .xsession
« Reply #12 on: February 01, 2011, 07:33:38 AM »
I want three boot alternatives in Grub:
1. TC with Xorg
2. TC with Xvesa
3. TC with (only) Xvnc

To achieve this I have created three different onboot.lst-files that are passed as boot option. One loads xorg, the next loads xvesa and the last loads tightvnc. Xorg and Xvesa automatically alters .xsession at boot. I need a simple way to do that for Xvnc as well.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Adding xvnc to .xsession
« Reply #13 on: February 01, 2011, 07:39:30 AM »
Oh ok. To do that either edit the tightvnc extension, or check for a bootcode in bootsync.sh. In the second case, your boot entry would include something like "xvnc".

Quote
grep xvnc /proc/cmdline && echo Xvnc > /etc/sysconfig/desktop && cp /path/to/.xsession.xnvc /home/tc/.xsession
The only barriers that can stop you are the ones you create yourself.

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Adding xvnc to .xsession
« Reply #14 on: February 01, 2011, 07:47:14 AM »
I will test that. Thanks!