ssh DISPLAY issues and remote DESKTOP
I want to use tcpdump to capture packets of website visiting with firefox on a remote machine.
I'm now operating on my laptop with fedora I want the firefox is opened on the remote machine, not on my laptop I ssh onto the machine and notice that I can't open firefox coz no DISPLAY is set so I set DISPLAY Code:
export DISPLAY=":0.0" but I got nothing about the website while the firefox seems to be running Code:
[root@canard tor_capture]# sudo -u wgong firefox www.google.com & besides, I want to configure remote desktop TigerVNC following the guide: http://zeusville.wordpress.com/2012/...-on-fedora-16/ the author said: Code:
let’s update iptables: Code:
[root@canard tor_capture]# systemctl restart iptables.service thanks! |
A bunch of stuff is probably getting in your way. First, I will rephrase your question, so you can confirm that I'm answering the questions you want answered.
You use the ssh client on a Linux host that is running an X server, to log into a remote Linux host. You want to run X client applications on that host, such that they connect and render on the X server at your local Linux console. If incorrect, please clarify. To get the remote X clients to render on your local X server, the easiest thing to do is simply use the ssh -X option, which will cause ssh to build a tunnel back to your local X server, and automatically set $DISPLAY on the remote host session for you. Now, having done this, simply start your X applications as if they are running locally. Setting $DISPLAY to ':0.0' will cause the X applications to try to make a connection to an X server running on the remote host, which should probably fail if it's security is adequately configured, and you won't be able to see or control anyway, since it's remote. Now, for firefox, things get more complicated. When firefox launches, it snoops around on the attached X server (defined by $DISPLAY), and looks for an existing firefox application using the X server. Not sure how it does that, but it does. Now, even if the instance of firefox using the X server is running on a totally different host, it will hand off the launch request to that other firefox sharing the X server. If it is on a host with multiple virtual desktops, and the firefox window(s) obscured, you won't even see the result. The solution there is to start firefox with the -no-remote option. That defeats the default pernicious behavior. You don't have to open any firewall rules on the host for which you've posted the listings. It is already wide open, accepting anything from anywhere. --- rod. |
thanks
You misunderstood me I just want everything is done on the remote machine, I'm now operating with my laptop on fedora. I want the remote machine open firefox, visit website and capture packets, all these stuff are done on the remote machine, I wrote a script on that machine for doing these stuff. I just want to ssh into that remote machine, use "screen" and start the script and then exit and then power off my laptop. you said Quote:
last time I used tigerVPN to log onto that machine and opened firefox on that machine. tigerVPN can, why can't ssh ? |
firefox will not run without an X server to connect to. That can be a real X server, on either the host running firefox, a real X server on your local host running the ssh client, or a virtual X server such as Xvfb (which would run on the remote host that will run firefox).
Is there something about the web site that actually requires firefox? Is the problem better solved by using either a text-mode browser such as links or lynx, or a downloader/command-line HTTP client such as wget or curl? Perhaps tell us what the actual objective is, as there is probably a clean solution to be used. --- rod. |
I want to use firefox get video streaming
and capture the packets for the video streaming, and so running firefox is mandatory I'm now considering the tigerVPN, coz tigerVPN should be fine but I have problems on the iptable stuff Quote:
|
So, is it the TCP/IP data that you are trying to capture, or are you trying to capture the actual streaming video? If you want the streaming video, it is a long way to go from captured ethernet packets to a video file that you can play on anything. It might be impossible, due to encryption and compression between the source and destination.
How does using a VPN solve the problem? Is it because the streaming video is supposed to be contained within some IP doamain? If so, then consider the idea of using the Xvfb to support X for firefox. It isn't very complex to set up, and plays well with your screen session. In fact I've used those two pieces in combination for reasons not dissimilar to yours. --- rod. |
Quote:
I'm actually doing research on video streaming with browser, for example, youtube. so I hope the packets are between the youtube server and the remote machine, there should be no encryption/compression I don't want to watch the video on my local laptop I don't understand your second paragraph, can you make it a bit clearer? thanks! |
What I mean is that you can run firefox on the remote host, using a virtual X server. I don't know what role the VPN you talked about plays, or how it contributes to a solution.
--- rod. |
Quote:
( Do not export DISPLAY ) |
All times are GMT -5. The time now is 03:44 AM. |