Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to open netbeans as a different user, but isn't working. I'm running a Kubuntu 12.04 LTS with KDE.

And I tried the following: Open a terminal, type su - myotheruser, type the myotheruser password. Then tried to open netbeans: /opt/netbeans/7.3/bin/netbeans (netbeans is installed on /opt/netbeans/7.3).

I got the following:

Erro: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.

I tried some commands like export DISPLAY=":0.0", xhost +, xhost +local:all and other commands related here and here. None worked.

Is important to me that myother user not be in the sudoers file.

If I end the session with mycurrentuser and logon with the myotheruser I can easily open netbeans.

I need open netbeans as myotheruser because I would like to work on a project that belongs to this user and just to it. If I changes permissions, looks like when I versionnig the project the user will loose the exclusivity.

So, how can I solve this? How can I open netbeans as a different user inside of another user display?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You could always try the following:

ssh -Y otheruser@localhost "/opt/netbeans/7.3/bin/netbeans"

:)

share|improve this answer
    
Thx a lot, works @tink. –  GarouDan May 5 '13 at 23:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.