Posts Tagged ‘linux’

rm: /PATH_TO_FILE not removed: Disc quota exceeded

Posted in Uncategorized on May 29th, 2010 by admin – Be the first to comment

This occurred whilst using Solaris on Joyent. Somewhat annoying when one can’t remove a file when “Disc quota exceeded”!

What one can do is override the file contents with nothingness.

cat /dev/null >/PATH_TO_FILE

Source: Joyent forums

ubuntu shutdown and wakeup timer

Posted in Uncategorized on January 3rd, 2010 by ph-lee – Be the first to comment

Going green

My all-in-one kubuntu media centre and general server sits unused most of the time. So why not set it to switch on and off in sync with when I need it based on the time of day. Should save on some bills.

Requirements

Method

Setup a cron job as root to shutdown at the specified time. To edit crons as root enter the following.

sudo crontab -u root -e

Add the following line to the list. This will shut down the box everyday at 0400. Of course you can modify as needed to suit your needs. And if you want to hibernate I’m sure theres a hibernate command.

0 4 * * * /sbin/shutdown -h now

While we’re at it we’ll also set up the wakeup time using rtcwake. So also add the following to the cron list.

45 3 * * * /usr/sbin/rtcwake -m no -s 29700

15 minutes before the shutdown we set the box to wake up in 29700 seconds which equates to 8 hours and 15 minutes. So the machine is scheduled to wake up at 12 noon.

Setup

This solution might be setup dependent so here are some specs that may help…

  • Linux kubuntu 9.10 Karmic Koala
  • 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:01:29 UTC 2009 i686 GNU/Linux
  • Motherboard: ASUS A7V-133 ACPI BIOS Revision 1007 (10/03/2001)

Making media centres’ greener.

MythTV blue screen on playback

Posted in Uncategorized on December 28th, 2009 by ph-lee – Be the first to comment

Problem: Getting a blue screen on video and live TV playback with MythTV.

Solution from [ubuntu forums]

xvattr -a XV_CRTC -v 1

S-Video TV out on kubuntu

Posted in Uncategorized on December 22nd, 2009 by ph-lee – 1 Comment

The problem: ubuntu media centre that hooks up to an old TV which takes S-video. Graphics card or ubuntu isn’t capable of automatically detecting the TV.

The solution: [Bernades] has an article on how to get ubuntu to detect the tv and output it using XRandR.

xrandr --output S-video --set load_detection 1

xrandr --output S-video --auto

The problem is that this isn’t persistent and as soon as you reboot you’ll be back to square one.

[Ubuntu wiki] shows a script can be setup to run the above lines of code on startup. So in my case of using kde add the above lines of code to the following file.

/etc/kde4/kdm/Xsetup

Give your a box a reboot and your linux media centre should be configured to use your TV.

Ubuntu Path Environment variable

Posted in Uncategorized on November 22nd, 2009 by ph-lee – Be the first to comment

To get at it

sudo vim /etc/environment

To reload any changes you made

source /etc/environment

That’s it folks.