If you manage a few servers, you might often find yourself with a few terminal windows open and it can get tricky to remember which terminal window is which.
To make this a lot easier you can create a custom terminal launcher for your panel and make it use a custom terminal colour scheme and profile and also make it automatically log into the server in question via SSH so it really is either that server or nothing (unless you exit but keep the terminal window open for some reason).
For your production server for example you might do the following:
Open up a terminal and create a new profile by selecting Edit-Profiles then hit the [new] button and create a profile called “Production”. Customise it to suit.
To create a new launcher, right click your panel and select “Add to Panel”
Then click “Custom Application Launcher”
For the name, call it something obvious like “Production”
The command should be like this:
gnome-terminal --window-with-profile=Production --command="ssh username@server.com"
Now choose a nice icon by clicking the springy icon that is default and navigate around till you find one you like.
Save the launcher and try clicking it, it should automatically use the special colour scheme you set and should also either log you straight into SSH (if you are using SSH Keys) or will give you the password prompt.
Never be confused again!
If you are finding it takes ages for a password prompt to come up when trying to connect to a CentOS server (and possibly others) this is a solution.
The cause is that your IP address does not have the correct reverse DNS etc settings.
You can of course try to fix all that but if you need a quick fix, you can edit the sshd configuration and disable
GSSAPIAuthentication yes
to: GSSAPIAuthentication no
and
UseDNS yes
to: UseDNS no
If you are struggling to understand why Magento is not finding images that are definitely there, the problem may well be that you are not prefixing your image with a slash, i.e for a new image we would put:
/image.jpg
and the image would be in
media/import/image.jpg
Unfortunately whoever wrote the Dataflow product importer though it would be a good idea to silently capture all exceptions on image imports which removes any useful error messages that might occur (such as no image at media/importimage.jpg)
If you would prefer to fix this, you can override Mage_Catalog_Model_Convert_Adapter_Product
Copy the saveRow() method into your overriding class and then change this bit
foreach ($imageData as $file => $fields) {
try {
$filepath = Mage::getBaseDir('media') . DS . 'import' . trim($file);
$product->addImageToMediaGallery($filepath, $fields);
} catch (Exception $e) {}
}
To something like this
foreach ($imageData as $file => $fields) {
//try {
$filepath = Mage::getBaseDir('media') . DS . 'import' . trim($file);
$product->addImageToMediaGallery($filepath, $fields);
//} catch (Exception $e) {}
}
If you want to calculate the actual save path that Magento will use for an image file for example then you might find yourself scouring the source code for the specific method that does this.
It’s not the easiest to find, in fact its tucked away in the lib folder inside the Varien_File_Uploader class.
The method in question is a usefully static method Varien_File_Uploader::getDispretionPath();
Sorted!