You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, July 16th 2006, 9:22pm

DCOP over SSH annoyance

So I have a server running a few applications under the user binky. If I approach the server and open a terminal and run dcop from the command-line, everything works fine.

However, if I ssh to binky@server and run dcop, I get "ERROR: Couldn't attach to DCOP server!" On the other hand, if I run "dcop --user binky" everything works fine.

It's a minor annoyance, but shouldn't dcop be connecting to binky's server by default, since I'm logged in as him? Any advice on this front?

This post has been edited 1 times, last edit by "itakeumbrage" (Jul 16th 2006, 9:22pm)


GotenXiao

Beginner

Posts: 5

Location: England

  • Send private message

2

Monday, July 17th 2006, 6:53pm

I had something like this when setting up a cron'd DCOP message. You'll need to use dcop --user [user], possibly even dcop --user [user] --session [session]. Check dcop --help for better information :P

3

Wednesday, July 26th 2006, 3:58pm

RE: DCOP over SSH annoyance

I have the same problem, but I did not even think of the --user option, instead, I use what makes all my x programs work over ssh. I did this:

export DISPLAY=':0'

I set it in a function in ~/.bashrc. It's quite helpful and helps for running things on the computer which you don't want forewarded to your computer.

If you want, try this:

on the computer that you are running dcop on:

Source code

1
2
3
4
5
tee -a ~/.bashrc <<eof
function makexwork {
    export DISPLAY=':0'
}
eof


Then, afterwards, just type

Source code

1
makexwork
to make dcop and other various programs work for the remainder of the session.

This post has been edited 1 times, last edit by "SeanTater" (Jul 26th 2006, 3:59pm)


GotenXiao

Beginner

Posts: 5

Location: England

  • Send private message

4

Wednesday, July 26th 2006, 8:30pm

The only problem with this solution is if you're running multiple X servers, since you'll need to change DISPLAY appropriately.

You may want to investigate using ssh -X, which enables X11 forwarding and probably achieves what you're after. I wouldn't know, since I haven't done testing of my own, but I think doing some quick Googling will result in much more information than that available in man ssh ;)