LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-13-2004, 10:47 PM   #46
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46

It would be very nice indeed if all people knew how to use the "vi" text editor. http://www.cis.ksu.edu/~bhoward/vi/ But in Debian you don't actually need "vi" because the basic installation of Debian comes also with another text editor, "nano", that is even nicer than "vi" because it has in-built instructions how to use it. What would you do if you hadn't used computer for some time and had forgot the basic commands of "vi"? OK, you can always type "man vi" and spend some time re-learning "vi". But, if you're in a hurry, you just need to remember the name of that other text editor in Debian, "nano", and that is enough. "nano" itself tells you how to use it.

But if you get a fancy to install some flavour of *BSD, for instance, it's good to know how to edit files with "vi" because, unlike "nano", "vi" is available in ALL Unix-like systems. So, macondo's basic tutorial on how to edit files with "vi" is very useful indeed -- even if you prefer to use "nano" after all.

Last edited by Dead Parrot; 10-23-2004 at 05:44 AM.
 
1 members found this post helpful.
Old 10-13-2004, 11:03 PM   #47
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 use vi (or vim) every single day. It's so easy, especially when you do quick editing. It doesn't take very long to get used to and I don't have to open a gui window

All you really have to know.
i - to insert text
o - to open a new line below the current one to insert text.
ESC - to get back to command mode
u - to undo
yy - to copy current line
yw - to copy current word
p - to paste after cursor
P - to paste before cursor
:w to save
:wq to save and exit
0 - to go to begnning of currenet line
$ - to go to end of current line
w - to go to next word
G - to go to end of file
1G - to go to first line in file.
ctrl+b - to bo back one screen
ctrl-f - to go forward one screen

It seems like it would be hard to learn but once you try, it is easy. And then later you learn that replacing text is much easier with a sed script

I work on a lot of servers where there is no gui and no nano, etc. So you HAVE to know vi. And it does pay to know
 
Old 10-14-2004, 08:29 AM   #48
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Original Poster
Rep: Reputation: 62
Thank you Darthtux and Dead Parrot. That was pretty good, and yet nobody has explained Nano, which is used by many people, i just wanted to cover that so newbies could start somewhere

Let's say i want to edit a file:

#nano /etc/modules

once there, do i need to change modes? if so, what's the key combo?

once the file is edited, how do i get out of there, save and exit? That's all.
 
Old 10-14-2004, 09:42 PM   #49
debian_dummy
Member
 
Registered: Apr 2004
Distribution: Debian SID and Woody
Posts: 77

Rep: Reputation: 15
2 or 3 things I would like tom see added to the Config post Install doco

"apt-get install nano" for an easy to use text editor

One thing that's missing (for me anyway) is automatic updating via cron of your Debian system a la Windows Update and then email the results of the process to another account. When installed to the hard disk Knoppix automatically does this but Debian Sarge doesn't.

"apt-get update" to refresh your packages list
"apt-get upgrade' to fetch and install new packages and security fixes

I don't know how to automate this process via a CRON job and I don't know how to send the results via email. There is thread here http://www.linuxquestions.org/questi...light=cron+apt that sort of shows how to apt-get via cron but no email notifications.

Anybody ?

Last edited by debian_dummy; 10-14-2004 at 09:55 PM.
 
Old 10-14-2004, 10:10 PM   #50
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
Quote:
Originally posted by macondo

Let's say i want to edit a file:

#nano /etc/modules

once there, do i need to change modes? if so, what's the key combo?

once the file is edited, how do i get out of there, save and exit? That's all.
Nano can be started with several options. A few are
-i autoindent
-c display cursor position at bottom of screen
-m enable mouse to select text

Nano doesn't have "modes" like vi.

Nano has its key combinations at the bottom of the screen. The ^ character stands for the control key. The most important is ^G which gives all the shorcuts and their meaning.

There are several Meta(Alt) key combinations which switch certain features on and off. To see them ^G.

To save ^O and save the file name and ^X to exit.
 
Old 10-15-2004, 01:48 AM   #51
TLV
Member
 
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
Quote:
Originally posted by debian_dummy
I don't know how to automate this process via a CRON job and I don't know how to send the results via email. There is thread here http://www.linuxquestions.org/questi...light=cron+apt that sort of shows how to apt-get via cron but no email notifications.

Anybody ?
I have a very simple backup script (basically I make a bzip2/tar-ball of some important directories that I specify) that I run weekly with cron. The script also notifies my user with an e-mail.

