Portál AbcLinuxu, 13. května 2025 07:34

Dotaz: pristup na vncserver z windows

4.3.2007 02:40 David | skóre: 21 | Praha
pristup na vncserver z windows
Přečteno: 625×
Odpovědět | Admin
Ahoj, potrebuju se z win pripojovat na linux a to do grafiky. Vyresil jsem to tak, ze se z win pomoci putty pripojim na linux, tam pustim vncserver a pak se z win pripojim pomoci vnc na linux do grafiky. Pokud vnc ve win zavru a znovu se pripojim, tak mi tam naskoci moje rozdelana prace, kterou sem zacal pred tim, nez sem vnc zavrel, to je OK. Ale pokud zavru vnc i putty, tak se sice mohu pomoci vnc pripojit (nemusim se znovu pripojovat pomoci putty a poustet vnc server, protoze ten porad bezi), ale vsechny aplikace, ktere sem si pomoci vnc pustil se ukoncily, to NENI OK. Jak to mam udelat, abych se mohl uplne od linuxu odpojit a moje Xsession vznikla pres vncserver mi tam zustala? Diky, David.
Nástroje: Začni sledovat (0) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

Max avatar 4.3.2007 04:13 Max | skóre: 72 | blog: Max_Devaine
Rozbalit Rozbalit vše Re: pristup na vncserver z windows
Odpovědět | | Sbalit | Link | Blokovat | Admin
Eh? A co používáš za vnc ? Já používám realvnc, který má modul pro xserver a spouští se vlastně při spuštění xek (pokud to tak mám nastaveno v xorg.conf). VNC by mělo fungovat jako monitor na dálku a né jako nová session. Ty asi používáš x11vnc a u něj netuším, jak se chová :-/. Ale možná se mýlím ...
Zdar Max
Měl jsem sen ... :(
4.3.2007 10:51 David | skóre: 21 | Praha
Rozbalit Rozbalit vše Re: pristup na vncserver z windows
Nezlob se, ale odpoved typu ja o tom vlastne nic nevim mi nepomuze :(. Jinak pouzivam Realvnc a bezi mi to na Ubuntu. Tohle je /etc/vnc.conf
# /etc/vnc.conf written by Marcus Brinkmann. This file is in the Public Domain.
#
# This is the configuration file for the vncserver package.
# It is perl syntax, but only variable assignment is allowed.
# A semicolon will be added if missing.
# Every value has suitable defaults, so you probably don't need any file.
#
# This file will be sourced by `vncserver' and `vncpasswd'.
# After this file, $(HOME)/.vncrc will be sourced, so values can be
# overwritten on a per-user basis. If you want to reactivate the default
# value there, you have to specify an empty value. For example, $fontPath
# will set to the default value after
#
# $fontPath = "/foo";
# $fontPath = "";
#
# If you are missing something, please let me know.
# Marcus.Brinkmann@ruhr-uni-bochum.de

# System configuration
# --------------------
#
# This section contains entries that should be true for all users.

# $vncClasses should be the path to the java classes of server.
# $vncClasses = "/usr/share/vncserver";

# $XFConfigPath   can be set to the global XF86Config file. This will be
#                 parsed to gain default values for $fontPath and $colorPath.
#                 If you want to disable this feature, point it to an
#                 invalid file, "/foo" for example.
# $XFConfigPath = "/etc/X11/XF86Config";

# $fontPath should be a comma seperated list of fonts to be added to the font
#           path. If not specified, and $XFConfigPath is valid, vncserver
#           will read the $fontPath from there. If both are not set, the
#           default will apply.
# Example: $fontPath = "tcp/localhost:7100";     # would make vnc to use xfs.
# Example: $fontPath = "";
#	$fontPath .= "/usr/X11R6/lib/X11/fonts/misc/,";
# 	$fontPath .= "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled,";
# 	$fontPath .= "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled,";
# 	$fontPath .= "/usr/X11R6/lib/X11/fonts/Type1/,";
# 	$fontPath .= "/usr/X11R6/lib/X11/fonts/Speedo/,";
# 	$fontPath .= "/usr/X11R6/lib/X11/fonts/75dpi/,";
# 	$fontPath .= "/usr/X11R6/lib/X11/fonts/100dpi/,";
#	$fontPath .= "/usr/X11R6/lib/X11/fonts/freefont/,";
#	$fontPath .= "/usr/X11R6/lib/X11/fonts/sharefont/";
# I don't know what the default is, though.

# $colorPath should be the RGB file to be used by X. This can also be taken
from
#            XF86Config file if specified by $XFConfigPath
# $colorPath = "/usr/X11R6/lib/X11/rgb";

# User configuration
# ------------------
#
# This section contains entries that may change from user to user.

# $vncUserDir contains the filename for the log files directory of Xvnc
#             (the server) and the viewers that are connected to it.
# $vncUserDir = "$ENV{HOME}/.vnc";

# $vncPasswdFile contains the filename of the password file for Xvnc.
# $vncPasswdFile = $vncUserDir . "/passwd";

# $vncStartup points to a script that will be started at the very beginning.
#$vncStartup = "/etc/X11/Xsession";
$vncStartup = "$ENV{HOME}/.vnc/xstartup";

# $xauthorityFile should be the path to the authority file that should be used
#                 by your vnc X server.
# $xauthorityFile = "$ENV{HOME}/.Xauthority";

# $defaultDesktopName should be set to the default name of the desktop.
#                     This can be changed at the command line with -name.
# $defaultDesktopName = "X";

# $geometry sets framebuffer width & height. Default will be calculated if
#           server is started from within a running X servers. Can be changed
at
#           the commandline (-geometry). A fixed default will be used if
#           vncserver is not invoked in a running X session.
$geometry ="1024x768";

# $depth       sets the framebuffer color depth. Must be between 8 and 32.
# $pixelformat sets the default pixelformat.
#              The default will be calculated if none of both is specified
#              and when vncserver is called from within a running X servers.
#              Can be changed at the command line with option -depth.
#              A fixed default value will be used if vncserver is not
#              invoked in a running X session.
$depth = "16";
#           $pixelformat = "rgb565";

# $getDefaultFrom sets the display from which you can query the default of
#                 the above three options, if you don't want to start vncserver
#                 from within a running X server. It will be added to the call
#                 of xdpyinfo.
#                 It is useful to get the default from the X server you will
#                 run xvncviewer in.
# Example:  $getDefaultFrom = "-display localhost:0"

# $rfbwait sets the maximum time in msec to wait for vnc client viewer.
# $rfbwait = "120000";
a tohle je /home/david/.vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -nowin &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#startx &


twm &
4.3.2007 11:02 Dejv | skóre: 37 | blog: Jak ten blog nazvat ... ? | Ostrava
Rozbalit Rozbalit vše Re: pristup na vncserver z windows
Odpovědět | | Sbalit | Link | Blokovat | Admin
Ja kdyz jsem na Fedore6 zkousel VNCserver, tak jsem pochopil, ze VNC bezi jako "druhe X" (treti, ctvrte... podle parametru v konfiguraku VNCserveru). Proste jsem jako uzivatel na konzoli mel spustene X (normalne z konzoly startx) a z druhe konzoly vncserver. Lokalne jsem zustaval prihlaseny, ty X spustene, a z domu jsem mohl normalne (taky realVNC) pracovat. Coz ale asi neresi tvuj problem, popisuju to jen na dokresleni me rady.

Napadlo me zkusit ten vncserver spoustet na pozadi (vncserver &). Ale nezkousel jsem to.

Dejv
Pevně věřím, že zkušenější uživatelé mě s mými nápady usměrní a pošlou tam, kam tyto nápady patří...
4.3.2007 11:11 David | skóre: 21 | Praha
Rozbalit Rozbalit vše Re: pristup na vncserver z windows
VNC bezi jako "druhe X" (treti, ctvrte... podle parametru v konfiguraku VNCserveru).
Tak tak, takhle to presne funguje. Muj problem je ale ten, ze na linuxu nejdriv neni nikdo prihlasen, pak se tam z domova prihlasim ja pomoci putty a pustim si vncserver, ale jakmile se z putty odhlasim, tak vse co jsem si pomoci vnc vzdalene pustil se ukonci, samotny vncserver ne, ale vsechny aplikace ktere sem na nem pustil.
4.3.2007 11:08 Ash
Rozbalit Rozbalit vše Re: pristup na vncserver z windows
Odpovědět | | Sbalit | Link | Blokovat | Admin
Xsession vzniklá přes vncserver by opravdu měla existovat tak dlouho, dokud vncserver běží, bez ohledu na to, jestli se na ten počítač někdo sshčkuje nebo ne. Je divné, že ta xsession zanikne při ukončení ssh, kterým jste vncserver spustil.

Jakým způsobem se vaše konfigurace chová, pokud
1) putty.exe -> vncserver
2) UKONČÍTE už nyní putty.exe !!! (není potřeba, že)
3) vncviewer.exe
případně pak ještě párkrát
4) UKONČÍTE vncviewer.exe
5) vncviewer.exe
zachovává se stav xsession?

alternativně pokud používáte putty k tunelování, tak
1) putty.exe -> vncserver
2) UKONČÍTE už nyní putty.exe !!!
3) putty.exe (sshtunel)
3) vncviewer.exe
případně pak ještě párkrát
4) UKONČÍTE vncviewer.exe
5) vncviewer.exe
zachovává se stav xsession?
4.3.2007 11:19 David | skóre: 21 | Praha
Rozbalit Rozbalit vše Re: pristup na vncserver z windows
1) putty.exe -> vncserver
2) UKONČÍTE už nyní putty.exe !!! (není potřeba, že)
3) vncviewer.exe
Pokud to udelam takhle (tedy ukoncim putty hned na zacatku), tak to funguje, Xsession se zachovava :). Tisicere diky. David

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.