Jump to content

Newbie: $Display - what is this? - Also what book?


Guest francis
 Share

Recommended Posts

Guest francis

Newbie question- Try to install some software packages and have seen a few times a response on the console something like " cannot get screen information" and mention of "$DISPLAY". Is this some sort of setup file or variable that I don't know about?

I'm starting to understand how Linux works but it's a slow proces after 20 years with Windows/Dos, so be gentle with me.

 

Also need an understandable guide to Linux book- tried a few so far eg "Idiot's Guide" and "Linux in Easy Steps" but they tell you how to use Gimp or similar but little on how the system works e.g the filesystem, and basic things e.g how to become logged in as root- till I discovered "SU" this was a major problem and caused much grief. How can I configure hardware?- I have a wireless dongle which I can apparently configure easily but is not supported with a proper driver - BUT HOW DO I DO IT? - that sort of question. How do I get to see the documentation with Mandriva Free DVD version- is there any? When I use the help all I keep getting is "there is no help available" or similar.

Link to comment
Share on other sites

Welcome to the board. :) Have you set up your software sources?

 

If you need to set them up for Mandriva 2007, open the Mandriva Control Centre, and go to the Software Management tab. Click the link titled 'Select from where software packages are downloaded when updating the system'. Click 'yes' when asked if it is OK to continue. Now click the 'Add...' button on the right hand side of the new screen. When asked whether to add 'Official updates' or 'Distribution sources', click 'Distribution sources'. Click 'Yes' in reply to the question about the mirror list. When the mirror list appears, choose a mirror close to your geographical location. Wait for the process to complete.

 

For earlier distributions, use the Easy URPMI link at the top of this page (or http://easyurpmi.zarb.org/, it's a bit tidier).

 

To install documentation, use the 'Look at installable software' option in Software Management. Search for packages containing 'mandriva-doc' for distro-related stuff, and 'rute' for a general Linux manual. Once you've installed them, the documentation should appear on your menu under More Applications.

Link to comment
Share on other sites

Newbie question- Try to install some software packages and have seen a few times a response on the console something like " cannot get screen information" and mention of "$DISPLAY". Is this some sort of setup file or variable that I don't know about?

I'm starting to understand how Linux works but it's a slow proces after 20 years with Windows/Dos, so be gentle with me.

We are experts at being gentle :D Welcome to the board :D

$DISPLAY is what is called an environmental variable...

You can set it easily in a bash shell by

export DISPLAY = localhost:0.0

 

export is a short cut, typing man export will explain...

DISPLAY is the env var...

localhost:0.0 is the "screen" in X... You can have more than one screen independently or you can merge 2 screens.. this is maybe advanced so Ill skip for now.. but :0.0 is the first on the first xserver and :0.1 the second etc. whereas 1:0 is the first on the second xserver... on a PC normally you will never need the second and third xservers... so relax about thatr for now.

 

Back to DISPLAY.... this tells X where to display the window its about to create... say you have 1 xserver and two independent screens ... you have a console on :0.0 if you type xterm then unless DISPLAY is set it won't know where... its left unset by default for security reasons...

now if you type

export DISPLAY = localhost:0.0 it knows where to display... (localhost is inferred if left out)

If you own the desktop (your logged in as you) and just do this a xterm console will start (give it a try)

 

IF you say su to root then typ eit root doesn't own the desktop (despite being root) and it will complain about permissions .. you use xhost (type man again) to give/take permissions... the simplest xhost + will allow anyone from anywhere to open that xterm... you can control the machine and user (see man)

 

Now why does X need this... well you could log into my machine right now (given a name/password and me opening the firewall) and type

export DISPLAY = <yourIP>:0.0 then type xterm and WOW... it opens on YOUR screen...

if from this console you type another prog then that inherits the DISPLAY do it will also open on your machine...

 

More on su

If you type su alone it takes you to the root account... su <username> will open a terminal as that user... if you are root then no password is needed... if not it is...

HOWEVER su - or su - <user> does the same but runs the login stuff... for the normal bash shell this is .bashrc etc. (man .bashrc)

This means you can set the DISPLAY (or any other variable) and if you use the - switch it will be set automatically .. and you can still not run it by missing out the -

 

Also need an understandable guide to Linux book- tried a few so far eg "Idiot's Guide" and "Linux in Easy Steps" but they tell you how to use Gimp or similar but little on how the system works e.g the filesystem, and basic things e.g how to become logged in as root- till I discovered "SU" this was a major problem and caused much grief. How can I configure hardware?- I have a wireless dongle which I can apparently configure easily but is not supported with a proper driver - BUT HOW DO I DO IT? - that sort of question. How do I get to see the documentation with Mandriva Free DVD version- is there any? When I use the help all I keep getting is "there is no help available" or similar.

See the post above but also

the man pages and info pages are a bit techy but in reality everything in linux is straightforwards... you just need to wrap your head round the terms... and demistify them...

 

googleing a command will usually give you lots of info and you can always ask here... no question is considered stupid.

Most of the best linux resources are actually FREE.... in most cases commercial books are either copies or just tell you how to use Gimp etc. as you found out....

O Reilly is an excellent series though (although largely most of the stuff is available for free) they compile it well and index it thus making it worth the $$ ....IMHO...

 

rute is excellent :D as are many of the howto's at the LDP... again its a mindshift paradigm... it takes some getting used to to realise the FREE documentation is usually the definitive one!

Link to comment
Share on other sites

One book which I have used that explains concepts rather than clik here/select that is 'Linux System Administration' from Marcel Gagne. He has his own website which gives some background. Drawback of the book is that it was written in 2002 (kernel 2.4, gnome at 1.x level), but the basic concepts were still the same. I still use it for checking some stuff.

 

I have also looked at his later book 'Moving to Linux' which has same refreshing style, but is more of the click here/how to use that program.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...