To get the script to run weekly (exactly what time and day doesn't matter for me) I simply place the script in /etc/cron.weekly/

The e-mail notification is in the script itself with the follwing command:

Code:
echo "blah blah blah" | mail -s "some subject" user_to_be_emailed
It shouldn't be too hard to make the updates work. Though I prefer the interactivity to select what I want to update (or not).

Hope this helps,
/TLV
 
Old 10-15-2004, 08:54 AM   #52
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Original Poster
Rep: Reputation: 62
"To save ^O and save the file name and ^X to exit."

OK, i edited a file, did:

Ctrl+O
Ctrl+X

the last command did not work, i finally closed it, and checked back and the changes were not implemented, what did i do wrong?
 
Old 10-15-2004, 09:01 AM   #53
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
When you do ^O look at the bottom of the screen. It says "File Name to Write:" . You have to name it and press ENTER. Or if you opened a file, it will put its name there and you just press ENTER. Then you press ^X. If you just pressed ^X, It said "Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES)". You have to press "Y" to get back to the File Name to Write:" to enter a file name.
 
Old 10-15-2004, 09:24 AM   #54
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Original Poster
Rep: Reputation: 62
Thanks a lot Darthtux, it worked like a charm! Learned one more thing today.
 
Old 10-16-2004, 04:31 PM   #55
peeples
Member
 
Registered: Sep 2002
Location: Wichita Falls, TX
Distribution: tried a lot of 'em, now using kubuntu
Posts: 180

Rep: Reputation: 30
Automatic updates are accomplished via the cron-apt tool.

apt-get install cron-apt

Then read the man page. Default configuration is to download only, but you CAN change this to download and install.

HTH
 
Old 10-23-2004, 10:24 AM   #56
axemanW
LQ Newbie
 
Registered: Aug 2004
Location: St. Louis, Mo.
Distribution: SuSE 9.0, Knoppix, Mandrake 10.0, Redhat 9
Posts: 11

Rep: Reputation: 0
Wow! you guys have saved me hours of and made this install much easier. Answered a lot of I didn't even know I should ask!
 
Old 10-23-2004, 02:26 PM   #57
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Original Poster
Rep: Reputation: 62
Automatic Shutdown

This is a problem that has been bugging me for a couple of years. Every time i install a distro, i can't shut it down completely, it usually works half of the time, except with Libranet, it's the only distro that shuts it down completely ALL the time.

I've spent hours (literally) searching Google and forums all over the net, the debian-user-mailing lists in english, portuguese, spanish and italian, plus, the IRC debian channels, #linuxhelp, and every geek i casually meet. The problem is my motherboard, it's an Intel 440something and the BIOS is circa 1998, it has never been flashed, i bought this box (PII 266) second hand. I have tried everything under the sun and nothing. I have used different commands to shut it down:

shutdown -h now
poweroff
halt -p

different lines on the kernel stanza in the grub/menu.lst and /etc/modules:

apm=on apm=off
apm=power-off
apm power_off=1
noapic
acpi=off

At best it would shut down 70 percent of the time.

It would just give this message at the end:

Flushing IDE devices: hda hdb hdc hdd
Power down

until now...

I suspect there is a ton of people with the same problem out there, there is no guarantee this will work for you, it worked for me, i'm a happy camper.

It was accidental, really. Last weekend i was bored. I decided to wipe the my hard drive clean and install Sarge with pre-rc2 debian-installer, i was using sid at the time.

I inserted the cd and went thru every option they had, by pressing the Fn keys, looking at everything, something i had neglected before. I knew i did not want the 2.6 kernel on my decrepit box, i wanted to make a newbie installation just to see how the other half lives; so at the boot prompt, i ended up with:

linux noapic nolapic noframebuffer (i can't remember the full string for it)

and away i went, after installing

the basics,
apmd (new trick)
icewm

i tried to shut it down, with:

#shutdown -h now

and it shut down completely the first time, no less. I tried 6 times, and it never failed. Then i installed Blackbox, it shutdown too, perfect (5 times), it's been a week now, and it hasn't let me down.

I just wanted to share this, in case there is some people in the same boat.

Edit: a week later i reinstalled (surprise) and this time installed Sarge with the kernel 2.6, no problem, so now i use kernel 2.6.8 for the first time.




Last edited by macondo; 10-25-2004 at 08:40 AM.
 
Old 10-23-2004, 04:50 PM   #58
TLV
Member
 
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
Re: Automatic Shutdown

Quote:
Originally posted by macondo
... nolapic ...
And I'm pretty sure this is the one that did it for you. "nolapic" stands for No Local Advanced Programmable Interrupt Controller. I used to have to add that parameter to my kernel to get my laptop to power down completely. These days I just do not compile "Local APIC support" into the kernel.

Not sure why it messed up the complete halt of a system.

/TLV
 
Old 10-23-2004, 07:18 PM   #59
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Original Poster
Rep: Reputation: 62
TLV said:

"And I'm pretty sure this is the one that did it for you."

Boy, i'm glad this is over.

BTW, today WindowMaker came out with its latest version 0.90.0

http://www.windowmaker.org/

Dead Parrot must be jumping up and down.

Last edited by macondo; 10-23-2004 at 07:38 PM.
 
Old 10-24-2004, 12:19 AM   #60
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Quote:
Dead Parrot must be jumping up and down.
You can count on that.

Window Maker 0.91.0 is now in unstable.

To make fonts look good you need to turn on antialiasing in WPrefs.app (select "Smooth font edges").

Last edited by Dead Parrot; 11-17-2004 at 10:58 AM.
 
  


Reply

Tags
debian, setup


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
DISCUSSION: Debian Post-Install Configuration macondo LinuxAnswers Discussion 5 12-11-2008 10:21 PM
(new to Debian) post install questions gugamare Debian 4 11-01-2005 09:01 AM
debian ugly post-install ssaady Debian 4 10-27-2005 06:02 AM
FC3 installation fails at post install configuration stage grstaker Fedora - Installation 8 06-20-2005 10:43 AM
RedHat 7.3 post install configuration LOCKS UP sput Linux - Distributions 7 07-19-2002 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:14 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