LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-18-2019, 03:59 PM   #1
ulrich11
LQ Newbie
 
Registered: May 2019
Posts: 2

Rep: Reputation: Disabled
How does rdesktop set the DISPLAY variable?


I connect from UBUNTU on a PC to two raspbery pi computers via rdesktop, not both at the same time, say to rasp1 and rasp2.
In the remote desktop I open a terminal and issue "echo $DISPLAY".
On rasp1 I get :10.0 and can start programs that use a GUI, e.g., gparted.
On rasp2 I get :0.0 and trying to start gparted I get "cannot open display: :0.0". However, "DISPLAY=:10.0 gparted" works fine.

So the question: why sets rdesktop the DISPLAY variable sometimes, sometimes not. Where comes :10.0 from?

rasp1 and rasp2 run the same OS: ubuntu mate.

Thanks for enlightenment,

ulrich
 
Old 05-20-2019, 01:35 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
Hi (and welcome here).
At first, it is not the desktop which sets the variable DISPLAY.
When you start the graphical environment (this is usually the startx command) you may need to specify the DISPLAY you use. The usual default is :0 (or :0.0).
When you log in (connect) from a remote host (using ssh, rdesktop or something similar) you will get a virtual DISPLAY which is valid during the given remote session. :10 is usually connected to :0 (usually 10 is added to the original DISPLAY).
when you make a remote connection you can specify if you want to use DISPLAY or not (therefore you can configure if you want to set DISPLAY at all).


https://support.objectplanet.com/esu...kbarticleid=17
https://unix.stackexchange.com/quest...t-is-display-0
https://askubuntu.com/questions/4322...nment-variable
 
Old 05-20-2019, 03:38 AM   #3
ulrich11
LQ Newbie
 
Registered: May 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
I still do not understand why connecting to two - as far as I know - identical target hosts gives different results.
I looked at /etc/alternatives/vncserver on both machines: they are identical. The same holds for /etc/X11/Xsession.
Something must be different, but what?
 
  


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
[SOLVED] set variable based on another variable - shell script ceantuco Linux - Newbie 8 03-14-2018 02:17 PM
AWK a variable Ouptut to a new variable and using the new variable with the old one alertroshannow Linux - Newbie 4 02-16-2009 12:08 AM
how to set a variable in a script and have the variable still set after script termin john test Linux - Newbie 9 10-21-2008 05:21 PM
X_CreateColormap error rdesktop, xlock on 3 head nvidia display wolfgang0524 Linux - Software 1 07-09-2007 04:34 PM
rdesktop on second display dylan912 Linux - Desktop 6 04-14-2007 02:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:13 PM.

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