yellow.one.pl

[  author:   ]
> My linux adventure
> My linux adventure

<< back

My linux:


Full list of my packages

Topic list:



>Logitech RX300 usb mouse:


Mouse works great with default settings except wheel. Simple resolution (adding ZAxisMapping) allow to use vertical wheel. But to use horizontal scroll you need to follow instruction below.
execute this command:
cat /proc/bus/input/devices
...and analyze your result.
Search something like that:
        I: Bus=0003 Vendor=046d Product=c040 Version=0110
        N: Name="Logitech USB-PS/2 Optical Mouse"
        P: Phys=usb-0000:00:10.0-1/input0
        S: Sysfs=/devices/pci0000:00/0000:00:10.0/usb2/2-1/2-1:1.0/input/input2
        U: Uniq=
        H: Handlers=mouse1 event2
        B: EV=17
        B: KEY=ff0000 0 0 0 0 0 0 0 0
        B: REL=143
        B: MSC=10
        
Important is that line:
        S: Sysfs=/devices/pci0000:00/0000:00:10.0/usb2/2-1/2-1:1.0/input/input2

Exactly last character. It is number which should be used in next step.

part of /etc/X11/xorg.conf:
        Section "InputDevice"
                Identifier "Mouse1"
                Option "Protocol"  "IMPS/2"
                Driver "evdev"
                Option "CorePointer"
                Option "Device"         "/dev/input/event2" # << Number from previous step should by used here
                Option "Emulate3Buttons"        "false"
                # Option "Emulate3Timeout"      "50"
                Option "Buttons"        "7"
                Option "Name"           "Logitech USB-PS/2 Optical Mouse"
                Option "ZAxisMapping"   "4 5 6 7"
                Option "ButtonMapping"  "1 2 3"
                Option "Resolution"     "300"
        EndSection
                
At this moment horizontal scroll works but in exchanged direction.
Instruction below allow to fix it. Create file if there isn't: /etc/X11/xinit/.Xmodmap
To this file add line:
        pointer = 1 2 3 4 5 7 6 8 9 10 11 12
That is all. Now you need only restart X and believe that will works. :]


> slackpkg (packages manager) - switch to mode 'first download all then install/upgrade':


Edit /etc/slackpkg/slackpkg.conf and set parameter 'DOWNLOAD_ALL' as 'on' (line 94)
        DOWNLOAD_ALL=on
Now any of packages to install or upgrade will be firstly downloaded and then install.
Warning: watch your disk space :) slackpkg store packages in /var/cache/packages/


> Java installed by hand (not from package) - Java applets wont work:


Usually java version available in package from repository is much older than current version. So we can just download and unpack java to any dir. Set environment variable $JAVA_HOME to this dir and add to PATH $JAVA_HOME/bin. But even if you add java plugin (libjavaplugin_oji.so) to plugins in your favorite web browser java applets will not works. You need to make some symlink:
	ln -s $JAVA_HOME/jre/lib/i386 /usr/lib/i386
After this java applets will works fine.


> Wireless network card RaLink 2500 with WPA-PSK:


Make sure that you have installed following packages:
        network-scripts
        wpa_supplicant
        wireless-tools
        
In file /etc/modprobe.conf add line:
        alias wlan0 rt2500pci
In file /etc/rc.d/rc.inet1.conf add lines:
        IFNAME[1]="wlan0"
        USE_DHCP[1]="yes"
        DHCP_OPTIONS[1]="-r -o"
        WLAN_WPA[1]="wpa_supplicant"
Now you need to generate special string which will contain encoded PSK KEY.
Execute such command:
wpa_passphrase <SSID> <PLAIN_TEXT_PSK_KEY> 
Output contains encoded psk key which is needed i next step.

File /etc/wpa_supplicant.conf should look like:
        ctrl_interface=/var/run/wpa_supplicant
        ctrl_interface_group=0
        eapol_version=1
        ap_scan=1
        fast_reauth=1

        network={
        ssid="<NETWORK_SID>"    # ssid of your wireless network
        psk=<ENCODED_PSK_KEY>   # generated in previous step
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=TKIP
        }
        
Now just execute command /etc/rc.d/rc.inet1 restart
...and it should works.

There is possibility to use not encoded (plain text) key but it is not recommended because of security.
In this case psk in file wpa_supplicant.conf should look like:
        psk="<PLAIN_TEXT_PSK_KEY>"
All elements like <VALUE> should be replaced by values dedicated for your wireless network configuration.


> Running X application with remote display:

Edit file /etc/kde/kdm/kdmrc Line:
	ServerArgsLocal=-nolisten tcp
with line:
	ServerArgsLocal=
Now you need to restart X server. For example ctrl+alt+bakspace.
From now X serer on local machine will accepts tcp connection on port 6000.
You can make sure with namp (port scanner).
	nmap local_machine_ip -p 6000

Next execute on local machine:
        xhost+ remote_machine_ip
Now local machine accepts request to show window from remote machine.
You need to check address of your DISPLAY on local machine. To do this execute:
	echo $DISPLAY
	:0.0
Displayed value is needed to next step.

Following command execute on remote machine (e.g. via SSH ):
        export DISPLAY=local_machine_ip:0.0
If you value of $DISPLAY is other than :0.0 you should use them instead :0.0


Now you can try to run some X application on remote machine and it should shows on local machine display.
Some of application ignores $DISPLAY variable (e.g. Firefox). In this case you need to get know how to run them from their own manuals.
To run Firefox you need to execute:
	firefox --display=localmachine:0.0


> Redirect of localhost ports via SSH tunel:

I haven't fond any solution to redirect localhost port to remote host using iptable. The solution I currently using is to use SSH tunel.
	ssh -N -g -L [local_port]:[dest_host]:[dest_port] [ssh_user]@[ssh host]


<< back