Schurger.org

29 mai 2006

Running an SSH server on Windows

Filed under: SSH — Jean Schurger @ 16:35

Here is a quick how to about running an SSH server on a Windows PC.

1. Intro : Any reason do do this nasty thing : YES, it allow you to have a command prompt, that sometimes can be usefull for who knows how to admin Windows box from a shell, and the most important (i think), it’s that SSH tunnels works well (i dunno, if there is an stunnel server of Windows, but this way is very simple and works well).

2. The Software

It uses a version of cygwin compiled openssh specialy packaged for that. WARNING, it may conflict with a normal cygwin installation, but in that case, you don’t need this version.

You can found it here : http://sshwindows.sf.net

3. Install it and folow the quick start (it’s on the Start-Menu) or the even-more-quick start below

  • Install it (i guess you know how to do that. A Zip file with an exe within is provided for the install)
  • Open a shell (you know, the “cmd“)
  • chdir in the installed directory
  • cd c:\progra~1
    cd openssh*
    cd bin

  • create the group and passwd file as explain in the quick start
  • mkgroup -l >>../etc/group
    mkpasswd -l >>../etc/passwd

  • Then, stard it
  • net start opensshd

  • WARNING : to be able to login, you MUST have a password set for the account you want to use.
  • That’s finished, now you can login on your Windows Box, and get the cmd prompt.

ssh Administrateur@my_windows_box_ip

4. Tunnels are working

Imagine you have an VNC serveur on a Windows Box that is hidden behind a firewall. Just open the SSH port (22) to you Windows PC, and you’ll be able to connect to your VNC throug the SSH tunnel. (very more secure than opening your VNC server to the world !).

  • From Linux

$ ssh Administrateur@my_windows_box_ip -L 5900:localhost:5900
$ vncviewer localhost

  • From Windows
  • The Putty SSH client allow to make tunnels. Here is a screenshot :

Putty Screenshot

    Add the tunnel as in the picture, (you should have entered the right IP in the Session section), and click open.Keep the connection opened somewhere, and just connect with your favorite VNC client to the adress 127.0.0.1..done;

24 mai 2006

HOWTO remove scrollbars in Firefox

Filed under: Firefox — Jean Schurger @ 16:46

It’s quite simple :

  1. You need to find your firefox ‘profile’ directory, in Window$, if may be in a sort of “C:\Documents and Settings\your_username\Profiles\#####\” on Linux, it depends of your distribution, but you may find it in your “$HOME/.firefox/#####” of “$HOME/.mozilla/firefox/#####”. On mac, i don’t know, but i’m sure it’s well explain somewhere.
  2. There is a chrome directory if your profile, and you have to create a file named userContent.css (scrollbars are considered as ‘content’).
  3. Put the following lines on your file :
  4. scrollbar { display: none !important; }

I think it’s better to do that with firefox switched off. (i’m not sure if it overwrite the file on exit).

22 mai 2006

vkeybd

Filed under: Audio — Jean Schurger @ 12:50

here is a .vkeypdmap file for a French keyboard. Well, to give an idea of what it meens : there is a soft on linux that is called vkeybd. It’s a virtual midi keybord that work with asla. The goal is to use a PC keyboard and ‘plug’ it on midi devices. (eg: use your keyboard with a soft synth program like fluidsynth.

I give an simple example :

  1. Download a soundfont of the instrument of your taste (you’ll found some here : http://hammersound.net/cgi-bin/soundlink.pl) you have to found one in the sf2 format.
  2. To use virtual midi devices, you need to load the ’snd_virmidi’ kernel module (as root type modprobe snd_virmidi)
  3. start fluidsynth from a terminal, and tell him to load your soundfont : load instrument.sf2
  4. start vkeybd (you should have copied the .vkeybdmap that i propose file if you use a french keybord)
  5. use aconnect to make the link between vkeybd and fluidsynth : first, list you input aconnect -i, and list your outputs aconnect -o, you should see you virtuals devices (client 128: ‘Virtual Keyboard’ [type=user], and client 129: ‘FLUID Synth (16260)’ [type=user]), then connect the both : aconnect 129 128
  6. That’s all, now you can play music with you keyboard (or your mouse, clicking on the keys :) )

Ok, it’s a bit complicated, but there is some GUI for that : qsynth to use fluidsynth more easely, and aconnectgui.

Now, here is the file : vkeybdmap you can use it if you have a french keyboard, if you don’t, you’re free to modify it to match with your keyboard, it’s easy to understand.

Bon pianotage

Powered by WordPress