VerySimple Developer Blog
Technical Tips, Tricks and Rants.

Archive for March, 2006

 
Mar
30
Filed Under (*NIX) by Jason on 30-03-2006

Linux refers to drivers sometimes as modules. Generally root permission is required to use any of these commands:

lsmod = lists all modules
rmmod = remove a module
modprob = add a module

drivers are located (usually)
/lib/modules

PCMCIA devices are controlled by the card manager
/etc/pcmcia.conf

Network Devices:

ifconfig = utility for network
iwconfig = utility for wireless network

ifconfig eth0 up = starts eth0
ifconfig eth0 down = shuts down eth0

 

 
Mar
30
Filed Under (*NIX) by Jason on 30-03-2006

I spent quite a bit of time trying to figure out how to remotely control my Mandrake 10 box as I do other Windows servers using Remote Desktop. I found that VNC seems to be the primary method of doing this. Only after compiling and configuring VNC server, though, did I realize that Mandrake 10 comes with an alternate service pre-loaded. There is one catch that I’ve discovered, though, which makes installing VNC still separately somewhat desirable.

The default Mandrake 10 installation includes the following app:

Start -> Internet -> Remote Access -> Virtual Network Connection

Running this application basically opens a Wizard-type application that prompts you with three choices:

1. Control Another Linux Box
2. Allow this machine to be controlled
3. Windows Terminal Service Client

When you select an option, it will launch the appropriate application:

1. Launches TightVNC client
2. Launches rfbdrake - (which is a VNC server)
3. Launches rdesktop (a windows remote desktop client)

Selecting option 2 starts rfbdrake, which starts a VNC service, allowing you to connect to your Linux box using any VNC client ( downloadable from www.tightvnc.com ).

This is pretty handy, but there is one major drawback. That is, you must physically be at the box to launch KDE or GNOME in the first place, then launch rfbdrake. So, if you reboot or your machine goes down, or rfbdrake crashes, you can no longer control the server without physically being at the box. I find this somewhat ironic, seeing as how i don’t normally want to remote control my box if i have physical access to it!

If you compile and install the VNC server, however, you have another option. The VNC server is interesting in that you can first SSH or Telnet into the server, startup VNC server, then login using a VNC client. It also supports multiple, concurrent user sessions, whereas rfbdrake only shares your current session. So, if you need to reboot or the machine goes down, you can always terminal back in and restart the VNC server. The installation process is somewhat complicated if you’re not used to compiling software. You need root permission. Downloading the Linux version of VNC server from www.tightvnc.com and following the basic instructions will do the trick.

The drawback to this is that VNC runs on a really bizarre low-level of X-windows. So, the windows environment will be somewhat uncomfortable and unusual for most people. But, at least you can run GUI apps. When you first start VNC server at the command prompt, a .vnc directory will be automatically created in your home directory. In this directory a file called xstartup will be created. This controls your VNC session. You can append the following line to the end of this file to launch VNC GNOME windows manager:

exec gnome-session &

Of course you have to restart the VNC service to recognize these changes. Starting and closing the VNC service is done using a shell script that is included with the app called vncserver. The one thing to note is that each time you start VNC server, it will create a new instance. So, you can have many instances running on the same machine. When you start the VNC service, it will tell you the ID number of the instance. The VNC instances are specified when you connect from the client like so:

192.168.1.150:1 (instance 1)
192.168.1.150:2 (instance 2)
etc..

to terminate an instance, you use the vncserver script again like so:

vncserver kill :1 (kills instance 1)

I know this is quite a bit of information all in one post. I hope that it at least gives you some clue and/or sends you off in the right direction!

 

 
Mar
30
Filed Under (Apache, PHP) by Jason on 30-03-2006

I just spent about an hour trying to figure this out, but when you have a php application that requires call time pass reference to be enabled, you can set in the .htaccess file.

the trick is that you have to set it to “1″ and not “on” as is indicated on the PHP support forums. here’s the code:


php_flag allow_call_time_pass_reference 1

 

« Previous Entries
Close
  • Social Web

NOTE: Email is disabled

E-mail It