Oh look, a GUI

Discussion and Technical Support for general software applications and utilities including OS related issues.
Sergeus
Member
Member
Posts: 24
Joined: September 30th, 2011, 12:46 pm

Oh look, a GUI

Post by Sergeus »

A few hours ago, I upgraded from Ubuntu Server 11.04 to Server 11.10. This was clearly a bad idea. -.- My main problem now is that the server always boots into the GUI. (I believe it's GDM?) I'm thinking that during the update it noticed the gone-core for the virtual desktop and made all the links required for it to be the default boot environment. True, I can get to a terminal using alt+f1, but the fact that the GUI is 'running' even when the screen isn't plugged in is going to bug me to no end.

I'm already seriously considering just reinstalling 11.04, but that would undo everything I've done since setting up the server. :( Surely there must be a way to get it to boot into command line by default?

I'm also getting messages when I boot that /dev/sda2 (I believe that's my swap partition) was not unmounted cleanly, but that seems to be an existing bug in 11.10.

Any help would be much appreciated.
Sergeus
Member
Member
Posts: 24
Joined: September 30th, 2011, 12:46 pm

Re: Oh look, a GUI

Post by Sergeus »

Ok, I've now stopped it from booting into the GUI, but I think I did it in quite a ham-fisted way. I saw gdm in the list of things to run on boot and I deleted it. (Probably a bad idea? XD Today isn't going too great.) It boots into the command line, but now if I run VNC server manually, when I connect using the VNC Viewer it says "failed to load session 'ubuntu'". Makes me think I've deleted some part of the GUI so it's not there for the virtual desktop either.
User avatar
Andy Horn
Knows their stuff
Posts: 188
Joined: July 24th, 2011, 6:14 pm
Location: Stockton on Tees

Re: Oh look, a GUI

Post by Andy Horn »

I had no idea that 11.10 had a GUI.

You really should install 10.04 LTS as it tried and tested, also Ian's guide is based upon 10.04 LTS.

BTW I was going ask if anyone had tried out 11.10-now I know :!:

Andy
Sergeus
Member
Member
Posts: 24
Joined: September 30th, 2011, 12:46 pm

Re: Oh look, a GUI

Post by Sergeus »

Yeah, I think that's the best idea now. *sigh* Starting almost from the very beginning lol. At least my HDDs will still be partitioned.
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Oh look, a GUI

Post by Ian »

As I always say, with Ubuntu the latest is not always the greatest. :thumbdown:

Unless there are specific features people are really dying to get their hands on then stick with the LTS version.
The server version of 10.04LTS will be supported up until April 2015.
11.10, which has only just been released, will only be supported up until April 2013.

What's the benefit of going with the latest version? :?

Ian
Sergeus
Member
Member
Posts: 24
Joined: September 30th, 2011, 12:46 pm

Re: Oh look, a GUI

Post by Sergeus »

Seems very true. I'm in the habit of updating everything if there's an update available, this is the first time it's backfired in such spectacular fashion lol. I've reinstalled 11.04 (didn't go back to 10.04 since 11.04 was all working fine before I updated) and everything is going quite swimmingly again. I've gotten back to where I was before, so it's all new stuff from here.

Thanks for the guide though, Ian! I'd be lost without it. Well, I'd have used WHS without it. ;)

I've run into a bit of a snag on the CPU temperature monitoring script though. I get an email (w00t!) with an error (not w00t) every time the CPU temperature script runs saying:

Code: Select all

