30 Aug

Continuously move dragged content with touch pad

Following operation only takes effect in Xorg. If you are in Wayland, you need to log out and switch to a Xorg session.

First, you need to find out device ID of your touchpad:

$ xinput list

This command will give you something like :
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SYNA7813:00 06CB:16DB id=13 [slave pointer (2)]
⎜ ↳ ETPS/2 Elantech Touchpad id=15 [slave pointer (2)]
⎜ ↳ dougav’s mouse id=9 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Clavier de Dawud W Vong id=10 [slave keyboard (3)]
↳ HP Wide Vision HD id=11 [slave keyboard (3)]
↳ Intel Virtual Button driver id=12 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
↳ HP WMI hotkeys id=16 [slave keyboard (3)]
↳ HP Wireless hotkeys id=17 [slave keyboard (3)]

Touchpad’s ID is 15 in this case
You can list Properties of your TOuchpad with:
$ xinput --list-props 15
you’ll see something like:
Device 'ETPS/2 Elantech Touchpad':
Device Enabled (143): 1
Coordinate Transformation Matrix (145): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Tapping Enabled (296): 1
libinput Tapping Enabled Default (297): 0
libinput Tapping Drag Enabled (298): 1
libinput Tapping Drag Enabled Default (299): 1
libinput Tapping Drag Lock Enabled (300): 0
libinput Tapping Drag Lock Enabled Default (301): 0
libinput Tapping Button Mapping Enabled (302): 1, 0
libinput Tapping Button Mapping Default (303): 1, 0
libinput Natural Scrolling Enabled (278): 1
libinput Natural Scrolling Enabled Default (279): 0
......

Property “libinput Tapping Drag Lock Enabled” which should be 0 by default is what we need to turn on.
Execute:

$ xinput set-prop 12 "libinput Tapping Drag Lock Enabled" 1
This will enable Drag lock function.
Now you will be able to continuously drag contents without being restricted by touchpad size.
When your dragging movement reaches the edge of the touchpad, you can quickly lift your finger and click-hold the middle of the touchpad without losing your connection with the dragged content.
Please add this command to .xprofile to make it permanently available.

30 May

World clock’s width changes frequently

LXQT’s default panel does not contain a ram monitor and besides, I don’t like its CPU monitor. So I installed Multiload-ng. This widget has fancy colors, and some problem happened to it.
LXQT’s World clock which is located behind Multiload-ng changes its width frequently according to the numbers. This causes instability to Multiload-ng’s color, some color noise appears around Multiload-ng.
According to World clock’s GitHub discussion, the number displayed is controlled by HTML syntax. Therefore, it is easy to set a monospaced font to the clock number like this:


'<font size="3" face="Monospace">'HH:mm:ss'</font>'

This solved Multiload-ng’s color problem.

29 May

change panel’s layer in LXQT

The previous article (lubuntu’s panel keeps in top of all windows) explains how to restrain LXDE’s panel in the bottom layer by editing lxde-rc.xml. A similar method is available in LXQT. The only difference is the ‘name’ property of the ‘application’ tag.

Comment information at the start of application part explained how to find applications’ name property. You can get a window’s properties by running xprop, the first element of window’s WM_CLASS property is what you need. As for panels in LXQT this value is ‘lxqt-panel’. So the entire config information is as follows:


<application name="lxqt-panel" >
<layer>below</layer>
</application>

4 Apr

LibreOffice impress crashes at the click of show button

With some certain files, my LibreOffice impress crashes every time when I click the show button. I started LibreOffice in the terminal in order to catch some error message. I got the following report:

soffice.bin: cairo-ft-font.c:576: _cairo_ft_unscaled_font_create_internal: Assertion `unscaled->base.hash_entry.hash == key.base.hash_entry.hash' failed.

It seems that it has something to do with fonts. I did some tests and found that it is the Chinese font “黑体” from MS powerpoint that caused the crash. The solution is to copy windows’ fonts to LO’s config directory.

specifically:

  1. create a new folder ” fonts ” under .config/libreoffice/4/user
  2. copy all files from C:\Windows\Fonts to .config/libreoffice/4/user/fonts

 

 

31 Jan

EFI partition corrupted

Resized EFI partition today, and failed to enter windows. I got this error message:

the boot configuration data for your pc is missing or contains errors

I tried several methods to repair it but none of them helps. Then I realized that the EFI partition may be corrupted.
So, I deleted the EFI partition completely and regenerated one with the tutorial here by genet.
The steps are as follows:

first, make sure you have an unallocated space for EFI and allocate other unused space.
Boot with a windows installation media and enter the command prompt
run the following commands to create EFI partition:

diskpart
list disk #note the disk number where you are going to create EFI
select disk n # n is the number you got from the previous command
list partition #you can see that there is no efi partition yet
create partition efi
format quick fs=fat32
list partition #you can see your new efi partition now
list volume #note the volume letter where your windows is installed
exit

Now, run the following commands to generate boot datas to EFI partition:

bcdboot X:\windows # n is the letter you got from the previous command

Reboot the computer now and you should be able to enter your windows

25 Dec

LXDE: desktop manager is not active

I’ve got some memory-intensive works to do recently. So I managed to log in to lxde desktop again last night after repairing a long-pending black screen problem by just uninstalling Nvidia driver.

However, I came up with a new problem this morning. After I set wallpaper on an external monitor, the desktop-preference program crashed by reporting "desktop manager is not active" and I got a wrongly configured wallpaper as an accompanying result. The link here said that this is because the pcmanfm failed to draw desktop at startup. Manually redraw desktop by executing:
pcmanfm --desktop &
will restore desktop-preference. I planned to add this command to autostart menu and found that there was already a similar command:
pcmanfm --desktop --profile LXDE
Obviously, this is the failed command which caused the trouble. It seems that an LXDE profile config file related to this command was corrupted.
I finally found this desktop-items-0.conf file under /home/user/.config/pcmanfm/LXDE and modified the wallpaper related settings in it to default. To be specific:

wallpaper_mode=crop
wallpaper=/usr/share/backgrounds/images/default.png

Actually, I copied these 2 lines from a desktop-items-1.conf file in the same folder.

15 Oct

Memory problem of VMPlayer14 on Fedora26

Upgraded My Fedora to 26 today and found my VMplaye-12.5.7 can not be started on Fedora 26. So I reinstalled vmplayer with version 14. VMplayer14 started properly, but when I started a VM, an error occurred as

” The virtual machine is unable to reserve memory“.

I tried several times, it reported either

” The virtual machine is unable to reserve memory” or “Not enough physical memory is available to power on this virtual machine”.

The vm’s memory is 1G, and I still have more than 4G free memory at the moment, so it can’t be the shortage of the memory that causes the problem. I searched for a while and found the solution here: https://communities.vmware.com/thread/573966

What is needed is the vmware-host-module patch from GitHub. Download the correct branch which corresponds to the vmware version, that is player-14.0.0 in my case, and do the following operations :

tar -cf vmmon.tar vmmon-only/

tar -cf vmnet.tar vmnet-only/

cp *.tar /usr/lib/vmware/modules/source/

Then remove the .ko files from /lib/modules/$(uname -r)/misc.

now do

vmware-modconfig –install-all

Then I rebooted the system and tried to run VMplayer again, everything went ok now.

7 Aug

Disable touchpad in fedora25-lxde

As synaptics is no longer available for controlling touchpad, we have to use xinput instead.
First, use command : xinput list to display all input devices and find out touchpad’s number.
In my system the result is:

⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech M215 2nd Gen id=10 [slave pointer (2)]
⎜ ↳ Logitech M280/320/275 id=11 [slave pointer (2)]
⎜ ↳ Logitech M280/320/275 id=12 [slave pointer (2)]
⎜ ↳ Logitech M280/320/275 id=13 [slave pointer (2)]
⎜ ↳ Logitech M280/320/275 id=14 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=17 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=18 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Integrated Camera id=15 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=16 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=19 [slave keyboard (3)]

As displayed, my touchpad’s id number is 17. Next, just disable it using the following command:
xinput --disable 17