FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 01-05-2008, 01:14 PM
Nikhil
 
Default more Fedora Cookbook: VNC

>>
On Fedora/RHEL clones I like to configure vnc thus:
[summer@potoroo ~]$ tail /etc/sysconfig/vncservers
# Use "-nohttpd" to prevent web-based VNC clients connecting.

# Use "-localhost" to prevent remote VNC clients connecting except when

# doing so through a secure tunnel. *See the "-via" option in the
# `man vncviewer' manual page.

VNCSERVERS="66:root 3:summer"
VNCSERVERARGS[3]="-geometry 1280x1024"
VNCSERVERARGS[66]="-geometry 1280x1024"

<<
*
Does the above VNCSERVERS declaration mean to limit the number of vncservers to be 66... can it be increased if yes, how much beyond?

*
On 1/5/08, John Summerfield <debian@herakles.homelinux.org> wrote:
Robert P. J. Day wrote:
>** yes, yes, it's really basic stuff but ...
>
>
http://www.crashcourse.ca/wiki/index.php/Configuring_VNC

Here are some things to play with once you have it up.
1.
**killall twm
The window decorations vanish
2.
**startkde
Play with kde for a while, then logout

3.
gnome-session
play with that for a while, then logout
4.
**kwin&
**kicker&
5.
**killall kwin
**twm&

Note that when you don't have an active window manager, focus follows

the mouse cursor.

6.
**vncserver -kill :1

On Fedora/RHEL clones I like to configure vnc thus:
[summer@potoroo ~]$ tail /etc/sysconfig/vncservers
# Use "-nohttpd" to prevent web-based VNC clients connecting.


# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.**See the "-via" option in the
# `man vncviewer' manual page.

VNCSERVERS="66:root 3:summer"

VNCSERVERARGS[3]="-geometry 1280x1024"
VNCSERVERARGS[66]="-geometry 1280x1024"

[summer@potoroo ~]$

On Debian, I use this approach:
[summer@potoroo ~]$ tail /etc/sysconfig/vncservers

# Use "-nohttpd" to prevent web-based VNC clients connecting.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.**See the "-via" option in the

# `man vncviewer' manual page.

VNCSERVERS="66:root 3:summer"
VNCSERVERARGS[3]="-geometry 1280x1024"
VNCSERVERARGS[66]="-geometry 1280x1024"

[summer@potoroo ~]$

summer@mail:~$ cat /etc/init.d/vnc
#!/bin/bash
# If no config, do nothing
#set -x
[ -f /etc/vncserver.conf ] || exit 0
function cfg()
{
****sed**</etc/vncserver.conf
********-e 's=#.*$==g'

********| grep -v '^$'
}


case "$1" in
**start)
********cfg | while read user port options
******** do :
********** echo Starting session for ${user} on ${port}
********** eval passwdfile=~${user}/.vnc/passwd

********** if [ ! -f**${passwdfile} ] ; then
**************echo Cannot start session for ${user}, no passwd file
**************continue
********** fi
********** P=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

********** [ "${user}" = "root" ] &&
P=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
********** su - ${user} -c "PATH=${P} vncserver ${options} ${port}"

******** done
********;;
**stop)
********cfg | while read user port options
******** do :
********** echo Stopping session for ${user} on ${port}
********** eval passwdfile=~${user}/.vnc/passwd
********** if [ ! -f**${passwdfile} ] ; then

**************echo Cannot stop session for ${user}, no passwd file
**************continue
********** fi
********** su - ${user} -c "vncserver -kill ${port}"
******** done
********;;
restart)

****** ${0} stop
****** ${0} start
****** ;;
***)
********echo ${0} '[start|stop]'
********;;
esac

summer@mail:~$

which I organise to run in the appropriate runlevel(s).





--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu**Z1aaaaaaa@coco.merseine .nu
-- Advice

http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html

http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe:
https://www.redhat.com/mailman/listinfo/fedora-list


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-05-2008, 07:43 PM
John Summerfield
 
Default more Fedora Cookbook: VNC

Nikhil wrote:

On Fedora/RHEL clones I like to configure vnc thus:
[summer@potoroo ~]$ tail /etc/sysconfig/vncservers
# Use "-nohttpd" to prevent web-based VNC clients connecting.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.

VNCSERVERS="66:root 3:summer"
VNCSERVERARGS[3]="-geometry 1280x1024"
VNCSERVERARGS[66]="-geometry 1280x1024"
<<