/home/stuart/Scripts/CPUTempShutdown.sh: line 49: [: -ge: unary operator expected
/home/stuart/Scripts/CPUTempShutdown.sh: line 59: [: -ge: unary operator expected
/home/stuart/Scripts/CPUTempShutdown.sh: line 49: [: -ge: unary operator expected
/home/stuart/Scripts/CPUTempShutdown.sh: line 59: [: -ge: unary operator expected


Those lines are:

Code: Select all

  if [ ${newstr} -ge $1 ]


Code: Select all

  if [ ${newstr} -ge $2 ]


The command in webmin is:

Code: Select all

/home/stuart/Scripts/CPUTempShutdown.sh 35 50 >/dev/null  


Btw, quick question about the CPU temperatures page. When the script is introduced first, you warn that it will awaken any drives that are spun down, but in the cron jobs section you mention that it will not awaken sleeping drives. Is that a property of it running as a cron in webmin rather than executed from command line?
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Oh look, a GUI

Post by Ian »

Hi there.

It looks like you need to make some tweaks to that script so it works in your environment. So, please run the following command and send me the output from it in your next post

Code: Select all

sensors


Sergeus wrote:Btw, quick question about the CPU temperatures page. When the script is introduced first, you warn that it will awaken any drives that are spun down, but in the cron jobs section you mention that it will not awaken sleeping drives. Is that a property of it running as a cron in webmin rather than executed from command line?


I'll have to double-check what I said but the CPU temperature script shouldn't touch the drives. The Drive temperature script will tho. :?

Ian.
Sergeus
Member
Member
Posts: 24
Joined: September 30th, 2011, 12:46 pm

Re: Oh look, a GUI

Post by Sergeus »

My sensors output looks like:

Code: Select all

it8720-isa-0228
Adapter: ISA adapter
in0:         +0.93 V  (min =  +0.00 V, max =  +4.08 V)
in1:         +1.58 V  (min =  +0.00 V, max =  +4.08 V)
in2:         +3.34 V  (min =  +0.00 V, max =  +4.08 V)
+5V:         +2.96 V  (min =  +0.00 V, max =  +4.08 V)
in4:         +3.07 V  (min =  +0.00 V, max =  +4.08 V)
in5:         +1.71 V  (min =  +0.00 V, max =  +4.08 V)
in6:         +2.14 V  (min =  +0.00 V, max =  +4.08 V)
5VSB:        +3.01 V  (min =  +0.00 V, max =  +4.08 V)
Vbat:        +3.09 V
fan1:        754 RPM  (min =   10 RPM)
fan2:       1333 RPM  (min =   10 RPM)
fan3:          0 RPM  (min =    0 RPM)
temp1:       +30.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:       +25.0°C  (low  = +127.0°C, high = +70.0°C)  sensor = thermal diode
temp3:       +32.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermal diode
cpu0_vid:   +0.375 V

k10temp-pci-00c3
Adapter: PCI adapter
temp1:       +20.1°C  (high = +70.0°C, crit = +73.0°C)


I think the A with the hat (forgotten the name of that symbol) is probably messing everything up. Is it possible I'm missing a font package somewhere causing the degree symbol to generate that?

So if I've set your HDD temperature script to check the drives every hour, and I've got the spin down time at every half hour, assuming no one uses it, they stay active for 30 mins, spin down for 30 mins, then get woken up and active for another 30, and continue in that cycle?

I've also been having a bit of trouble with Webmin. Whenever I get an error on one of the cron jobs, it sends me an email, which is good. But it sends the email to the local username that ran the cron followed by @gmail.com. Eg. root@gmail.com and stuart@gmail.com (username is stuart). I haven't found anywhere in the settings to configure where it sends to, and the 'Read User Mail' page in webmin still gives me: 'None of the supported mail servers (Exim, Qmail, Postfix and Sendmail) were detected on your system. You will need to adjust the module configuration to set the mail server and possibly mail paths manually.' I tried to configure it manually but I really had no idea what I was doing lol.

Thanks for the help, Ian, it's awesome that you're still supporting this site so frequently! :thumbup:
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Oh look, a GUI

Post by Ian »

Sergeus wrote:My sensors output looks like:

Code: Select all

it8720-isa-0228
Adapter: ISA adapter
in0:         +0.93 V  (min =  +0.00 V, max =  +4.08 V)
in1:         +1.58 V  (min =  +0.00 V, max =  +4.08 V)
in2:         +3.34 V  (min =  +0.00 V, max =  +4.08 V)
+5V:         +2.96 V  (min =  +0.00 V, max =  +4.08 V)
in4:         +3.07 V  (min =  +0.00 V, max =  +4.08 V)
in5:         +1.71 V  (min =  +0.00 V, max =  +4.08 V)
in6:         +2.14 V  (min =  +0.00 V, max =  +4.08 V)
5VSB:        +3.01 V  (min =  +0.00 V, max =  +4.08 V)
Vbat:        +3.09 V
fan1:        754 RPM  (min =   10 RPM)
fan2:       1333 RPM  (min =   10 RPM)
fan3:          0 RPM  (min =    0 RPM)
temp1:       +30.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:       +25.0°C  (low  = +127.0°C, high = +70.0°C)  sensor = thermal diode
temp3:       +32.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermal diode
cpu0_vid:   +0.375 V

k10temp-pci-00c3
Adapter: PCI adapter
temp1:       +20.1°C  (high = +70.0°C, crit = +73.0°C)


My goodness, I've never seen such comprehensive output :crazy:

OK, you're gonna have to help me out a bit here. How many processors do you have and how many cores? The PCI adapter that it's also reporting (at 20.1°C) what is that?

My script needs quite a bit of tweaking to cope with the output you have so I'll knock you something up rather than try and talk you through how to change the one on my site.

To answer your HDD temp question, once the drives are asleep they should stay asleep. The script shouldn't wake them up.

Re your webmin bug, have you followed my email page? http://www.havetheknowhow.com/Configure ... ssmtp.html
If you have then please send me your "/etc/ssmtp/ssmtp.conf" and "/etc/ssmtp/revaliases" files. Obviously overtype the confidential bits with XXXs or somesuch.

Thanks,

Ian.
Sergeus
Member
Member
Posts: 24
Joined: September 30th, 2011, 12:46 pm

Re: Oh look, a GUI

Post by Sergeus »

Heh, GigaByte must strap a lot of sensors onto their boards. I've got a single processor with 2 cores. (The AMD Athlon II X2 245e.) To be honest, I'm not completely sure what that PCI device is. I didn't put anything into the PCI slots when I built the machine, so it must have come built in. Either the onboard graphics or the ethernet adapter? It's a Gigabyte GA-880GMA-USB3 board.

Thanks for working on a custom script for me! :D I know it can be impossible to get outputs like this to be properly recognized consistently. Any work I've done with regular expressions and compilers is always really sensitive to tiny changes in syntax.

Awesome that the HDDs stay asleep, I was worried there for a while lol.

Yep, I followed your mail configuration page. My ssmtp.conf:

Code: Select all

#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=XXXXXX@gmail.com

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:587

AuthUser=XXXXXX@gmail.com
AuthPass=************
UseTLS=YES
UseSTARTTLS=YES

# Where will the mail seem to come from?
rewriteDomain=gmail.com

# The full hostname
hostname=XXXXXX@gmail.com

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES


And revaliases:

Code: Select all

# sSMTP aliases
#
# Format:       local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:StuMedia@gmail.com:smtp.gmail.com:587


The StuMedia@gmail.com isn't a real address, I was planning on using it for the filtering on my gmail inbox end, so I could automatically put all of the server emails in one folder, and so they don't clutter up my inbox.
Post Reply