Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
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
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.
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?
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.
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:
#inside of the window you get, create this file, with the same format as i am putting here.
# 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:
now you should be at the $ prompt of your user and if you run:
# you will see your root directory, with usually in green a file called startflux*
# now if you run
# 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.
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?
well, it is .xinitrc and it might not be there. just make one. it isnt a big deal here is mine for reference:
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.
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:
chmod 755 /home/whoever-you-login-as/.xinitrc
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
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.