LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 06-18-2005, 11:47 PM   #1
colincannon
LQ Newbie
 
Registered: Jun 2005
Location: Louisville, KY
Distribution: Debian Woody
Posts: 12

Rep: Reputation: 0
new to this stuff


I just installed debian on an older computer that I had that had Windows on it. I guess I am still confused about what to expect from linux. I followed installation instructions on aboutdebian.com and they recommend to not use a gui and to stick with the command line interface. I started a gui (kind of) by typing startx at the command prompt. I think it was gnome? Is that the standard gui for linux?

The big question I have is what do I do if i want to use a windowed application in linux. can I start it from the command interface or do I have to start the gui first. For instance, when I am in the command line interface where you can type commands like "whoami" can I type a command to load up a program (maybe a graphical game of chess) or do I have to have the gui going?

Oh, and what exactly is x-windows?

I appreciate any help.
 
Old 06-19-2005, 12:31 AM   #2
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
ok here you go. linux is a kernel, or a group of "drivers" that talk to the hardware with your inputs.
X is the window system that is run ontop of linux to give you an interface to the applications. most of the programs you use under linux you will want to have x running and they will be x window apps. you will find out real quick if you can run the app from only command line (i.e. no x server running) cause it will say something like "unable to connect to x server" or "no server found". to ask if gnome is the standard gui for linux, no. there is no real standard. some perfer kde over gnome, some gnome over kde. others, like me, perfer the more minimal "window managers" like fluxbox, blackbox, and my favorite enlightenment. see, kde and gnome are considered "desktop environments" cause the have thier own configuration utilitys and other things. they are generally bigger and take longer to load. they are usually not as stable, but they do provide an easier interface to settings and configurations. you should check out
http://xwinman.org/intro.php
and
http://xwinman.org/

you can start programs from the command line in linux from inside of xwindows and see more verbosity if you are trying to debug. also linux has several consoles. when you boot, and are just in a command line interface, or console, press ctrl+alt and F2. this will switch you to another tty. you can log in here also. you can push ctrl+alt and F3 F4 F5 F6. when you actually start the x server, it usually runs on tty7. so when you issue startx press ctrl+alt F1 and you will get to your terminal but you will leave the x server console. the xserver will still be running though. then push ctrl alt F7 to get back to the X window system. pretty cool huh. also.. very seldom does linux freeze. this isnt to say that X wont freeze. it happens all the time. you dont have to ctrl alt del though and reboot. just hit ctrl alt backspace. this will kill the xserver and put you back on console 1. you can then enter startx again. then you will reload the xserver and not have to reboot. sometimes you may have to actually ctrl alt delete, but usually this will help alot.

hope i cleared up some of the confusion.
 
Old 06-19-2005, 01:08 AM   #3
colincannon
LQ Newbie
 
Registered: Jun 2005
Location: Louisville, KY
Distribution: Debian Woody
Posts: 12

Original Poster
Rep: Reputation: 0
First off, thanks a ton for the help. I checked out the links you provided. I started switching between tty which was very handy. I have a few more questions.

Is there any difference between the first 6 ttys?

I noticed that x-windows is referred to as a window manager and gnome is referred to as a desktop. Does this mean that gnome is the same type of thing as xwindows or does it require xwindows. From what you said before I guess I could use enlightenment instead of gnome. Can I use both on the same system?

When I type in startx is that telling linux to start xwindows and then it automatically starts gnome? If so can I tell it to start enlightenment or some other windows manger?
 
Old 06-19-2005, 01:56 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
X isn't a window manager, it's an X server. Basically, an X server provides very basic graphical utilities. So basic, in fact, as to be more or less completely worthless without a window manager running on top of it. Gnome is a desktop environment, which is (more or less) a window manager and a bunch of applications working together to create a mac or Windows like GUI. So yes, Gnome does depend on X to do its things.

The X server will start up anything you tell it to. You can create a file called .xinitrc (note the leading dot) in your home directory to give X a list of commands to start when it starts X. Usually it's just the command to start up your window manager or desktop environnebt. If you don't have a .xinitrc, the system default (usually /etc/X11/xinitrc) is used.
 
Old 06-19-2005, 02:16 AM   #5
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
not really a difference in the first 6 just gives you flexibility to have some terminals open, like if you are using a text editor in one and configuring the kernel in another, and maybe using links2 in another. they just use the 7th one for x cause that leaves you the first few. it is the mid point.

