ecd3 Run X apps remotely on another FreeBSD box - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Desktop Usage > X.Org

X.Org X.Org on FreeBSD installation & configuration.

Reply
 
Thread Tools Display Modes
  #1  
Old January 21st, 2011, 08:59
Doug Doug is offline
Junior Member
 
Join Date: Aug 2009
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Run X apps remotely on another FreeBSD box

Hello and thanks in advance for any help.

Remote X Applications

I would like to run the kmail appliation on the desktop machine from my laptop.

From what I have read in the posts there seems to be two ways to do it.
Over ssh and another way using xhosts and Display settings.

I have managed to get the ssh method working for a test using xcalc but I cannot run Firefox or kmail which are the applications I really want. So I would like to persue the non ssh method. I realise the example below is not very secure but I will tighten it up once I can get it working.

If I run the command "kmail" in an xterm on the desktop machine kmail starts OK. But I cannot seem to get it to diaplay remotely on the laptop.

Two machines -
Desktop 10.1.1.1
FreeBSD 8.1-RELEASE
KDE4 running with 6 desktop windows
X.Org X Server 1.7.5

Laptop 10.1.1.77
FreeBSD 7.3
KDE 4 running with 4 desktop windows
X.Org X Server 1.6.0

On Laptop (10.1.1.77) I issue the command
$xhost +
Very insecure I know.

Check it with
$ xhost
access control disabled, clients can connect from any host

On Desktop I issue the commands:
$export DISPLAY=10.1.1.77:0.0
(using /bin/sh)

Check it with:
Code:
$ set | grep DISP
DISPLAY=10.1.1.77:0:0
$ xcalc &
$ Error: Can't open display: 10.1.1.77:0:0

Code:
ps waux | grep X
root        1572  0.4 18.2 392940 376604  ??  S    10:03AM  15:20.44 /usr/local/bin/X -br -quiet -nolisten tcp :0 -auth /0
I have seen a lot of comments on posts about the nolisten option setting on X but I have not found any way to disable it or confirmed it is an issue with the software versions I am running. It exists in /usr/local/kde4/share/config/kdm/kdmrc
Code:
ServerArgsLocal=-nolisten tcp
but the file seems to get rewritten each reboot.

Thanks in advance

Last edited by DutchDaemon; January 21st, 2011 at 13:57. Reason: proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #2  
Old January 21st, 2011, 09:08
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,852
Thanks: 48
Thanked 2,061 Times in 1,890 Posts
Default

You need to have an X server on your laptop for the application to connect to. For added security stick to the ssh method. Post the problems you are having with that.

The nolisten flag on X is for XDMCP. XDMCP is similar to Terminal Services on Windows. A different way of working remote.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #3  
Old January 21st, 2011, 10:37
Doug Doug is offline
Junior Member
 
Join Date: Aug 2009
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Howdy - thanks

I thought I would have had a X server running as I am running KDE desktop on the laptop which I thought would need an X server to run. (I may be wrong).

I am not too concerned with security as the devices are not on the internet yet and I am just saving some work walking up stairs while I configure all the apps to swap machines over.

From the 10.1.1.77 machine
When I try firefox3 it starts but it runs the one on 10.1.1.77
There is no mozilla or firefox processes running on 10.1.1.1 ?
ssh -X fred@10.1.1.1 /usr/local/bin/firefox3



From the 10.1.1.77
Code:
ssh -X fred@10.1.1.1  /usr/local/kde4/bin/kmail
Password:veryverysecret
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
kmail(74464) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1. 
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
"/usr/local/kde4/bin/kmail(74464)" Error in thread 763367744 : "org.freedesktop.DBus.Error.ServiceUnknown - The name 
org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/local/kde4/bin/kmail(74464)" Error in thread 763367744 : "QLocalSocket::connectToServer: Invalid name"
"/usr/local/kde4/bin/kmail(74464)" Error in thread 763367744 : "org.freedesktop.DBus.Error.ServiceUnknown - The name 
org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/local/kde4/bin/kmail(74464)" Error in thread 763367744 : "QLocalSocket::connectToServer: Invalid name"
"/usr/local/kde4/bin/kmail(74464)" Error in thread 763367744 : "org.freedesktop.DBus.Error.ServiceUnknown - The name 
org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/local/kde4/bin/kmail(74464)" Error in thread 763367744 : "QLocalSocket::connectToServer: Invalid name"
kdeinit4: preparing to launch /usr/local/kde4/lib/libkdeinit4_klauncher.so
klauncher(74469) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1. 
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit4: preparing to launch /usr/local/kde4/lib/libkdeinit4_kded4.so
kded(74472) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1. 
kdeinit4: preparing to launch /usr/local/kde4/lib/libkdeinit4_kbuildsycoca4.so
kbuildsycoca4(74475) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1. 
kbuildsycoca4 running...
kdeinit4: preparing to launch /usr/local/kde4/lib/libkdeinit4_kconf_update.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kmail(74464)/libakonadi Akonadi::ServerManager::start: Unable to execute akonadi_control, falling back to D-Bus auto-launch 
kmail(74464) main: Unable to start Akonadi server, exit application 
kmail(74464)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
<unknown program name>(74457)/: Communication problem with  "kmail" , it probably crashed. 
Error message was:  "org.freedesktop.DBus.Error.ServiceUnknown" : " "The name org.kde.kmail was not provided by any .service files" "
or to start it with a hint I found on the internet.

