[solved] run cdevtools.pnd from remote computer


sle85276

Member
Joined
Aug 25, 2012
Messages
42
Hello,


I like to run the cdevtools.pnd from remote computer (tunneling X over ssh), in this case my desktop PC. Until now i managed to start some normal X programs like xfce4-about from my desktop, but running the pnd fails like below



Code:
$ /bin/bash /usr/pandora/scripts/pnd_run.sh -p /media/Develop/pandora/menu/cdevtools.pnd -e start.sh -b cdevtools1000

Mount the PND [SUCCESS]

Starting the application (start.sh )X11 connection rejected because of wrong authentication.

X11 connection rejected because of wrong authentication.

Starting the application (start.sh ) [ FAILED]

Restoring the frame buffer status [SUCCESS]

uMount the PND [SUCCESS]



Digging into start.sh i found the call to /usr/bin/terminal, which causes to

my limited understanding the problem. If i run terminal program directly from the error below:





Code:
$ /usr/bin/terminal

X11 connection rejected because of wrong authentication.

(terminal:2478): Terminal-DEBUG: D-Bus reply error: /usr/bin/dbus-launch terminated abnormally with the following error: X connection to localhost:10.0 broken (explicit kill or server shutdown).

(dbus-glib-error-quark: 23)

X11 connection rejected because of wrong authentication.

The application 'terminal' lost its connection to the display localhost:10.0;

most likely the X server was shut down or you killed/destroyed

the application.


Does anyone know how to solve this problem?


Thank you for your answers
 
Last edited by a moderator:
I made a small test using "ssh -Y <username>@<pandora_ip>".


Running "mousepad" worked.


Running the cdevtools.pnd did not work (same error as for you)


Running "terminal" works for me.


I found a way to run cdevtools, however something is a bit different: When I normally run the pnd, I am asked for the root-password because some sudo-command is executed from the script ".cdevrc". When I do the following this is not the case. I didn't try to compile anything with it, but maybe everything works like it should:



Code:
pnd_run.sh -p /media/trans8/pandora/menu/cdevtools.pnd -b cdevtools -m

cd /mnt/utmp/cdevtools/

./start.sh

pnd_run.sh -p /media/trans8/pandora/menu/cdevtools.pnd -b cdevtools -u


You could also copy the content of /mnt/utemp/cdevtools into some directory on your sdcard, then you could run it without the need of manually mounting the pnd.


I think the source of the problem is that the pnd-run-mechanism changes some environment-settings (like the HOME-directory) and because of this the authentication fails. Alas I have no more precise knowledge on this topic. So I don't know how to change this.


It's up to you to try the above work-around. I can't guarantee that it works completely or hasn't got some negative side-effects. Maybe there is an easy and better solution.
 
Thank you Lomaxx, this is the important piece of information, that helped me fixing my problem:

I think the source of the problem is that the pnd-run-mechanism changes some environment-settings (like the HOME-directory) and because of this the authentication fails.
The pnd changes the environment variable HOME to /mnt/utmp/cdevtools1000 . The way to get it going is:


Connect to the pandora with the command "ssh -X <username>@<pandora_ip>" (no idea what the difference between -X and -Y, but only -X works for me.



Code:
$ export XAUTHORITY=`/bin/pwd`/.Xauthority

$ /bin/bash /usr/pandora/scripts/pnd_run.sh -p /media/Develop/pandora/menu/cdevtools.pnd -e start.sh -b cdevtools1000

Than you get a new xterm on the (remote) screen and are prompted for the password.
 
Hi.


Glad you got this sorted out (I saw your question yesterday but had to go to work).


Anyways, an alternative way to do it (just with a terminal, no X):



Code:
ssh <user>@<ip>

/usr/pandora/pnd_run -p /media/pndapps/pandora/menu/cdevtools.pnd -m -b cdevtools1000

cd /mnt/utmp/cdevtools1000/

bash --rcfile .cdevrc
 
I read about "-Y" in some thread while searching for a solution for your problem. Man-page says:

-X Enables X11 forwarding. This can also be specified on a per-host


basis in a configuration file.


X11 forwarding should be enabled with caution. Users with the


ability to bypass file permissions on the remote host (for the


user's X authorization database) can access the local X11 display


through the forwarded connection. An attacker may then be able


to perform activities such as keystroke monitoring.


For this reason, X11 forwarding is subjected to X11 SECURITY


extension restrictions by default. Please refer to the ssh -Y


option and the ForwardX11Trusted directive in ssh_config(5) for


more information.


-x Disables X11 forwarding.


-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not


subjected to the X11 SECURITY extension controls.

The thread where i read about it was about solving authentication problems and one of the mentioned solutions was to delete the ~/.Xauthority-file, which will be created automatically again. Another side i stumbled across, which might be useful if you got problems with it, was http://www.cyberciti...authentication/


I noted now two times, that you run "pnd_run.sh" with it's necessary long list of parameters, so you might not know this: You can run "pnd_run" instead of "pnd_run.sh" if you just want to launch a pnd with it's standard-settings, which you obviously use. So in your case



Code:
$ export XAUTHORITY=`/bin/pwd`/.Xauthority

$ pnd_run /media/Develop/pandora/menu/cdevtools.pnd


"pnd_run.sh" is useful in cases where you want to manually (un-)mount a pnd (-m/-u) or start other scripts than the default run-scripts mentioned in the PXML.
 
Last edited by a moderator:
Oh and I forget to mention something else that might be of interest to you, if you are developing/porting for the Pandora


http://repo.openpand...app=synergy-pnd


When properly configured you can control your Pandora with your PCs mouse/keyboard. You just have to move your mousepointer to the e.g. left or right of your monitor and it will appear on your Pandora. As long as the pointer is on the Pandora you can use your PC-keyboard for typing.
 
Last edited by a moderator:
I use synergy on my Pandora, it is amazing to have full control over many workstations from one keyboard/mouse combo. Highly recommended.


Also, I use the cdevtools.pnd in a similar fashion as you, but I do this:


1. Mount CDEVTOOLS on my Pandora (using Pandora interface)


2. CDEV Shell opens, enter password (if required)


3. Leave CDEV shell open, go to PC workstation (Linux box)


4. ssh me@mypandora


5. cd /mnt/utmp/cdevtools/


6. ". ./.cdevrc"


7. From this point on, treat my Pandora like a normal Linux developer workstation (for the most part).
 
I use synergy on my Pandora, it is amazing to have full control over many workstations from one keyboard/mouse combo. Highly recommended.

Also, I use the cdevtools.pnd in a similar fashion as you, but I do this:

1. Mount CDEVTOOLS on my Pandora (using Pandora interface)

2. CDEV Shell opens, enter password (if required)

3. Leave CDEV shell open, go to PC workstation (Linux box)

4. ssh me@mypandora

5. cd /mnt/utmp/cdevtools/

6. ". ./.cdevrc"

7. From this point on, treat my Pandora like a normal Linux developer workstation (for the most part).
This is what I do too, but the step 6 errors out. I have to manually add the cdevtools /usr/bin to my shell path

also "sh ./.cdevrc" doesnt work. Cant figure out why...
 
"sh ./.cdevrc" is executing the script in a separate (sub)process. ". ./.cdevrc" reads it into the current shell session.
 
Back
Top