Archive for the 'windows' Category

Delete jpg and raw files simultaneously on Windows

This post is for Windows. A solution for Ubuntu could be Geeqie. [1]

I use my camera with the mode to save jpeg+raw. If I want to get skim through the pictures I always had twice the work (show jpg, skip raw)  and sorting out (delete jpg and delete raw). IrfanView at least allows to skip the raw image with the keyboard shortcut <Ctrl>+2. [2] Although the deletion process stays burdensome.

A much easier way on Windows for viewing JPG and then deleting JPG+RAW files simultaneously is to use XnView. After installing do the following:

  1. Open the XnView-config file: %appdata%\XnView\xnview.ini (in my case C:\Users\alex\AppData\Roaming\XnView\xnview.ini).
  2. In the section [File] add a new line at the end: Companion_00=jpg:cr2
    This links the .cr2 (raw-File) to the .jpg. So if you delete the jpg it automatically deletes the .cr2. Replace the cr2 with the extension of your raw-file (so eg nef for Nikon) and save the file.
    If you want the effect also in the other direction you have to create another newline:  Companion_01=cr2:jpg. For now you can just leave this, as we will hide the raw files in the next steps.
  3. Start XnView and open the options (Menu: Tools > Options or via <F12>) and see also screenshots below.
    1. In General open the tab File Operations tick the checkbox “For Copy/Move/Delete use companion file (.xmp/.thm/.jpg)
    2. In Browser > File List write the file extension you want to hide (the raw file: in my case cr2) in the last text input and click the OK button.

That is it. Now it should be easier to sort your pictures, as only the jpg-pictures are shown and if you delete it, the raw file automatically gets also deleted.


xnview-configfile xnview-general xnview-filelist


Securely remote control your Ubuntu via putty from a windows host (VNC+SSH)

Last time I had the following situation: I wanted to remote connect to my workstation from another workstation like in the following image:
SSH Linux Tunnel via Putty
My current workstation is the left one (I will call it “workstation“) and I want to connect to the computer on the right (“server“). The workstation is running Windows XP, the server is running on Ubuntu Feisty.

  1. Setup Server(SSH+VNC): You have to install SSH and activate the VNC-Server, to be able to securely connect to your server.
    1. Install SSH: Just install the SSH server by entering the following in bash:
      sudo apt-get install ssh
    2. Screenshot Remote Desktop Preferences Screenshot Remote Desktop MenuEnable VNC: VNC is already installed on yor Ubuntu system, so you only have to enable it. Navigate to System -> Preferences -> Remote Desktop. Now you should activate “Allow other users to view my desktop“, “Allow other users to control my desktop“, and for security purpose “Require the user to enter this password” and provide a secure password. Then click the Close-button. Now your VNC-server should be ready to use.
  2. Setup Rooter (SSH Forwarding). If your server is directly connected to the internet (modem) you can skip this step. On my SMC-router this feature is called virtual server. You have to forward the SSH-port (22) to the IP address of your server. (here:
  3. Download and Install Putty: If you search Google for putty, the first result will be a download page, where you should download eighter the windows installer (putty-0.60-installer.exe) or the single putty program (putty.exe) . (I placed the single file into %windir%system32 for fast access per Start -> Run.)
  4. Start Putty and set it up:
    1. Start putty.exe (e.g. if you put it in system32 per Start -> Run putty.exe
    2. Putty Step1Enter the hostname, you want to connect to on the first startpage “Session“. Here this is the router. You have to enter the external IP (in concreto: If your “server” is directly connected to the internet you have to enter the external IP of your server. (This is the case if you have only a single PC and this PC is directly connected to the modem of your provider.
    3. Putty Step2Setup a tunnel by going to “Connection -> SSH -> Tunnels“. Here you enter as source port 5900 (the default VNC-Port which is used by Ubuntu if you installed it like me). As Destination you enter the internal server-ip with the VNC-Port (in concreto: and Click Add. Make sur, that you use the internal IP of your server not e.g. an IP-Adress of your router. (I made this mistake and wondered why nothing happend 😉 )
    4. Putty Step3Save your session and connect, so you can recall it later quickly by going back to “Session”. Type a meaningful name for your session below the “Saved Session” label and click “Save“. Now you can restore your session always by selecting it and click “Load“. Now you can click “Open” to connect to your server.
  5. Connect to your workstation: Now you will get a window where your username and password will be asked. Enter you login credentials to connect to your server and establish a SSH-tunnel.
  6. Connect to your server using VNC:
    1. Download and install VNC. There are lots of free VNC apps for windows out there e.g. UltraVNC or TightVNC. Note that you only need the viewer.
    2. Start the vncviewer and connect to localhost ( and enter your password which you provided in step 1.2.
    3. Now you should be connected to your home server 🙂