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 :study: |
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 |
Code:
I like you information. Great job :) It's always good when people share what they learn. 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 |
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. |
Quote:
I would think about your recomendation. Thanks |
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" Code:
Section "ServerLayout" 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" Code:
Section "ServerLayout" So now we are ready to start a new X session with a 800x600 resolution Code:
X :1 -layout web Code:
startx -- :1 -layout web Hope this is helpful for someone else. Greetings |
All times are GMT -5. The time now is 06:34 AM. |