While I normally use scrot attached to hotkeys using obkey for taking screenshots, for more complex screenshot tasks Imagemagick's import is an indispensable tool. For some reason, the man page for import on my Arch Linux system doesn't show the complete listing of all available options. A full listing requires one to refer to several different resources (here and here).
Say, for example, that we want to take 10 full-screen screenshots every second starting in 10 seconds and save the files in the ~/Images subfolder with the name snap.png. With imagemagick import we can do this with the following command:
import -window root -delay 10 -snaps 10 -pause 1 ~/Images/snap.png
-window root tells import to take a screenshot of the entire screen
-delay 10 tells import to wait 10 seconds before starting to take screenshots
-snaps 10 tells import to take 10 screenshots
-pause 1 tells import to wait 1 second between snaps
import will automatically number the screenshots snap-0.png ~ snap-9.png
2014년 2월 3일 월요일
Canon Pixma MG2400 Series (2490) support in Linux
I recently purchased a cheap inkjet/scanner Canon Pixma MG2490 for less than $50. I have had good results with the Canon Pixma MP 258 (MP250 series) which is fully supported in SANE.
After connecting the MG2490 to my machine I ran lsusb and got the following output:
[archjun@arch ~]$ lsusb
Bus 007 Device 006: ID 04a9:176c Canon, Inc.
...
Unfortunately, the MG2490 is not yet supported by SANE. Although sane-find-scanner returns
found USB scanner (vendor=0x04a9 [Canon], product=0x176c [MG2400 series]) at libusb:007:006
scanimage -L doesn't find any compatible scanners (not correct; see update below)
The proprietary Vuescan recognizes the MG2490 and provides basic scanner access in the free version (although a full-featured version costs $39.95 ~ $79.95). The free version embeds a full-page patterned watermark (Buy Vuescan Now!) throughout the scanned image, so this is a no-go for anyone who needs clean scans and wants to use FOSS.
UPDATE 2014-06-18: Actually SANE does recognize the MG2490. scanimage -L returns:
device `pixma:04A9176C_60C204' is a CANON Canon PIXMA MG2400 Series multi-function peripheral
After connecting the MG2490 to my machine I ran lsusb and got the following output:
[archjun@arch ~]$ lsusb
Bus 007 Device 006: ID 04a9:176c Canon, Inc.
...
Unfortunately, the MG2490 is not yet supported by SANE. Although sane-find-scanner returns
found USB scanner (vendor=0x04a9 [Canon], product=0x176c [MG2400 series]) at libusb:007:006
scanimage -L doesn't find any compatible scanners (not correct; see update below)
The proprietary Vuescan recognizes the MG2490 and provides basic scanner access in the free version (although a full-featured version costs $39.95 ~ $79.95). The free version embeds a full-page patterned watermark (Buy Vuescan Now!) throughout the scanned image, so this is a no-go for anyone who needs clean scans and wants to use FOSS.
UPDATE 2014-06-18: Actually SANE does recognize the MG2490. scanimage -L returns:
device `pixma:04A9176C_60C204' is a CANON Canon PIXMA MG2400 Series multi-function peripheral
Xsane also recognizes the MG2490, although it takes several minutes as it scans for devices. Once the scan interface appears, however, pressing "Scan" or "Acquire Preview" does nothing and just hangs.
Note that Canon provides .deb and .rpm packages for the MG2400 series. The scanner driver rpm can be found at:
The above package depends on the cnijfilter-mg2400 package whose rpm can be found at:
Printing works just fine OOTB without installing the Canon print driver -- if you install the gutenprint package, there is a ppd file that CUPS can use to detect the MG2940.
The problem right now is getting scanning to work, however...
UPDATE 2014-09-16 Pixma MG2400 series is now supported
According to this thread from sane-devel, Rolf Bensch has patched the latest sane backend in the sane git repo. I haven't yet had time to test the patched version of sane on the MG2490. When I get the chance, I will present my findings here.
According to this thread from sane-devel, Rolf Bensch has patched the latest sane backend in the sane git repo. I haven't yet had time to test the patched version of sane on the MG2490. When I get the chance, I will present my findings here.
2014년 1월 15일 수요일
libreoffice와 ibus 호환 문제 해결 방법 (Arch Linux, Debian)
ibus과 ibus-hangul을 설치했는데도 libreoffice에서 한글 입력이 안 되면:
libreoffice-gtk 설치 해보세요 (Ubuntu나 Debian 파생 distro 쓰고 있는 경우)
libreoffice-gnome 설치 해보세요 (Archlinux 쓰고 있는 경우)
libreoffice-gtk 설치 해보세요 (Ubuntu나 Debian 파생 distro 쓰고 있는 경우)
libreoffice-gnome 설치 해보세요 (Archlinux 쓰고 있는 경우)
라벨:
archlinux,
debian,
ibus,
ibus-hangul,
libreoffice,
linux
2014년 1월 8일 수요일
Getting Huion H610 drawing tablet working in Linux Kernel 3.12...
There is a huion driver, hid-huion, that has been in mainline since 3.11 but it only supports up to the Huion 580 8" x 5" drawing tablet. Fortunately, developer Nikolai Kondrashov has made an out-of-tree kernel driver that supports the Huion H610 10" x 6" drawing tablet.
To install the driver, you must first install linux kernel headers for your distro. In the case of Archlinux, sudo pacman -S linux-headers.
Next git clone Nikolai's huion-driver repo from github to a local folder:
cd into the directory huion-driver and then run make:
If you get an error like
make[1]: *** /lib/modules/3.12.6-1-ARCH/ build: No such file or directory. Stop.
you probably don't have your linux kernel header package installed, so install that first.
Before running make install as root, unload the existing mainline driver hid-huion (or hid_huion) as follows:
rmmod hid-huion
or
modprobe -r hid-huion
Unplug your H610 if it's connected to your machine, and run make install as root:
Now if you plug your H610 back in, you should find that it works smoothly with a recent kernel! I recommend using this driver instead of trying to use the native Linux drivers provided by Huion - they don't even provide a makefile and expect desperate users to edit various C source files themselves!
BTW, the developer of this driver needs your help -- he says he cannot submit to mainline before verifying that it also works with the Huion 580, K58, and W58. If anyone happens to own these models, please contact the DIGIMEND project devs or the DIGIMEND project mailing list once you have verified the out-of-tree driver works for these older models, too.
Postscript 2014-04-08: One thing that is a bit cumbersome is that every time you upgrade your kernel (which is quite frequent in the case of Archlinux) you will have to remove the existing driver hid-huion and reinstall the out-of-tree DIGIMEND huion-driver once again...
Postscript 2014-09-27: huion-driver has been superseded by the digimend-kernel-drivers repository. All the commands above still apply, however just substitute the new repo name when using git clone.
Postcript 2014-10-25: Just a few days ago, Linux kernel 3.17.1-1 was made available in the default Archlinux repos and I can confirm that the Huion H610 now works OOTB (Out Of the Box) without the need to compile any out-of-tree drivers. Developer Nikolai Kondrashov's kernel patch for Huion devices was accepted at the end of July 2014 and he said it would be included in the mainline kernel starting from 3.17.X -- now everything works like a charm!
To install the driver, you must first install linux kernel headers for your distro. In the case of Archlinux, sudo pacman -S linux-headers.
Next git clone Nikolai's huion-driver repo from github to a local folder:
[archjun@archbang AUR]$ git clone https://github.com/DIGImend/ huion-driver.git
Cloning into 'huion-driver'...
remote: Reusing existing pack: 83, done.
remote: Total 83 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (83/83), done.
Checking connectivity... done.
cd into the directory huion-driver and then run make:
[archjun@archbang huion-driver]$ make
make -C /lib/modules/3.12.6-1-ARCH/ build SUBDIRS=/home/archjun/ Downloads/AUR/huion-driver modules
make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
CC [M] /home/archjun/Downloads/AUR/ huion-driver/hid-huion.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/archjun/Downloads/AUR/ huion-driver/hid-huion.mod.o
LD [M] /home/archjun/Downloads/AUR/ huion-driver/hid-huion.ko
make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
If you get an error like
make[1]: *** /lib/modules/3.12.6-1-ARCH/
you probably don't have your linux kernel header package installed, so install that first.
Before running make install as root, unload the existing mainline driver hid-huion (or hid_huion) as follows:
rmmod hid-huion
or
modprobe -r hid-huion
Unplug your H610 if it's connected to your machine, and run make install as root:
[archjun@archbang huion-driver]$ sudo make install
make -C /lib/modules/3.12.6-1-ARCH/ build SUBDIRS=/home/archjun/ Downloads/AUR/huion-driver modules_install
make[1]: Entering directory '/usr/src/linux-3.12.6-1-ARCH'
INSTALL /home/archjun/Downloads/AUR/ huion-driver/hid-huion.ko
DEPMOD 3.12.6-1-ARCH
make[1]: Leaving directory '/usr/src/linux-3.12.6-1-ARCH'
install -D -m 0644 hid-huion.conf /etc/depmod.d/hid-huion.conf
depmod -a
install hid-rebind /sbin
install -m 0644 hid-rebind.rules /lib/udev/rules.d/70-hid- rebind.rules
udevadm control --reload
Now if you plug your H610 back in, you should find that it works smoothly with a recent kernel! I recommend using this driver instead of trying to use the native Linux drivers provided by Huion - they don't even provide a makefile and expect desperate users to edit various C source files themselves!
BTW, the developer of this driver needs your help -- he says he cannot submit to mainline before verifying that it also works with the Huion 580, K58, and W58. If anyone happens to own these models, please contact the DIGIMEND project devs or the DIGIMEND project mailing list once you have verified the out-of-tree driver works for these older models, too.
Postscript 2014-04-08: One thing that is a bit cumbersome is that every time you upgrade your kernel (which is quite frequent in the case of Archlinux) you will have to remove the existing driver hid-huion and reinstall the out-of-tree DIGIMEND huion-driver once again...
Postscript 2014-09-27: huion-driver has been superseded by the digimend-kernel-drivers repository. All the commands above still apply, however just substitute the new repo name when using git clone.
Postcript 2014-10-25: Just a few days ago, Linux kernel 3.17.1-1 was made available in the default Archlinux repos and I can confirm that the Huion H610 now works OOTB (Out Of the Box) without the need to compile any out-of-tree drivers. Developer Nikolai Kondrashov's kernel patch for Huion devices was accepted at the end of July 2014 and he said it would be included in the mainline kernel starting from 3.17.X -- now everything works like a charm!
2013년 12월 27일 금요일
JS: 오른쪽 마우스 클릭 차단 Pt II
최근에 다음 오른쪽 마우스 클릭 방지 기능이 좀 바꼈다:
하지만 파이폭스 add-on Greasemonkey를 설치하고 최근의 Anti-Disabler 유저 스크립트를 설치하면 오른쪽 마으스 클릭 방지가 소용없게 된다!
Anti-Disabler 소스 코드는 여기에 있다.
Greasemonkey 쓰기 싫으면 복사하고 싶은 텍스트 콘텐츠 (예: 법정 스님 살 때와 죽을 때)를 Google 검색 창에 입력하고 뒤에 마이너스 '-' 기호를 삽입한 다음 배제할 도메인을 입력하삼:
법정 스님 살 때와 죽을 때 -daum.net
하지만 파이폭스 add-on Greasemonkey를 설치하고 최근의 Anti-Disabler 유저 스크립트를 설치하면 오른쪽 마으스 클릭 방지가 소용없게 된다!
Anti-Disabler 소스 코드는 여기에 있다.
Greasemonkey 쓰기 싫으면 복사하고 싶은 텍스트 콘텐츠 (예: 법정 스님 살 때와 죽을 때)를 Google 검색 창에 입력하고 뒤에 마이너스 '-' 기호를 삽입한 다음 배제할 도메인을 입력하삼:
법정 스님 살 때와 죽을 때 -daum.net
라벨:
daum,
JS,
oncontextmenu
2013년 12월 11일 수요일
[SOLVED] Rescuetime Client for Linux 2.8.5.870+ -- Problems in Archlinux
I've been a happy user of Rescuetime on linux for about 18 months. The local client that tracks the applications used and sites visited works on Windows, Mac OS and various linux distros.
In fact, I have had no problems with Rescuetime running on my Debian systems. But starting on Nov. 28, 2013 Rescuetime stopped working on one of my Archlinux installs with Openbox window manager and tint2 taskbar manager installed.
The problem began when I upgraded from RT linux client 2.8.1.865 to the current beta (which was 2.8.5.890 at the time) [The Arch User Repository (AUR) has packages for both Rescuetime stable and beta].
I soon noticed that time tracking of active windows was no longer working properly. The client only recorded the first 2 or 3 minutes of usage in an active window, discarding the rest. Oddly enough, time in non-active windows is recorded just fine -- i.e. if I launch a Virtualbox instance of Windows, the RT client records the time spent in the VM quite reliably. Also if I launch a full-screen game through WINE or a program on another Xsession using xinit, the RT client keeps recording time in the last window that was active -- i.e. if the active window was Libreoffice Writer but I then launch a WINE app from the Openbox launch menu, the RT linux client will still think I'm in Libreoffice Writer while I'm playing my WINE game.
Anyways, I immediately downgraded to the current stable version 2.8.5.870 but it exhibited the same behavior as 2.8.5.890~896. Unfortunately I couldn't downgrade to 2.8.1.865 (which was the last version that worked for me) because the oldest version available on the Rescuetime site was now 2.8.5.870.
Between the upgrade from 2.8.1.865 to 2.8.5.890 and the downgrade to 2.8.5.870, none of the packages on my system changed. Only after I upgraded to a newer beta 2.8.5.896 and noticed that the RT client still wasn't working did I update my system out of desperation, with upgrades to 7 packages as well as the linux kernel (from 3.12.1-1 -> 3.12.1-3) according to /var/log/pacman.log
This failed to make any difference, however. Finally on Dec. 5th, RescueTime tech support gave me a download link to 2.8.1.865 which had worked for me prior to Nov. 28, 2013. With great anticipation, I installed the old version and ... nothing. The old version which used to work no longer did!
Isolating the package(s) that might be causing this behavior is a big headache, because between 2013.11.29 ~ 2013.12.05 I upgraded 23 packages on my Archlinux install according to /var/log/pacman.log
None of the dependencies of rescuetime (qt4, xorg-xprop, xprintidle) were affected, however. The 30 packages (not including the kernel) upgraded were:
cifs-utils (mounting Samba shares in Linux)
gtk3 (GUI toolkit)
mplayer (media player)
python2-distutils-extra
python2-dnspython
tevent (event system based on the talloc memory management library)
youtube-dl (download Youtube videos from CLI)
imagemagick
calibre (ebook reader)
python (Python3 for Arch)
python2
serf (asynchronous HTTP client library)
subversion (VCS)
syslinux (bootloaders)
mesa (opensource OpenGL implementation)
mesa-libgl
intel-dri
lib32-dbus
lib32-mesa
lib32-mesa-libgl
lib32-intel-dri
libtasn1 (ASN.1 library used in GNUTLS)
svga-dri
I don't think any of the packages above should have anything to do with the RT client, and I don't want to roll back all these packages just to check. As a control, I tested 2.8.5.870 (stable) and 2.8.5.896 (beta) on a Debian machine running linux kernel 3.9 and the RT client worked just fine, correctly logging time spent in all applications, be they local or browser-based.
Note that the Debian system I tested RescueTime on doesn't use systemd and dbus but rather sysvinit for init scripts and managing services.
Has anyone else out there in Internet-land had a similar issue with the Rescuetime client in Archlinux?
UPDATE Jan 2014: Rescuetime support tracked down the bug -- the problem was related to the variable url_from_plugin_delay in the configuration file rescuetimed.cfg
In beta 2.8.5.896, this variable was changed from milliseconds to seconds, causing the RT linux client to check active windows only intermittently instead of every few seconds. When I downgraded to .870 it seems this variable overwritten by .896 caused similar behavior to occur in .870 stable.
The issue is totally fixed in the latest RT linux beta 2.8.5.964. RescueTime was even so kind as to give me a subscription credit of 8 weeks due to the bug in 896! RescueTime is one of those tools that has absolutely changed my life and I strongly recommend everyone to give it a try!
In fact, I have had no problems with Rescuetime running on my Debian systems. But starting on Nov. 28, 2013 Rescuetime stopped working on one of my Archlinux installs with Openbox window manager and tint2 taskbar manager installed.
The problem began when I upgraded from RT linux client 2.8.1.865 to the current beta (which was 2.8.5.890 at the time) [The Arch User Repository (AUR) has packages for both Rescuetime stable and beta].
I soon noticed that time tracking of active windows was no longer working properly. The client only recorded the first 2 or 3 minutes of usage in an active window, discarding the rest. Oddly enough, time in non-active windows is recorded just fine -- i.e. if I launch a Virtualbox instance of Windows, the RT client records the time spent in the VM quite reliably. Also if I launch a full-screen game through WINE or a program on another Xsession using xinit, the RT client keeps recording time in the last window that was active -- i.e. if the active window was Libreoffice Writer but I then launch a WINE app from the Openbox launch menu, the RT linux client will still think I'm in Libreoffice Writer while I'm playing my WINE game.
Anyways, I immediately downgraded to the current stable version 2.8.5.870 but it exhibited the same behavior as 2.8.5.890~896. Unfortunately I couldn't downgrade to 2.8.1.865 (which was the last version that worked for me) because the oldest version available on the Rescuetime site was now 2.8.5.870.
Between the upgrade from 2.8.1.865 to 2.8.5.890 and the downgrade to 2.8.5.870, none of the packages on my system changed. Only after I upgraded to a newer beta 2.8.5.896 and noticed that the RT client still wasn't working did I update my system out of desperation, with upgrades to 7 packages as well as the linux kernel (from 3.12.1-1 -> 3.12.1-3) according to /var/log/pacman.log
This failed to make any difference, however. Finally on Dec. 5th, RescueTime tech support gave me a download link to 2.8.1.865 which had worked for me prior to Nov. 28, 2013. With great anticipation, I installed the old version and ... nothing. The old version which used to work no longer did!
Isolating the package(s) that might be causing this behavior is a big headache, because between 2013.11.29 ~ 2013.12.05 I upgraded 23 packages on my Archlinux install according to /var/log/pacman.log
None of the dependencies of rescuetime (qt4, xorg-xprop, xprintidle) were affected, however. The 30 packages (not including the kernel) upgraded were:
cifs-utils (mounting Samba shares in Linux)
gtk3 (GUI toolkit)
mplayer (media player)
python2-distutils-extra
python2-dnspython
tevent (event system based on the talloc memory management library)
youtube-dl (download Youtube videos from CLI)
imagemagick
calibre (ebook reader)
python (Python3 for Arch)
python2
serf (asynchronous HTTP client library)
subversion (VCS)
syslinux (bootloaders)
mesa (opensource OpenGL implementation)
mesa-libgl
intel-dri
lib32-dbus
lib32-mesa
lib32-mesa-libgl
lib32-intel-dri
libtasn1 (ASN.1 library used in GNUTLS)
svga-dri
virtualbox-host-modules
virtualbox
virtualbox-guest-dkms
virtualbox-guest-iso
virtualbox-guest-modules
virtualbox-guest-utils
xterm
I don't think any of the packages above should have anything to do with the RT client, and I don't want to roll back all these packages just to check. As a control, I tested 2.8.5.870 (stable) and 2.8.5.896 (beta) on a Debian machine running linux kernel 3.9 and the RT client worked just fine, correctly logging time spent in all applications, be they local or browser-based.
Note that the Debian system I tested RescueTime on doesn't use systemd and dbus but rather sysvinit for init scripts and managing services.
Has anyone else out there in Internet-land had a similar issue with the Rescuetime client in Archlinux?
UPDATE Jan 2014: Rescuetime support tracked down the bug -- the problem was related to the variable url_from_plugin_delay in the configuration file rescuetimed.cfg
In beta 2.8.5.896, this variable was changed from milliseconds to seconds, causing the RT linux client to check active windows only intermittently instead of every few seconds. When I downgraded to .870 it seems this variable overwritten by .896 caused similar behavior to occur in .870 stable.
The issue is totally fixed in the latest RT linux beta 2.8.5.964. RescueTime was even so kind as to give me a subscription credit of 8 weeks due to the bug in 896! RescueTime is one of those tools that has absolutely changed my life and I strongly recommend everyone to give it a try!
2013년 6월 8일 토요일
2013.05.14 한국문학번역원 아틀리에 발표
My slide presentation at a talk I gave at the Literature Translation Institute Korea translator's workshop on May 14, 2013. It's about overcoming procrastination and laziness by using personal tracking tools like RescueTime, Beeminder, etc. The presentation is written in a mixture of Korean and English.
피드 구독하기:
글 (Atom)