LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2008, 07:24 AM   #1
Cetko
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Rep: Reputation: 0
SSH X forward firefox


I installed OpenSSH and connected to a remote machine with:
ssh -Y remotehost

Now, the problem occurs if the process on the remote and local machine are the same. In this case, firefox is always started on the machine that first started the process. Meaning, if I start it on the remote machine and then start on the local machine, they are all running on the remote host and vice versa. This is only the case with my acount (admin created in ubuntu at startup). The non-admin account created after the installation does not have the problem. As far as I know this only happens with firefox. I tried it on Ubuntu and Arch and cleared out cache data. The ssh server is Ubuntu Gutsy 7.10

Any kind of help, a reference, link, anything wold be appreciated.
 
Old 02-19-2008, 09:28 AM   #2
bpence
LQ Newbie
 
Registered: Feb 2008
Posts: 6

Rep: Reputation: 0
After you login and before you run firefox, check the value of your DISPLAY variable like this:

echo $DISPLAY

It should look something like this:

localhost:10.0

If not, you may have a login script overriding the value set by the ssh daemon. This could cause an X app to display on the local display rather than being forwarded. It would also explain why one accout is having this problem and another is not.

Regards,

Brian Pence

Last edited by acid_kewpie; 02-26-2008 at 01:22 PM.
 
Old 02-19-2008, 09:37 AM   #3
Cetko
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Original Poster
Rep: Reputation: 0
The DISPLAY variable is always localhost:10.0 as set by ssh
I haven't fiddled with any bash login files except /etc/bash.bashrc but it works for all accounts.
 
Old 02-19-2008, 10:32 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The problem that the OP is having is that after making the ssh connection, the program is running locally and not remotely.

Firefox checks if there is another instance of firefox operating on the computer running that display.

If you don't have an instance of firefox open locally, you will have firefox start up as you want. You may need to disable preloading.

I tried an experiment where I quit all instances of Firefox, ssh'ed from my laptop to my desktop and then entered "firefox" in the terminal. I typed in the url "file:///home" to verify that it was running on the remote machine. Then I started firefox on the laptop by clicking on the quickstart icon on the toolbar. This started firefox, but it was still running on the remote machine.
 
Old 02-19-2008, 11:40 AM   #5
Cetko
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Original Poster
Rep: Reputation: 0
How do I disable preloading??
There's some vague reference to /var/cache
 
Old 02-19-2008, 02:32 PM   #6
Cetko
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Original Poster
Rep: Reputation: 0
OK I found a reasonable solution. Start firefox with -no-remote option
though I haven't figured out what is different on the non-admin account.
I'm puzzled???
 
Old 02-20-2008, 01:53 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You discovered the best answer. I wish that "firefox --help" would have provided it.

Last edited by jschiwal; 02-20-2008 at 10:36 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH forward (tunnel) overhead ? michaelsanford Linux - Networking 2 07-31-2005 05:58 AM
forward ssh serii Linux - Newbie 1 05-01-2005 02:41 PM
IPTABLES Forward ssh session wkuk Linux - Security 2 05-21-2004 07:41 AM
ssh port forward failure harmster Linux - Networking 2 03-08-2004 06:46 AM
port forward over ssh bedwardj Linux - Security 1 06-26-2001 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration