Solving the ieee80211 xyz0: abc0: No probe response from AP xx:yy:zz:aa:bb:cc after 500ms, disconnecting – wireless dropouts.

Hi all.

I have this Belkin rt73usb card – it’s connected to this SUPER OLD Thinkpad 600E machine and it’s associated always with only one router – static IP setup – basically laptop is stationary / not moved. I had little problems with connecting it to the network at boot time but thanks to Boohbah from #Archlinux channel and a bit of research I got it to connect and to turn off power management and to keep the rate as “fixed” 54M – worked well BUT… I had a problem with it – the connection stayed up – I could browse the internet from the thinkpad / I could access the sshfs share on my server (from Thinkpad 600E) and so on but after a while sshd port – 50505 in my case – was switching from open into filtered and I could not connect to it anymore.

Example – rebooted Thinkpad 600E – i can connect – Thinkpad was left alone for lets say sometimes 10 minutes – sometimes an hour – connection was active but I could not ssh to the machine anymore.

After a bit of investigating I have found this line in the dmesg (after the connection dropped)

ieee80211 xyz0: abc0: No probe response from AP xx:yy:zz:aa:bb:cc after 500ms, disconnecting

and I had googled it but could not find solution so I have asked for help on the Arch Linux forum and Strike0 has sorted me out in no time. Thanks Dude!

I am reposting the info here just in case forum post goes missing in the future. To solve this issue I had to do this:

As root add:

options rt73usb nohwcrypt=1

to the file:

/etc/modprobe.d/modprobe.conf

and save it. Then re-create kernel image with

mkinitcpio -p linux

and reboot.

Hope someone will find it useful in the future.

Regards.

Andrzej

[UPDATED] Bloody RT73 USB dongle wouldn’t connect at boot time.

Hi all.

I own this dongle:

Bus 001 Device 003: ID 148f:2573 Ralink Technology, Corp. RT2501/RT2573 Wireless Adapter

It’s plugged in to my “stationary” IBM Thinkpad 600E laptop. Only one network. Static IP. It would connect to internet when system was booted fully but not during boot time.

BIG thanks to Boohbah he sorted me out when I was loosing all hope…

To solve this issue I had to do this (as root):

Create two files:

/etc/systemd/system/network@wlan0.service

With content:

[Unit]
Description=Network Connectivity (%i)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/network
ExecStart=/sbin/ip link set dev ${interface} up
ExecStart=/usr/sbin/wpa_supplicant -B -i ${interface} -c /etc/wpa_supplicant.conf
ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}
ExecStart=/sbin/ip route add default via ${gateway}
ExecStart=/usr/sbin/iwconfig ${interface} power off
ExecStart=/usr/sbin/iwconfig ${interface} rate 1M fixed
ExecStop=/sbin/ip addr flush dev ${interface}
ExecStop=/sbin/ip link set dev ${interface} down

[Install]
WantedBy=multi-user.target

and

/etc/conf.d/network

with content:

interface=wlan0
address=192.168.0.102
netmask=24
broadcast=192.168.0.255
gateway=192.168.0.1

Your IP / gateway may vary. You will also have to edit file:

/etc/resolv.conf

So it contains DNS servers that You’re using. Example:

nameserver 192.168.0.1

and then enable service:

systemctl enable network@wlan0.service

and reboot.

After the reboot my card was connected.

[root@wishthinkpad andrzejl]# journalctl -b | grep wlan0
Jan 05 04:31:50 wishthinkpad.loc systemd[1]: Expecting device sys-subsystem-net-devices-wlan0.device…
Jan 05 04:32:03 wishthinkpad.loc systemd[1]: Starting Network Connectivity (wlan0)…
Jan 05 04:32:03 wishthinkpad.loc kernel: IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Jan 05 04:32:04 wishthinkpad.loc systemd[1]: Started Network Connectivity (wlan0).
Jan 05 04:32:06 wishthinkpad.loc kernel: wlan0: authenticate with 00:18:39:a0:db:3e
Jan 05 04:32:06 wishthinkpad.loc kernel: wlan0: send auth to 00:18:39:a0:db:3e (try 1/3)
Jan 05 04:32:06 wishthinkpad.loc kernel: wlan0: authenticated
Jan 05 04:32:06 wishthinkpad.loc kernel: rt73usb 1-1.1:1.0: wlan0: disabling HT as WMM/QoS is not supported
Jan 05 04:32:06 wishthinkpad.loc kernel: wlan0: associate with 00:18:39:a0:db:3e (try 1/3)
Jan 05 04:32:06 wishthinkpad.loc kernel: wlan0: RX AssocResp from 00:18:39:a0:db:3e (capab=0x411 status=0 aid=1)
Jan 05 04:32:06 wishthinkpad.loc kernel: wlan0: associated
Jan 05 04:32:06 wishthinkpad.loc kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[root@wishthinkpad andrzejl]#

Thanks again Boohbah I wouldn’t be able to solve that without You.

Hopefully someone else can use it in the future.

Regards.

Andrzej

EDIT 01: Adding pci=noacpi as a kernel parameter seems to make this temperamental USB device to behave slightly better…
EDIT 02: Power management needs to be disabled and the rate must be brought down to 1M otherwise card disconnects AND looses pings.

Cool trick – speeding up LibreOffice by pre-loading it during boot.

Hi all.

I have decided to speed up opening of the LibreOffice and its components by pre-loading it after I log into my system.

This is not a trick for people with low ram machines. Why? It pre-loads LibreOffice on system start and keeps it in the memory so unless you are willing to sacrifice something between 64256 MB of RAM – this how-to is not for You.

Still interested? Great. Do this:

Open terminal and run those commands:

touch ~/.config/autostart/preload_libreoffice.sh

chmod +x ~/.config/autostart/preload_libreoffice.sh

mcedit ~/.config/autostart/preload_libreoffice.sh

Now copy this:

#!/bin/sh
sleep 15
loffice --nodefault --nologo &
PID=$!
sleep 10
kill $PID

Click on the mcedit window and press SHIFT + INS(ERT). Content of the clipboard should now be pasted into the mcedit. Now press F2 to invoke saving dialog. Now press F10 to invoke closing dialog.

Mcedit - Saving the script

Close the terminal and open any part of the LibreOffice (writer, calc, draw whatever ails you…) and click Tools > Options from the menu bar. Now in the LibreOffice menu find and click Memory. See the Use for LibreOffice box? Change it’s value to something like 64, 128 or 256. Now OK the Options window and close LibreOffice.

LibreOffice - Memory Settings

Now reboot Your machine and log into it. Give it some time (15 seconds) to run the script in the background and try opening LibreOffice component… It should start in less then 1 second.

Regards.

Andrzej

Playing DVD Videos in SMPlayer. Adding SMPlayer entry in KDE’s Device Notifier.

Hi folks.

I have installed Arch Linux few days ago. I am loving it.

By default SMPlayer won’t play DVD videos neither will it have entry in the KDE4 Device Notifier to do so. Here is how I got it to work:

I assume You have a fully upgraded system.

Run this:

su

Now give it root’s password.

Now run this:

pacman -S smplayer libdvdcss libdvdnav libdvdread

and agree to install all the packages and their dependencies.

Now run this:

mcedit /etc/udev/rules.d/82-cdrom.rules

and paste this as a content:

SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="cdrom cdrw dvd dvdrw"

Big thank You to sudokode for helping me with the udev rule.

Now save the file and close editor (F2 to save, F10 to exit). You can use any other text editor like vi, nano etc.

Now if You’re not using KDE4 and You do not need or want the Device Notifier entry You can reboot. SMPlayer will be able to play Your dvd videos now.

For those that want and need the Device Notifier entry please continue in the same terminal.

Run this:

mkdir -p /usr/share/apps/solid/actions/

mcedit /usr/share/apps/solid/actions/smplayer_play_dvd.desktop

and paste this:

[Desktop Entry]
Type=Service
Actions=PlayDVD;
X-KDE-Solid-Predicate=OpticalDisc.availableContent & 'VideoDvd'
[Desktop Action PlayDVD]
Name=Play DVD with SMPlayer
Exec=smplayer dvd://%U
Icon=smplayer

Now save the file and close editor (F2 to save, F10 to exit). You can use any other text editor like vi, nano etc.

Reboot Your machine.

Now when You insert DVD disc into the drive Device Notifier will ask You what do You want to do. One of the options should be to “Play DVD with SMPlayer”

Regards.

Andrzej

Testing Mozilla Thunderbird Central Daily 20 safely on PCLinuxOS 2012.x

Hi all.

I wanted to test the latest version of the e-mail client from Mozilla. I am a huge fan of Thunderbird and it always was my main e-mail client. PCLinuxOS comes with the latest stable version. Its a good thing. I love stability of my distribution. However I want to try the newest Mozilla product before it becomes a default for PCLinuxOS. Also I want to help Mozilla Developers by filing a bug reports and make their products even better this way.

Here are few simple steps You can do if You want to test it too.

Thunderbird is a default PCLinuxOS e-mail client so its installed by default. If You removed it – reinstall it via synaptic.

Older version must be installed for few minor yet important reasons.

Close Thunderbird completely. Now open console and run these commands:

cd

Go to Your /home/ folder

This version of Thunderbird is a bleeding edge release so ride might be little bumpy. I never noticed any problems but just to be on the safe side…

cp -R ~/.thunderbird ~/.thunderbird.backup.20

let’s backup Your profile first.

wget -c http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-central/thunderbird-20.0a1.en-US.linux-i686.tar.bz2

Download the compressed Daily XX file.

tar -xvjf ./thunderbird-20.0a1.en-US.linux-i686.tar.bz2

Extract it.

rm -f ./thunderbird-20.0a1.en-US.linux-i686.tar.bz2

Remove it.

su

Gain root privileges…

root password

…by giving correct root password.

rm -f /usr/bin/thunderbird

Remove old executable.

rm -f /usr/bin/mozilla-thunderbird

Remove old executable.

ln -s /home/yourlogin/thunderbird/thunderbird /usr/bin/thunderbird

Create symlink to a new executable in Your home folder. Replace yourlogin with Your actual login.

ln -s /home/yourlogin/thunderbird/mozilla-thunderbird /usr/bin/mozilla-thunderbird

Create symlink to a new executable in Your home folder. Replace yourlogin with Your actual login.

exit

exit

Go back to user mode and close the console.

Now You can use the old shortcuts (from the desktop, panel or KMenu) to open new Thunderbird. All the programs should open the mailto: links in new version of Thunderbird too.

Enjoy the latest and the greatest from Mozilla. I am. If You are using Daily You should know that it can also be safely upgraded to the latest version by using Help > About Daily from the Thunderbird menu bar.

Thunderbird 20 Daily on PCLinuxOS 2011.x

Going back to the repo version of Thunderbird.

Close Thunderbird completely. Reinstall Thunderbird using Synaptic.

Regards.

Andy

Testing Mozilla Firefox Nightly 20 safely on PCLinuxOS 2012.x

Hi all.

I wanted to test the latest browser from Mozilla. I am a huge fan of Firefox and it always was my main browser. PCLinuxOS comes with the latest stable version. Its a good thing. I love stability of my distribution. However I want to try the newest Mozilla product before it becomes a default browser for PCLinuxOS. Also I want to help Mozilla Developers by filing a bug reports and make their products even better this way.

Here are few simple steps You can do if You want to test it too.

Firefox is a default PCLinuxOS browser so its installed by default. If You removed it – reinstall it via synaptic.

Older version must be installed for few minor yet important reasons.

Close Firefox browser completely. Now open console and run these commands:

cd

Go to Your /home/ folder

cp -R ~/.mozilla ~/.mozilla.backup.20

Let’s backup Your profile first.

wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-20.0a1.en-US.linux-i686.tar.bz2

Download the compressed Nightly XX file.

tar -xvjf ./firefox-20.0a1.en-US.linux-i686.tar.bz2

Extract it.

rm -f ./firefox-20.0a1.en-US.linux-i686.tar.bz2

Remove it.

cd ~/firefox/searchplugins/ && wget -c http://andrzejl.cyryl.net/WoTW/WoTW_files/FFxSearchPCLOSForum/pclinuxos-forum.xml

Add the search engine for PCLinuxOS Forum.

su

Gain root privileges…

root password

…by giving correct root password.

rm -f /usr/bin/firefox

Remove old symlink.

rm -f /usr/bin/mozilla-firefox

Remove old symlink.

ln -s /home/yourlogin/firefox/firefox /usr/bin/firefox

Create new symlink. Replace yourlogin with Your actual login.

ln -s /home/yourlogin/firefox/firefox /usr/bin/mozilla-firefox

Create new symlink. Replace yourlogin with Your actual login.

exit

exit

Go back to user mode and close the console.

Now You can use the old shortcuts (from the desktop, panel or KMenu) to open new Firefox. All the programs should open links in new version of Firefox too.

Enjoy the latest and the greatest from Mozilla. I am. If You are using Nightly You should know that it can also be safely upgraded to the latest version by using Help > About Nightly from the Firefox menu bar.

Firefox 20 Nightly on PCLinuxOS 2011.x

Going back to the repo version of Firefox.

Close Firefox completely. Reinstall Firefox using synaptic.

Regards.

Andy

Boy do I love sshfs… Mounting ssh / sftp share as a local drives.

Hi folks.

I have a machine that runs ssh server. That’s nothing new. Neither is it worth mentioning under normal circumstances… Recently I have purchased a 2 TB Western Digital MyBook USB 3.0 hard drive and I was going to use it to backup all my data. Why not make it a network shared drive I thought. It will make my life much easier if I could access the data from all my machines? Not a bad idea… I know… but I am not going to setup samba or nfs. I don’t want to make it a “network” drive. I want to have it mounted as a local drive on every machine that I use without a big fuss… How do I go about it?

I assume that You have drive attached to the ssh server running machine and that it’s mounted and that You have read and write permissions granted to Your user. I am using static IPs in my network – this is making things much easier for me as well.

In my case the drive is mounted on the server (IP 192.168.0.1 and port 20202) as /media/1862_GB_X-Ternal/ and my user andrzejl is the only user that is allowed to write to and read from it.

Now it’s time to prep the client machine. It’s really simple…

I want to have my drive mounted on my ssh client machines in /media/1862_GB_X-Ternal/ folder but I want to mount it as user (andrzejl) – not as root.

First I had to open terminal and gain root’s privileges by issuing:

su

and giving a root’s password.

Next I had to create my mount point:

mkdir -p /media/1862_GB_X-Ternal/

and make andrzejl owner of it:

chown -Rf andrzejl:andrzejl /media/1862_GB_X-Ternal/

Now that I had the folder ready I needed a package that would allow me to work with sshfs / sftp file system so in the same terminal I ran:

apt-get install sshfs-fuse

After the package was downloaded and installed I could close this terminal window and open another one. I needed to drop the root’s privileges as I want to do the rest of this as a user.

The syntax of the command looks like this:

sshfs -p sshSERVERport loginTOtheSSHserver@IPorHOSTNAMEofTHEsshServer:/where/is/the/drive/mounted/on/the/server/ /where/to/mount/on/local/machine/

Now… if I will start filling the data in this command I get this:

sshfs -p 20202 andrzejl@192.168.0.1:/media/1862_GB_X-Ternal/ /media/1862_GB_X-Ternal/

After running this command and typing in the password (if You got the syntax right) You should find all Your data on Your ssh client machine mounted in /media/1862_GB_X-Ternal/ ready to be read and modify by Your user.

Now…

IF You want the data to be automounted at start up without typing in the password follow this post. Passwordless SSH authentication. Using authentication keys

You also need to create a mountsshfsshare.sh script in your ~/.config/autostart folder and make it executable.

Here is how I do it under KDE4.

Open terminal. Type in:

touch ~/.config/autostart/mountsshfsshare.sh

chmod +x ~/.config/autostart/mountsshfsshare.sh

echo "sshfs -p 20202 andrzejl@192.168.0.1:/media/1862_GB_X-Ternal/ /media/1862_GB_X-Ternal/" > ~/.config/autostart/mountsshfsshare.sh

Don’t forget to modify the sshfs line to suite Your needs.

Just to check run this:

cat ~/.config/autostart/mountsshfsshare.sh

It should spit out:

sshfs -p 20202 andrzejl@192.168.0.1:/media/1862_GB_X-Ternal/ /media/1862_GB_X-Ternal/

or whatever command You use to mount the sshfs share. Now You can reboot the ssh client machine for testing purposes. If You did everything properly – You will have a mounted drive waiting for You next time You boot up Your machine.

Edit 01: Sometimes .sh script will not work. Try creating .desktop file then instead.

Remove the .sh file first.

rm -f ~/.config/autostart/mountsshfsshare.sh

Now create the .desktop file.

touch ~/.config/autostart/mountsshfsshare.desktop

Now edit the file using Your favorite editor. I will use mcedit here. Paste this into it:

[Desktop Entry]
Comment[en_US]=Mount SSHFS automagically.
Comment=Mount SSHFS automagically.
Encoding=UTF-8
Exec=sshfs -p 20202 andrzejl@192.168.0.1:/media/1862_GB_X-Ternal/ /media/1862_GB_X-Ternal/ &
GenericName[en_US]=
GenericName=
Icon=xterm-terminal
MimeType=
Name[en_US]=sshfs_mount
Name=sshfs_mount
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

Do not forget to change the sshfs line. Now save the file and reboot for testing.

Edit 02: IF a startup script nor a desktop file works for You add (as root using Your favorite text editor) lines like this at the end of Your /etc/rc.local file:

echo "Mounting SSHFS share as andrzejl"
su andrzejl -c "sshfs -p 20202 andrzejl@192.168.0.1:/media/1862_GB_X-Ternal/ /media/1862_GB_X-Ternal/ &"

Don’t forget to leave one empty line at the end of the file. Also You will need to modify the lines to Your needs of course.

I like this setup very much for a good few reasons. Here are just a few:

a) hard drive is being shared over the network but it feels and acts like a local drive
b) it’s not accessible by the windows machines without specific setup
c) it’s easy to setup permissions to the drive so only one user or group can have full access to the drive. You can have some folks to see the drive as read only while You keep the privileges to write to it.
d) like everything that runs via ssh the traffic between you and the hdd is encrypted

Regards.

Andy

How to find all the empty folders inside a current folder using terminal? How to filter the output of the command to only show folders that name DOES NOT matches a certain pattern?

Hi.

How to find all the empty folders inside a current folder using terminal? How to filter the output of the command to only show folders that name DOES NOT matches a certain pattern?

It’s simple:

find . -depth -type d -empty | grep -i -v -e "pattern"

You can filter out more then one pattern:

find . -depth -type d -empty | grep -i -v -e "pattern1" -e "pattern2" -e "pattern3" -e "pattern4"

This command will find all the empty folders in the current (.) folder and will grep (ignoring the UPPER or lower case) for names that DO NOT match the pattern word and will display only those names.

Regards.

Andy

Adding ‘Play content of this folder as DVD video in SMPlayer.’ entry to Actions menu (Service Menu) in KDE4

Hi folks.

I have a bunch of folders on my hard drive containing a DVD videos. Family videos from Christmas, Weddings, Baptisms and other occasions recorded with my Camcorder in DVD format and then backed up to my HDD. I could rip them into .avi files just to make it easier to play them but then I am risking loosing the quality. It would be pointless really – recording in DVD quality just to encode it to avi… If not the waste of quality then definitely a waste of time and cpu power / electric energy.

Anyway as You probably know DVD video content is a whole structure. It’s not just one file so it’s not as easy as going into the file’s folder and clicking on it to make it playable. There are .vob files inside that could be played one after another… sure but it’s a waste of time again plus each DVD has at least 2 – 4 of those .vob files you would have to click on each of them to watch the entire video and sometimes the rewinding or fast forwarding won’t work when You do that… Nah… That won’t work for me.

When You right click on something in KDE4 You get right click menu and one of the items in this menu is ‘Actions’. I have decided to add ‘Play content of this folder as DVD video in SMPlayer.’ entry to this menu in my Arch Linux. It took me a while but I have succeeded. Here is how:

First make sure You have SMPlayer installed. After You install SMPlayer open terminal and run those commands:

mkdir -p ~/.kde4/share/kde4/services/ServiceMenus/

and then:

kwrite ~/.kde4/share/kde4/services/ServiceMenus/playwithsmplayer.desktop

and then paste this into the text editor:

[Desktop Entry]
Type=Service
Version=1.0
Actions=PlayWithSmplayer;
Name=Play content of this folder as DVD video in SMPlayer.
GenericName=Play content of this folder as DVD video in SMPlayer.
Icon=/usr/share/icons/hicolor/64x64/apps/smplayer.png
ServiceTypes=ServiceTypes=KonqPopupMenu/Plugin
X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory
[Desktop Action PlayWithSmplayer]
Name=Play folder content as DVD video in SMPlayer.
Exec=smplayer 'dvd://1//%U'
Icon=/usr/share/icons/hicolor/16x16/apps/smplayer.png

Now save the file. There… You’re all done…

Adding 'Play content of this folder as DVD video in SMPlayer.' entry to Actions menu (Service Menu)

Right click on any folder containing DVD structure and choose Actions > Play content of this folder as DVD video in SMPlayer from the menu. Smplayer will start and will start playing DVD from the folder that You have chosen.

Hope someone will find it useful.

Regards.

Andrzej

My screen is way to dark when booting to PCLinuxOS… What can I do?

Hi.

So Your screen is normally bright but for whatever reason when You boot up to PCLinuxOS the brightness level is very low?

Try this:

1) Install xbacklight via synaptic
2) Open terminal and su to root
3) List the content of the folder /sys/class/backlight with this command:

ls --full /sys/class/backlight

4) You should get few hits:

[root@wishmacer backlight]# ls –full /sys/class/backlight
total 0
lrwxrwxrwx 1 root root 0 2012-11-04 02:10:05.023004946 +0000 acer-wmi -> ../../devices/platform/acer-wmi/backlight/acer-wmi/
lrwxrwxrwx 1 root root 0 2012-11-04 02:09:09.784000471 +0000 intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/
[root@wishmacer backlight]#

5) Now You need to get Your command right. We are gonna push the variable into the correct folder. The variable and the folder will be different on all machines but I think it’s safe to assume the variable values go from 1 to 15.

6) So knowing that let’s try the intel_backlight folder first:

echo -n 15 > /sys/class/backlight/intel_backlight/brightness

This however didn’t go so well.

[root@wishmacer backlight]# echo -n 15 > /sys/class/backlight/intel_backlight/brightness
bash: echo: write error: Invalid argument
[root@wishmacer backlight]#

7) So let’s try the acer-wmi folder:

echo -n 15 > /sys/class/backlight/acer-wmi/brightness

BINGO! Screen got bright.

8) Now that You know what folder/file to modify – try changing the variable from 15 and see if You get better results with other numbers. See if You can go 16 or 14 for example.

8) When Your command is ready open Your favorite text editor as root and modify the /etc/rc.local file by adding the command as a last line.

9) Save the file and reboot.

Hope this helps!

Regards.

Andy