Code:
 ssh -X fred@10.1.1.1  'dbus-launch /usr/local/kde4/bin/kmail'
Password:
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
kmail(74492) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1. 
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
"/usr/local/kde4/bin/kmail(74492)" Error in thread 763367744 : "org.freedesktop.DBus.Error.ServiceUnknown - The name 
org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/local/kde4/bin/kmail(74492)" Error in thread 763367744 : "QLocalSocket::connectToServer: Invalid name"
"/usr/local/kde4/bin/kmail(74492)" Error in thread 763367744 : "org.freedesktop.DBus.Error.ServiceUnknown - The name 
org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/local/kde4/bin/kmail(74492)" Error in thread 763367744 : "QLocalSocket::connectToServer: Invalid name"
"/usr/local/kde4/bin/kmail(74492)" Error in thread 763367744 : "org.freedesktop.DBus.Error.ServiceUnknown - The name 
org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/local/kde4/bin/kmail(74492)" Error in thread 763367744 : "QLocalSocket::connectToServer: Invalid name"
kdeinit4: preparing to launch /usr/local/kde4/lib/libkdeinit4_klauncher.so
klauncher(74495) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1. 
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit4: preparing to launch /usr/local/kde4/lib/libkdeinit4_kded4.so
kded(74497) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1. 
kdeinit4: preparing to launch /usr/local/kde4/lib/libkdeinit4_kbuildsycoca4.so
kbuildsycoca4(74498) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1. 
kbuildsycoca4 running...
kdeinit4: preparing to launch /usr/local/kde4/lib/libkdeinit4_kconf_update.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kmail(74492)/libakonadi Akonadi::ServerManager::start: Unable to execute akonadi_control, falling back to D-Bus auto-launch 
kmail(74492) main: Unable to start Akonadi server, exit application 
kmail(74492)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
<unknown program name>(74486)/: Communication problem with  "kmail" , it probably crashed. 
Error message was:  "org.freedesktop.DBus.Error.ServiceUnknown" : " "The name org.kde.kmail was not provided by any .service files" "

Last edited by DutchDaemon; January 21st, 2011 at 13:59. Reason: proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #4  
Old January 21st, 2011, 10:57
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,852
Thanks: 48
Thanked 2,061 Times in 1,890 Posts
Default

Try starting a "simple" program like xterm first. When that works move on to the other things. The errors indicate a few other issues but we need to make sure the X forwarding at least works.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #5  
Old January 21st, 2011, 20:52
Doug Doug is offline
Junior Member
 
Join Date: Aug 2009
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Howdy

Yep I have managed to get xcalc up and running using the ssh method but not the xhost method.

Using ssh method I run theis command on 10.1.1.77 laptop
ssh fred@10.1.1.1 xcalc

Xcalc starts and I can telnet to the 10.1.1.1 desktop and to a ps command to confirm xcalc is running there but displaying on 10.1.1.77

To try and use the other method - which is the prefered method and it may circumvent all the other errors I experience with the ssh method as I know the apps run locally and I just want them to display on the other machine.

On the 10.1.1.1 desktop
Code:
$ xcalc &
$ Error: Can't open display: 10.1.1.77:0:0

Last edited by DutchDaemon; January 22nd, 2011 at 01:47.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] I want move big files from FreeBSD box to Linux Box with USB flash mfaridi General 4 January 4th, 2011 15:07
[Solved] Virtual Box 4.0 FreeBSD 9 el_report Porting New Software 6 December 26th, 2010 12:17
[Solved] cannot remotely log in after pulling FreeBSD source to /usr/src via sysinstall shva General 5 October 3rd, 2010 11:56
FreeBSD 7.1 on Virtual Box 2.2.0 sbattu Howtos & FAQs (Moderated) 1 November 16th, 2009 07:32
Layer 2 Apps under FreeBSD overmind Networking 11 September 28th, 2009 16:49


All times are GMT +1. The time now is 19:45.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0