LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-23-2006, 06:38 AM   #1
AZaraT
LQ Newbie
 
Registered: Jun 2006
Posts: 16

Rep: Reputation: 0
schedule hibernate


Hey there

Im using ubuntu server and i wonna set it on hibernate lets say for 4hours every week(so it start up again after the 4 hours) at a specific time, I'm pretty sure it's possible, but im a noob, so I didn't figured it out.

As said im a linux noob so a would be awesome if someone could explain it detailed how i do.

And allso, i decided to install X, but i wonna startup in console mode, how do I do that ?

Hope someone can help
Cheers
AzaraT
 
Old 11-23-2006, 12:22 PM   #2
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Rep: Reputation: 15
Quote:
And allso, i decided to install X, but i wonna startup in console mode, how do I do that ?
This depends on the distribution you're using, but there's a file, /etc/inittab, that you'll need to edit (in superuser mode.) so that your box won't automatically put you in X.

Find 'id:[number]:initdefault:' near the top of the file (the number can be any number between 0 and 6; I don't know what your /etc/inittab looks like) and, depending on which distribution you're using, you replace that number with some other number between 0 and 6 that will put you in text mode on startup.

Copy and replace 'id:[number]:initdefault:' with the stuff below depending on your distribution. Remove all quotes.

o For most distros: 'id:3:initdefault:'
o For Debian, things get a little tricky... reply for more information.

Edit: I didn't notice that you run Ubuntu, sorry.
This is what you'll need to do (forget everything I said about /etc/inittab):

o open up a terminal (as root)

o type 'cd /etc/rcS.d' without quotes

o type 'ls' and find the one(s) that have anything to do with x11 (ex: S70x11-common).

o assuming the only one you have is S70x11-common, then type 'mv S70x11-common K70x11-common' if you have more, then do the same with the rest.

o Now, check the top of inittab to see which number is between the "id" and "initdefault." type 'cd /etc/rc[number].d' and type 'ls' to find the one that has gdm in it (mine is S21gdm, yours might be different) , and type 'mv S21gdm K21gdm' replace '21' with the number between S and gdm.

o Voila! Reboot, and see if it worked.

Last edited by notapplicable; 11-23-2006 at 12:36 PM.
 
Old 11-24-2006, 05:10 AM   #3
AZaraT
LQ Newbie
 
Registered: Jun 2006
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the reply.

However i can't find the inittab file
Quote:
Now, check the top of inittab to see
I looked in /etc but didn't found anything ??

EDIT: okay nevermind, i found another way to do this, there is some menu which allowed me to turn GDM off, so it start in console now..


So another question (yeah yeah i know im asking alot) i want my CS server to startup when it boots, so i did this

sudo crontab -e

and then i inserted : @reboot /home/server/bla/bla....

but it doesn't really works, when i open crontab -e it says that the file is saved correctly so shouldn't it work ?

Last edited by AZaraT; 11-24-2006 at 08:34 AM.
 
Old 11-24-2006, 01:09 PM   #4
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Rep: Reputation: 15
Wow. Ubuntu doesn't have an inittab. That's kind of disappointing. There are easier ways to do it than using crontab.

I'm assuming you use GNOME, so you could go to system -> preferences -> sessions. Then, wait for the window to open, and click the rightmost tab, "Startup Programs." Click "Add" (on the right). The rest should be self explanatory.
---------------

If you don't use GNOME, and you occasionally use your virtual terminals not running X, then you'd want to run it at the system's startup. Mind getting your hands a little dirty? Write a bourne shell script:

#!/bin/sh
[insert whatever command you use to start your CS server here]

Save it as csServer.sh or something, and then, in terminal, type 'chmod +x csServer.sh'. Without the quotes. Then, type 'sudo mv csServer.sh /etc/init.d/' without the quotes, and type 'sudo update-rc.d csServer.sh defaults' without the quotes. That should do the job.

Last edited by notapplicable; 11-24-2006 at 01:11 PM.
 
Old 12-17-2006, 10:12 AM   #5
AZaraT
LQ Newbie
 
Registered: Jun 2006
Posts: 16

Original Poster
Rep: Reputation: 0
uh, been a while haven't got any time at all the last weeks...

But its working thanks for the help mate!
 
  


Reply

Tags
ubuntuserver



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
Schedule padideh Linux - Server 4 10-22-2006 08:15 AM
Is core 2 on schedule? Rotwang Fedora 2 05-10-2004 05:08 PM
Mandrake 10.1 Schedule is Up colnago Mandriva 0 03-25-2004 01:29 PM
Schedule, AGAIN!! erathomor Linux - General 0 04-11-2002 11:25 AM
HOW TO Schedule erathomor Linux - General 3 04-10-2002 01:57 PM

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

All times are GMT -5. The time now is 08:00 PM.

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