Does the above VNCSERVERS declaration mean to limit the number of vncservers
to be 66... can it be increased if yes, how much beyond?




Those are just the port numbers I use (as expressed by X & VNC), Red Hat
chose this method around RHL 7.x.


The expression VNCSERVERARGS[66] is how bash addresses arrays.

I think the limit's 99, maybe 100. ":66" translates to TCP port 5966,
but one can also access vnc by HTTP to TCP ports 100 less, so 5866 in
this case.


--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-05-2008, 08:38 PM
Tom Horsley
 
Default more Fedora Cookbook: VNC

On Sat, 05 Jan 2008 21:09:35 +0900
John Summerfield <debian@herakles.homelinux.org> wrote:

> 3.
> gnome-session
> play with that for a while, then logout

It probably depends on the distribution, but I notice
on a lot of versions of linux the "gnome-session"
program all by itself isn't sufficient to get a
complete session up and running. I've taken to adding
these lines in my VNC xstartup script:

kill_agent="no"
if [ -z "$SSH_AUTH_SOCK" ]
then
eval `ssh-agent -s`
kill_agent="yes"
fi
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]
then
eval `dbus-launch --sh-syntax --exit-with-session`
fi

run gnome-session or whatever here...

if [ "$kill_agent" = "yes" ]
then
ssh-agent -k
fi

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-06-2008, 12:33 AM
John Summerfield
 
Default more Fedora Cookbook: VNC

Tom Horsley wrote:

On Sat, 05 Jan 2008 21:09:35 +0900
John Summerfield <debian@herakles.homelinux.org> wrote:


3.
gnome-session
play with that for a while, then logout


It probably depends on the distribution, but I notice
on a lot of versions of linux the "gnome-session"
program all by itself isn't sufficient to get a
complete session up and running.


Very likely, as I don't generally use gnome I've not looked into it very
much. More of a curio, and maybe a means to surprise/confuse/challenge
others.


Here's another gem, though nothing to do with vnc. I discovered this one
accidentally.


ssh X anotheruser@localhost startkde
For maximum effect, do it from a KDE session, or start GNOME from a
GNOME session.





--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-09-2008, 07:54 AM
Alexander Apprich
 
Default more Fedora Cookbook: VNC

Robert P. J. Day wrote:
> yes, yes, it's really basic stuff but ...

... at least you're doing something :-) !!! thanks for your work Rob!!

Alex
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-20-2008, 03:08 AM
"Paul Johnson"
 
Default more Fedora Cookbook: VNC

On Jan 9, 2008 2:54 AM, Alexander Apprich
<a.apprich@science-computing.de> wrote:
> Robert P. J. Day wrote:
> > yes, yes, it's really basic stuff but ...
>
I found this to be informative.

I've not used vnc for about 10 years, since Windows 95.

It works differently than I remember. In the old days, when I would
use vnc, I would see the programs that were running on the other
system, and I'd take control of the keyboard and mouse of the other
system. It was handy for practical jokes where we would make people's
PCs do crazy stuff.

In this vnc on Fedora, I see a blank desktop, rather than a running
session on the other PC.

What's the story there?

--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-20-2008, 03:22 AM
Les Mikesell
 
Default more Fedora Cookbook: VNC

Paul Johnson wrote:

On Jan 9, 2008 2:54 AM, Alexander Apprich
<a.apprich@science-computing.de> wrote:

Robert P. J. Day wrote:

yes, yes, it's really basic stuff but ...

I found this to be informative.

I've not used vnc for about 10 years, since Windows 95.

It works differently than I remember. In the old days, when I would
use vnc, I would see the programs that were running on the other
system, and I'd take control of the keyboard and mouse of the other
system. It was handy for practical jokes where we would make people's
PCs do crazy stuff.

In this vnc on Fedora, I see a blank desktop, rather than a running
session on the other PC.

What's the story there?


Linux can run multiple sessions, so there are several ways to run the
vnc service. One is to use vncserver to start separate long-running
sessions that are not attached to the console. That is, you can
connect, start some programs, disconnect, then reconnect later, perhaps
from a different view and the programs will still be running. Another
way is to set up xinetd to start new sessions for each connections which
will be destroyed as you disconnect. Yet another is with an X module
that allows you to connect to the console session, more or less like the
windows version where that was the only available session.


--
Les Mikesell
lesmikesell@gmail.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-20-2008, 09:16 AM
"Robert P. J. Day"
 
Default more Fedora Cookbook: VNC

