Find the answer to your Linux question:
Results 1 to 9 of 9
Hi I'm using VNC to work on a remote Linux machine. My problem is that I want to be able to open Linux applications from the remote machine on my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4

    VNC as xserver


    Hi

    I'm using VNC to work on a remote Linux machine.
    My problem is that I want to be able to open Linux applications from the remote machine on my Windows desktop and to be able to move them from screen to screen, to maximize them and to be able to see 2 Linux application side by side.
    In general, what I want to achieve is exactly what xserver provides, without one thing, I don't want to lose everything when I disconnect from the network.

    Is there a way to open application in VNC but to access it like xserver?

    Thanks
    Haim

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,628
    I'm not sure I fully understand what is is you are wanting to do, but if I am, it seems to me you could log into the server and access the native Linux desktop as though you were in front of that machine. An easy way to do it without xorg.conf configurations is to log into the server (as I guess you have been)...
    Code:
     vncviewer vnc_server_machine:1
    ...and from a terminal on the remote machine, access its desktop if running:
    Code:
    vncviewer 127.0.0.1:0
    To log into the Linux vncserver from your java enabled Windows web browser, simply put the address in the address bar:
    Code:
    http://vnc_server_machine:5801
    and access the desktop the same as above once connected. Ports 5801* and 5901* must be forwarded to the vncserver on the other end.

    * This is assuming you are logging into the :1 display.

    Once logged into the server's desktop, you should then be able to run apps from the server just like you would if you were sitting in front of it. If you close your Windows browser, the accessed server desktop will still be up and running from VNC for next time you log in if you choose to leave it up and running.

    Hope this was what you were wanting to know. Sorry if not.
    Linux Mint + IceWM Registered:#371367 New Members: click here

  3. #3
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Thanks for your answer!

    This is the way I'm working now, using RealVNC.
    The problems with this are:
    1. The VNC window size is limited to the size I originally opened it
    2. I work with 2 monitors with different sizes and with 3rd monitor on the laptop
    3. I want to take one application to one monitor and another to the other monitor

    As I wrote, the work inside the VNC window is very limiting, especially when I open many applications in the Linux machine, xserver provides all the needs except of saving the session.

  4. #4
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,628
    To change screen size, run the -geometry option from the server side. An example would be...
    Code:
    vncserver -geometry 1024x768 :1
    I don't know about running different apps on different screens in Windows but a suggestion I could make would be to start each app on a separate vnc display. For instance, if you needed two, you could do:
    Code:
    vncserver -geometry 1024x768 :1
    vncserver -geometry 800x600 :2
    Log in to each seperately and move them where you want. This may not be the most eloquent solution but would work. For all vncserver options available run:
    Code:
    man vncserver
    Linux Mint + IceWM Registered:#371367 New Members: click here

  5. #5
    Linux Newbie sarlacii's Avatar
    Join Date
    May 2005
    Location
    South Africa
    Posts
    110
    Hi haimcn

    Unfortunately VNC connections are made at a specific resolution, because you are effectively telling the server to send you a virtual "screen" at x and y resolution. If you want to make a VNC connection that spans two monitors, you have to specify the VNC desktop at that resolution when you connect. Then you can position the VNC desktop so that it covers both your monitors. Some VNC servers may not like this res.

    The only problem with this approach is that it requires bandwidth... at thus may be slow if you're not on thel ocal LAN. If you double the res from 1024x768 to 2048x768 you'll roughly double the bandwidth requirement (setting aside non-liner effects like compression etc.).

    So... put the required res in your VNC config and then connect at that res from windows.

    Let us know how it goes.
    Respectfully... Sarlac II
    ~~
    The moving clock K' appears to K to run slow by the factor (1-v^2/c^2)^(1/2).
    This is the phenomenon of time dilation.
    The faster you run, the younger you look, to everyone but yourself.

  6. #6
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Actually, I understand that VNC is not the solution I need.
    What I would like to know is whether there is a way to open X-server on the Windows machine but not lose it when disconnecting from the network.
    Is there any way to hijack the process to the Linux machine and then get it back to the X-server?

    I'm working with VNC a lot, so I know how to use it, I just wonder if there is a way to get out of its desktop?

  7. #7
    Linux Newbie sarlacii's Avatar
    Join Date
    May 2005
    Location
    South Africa
    Posts
    110
    Ah, the issue got confused. Your question is
    Is there a way to open application in VNC but to access it like xserver?
    and the answer is no, not with a VNC-type process. Having worked with VNC you'll know that VNC simply displays the graphical output remotely... the process executes on the remote box.
    Xserver allows you to display a specific app remotely, but as you intimate, the app dies when you disconnect.
    Interesting one... what you want is to be able to connect to apps individually, but then disconnect and reconnect as required, with the apps retaining their state, like a VNC desktop. Hmm, Dapper Dan's suggestion of two VNC desktops is a step in the right direction, but not what you want.
    Respectfully... Sarlac II
    ~~
    The moving clock K' appears to K to run slow by the factor (1-v^2/c^2)^(1/2).
    This is the phenomenon of time dilation.
    The faster you run, the younger you look, to everyone but yourself.

  8. #8
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,628
    You could forward X through ssh using Putty but my experience has been this makes for a very slow process. Another disadvantage is, the session would end when you closed out Putty. You might want to experiment with it nonetheless...
    Linux Mint + IceWM Registered:#371367 New Members: click here

  9. #9
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Thanks again.

    Unfortunately it has the same problem, it is working great until I disconnect from the network.

    Haim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •