Posts tagged with: linux

2013-05-09

Dual monitor on Xubuntu 13.04, the easy way

On my development machine I got two monitors on the same NVIDIA card. So far, I’ve been using NVIDIA proprietary drivers to make everything (including dual monitor, aka “TwinView”) work fine.
I had to uninstall the proprietary drivers because they caused problems with the new 3.8.0 kernel, so I went back to nouveau drivers.

I’ve been desperately trying to restore my dual monitor setup with no luck, until I found this way I’m going to share with you. Please note that in my machine I have only one video card (NVIDIA GeForce 210) with two outputs: I don’t have two video cards. I don’t know if it makes any difference, but I guess it might.

Here it is: Read more...

Tags: linux, xubuntu
2013-05-24

How to shutdown a linux system from within a PHP script

If you run a linux system with the Apache web server and PHP, you may want to shutdown the system from within a PHP script.

The obvious idea is to call system("shutdown -h now") from PHP, but it will not work if Apache is run by an unprivileged user (actually, it should).

Here is my solution, merging various sources from the Internet. I find it the cleanest one. Read more...

Tags: linux, php
Fork me on GitHub