Monday, February 14th, 2011
Suppose you have a script in PHP and you want to print on the system's default printer, you can use the function
system (<command>, $retval)
The following example shows the printing of a content including a variable coming from the PHP script:
system('echo "'.$message.'"|lpr -o page-left=35 ', $retval );
Posted in linux, PHP, shell scripting | No Comments »
Thursday, May 27th, 2010
Memo to self...
Posted in linux, shell scripting, ssh | No Comments »
Saturday, January 16th, 2010
Let's start this new year by referencing an excellent system I happened to find on the Internet to perform uPnP server functionality on my Linux system.
The name of the thing is LLink and although I haven't exploited at full yet, it looks VERY promising.
Some features:
Parses various video containers: vob, avi, ...
Posted in linux, multimedia | No Comments »
Thursday, December 31st, 2009
Although it could seem an oxymore, sort something in randomic order might be usefl sometimes. Give a look to the script below, which I’m writing here for future reference. #!/bin/bash # # This script creates a list of file or symbolic link to ...
Posted in linux, shell scripting | No Comments »
Tuesday, November 3rd, 2009
Here’s another successful operation done on fantastic Linux OS that is a pure dream for other operating systems. Situation: I have a virtual machine with 20 GB HDD, partitioned as follows: 95% ext3 on primary partition 5% swap on first partition of extended partition I certainly ...
Posted in linux | No Comments »
Friday, March 6th, 2009
It took me a while to figure out due to misleading information over the vast Internet suggesting to search for non existing /etc/vsftpd.users or something like this. Thing you have to do is to edit /etc/ftpusers and remove root from there.
Posted in linux, networking | No Comments »
Wednesday, December 10th, 2008
This is happening, for instance, when moving a Virtual Machine from one Server to another or when changing the physical network adapter of a server. The reason is that NIC's MAC Address changes, therefore Linux perform a new HW detection and creates new adapter definition, ending in situation where ...
Posted in linux | No Comments »
Friday, November 14th, 2008
Taking short note so I'll never forget this again ;)
apt-get install x11-common (if not already there)
apt-get install xfce4-session
apt-get install xfce4
...and naturally ;) apt-get install xdm
Should you need to set runlevel 3 by default (I wanted it), edit /etc/rc-default and replace lines running telinit 2 with telinit 3.
Reboot.
Posted in linux, xfce4 | No Comments »
Tuesday, April 22nd, 2008
Running vmware-config-tools.pl script on a guest CentOS 5.1 virtual machine in a VMWare Server 1.0.5 environment will not find the proper kernel modules, so it will prompt you to compile the modules.
To do this you need a compiling environment (namely gcc) and the C kernel headers installed.
If your machine is ...
Posted in linux, VMware | No Comments »
Saturday, March 29th, 2008
One of the things I like of Linux is that despite I'm working with it since 1994 I never end learning part of it.
Today my need was the following: I dd a 20 Gb backup onto a 40 Gb HDD and it worked smoothly, but problem is that filesystem on ...
Posted in Various | No Comments »