... coffee hasn't kicked in yet, so coherence is optional ...

On Sat, 19 Jan 2008, Les Mikesell wrote:

> Paul Johnson wrote:
> > On Jan 9, 2008 2:54 AM, Alexander Apprich
> > <a.apprich@science-computing.de> wrote:
> > > Robert P. J. Day wrote:
> > > > yes, yes, it's really basic stuff but ...
> > I found this to be informative.
> >
> > I've not used vnc for about 10 years, since Windows 95.
> >
> > It works differently than I remember. In the old days, when I would
> > use vnc, I would see the programs that were running on the other
> > system, and I'd take control of the keyboard and mouse of the other
> > system. It was handy for practical jokes where we would make people's
> > PCs do crazy stuff.
> >
> > In this vnc on Fedora, I see a blank desktop, rather than a running
> > session on the other PC.

by "blank desktop", do you mean truly blank, or just a regular initial
desktop with no clients running on it yet? i'm assuming the latter.

> > What's the story there?
>
> Linux can run multiple sessions, so there are several ways to run
> the vnc service. One is to use vncserver to start separate
> long-running sessions that are not attached to the console. That
> is, you can connect, start some programs, disconnect, then reconnect
> later, perhaps from a different view and the programs will still be
> running. Another way is to set up xinetd to start new sessions for
> each connections which will be destroyed as you disconnect. Yet
> another is with an X module that allows you to connect to the
> console session, more or less like the windows version where that
> was the only available session.

i, too, recall the days when a VNC session would take over a remote
desktop but i didn't get into that in the recipe. i can't test this
at the moment but i'm going to hazard a guess as to how things work.

if someone is actually logged on to the remote linux system, then
they're running an X session corresponding to display :0. when
someone on that remote system runs "vncserver", they should get a new
X session on display :1 and that's the one you're connecting to, so
that represents a new X session entirely independent from the one the
user on the remote system is actually working with.

if you wanted to grab control of their desktop, i imagine you'd have
to do something corresponding to running vncviewer and connection to
display :0. is that even possible? i didn't look into that. does
any of the above make sense? clarification, anyone?

rday

p.s. as mike points out, it would seem that, since windows supported
only one X session in the first place, that would be the one you were
connecting to.
--

================================================== ======================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

Home page: http://crashcourse.ca
Fedora Cookbook: http://crashcourse.ca/wiki/index.php/Fedora_Cookbook
================================================== ======================

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-20-2008, 09:24 AM
"Robert P. J. Day"
 
Default more Fedora Cookbook: VNC

On Sun, 20 Jan 2008, Robert P. J. Day wrote:
...
> p.s. as mike points out, ...

sorry ... should have said, "as les points out ...".

rday
--
================================================== ======================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

Home page: http://crashcourse.ca
Fedora Cookbook: http://crashcourse.ca/wiki/index.php/Fedora_Cookbook
================================================== ======================

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-20-2008, 02:19 PM
"Robert P. J. Day"
 
Default more Fedora Cookbook: VNC

On Sat, 19 Jan 2008, Paul Johnson wrote:

> On Jan 9, 2008 2:54 AM, Alexander Apprich
> <a.apprich@science-computing.de> wrote:
> > Robert P. J. Day wrote:
> > > yes, yes, it's really basic stuff but ...
> >
> I found this to be informative.
>
> I've not used vnc for about 10 years, since Windows 95.
>
> It works differently than I remember. In the old days, when I would
> use vnc, I would see the programs that were running on the other
> system, and I'd take control of the keyboard and mouse of the other
> system. It was handy for practical jokes where we would make people's
> PCs do crazy stuff.

ok, here's what i've been able to figure out, and others can fix any
errors before i wiki it.

on the server side, run:

$ x0vncserver PasswordFile=/home/rpjday/.vnc/passwd

(or whichever password file represents the appropriate user.
according to the man page, you *must* specify a VNC password file to
be used, which makes sense.)

when you do that, you'll see something like:
...
Sun Jan 20 10:17:12 2008
main: XTest extension present - version 2.2
main: Listening on port 5900
...

then, on the client side, connect to that exact port:

$ vncviewer 192.168.1.200::5900

that appears to give me the remote control over that desktop session.

thoughts?

rday
--


================================================== ======================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

Home page: http://crashcourse.ca
Fedora Cookbook: http://crashcourse.ca/wiki/index.php/Fedora_Cookbook
================================================== ======================

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 07:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org