x-windows isnt a window manager. if you type X instead of startx at the command prompt you will see what x-windows system is. there is no window manager or desktop environment running. just X window system running. it is a program, but needs another program, like gnome, or enlightenment, to actually show windows and run commands, that is where the window manager comes into play. so i guess you could say that gnome requires x-window to be running. but you dont know that cause your .xinitrc file tells what starts when you start x. basically when you login say as bob, then you startx as bob, the x window system looks for a file called .xinitrc in your home directory and runs it. in the .xinitrc you will see that it is starting gnome. you can change this but you would have to know what you are wanting to run. you can also make some simple scripts and this would actually help you understand X and window managers. here is an example script for fluxbox, i called it startflux. follow these commands:

su
password
cd /
pico startflux
#inside of the window you get, create this file, with the same format as i am putting here.

X &
sleep 5
DISPLAY=localhost:0 fluxbox

# then push ctrl+o to write it out and save it. then ctrl+x to exit the editor.
# then you have to make it executable so run this:
chmod 755 /startflux
#then exit the superuser with:
exit

now you should be at the $ prompt of your user and if you run:
ls /
# you will see your root directory, with usually in green a file called startflux*
# now if you run
/startflux
# it will start the x-window system (X) and then it will wait for 5 (sleep 5) then it will
#start fluxbox on DISPLAY0:0 (DISPLAY=localhost:0)
#pretty cool huh, to exit you can exit fluxbox, but you wont get out of X, cause flux
#cant kill the server cause it wasnt started from the xinit file, so you will have to push
#ctrl+alt+backspace to kill the server.

also if the pico command didnt work, try nano, or mcedit. these are all editors that are easy to use. give it a shot.
 
Old 06-22-2005, 07:00 PM   #6
colincannon
LQ Newbie
 
Registered: Jun 2005
Location: Louisville, KY
Distribution: Debian Woody
Posts: 12

Original Poster
Rep: Reputation: 0
I was going to try to write a command like you showed in the .initrc file but I could not find the file. the only thing that my home directory has in it was a folder for a user. Am I just looking in the wrong place? Is there a command that allows me to search for a file, like .initrc?
 
Old 06-22-2005, 10:28 PM   #7
Bluenoser
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada
Distribution: Ubuntu 8.04 LTS
Posts: 138

Rep: Reputation: 15
Here's a tip, if a file begins with a dot, it makes it a hidden file. You can type ls -a to show a list of files including files with the dot such as .xinitrc
 
Old 06-23-2005, 12:42 AM   #8
colincannon
LQ Newbie
 
Registered: Jun 2005
Location: Louisville, KY
Distribution: Debian Woody
Posts: 12

Original Poster
Rep: Reputation: 0
thanks for the ls -a tip, but I still can't find that .initrc file, anybody know how I can find it?
 
Old 06-23-2005, 01:44 AM   #9
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
well, it is .xinitrc and it might not be there. just make one. it isnt a big deal here is mine for reference:

exec /usr/local/enlightenment/bin/enlightenment

you like that huh. that is all it takes. just make a file (with pico, nano, vim, gedit, kwrite, whatever) and name it .xinitrc and have the path to your window manager that you want. you dont even have to have a path like i do... taht was just for enlightenment.

exec startkde

should work fine if you want to startkde.. you have to make the file executable before the file will work, so after you save it:

su
password
chmod 755 /home/whoever-you-login-as/.xinitrc
exit

then it should work.
 
Old 06-23-2005, 01:49 AM   #10
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
as for the file i was talking about creating earlier you dont need to make the .xinitrc file. just name the file buggar if you want and have inside the file

X &
sleep 5
DISPLAY=localhost:0 startkde

then save the file and chmod 755 it and then just make sure you put the path to it in the command prompt.. and it will load x and the window manager you want. just try it. i have about 10 of them in my / directory so that i can start any window manager i want. like fluxbox, blackbox, enlightenment, e17, afterstep, whatever i want.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
When installing new stuff in suse 9.1, do you uninstall old stuff first? randon SUSE / openSUSE 1 12-25-2004 05:37 PM
Where did all my stuff go?? spaztik Linux - Newbie 7 02-06-2004 10:18 AM
RC.D Stuff gr33ndata Linux - Newbie 2 11-01-2003 08:08 PM
stuff you need for it to be....right Underworld Linux - General 1 10-18-2003 09:23 PM
Stuff beatman Linux - Software 6 08-03-2003 02:07 PM

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

All times are GMT -5. The time now is 03:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration