The post drag and drop – Disable ability to pull a tab off of Chrome – Super User appeared first on Leho Kraav.
]]>I’m so sick of mistakenly pulling my Chrome tabs out of the tab list when i click on it, and having it open in a new window. I’m always pulling them off, then having to drop them back.
Does anyone know of a way to disable this ‘feature’ of Chrome?
I’m not the only one annoyed, unfortunately no solution available. On a tiled window manager like #i3wm this just doesn’t work well.
Source: drag and drop – Disable ability to pull a tab off of Chrome – Super User
The post drag and drop – Disable ability to pull a tab off of Chrome – Super User appeared first on Leho Kraav.
]]>
The post Restore “ga” tracker variable name after Yoast Google Analytics “__gaTracker” transition appeared first on Leho Kraav.
]]>Yes, this alternative name is given in the official Google Analytics documentation with the headline Renaming the Global Object in case “ga” is already used on the page. I have seen no insights from Yoast’s issue tracker to why they felt it was needed to change this variable and it broke people’s sites when their “ga()” calls were suddenly erroring.
Paste the following snippet into the “Advanced” tab -> “Custom Code” box of Yoast’s analytics plugin:
__gaTracker( function() { window.ga = __gaTracker; } );
This fires the variable assignment once the tracker is loaded link. That happens whenever in the case of asynchronous loading (= everybody these days).
This snippet should keep your “ga”-based integrations alive and well, for example Wistia video tracking.
The post Restore “ga” tracker variable name after Yoast Google Analytics “__gaTracker” transition appeared first on Leho Kraav.
]]>
The post Combine xf86-input-evdev middle button + wheel emulation, Kensington Orbit Trackball appeared first on Leho Kraav.
]]>In the interest of keeping price low and functions simple, this thing only has two buttons. I now happened to run into a situation where Xorg’s standard wheel and middle button emulation configuration didn’t cut it, because evdev (as of 2.7.3) doesn’t support wheel emulation on top of middle button emulation.
My previous configuration consisted of having the right button do wheel emulation: holding it down and moving the trackball would scroll the document up and down. Single click gives the regular context menu popup etc. Apparently this works for about 99% of the time because I didn’t have a problem until I needed the right button held down for a Tcl/Tk application context menu (hi git gui!).
After finding out I can’t just hold both buttons down (middle button emulation) and scroll with it (wheel emulation on top of middle button emulation) — see above –, doing plenty of remapping logic exercises finally resulted in a configuration that works. Enter third button emulation into the picture, which will replace middle button emulation.
Here’s the final configuration (replace 11 with your device id from “xinput list”):
$ xinput list-props 11 Device 'Kensington Kensington USB/PS2 Orbit': Device Enabled (134): 1 Coordinate Transformation Matrix (136): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 Device Accel Profile (261): 0 Device Accel Constant Deceleration (262): 1.000000 Device Accel Adaptive Deceleration (263): 1.000000 Device Accel Velocity Scaling (264): 10.000000 Device Product ID (252): 1149, 4130 Device Node (253): "/dev/input/event6" Evdev Axis Inversion (560): 0, 0 Evdev Axes Swap (562): 0 Axis Labels (563): "Rel X" (144), "Rel Y" (145) Button Labels (564): "Button Left" (137), "Button Unknown" (559), "Button Right" (139), "Button Wheel Up" (140), "Button Wheel Down" (141)
We disable middle button emulation, because when enabling third button emulation there is no more use for it.
Evdev Middle Button Emulation (565): 0 Evdev Middle Button Timeout (566): 50
Hello third button emulation. Because right mouse button will be occupied for wheel emulation, which requires a real non-emulated button, this will be our new right-click that can be held down. Thing to watch out here for is the timeout. I’m finding 400ms delay is about right. Default of 1000ms was definitely annoyingly long. 200ms is too short, you will have trouble selecting text without getting a right-click.
Notice I’m setting the emulated button to “2”. This is for getting apps to keep functioning in a regular expected way.
Evdev Third Button Emulation (567): 1 Evdev Third Button Emulation Timeout (568): 400 Evdev Third Button Emulation Button (569): 2 Evdev Third Button Emulation Threshold (570): 20
Wheel emulation is all regular stuff, except for setting the emulated button to “3”.
Evdev Wheel Emulation (571): 1 Evdev Wheel Emulation Axes (572): 0, 0, 4, 5 Evdev Wheel Emulation Inertia (573): 10 Evdev Wheel Emulation Timeout (574): 200 Evdev Wheel Emulation Button (575): 3 Evdev Drag Lock Buttons (576): 0
And here’s the final piece of the puzzle, reversing buttons “2” and “3” mapping. This makes sure the wheel emulation ends up on the real, non-emulated button.
leho@s9 ~ $ xinput get-button-map 11 1 3 2 4 5
To sum it all up, problem solved here is getting a right-click that can be held, while still maintaining wheel emulation, with a 2-button mouse.
Everything in terms of /etc/X11/xorg.conf.d:
leho@s9 ~ $ cat /etc/X11/xorg.conf.d/51-kensington.conf Section "InputClass" Identifier "My Kensington Orbit Trackball" Driver "evdev" Option "ButtonMapping" "1 3 2 4 5" Option "EmulateMiddleButton" "False" Option "EmulateThirdButton" "True" Option "EmulateThirdButtonButton" "2" Option "EmulateThirdButtonMoveThreshold" "0" Option "EmulateThirdButtonTimeout" "400" Option "EmulateWheel" "True" Option "EmulateWheelButton" "3" MatchProduct "Kensington USB/PS2 Orbit" EndSection
EDIT
One more parameter needs to be tuned. Default setting of EmulateThirdButtonMoveThreshold 20 disturbs selecting text and drag-n-dropping stuff with the left. You can safely set the threshold to 0, since with a trackball there is pretty much no involuntary movement of the cursor after clicking, like there can be with the regular mouse connected to the whole palm of your hand. 51-kensington.conf has been updated accordingly.
UPDATE Jun 18th, 2015
I’m still happily rolling with the Orbit today, on xorg-server-1.16.4
, evdev-2.9.1
. Future proof, yeah baby yeah.
The post Combine xf86-input-evdev middle button + wheel emulation, Kensington Orbit Trackball appeared first on Leho Kraav.
]]>
The post WordPress – a solution to “You do not have sufficient permissions to access this page” appeared first on Leho Kraav.
]]>Problem: plugin directory name “microkid-related-posts.svn”, since I check them out directly and like to know the scm type used
Solution: remove “.svn” from directory name
Should anyone know why that helps, I’d welcome some hints.
The post WordPress – a solution to “You do not have sufficient permissions to access this page” appeared first on Leho Kraav.
]]>
The post Using interactive commands during emerge ebuild phases appeared first on Leho Kraav.
]]>This mostly makes sense, because compiling software can be a lengthy process. Even more so when you’re possibly emerging tens of packages at a time. It makes no sense for the user to guard the terminal and stare at the Matrix, waiting to answer the occasional, usually trivial Yes/No prompt.
But in this particular use case I have, I’ve discovered I’d like to run an interactive command etc-update after every package finishes installing (ebuild postinst phase). My goal is to have a firm grip on a vserver bootstrap template configuration with the help of git. Portage’s configuration protection litters /etc with ._cfg* files and I would rather not spread the litter to the git repo by just blindly committing everything in postinst. Also, maintaining the bootstrap template is usually a rare and short operation (few packages at a time) where I can monitor the build and act on request.
Your ${ROOT}/etc/portage/bashrc could have something like this:
echo Phase: $EBUILD_PHASE ETC="${ROOT}etc" GITCMD="GIT_DIR=$ETC/.git GIT_WORK_TREE=$ETC git" case "$EBUILD_PHASE" in "setup") STATUS=$(eval $GITCMD status -uno -s) [ -n "${STATUS}" ] && die "Error: $ETC is not clean" ;; "postinst") etc-update eval $GITCMD add $ETC eval $GITCMD commit -q -a -m \"emerge $CATEGORY/$P\" ;; esac
Problem is that emerge pipes everything to its logfiles and won’t let etc-update get any input from you. Some googling revealed a solution by redirecting stdin and stdout. /dev/tty is magic that always has the right answer, google it yourself for details.
${ROOT}/etc/portage/bashrc:
... "postinst") etc-update 0</dev/tty 1>/dev/tty ...
The post Using interactive commands during emerge ebuild phases appeared first on Leho Kraav.
]]>
The post Install N9 Skype UI on N950 appeared first on Leho Kraav.
]]>jflatt at the invaluable tmo forum published an approach to install the N9 version of Real Golf 2011 on N950. It is a mind-numbingly simple task of just adding the N9 apt source repo to your lists.
$ devel-su Password: rootme # cd /etc/apt/sources.list.d # echo "deb https://qa9recEP:Pat2UGuP@downloads.maemo.nokia.com/harmattan/001 ./" > n9.list
“001” is the device code that replaces “rm680” for N950. Real Golf requires some additional hacking (see link above), but that is not what I wanted to talk about. First question on my mind was: can I finally get Skype UI installed on the N950 the same way?
Continuing from before:
# apt-get update # apt-cache search skype l10n-app-skype - Translation File for application skype telepathy-spirit - Skype connection manager for Telepathy account-plugin-skype - Skype plugin for accounts-ui # apt-get install account-plugin-skype Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed account-plugin-skype 0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded. Need to get 390kB of archives. After this operation, 1,528kB of additional disk space will be used. Get: 1 https://downloads.maemo.nokia.com ./ account-plugin-skype 0.85+0m6 [390kB] Fetched 390kB in 2s (193kB/s) Selecting previously deselected package account-plugin-skype. (Reading database ... 44172 files and directories currently installed.) Unpacking account-plugin-skype (from .../account-plugin-skype_0.85+0m6_armel.deb) ... aegis-installing account-plugin-skype (from 'com.nokia.maemo') Processing triggers for desktop-file-utils ... Setting up account-plugin-skype (0.85+0m6) ... Updating desktop entries... Done #
My existing mc-tool’d Skype account did not show up after this procedure. So I removed it.
$ mc-tool list $ mc-tool remove account-name-here
Then I launched Skype from the fresh new app launcher icon that appeared, entered my account info again, logged in and everything seems fine so far.
I believe it was Jamie Oliver who said: Happy Days!
The post Install N9 Skype UI on N950 appeared first on Leho Kraav.
]]>
The post Prioritize your Google Reader with +tags appeared first on Leho Kraav.
]]>Once you’ve accepted this reality (it will take a certain amount of time :>), it starts to make sense to prioritize tags in the display list. This is useful for quickly glancing over key categories without scrolling through your whole list, which helps keep in-app time spent lower and simultaneously keep the mind at ease. “Phew, I did not miss that massively important blog post, another crisis averted!” type thing.
I have found using the format of “+tag” accomplishes this goal when alphabetic sorting is used and is pleasing to the eye, no doubt thanks to Google recently rewiring my brain according to their plus-sized masterplan.
Note that I have everything sorted alphabetically, because the overhead accompanying manual drag-n-drop sorting probably doesn’t assist with the original goal of spending less time with the app.
The post Prioritize your Google Reader with +tags appeared first on Leho Kraav.
]]>
The post Bent Pins appeared first on Leho Kraav.
]]>4GB of RAM started to feel cramped and adding another 4GB 1333MHz DDR3 for 20€ sounded reasonable for a 4x2GB configuration.
So I types
shutdown -h now
off comes Antec Remote Fusion top cover, in go the new memory modules, finger hits Power button.. only to see BIOS showing I still have 4GB of total memory.
Great.
After one or two CMOS resets, power cycles and a bit of BIOS-exploration, I noticed Gigabyte BIOS M.I.T. Status screen show something strange: all memory sticks were listed for 2048MB, but only two of them were shown as being “Enabled”.
OK, foreseeing some more power cycles here, so disconnecting HDD power cables for a bit seemed reasonable. Let the memory slot testing bonanza begin! Couple of interesting behaviors surfaced.
GA-P55M-UD2 has the following memory slot layout:
|-----------------------------------------| DIMM2 |-----------------------------------------| DIMM1 |-----------------------------------------| DIMM4 |-----------------------------------------| DIMM3
Motherboard manual says two-stick Dual Channel is achieved by placing DIMMs into slot 1 and 3. Yet mine were sitting in slots 1 and 2 instead. At that point I seemed to vaguely recall some issues getting slots 1 and 3 to work together and since 1 and 2 Just Worked(tm), I left them there at the time.
But as we need to know whether Slot 3 actually works at all, I set the layout up again. All I got was a pre-POST reboot loop, which was a pretty good indication of some deeper problem. It’s Google-time for “ga-p55m-ud2 8gb memory” and themsuch queries.
Surprise surprise, turns out this behavior has been seen before and one of the first recommended debugging operations seemed to always be “reseat CPU, check for bent pins”. First I had ever heard of this, you (read: I) would think that if a pin was non-functional, you wouldn’t even get to POST. But this box has been rolling along for a few years now, although with memory sticks possibly being in “wrong” non-Dual-Channel slots.
http://www.tomshardware.co.uk/forum/270289-12-another-gigabyte-ud3r-memory-problem
http://www.tomshardware.co.uk/forum/267749-12-windows-usable
http://www.tomshardware.co.uk/forum/270808-12-continuous-short-beeps-p55m
http://www.tomshardware.co.uk/forum/266861-12-p55m-post-reboot-cycle
It was clear now, there was no way to avoid disconnecting the bazillion cables sticking out from the back of the server and digging through desk drawers for that Arctic Silver MX-2 tube. Yawn.
Intel’s instructions for checking sockets:
http://www.intel.com/support/processors/sb/CS-030850.htm
Looking carefully at the socket pin grid, there indeed seemed to be a spot in upper left corner where a pin seemed to reflect light at a different angle being slightly out of the straight line everybody else was standing in. So I augmented it to the best of my ability with the smallest flathead screwdriver I could find in the house (1mm) and using my girl’s reading glasses as magnifying help. While the pin looked somewhat more in line post-op than before, I am still not entirely sure it’s exactly factory-precision.
In the lower right part there seemed to be something that looked like a small part of a fingernail stuck between pins. So for good measures and while I was at it anyway, I patted myself on the shoulder for job obviously well done on the previous CPU installation and dug the unidentified object out of the socket. Was kinda disappointed the cooking heat of the CPU didn’t turn it into a precious jewel of some kind. Would’ve felt nice to get profit out of gcc and kernel compilations.
After some cursing at S1156 HSF mounting mechanism when putting Scythe Shuriken back on top of the CPU, machine was ready to be tested again.
So all in all, happy days.
Based on the above, I’d say bent pins inside the CPU socket causing your memory problems is a real good possibility. Definitely check socket, adjust pins and reseat CPU before you convert the motherboard into being a part of your frisbee equipment.
What I’m wondering now is what happens when different pins are out of alignment. Is it always memory issues, or different bad things happen or to what extent the CPU is capable of functioning in general?
The post Bent Pins appeared first on Leho Kraav.
]]>
The post N950 tip: enable ssh user@n950 with public key authentication appeared first on Leho Kraav.
]]>With aegis watching over us like a true eye in the sky, getting N950 to let you ssh in as unprivileged user with public key authentication took a bit of effort. Sure, you could ssh root@n950 and then su – user, but doesn’t the sane world do it the other way around?
Anyway, get your authorized_keys file on the device as root with sftp, or manually typing it. No, just sftp it, dude. Now aegis won’t let root see ~user/.ssh and also won’t let user see /root/.ssh contents.
# cp /root/.ssh/authorized_keys /tmp # chmod 644 /tmp/authorized_keys # su - user $ cp /tmp/authorized_keys .ssh $ exit
At this point ssh user@n950 still shouldn’t be letting you in, because apparently the account is locked by default. syslogd doesn’t by default log sshd stuff, so if you want to see this for yourself do this as root:
# echo "auth.* -/var/log/secure.log" >> /etc/syslog.conf # stop syslogd # start syslogd # tail -f /var/log/syslog /var/log/secure.log
Now try ssh user@n950, this is what you should see:
==> secure.log <== Jul 25 01:09:11 RM680 sshd[2838]: User user not allowed because account is locked Jul 25 01:09:11 RM680 sshd[2838]: Failed none for invalid user user from 192.168.1.111 port 354 83 ssh2
Solution is to unlock the account.
EDIT Originally I thought usermod -U user would do the trick. It turns out it doesn't work out so well. aegis-loader (and possibly other parts) started puking when doing dpkg -i etc.
/home/developer $ dpkg -i conboy_0_0_1_armel.deb aegis-loader: Failed parsing '/etc/passwd ...hanging forever
After a bunch of folks on #harmattan helped me get to the bottom of this, mgedim pointed out passwd seemed to work for him:
# passwd -u user
I have no idea what usermod and passwd are doing different aegis-wise. Hints welcome!
The post N950 tip: enable ssh user@n950 with public key authentication appeared first on Leho Kraav.
]]>The post WP-to-Twitter test, done with Twitter Tools appeared first on Leho Kraav.
]]>The post WP-to-Twitter test, done with Twitter Tools appeared first on Leho Kraav.
]]>