LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-30-2004, 11:51 PM   #1
el_pajaro!
Member
 
Registered: Sep 2003
Location: Ecuador
Distribution: Debian, Ubuntu, Elastix
Posts: 183

Rep: Reputation: 30
Playing with X


I just want to share with everyone what I just learn today. Playing with X could be so fun and you can understand what a Window Managaer, just try this.

You can have multiple graphical consoles with Linux. So try This:

# X :1 &

This is the most basic way to start X graphical server. You would only see a mouse cursor on the window.

Note :1 means that X would open on ctl+alt+f8 terminal. You can use number between 0 - 5, 0 is the default and might be the one you are using now. You can switch between graphical enviroments by just typing: ctrl+alt+f7 or ctrl+alt+f8 up to ctrl+alt+f12. So after typing the next command you woultd have to type ctl+alt+f7 to get back here.

OPENING AN APLICATION

The next command would set de DISPLAY variable to: 1 The :1 means that the gui programs would open on that graphical console. 1 for ctrl+alt+f7 .

# export DISPLAY=:1

Now lets open a simple aplication. (Remeber ctl+alt+f7 to get back here)

# xeyes &

So your computer now have two eyes cool!!! Now lets run a more usefull aplication. How about a console so you can write the commands on your other X server session. So open your favorite session termniat. It might be one of this: (just type one)
# xterm &
# konsoloe &

Note that we use & so you can still type commands on the same terminal.
Now go to the other graphical terminal ctl+alt+f8:

What happend? you now have a terminal, but you can not move it, resize it. That is because you don't have a Window Manager. So try using one. Posible options are:
http://xwinman.org/

I would use metacity
#metacity &

So that is what a Window Manager is. You can move the windows make it bigger or smaller. Now try to open a browser. So you can browse the web in you light weight Desktop. Type your favorite browser:

#firefox &

Try to open a panel, so you can manage your windows easier: (Only if you use XFCE as your desktop)

# xfce4-panel &

If you don't use XFCE try the panel of your desktop enviroment.

Have fun!!!!!!
And learn Linux

Last edited by el_pajaro!; 12-09-2004 at 07:13 PM.
 
Old 10-01-2004, 03:08 AM   #2
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
I like you information. Great job It's always good when people share what they learn.

I would just like to add:
startx -- :1
will start another normal X session which is accessible with ctrl+alt+F8
 
Old 10-01-2004, 10:50 AM   #3
el_pajaro!
Member
 
Registered: Sep 2003
Location: Ecuador
Distribution: Debian, Ubuntu, Elastix
Posts: 183

Original Poster
Rep: Reputation: 30
Code:
I like you information. Great job :) It's always good when people share what they learn.
It si great, that is what Linux is about. Helping each other. Now that I know more than before I would like people to learn too.

But I have question for you or for anybody that reads this thread. Is there a way to start a second session of X with an specific resolution. For example I work developing website. I usually work with a resolution if 1024*720. I would like to start a second instance of X so that I can test my websites at 800*600.

Thanks
 
Old 10-01-2004, 02:27 PM   #4
Ikebo
Member
 
Registered: Jun 2004
Location: Michigan, USA
Distribution: Ubuntu
Posts: 77

Rep: Reputation: 15
What is the difference between specifying 'X :0 &' and 'X :0.0 &' ? I notice that using 'startx' uses 0.0 rather than 0, is there a significant difference between the two?

As for your question I'm afriad I don't have a very helpful answer besides maybe creating two configuration files that have the different resolutions specifed and writing a script to copy over one or the other and then start the appropriate X session.
 
Old 10-01-2004, 02:34 PM   #5
el_pajaro!
Member
 
Registered: Sep 2003
Location: Ecuador
Distribution: Debian, Ubuntu, Elastix
Posts: 183

Original Poster
Rep: Reputation: 30
Quote:
What is the difference between specifying 'X :0 &' and 'X :0.0 &' ? I notice that using 'startx' uses 0.0 rather than 0, is there a significant difference between the two?
If you hava a graphic card that only supports one monitor there is no difference. But if your graphic card support more than one monitor you can specify witch monitor with the second number. Ej: X :0.0 would open on the first monitor and X :0.1 would open on the second monitor.

I would think about your recomendation. Thanks
 
Old 10-06-2004, 12:00 PM   #6
el_pajaro!
Member
 
Registered: Sep 2003
Location: Ecuador
Distribution: Debian, Ubuntu, Elastix
Posts: 183

Original Poster
Rep: Reputation: 30
Thumbs up Start second sesion of X with different resolution

I did it with a help of a friend:

Here is the how to:

I had to edit my XF86Config-4 file at /etx/X11/XF86Config. The default config had this two sections:

The screen section that has de different options of resolution and color depth for an X session. This are insede the subsection display. (This is my Mandrake default)
Code:
Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"
    DefaultColorDepth 24
    
    Subsection "Display"
        Depth 8
        Virtual 1024 768
    EndSubsection
    
    Subsection "Display"
        Depth 15
        Virtual 1024 768
    EndSubsection
    
    Subsection "Display"
        Depth 16
        Virtual 1024 768
    EndSubsection
    
    Subsection "Display"
        Depth 24
        Virtual 1024 768
    EndSubsection
EndSection
and: The Server Layout section witch is the one that selects the screen to display

Code:
Section "ServerLayout"
    Identifier "layout1"
    InputDevice "Keyboard1" "CoreKeyboard"
    InputDevice "Mouse1" "CorePointer"
    Screen "screen1"
EndSection
So if in a ServerLayout section I had Screen define as "screen1", it would be using the screen section define with the identifer screen.

So to have a diferent layout I had to create a new screen subsection with a different layout and a new ServerLayout. So this is what I add:

Code:
Section "Screen"
        Identifier "web"
        Device "device1"
        Monitor "monitor1"
        DefaultDepth 24        
	        Subsection "Display"
                Depth 24
                Modes "800x600"
        EndSubSection
EndSection
and:

Code:
Section "ServerLayout"
        Identifier	 "web"
        Screen		 "web"
        InputDevice	 "Keyboard1" "CoreKeyboard"
        InputDevice	 "Mouse1" "CorePointer"
EndSection
Note that I name the ServerLayout with and Identifier "web". The Screen is also set to "web" because the Screen section has an identifier web. The name web is the name I choose because I would use it to test websites. You can have any name you want. The only important thing is that Screen name in the ServerLayout Section is equal to the Screen Identifier in the Screen Section.
So now we are ready to start a new X session with a 800x600 resolution
Code:
X :1 -layout web
or
Code:
startx -- :1 -layout web
Note that we use web as a layout. That is because the ServerLayout section has the identifier set to web.

Hope this is helpful for someone else.

Greetings
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
playing mp3's.. agryan Linux - Newbie 4 06-03-2005 12:41 AM
Totem playing off of network, Xine playing local iammike Ubuntu 0 04-30-2005 11:43 AM
playing music blacktattoo Linux - Newbie 6 01-26-2005 11:27 PM
playing new dvds? riddlebox80 Linux - Software 3 04-17-2003 07:32 PM
playing with html emetib Linux - General 5 04-06-2003 10:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:27 AM.

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