Usage Tips


I was messing about with The GIMP the other day and managed to close the tab that appears in the lower half of the window titled “The GIMP”. Aargh! And then it took me ages to find out how to fix this.

So here is what you have to do…

  1. Click on File, Dialogues, Tool Options (Shift+Ctrl+T)
  2. A new window will appear. Its appearance depends on which tool is currently selected in the toolbox (which is the official name for The GIMP window).
  3. Click on the top line (the one with the same button you used to close the dialog in the first place) and drag it over to “The GIMP” window
  4. When you start dragging, the cursor will change to a button labelled “Tool Options”
  5. Drop it on the small bar below the tools. The bar will turn dark when you can drop the dialog

That’s it.

Bookmark this article

Courtesy of Electric Toolbox

If you have made changes to the Apache configuration file httpd.conf on you need to reload the Apache service for the changes to take effect. From the command line you do this with the apachectl command. The exact location of this command varies on the Unix or Linux variant you are using (eg Fedora, OSX, FreeBSD, Slackware, Mandrake, SUSE) and the compile time settings, but typically it is accesible at /usr/sbin/apachectl . An example of restarting Apache gracefully is shown below:

/usr/sbin/apachectl graceful

Note that you will either need to be running as root or use the “sudo” command in order to run this command.

If Apache is not already running it will be started. If it is already running then it will reload with the new changes but will not abort active connections, meaning that anyone who is in the middle of downloading something will continue to be able to download it.

Before restarting the Apache service a check will be done on the configuration files to ensure they are valid. If there is an error in them the error will be displayed and the Apache service will continue running using the old settings. You need to correct your settings before attempting to restart again.

You can also just check the settings without restarting Apache like so:

/usr/sbin/apachectl configtest

This will check the httpd.conf file and report whether the syntax of the file is valid or not. A list of errors will be displayed including the line numbers if there are any. This makes it easy to isolate any problems.

The following are all the available options that can be passed to the apachectl command. This text is from the apachectl man page.

apachectl start: Start the Apache daemon. Gives an error if it is already running.

apachectl stop: Stops the Apache daemon.

apachectl restart: Restarts the Apache daemon by sending it a SIGHUP. If the daemon is not running, it is started. This command automatically checks the configuration files via configtest before initiating the restart to make sure Apache doesn’t die.

fullstatus: Displays a full status report from mod_status. For this to work, you need to have mod_status enabled on your server and a text-based browser such as lynx available on your system. The URL used to access the status report can be set by editing the STATUSURL variable in the script.

apachectl status: Displays a brief status report. Similar to the fullstatus option, except that the list of requests currently being served is omitted.

apachectl graceful: Gracefully restarts the Apache daemon by sending it a SIGUSR1. If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted. A side effect is that old log files will not be closed immediately. This means that if used in a log rotation script, a substantial delay may be necessary to ensure that the old log files are closed before processing them. This command automatically checks the configuration files via configtest before initiating the restart to make sure Apache doesn’t die.

apachectl configtest: Run a configuration file syntax test. It parses the configuration files and either reports Syntax Ok or detailed information about the particular syntax error.

apachectl help: Displays a short help message.

Bookmark this article

I just tried to transfer a plugin to my server using FTP, but kept getting Connection Refused whenever I logged in. My hosting provider’s solution was to reboot my VPS - a little problematic as I was in the middle of editing httpd.conf, so now my HTTP access is hosed :-( The FTP server started working though :-)

Here’s what you should do to test your FTP server

  1. Open a command prompt
  2. Start a telnet session by typing telnet mydomain ftp then type the items entered in BOLD below
  3. connecting to mydomain…
    220 mydomain FTP server (Version wu-2.6.2(1) Mon Aug 16 17:10:57 IDT 2004) ready.
    150 Opening BINARY mode data connection for file list.
    226 Transfer complete.
    USER anonymous
    331 Guest login ok, send your complete e-mail address as password.
    PASS mozilla@
    230 Guest login ok, access restrictions apply.
    SYST
    215 UNIX Type: L8
    TYPE I
    200 Type set to I.
    PASV
    227 Entering Passive Mode (192,168,0,10,239,190)
    NLST

    Do not worry if you get the reply 550 *: No such file or directory

  4. Start another command prompt
  5. Start another telnet session, but this time use the data received in reply to the PASV command above. In our example, the FTP server at IP Address 192.168.0.10 is listening on port ((239* 256) + 190), or 61374, so we would type telnet mydomain 61374
  6. If you received error 550, then type LIST in the first telnet session and you will see a list of files appear in the second telnet window and a couple of messages in the first window

    150 Opening BINARY mode data connection for /bin/ls.
    226 Transfer complete.

    If you did not receive error 550, then you will see a list of the directories appear in the second telnet window, followed by Connection to host lost and the two messages below in the first telnet window. There will be a pause between the first and second message while the data is transmitted.

    150 Opening BINARY mode data connection for file list.
    226 Transfer complete.

  7. Type QUIT in the first telnet window to close the FTP session. You may need to type QUIT again to terminate the telnet session.

If you like, you can edit /etc/ftpaccess and remove the ‘#’ from the two lines
#log commands real
#log transfers anonymous,real inbound,outbound

to enable logging for your FTP server. Beware as these log files can suck up disk space! Look here for full details, or do a Google on log commands real wu-ftp

Bookmark this article

mysql> show grants for ‘olduser’@'localhost’; +—————————————————————————————————————-+ | Grants for newuser@localhost | +—————————————————————————————————————-+ | GRANT USAGE ON *.* TO ‘olduser’@'localhost’ IDENTIFIED BY PASSWORD ‘*D8DECEC305209EEFEC43008E1D420E1AA06B19E0′ | | GRANT USAGE ON `database`.* TO ‘olduser’@'localhost’ WITH GRANT OPTION | +—————————————————————————————————————-+ 2 rows in set (0.00 sec)

mysql> REVOKE ALL PRIVILEGES ON `database` . * FROM ‘olduser’@'localhost’; Query OK, 0 rows affected (0.00 sec)

mysql> REVOKE GRANT OPTION ON `database` . * FROM ‘olduser’@ ‘localhost’; Query OK, 0 rows affected (0.00 sec)

mysql> REVOKE ALL PRIVILEGES ON * . * FROM ‘olduser’@ ‘localhost’;

mysql> DROP USER ‘olduser’@ ‘localhost’;

Bookmark this article

mysqldump --opt -Q -uUSERNAME -p DATABASENAME > /PATH/TO/DUMP.SQL

n this line, you should change the following: USERNAME – this is the username you use to access MySQL. It is specified in your config.php file. DATABASENAME – the name of the database which your vBulletin is installed into. It is specified in your config.php file. /PATH/TO/DUMP.SQL – this is the path to the file that will be outputted. If you are unsure what to put here, simply use dbname_bak.sql or something similar.

When you press enter, you will be prompted for the password you use to access MySQL. This is also specified in your config.php file. The system will dump the database once you have entered the correct password. Verify that DUMP.SQL exists in the directory you specified. If you did not specify a full directory, the file will be in the directory you are currently in.

Repeat this procedure for each database you wish to backup.

Bookmark this article

« Previous PageNext Page »