Shlomif's Technical Posts Community
|Tech Tip: Resetting the GLib/Gtk+ Default Apps on Linux (e.g: the Default Browser)
||[Mar. 8th, 2014|01:31 pm]
In this tip, I would like to describe how to reset the default apps, and
especially the default browser, for
are used by desktops like GNOME and XFCE, and by GTK+ applications
such as HexChat or claws-mail. My problem originally was that I accidentally
pressed the "Yes" button when Firefox Nightly (installed under a prefix
/opt) asked me whether I should set it as the default
browser, which caused HexChat and Claws-Mail to open links using it by
Anyway, to resolve this problem do this:
Backup this directory somewhere safe.
mimeapps.list file contains the reference to use the offending
apps under the
*.desktop files there which you can search
for the reference to the apps.
Remove these line or their portions from
Now you may need to restart the desktop apps or the desktop environment (not
Hope it helps.
Here’s how I found it: after some false leads of either
trying to recursively search my home directory for occurrences of
/opt/firefox and reading the source code of HexChat, GLib
and gtk+ to see where this happens (there were too many levels of indirection
there), I ended up doing “strace -f -o hexchat.strace hexchat” and inspecting
the strace file for hints.
You can reuse this entry under
the Creative Commons
Attribution 3.0 Unported licence, or at your option any later version.
of how to comply with it.
|The Lost Souls of Freenode
||[Feb. 25th, 2014|04:02 pm]
|||||Grace Valhalla - Apricot Hill (from Jamendo.com)||]|
I originally wanted to write a more prose-like blog post about the topic of
“The Lost Souls of Freenode”, echoing some of my frustrations
from trying to help people on Freenode
I started from keeping a list of bullets and sub-bullets and decided to keep
it this way out of being lazy. Maybe it can also be considered the blog
equivalent of some wikiHow
After I gave a link to the bullets to someone I met on Freenode, he told
me he hasn't found any of what he read here surprising from his experience
on IRC and as a tutor and T.A. (= Teacher Assistant) in an American college.
“Many Lost Souls” on Freenode's #perl - IM conversation.
conversation about “First rule of #perl channels” (meaning that Freenode’s
#perl is our first line of defence).
People having problems getting indentation right.
People who /msg me after asking.
- Either they think that's the way to answer.
- Or they think that I cannot help them because there's another
- They're usually not willing or cannot afford to pay.
- Someone who thought that paying me 50 USD / hour for private help
was too high.
* People who want us to write their code for them.
“Help me with a script I found.”
“Help me with using a program / my operating system / etc.”
- “Are you using version control?” “No, what's that?”
Old versions of perls.
“We didn't study it yet”
“No external modules / CPAN”
“Not allowed to use any built-in language data structures, including not arrays.”
One who didn't know what files are nor did file I/O.
- private conversation with someone else who didn't know what files are.
|Tech Tip: Empty tag in XHTML served as text/html
||[Jan. 14th, 2014|04:25 pm]
|[||Tags|||||tech, tech tip, tip, web||]|
|||||Set Fire to the Rain - Cover by Spencer Borup with Cimorelli||]|
If you serve XHTML (= HTML
written using XML grammar and conventions) as
Content-Type: text/html, you may be tempted to write an empty
<div> tag as a standalone XML tag with a trailing
<div id="my_anchor" />. Don’t do that, because
text/html (a.k.a “tag-soup”) the browser may
think you just have an opening tag and will look for a closing tag
elsewhere. Instead, write a pair of opening and closing tags, e.g:
Using the first form confused both Firefox (24.2.x in my case) and Google
Chromium (whatever shipped with Mageia at the time), and made them misrender
my page, despite the fact that it validated as valid XHTML. Perhaps I should
have considered putting the
id=".." inside a meaningful
sub-section of the document, but I implemented something for skipping a
section navigation menu.
|Tech Tip: Mitigating “git clone”’s inability to be resumed using rsync
||[Jan. 2nd, 2014|02:43 pm]
|[||Tags|||||tech, tech tip, tip||]|
|||||Chumbawamba - Tubthumping||]|
Happy new civil year, everyone. As you may know
a distributed version control system, but its often time-consuming (if the
repository’s history is large) “git clone” operation cannot be resumed, which
is a problem with bad Internet connections. There was a service that did
“git clone” and then allowed people to download using HTTPS Called “Git
bundler” but it has been down for sometime now. However, I found a different
solution to the problem.
What can be done is use
to log in to a remote host, where the “git clone” is performed (preferably,
but not absolutely necessarily, when running on top of a session of
GNU Screen or
similar). After that, you can use
rsync over ssh to download
the .git directory to the local workstation (I like to use
rsync -a --progress -v --inplace for that).
Following that all you have to do is run git clone to a different directory
to the one where you put the
.git and set “git remote” appropriately.
Hope that helps, and the same can be done with other distributed version
control systems such as
|Tech Tip: Combining/Merging Bookmarks From a Different Firefox Profile
||[Dec. 31st, 2013|08:14 pm]
Happy New Civil Year!
Let’s suppose you collected some bookmarks in a different Firefox profile (possibly on a different
computer or system, or in a different profile), and wish to place them
somewhere under your current or main profile’s bookmark tree - how can it
be done? I had a need for that and in this entry, I describe a solution that worked for me.
First of all export your bookmarks from the source profile to a JSON
file (“Bookmarks → Show All Bookmarks → Import and Backup → Backup…”)
Create a new Firefox profile in the machine of the target profile.
(see this page
for more information about Firefox profiles.).
Import the bookmarks from the JSON file to it (while overriding the default
Copy all the folders you want to merge to the system clipboard
Ctrl+C or equivalent).
Paste them into the default profile’s bookmark manager.
Then all you need to do is sort them. Cheers!
|The GNU Project Will Integrate GNU Guile into GNU coreutils
||[Nov. 13th, 2013|02:41 pm]
Tel Aviv, Israel: the GNU (= “Guile N' UNIX”) project announced today
that following the popular decision to integrate GNU Guile (= an implementation
of the Scheme programming language) into GNU Make, it is going to integrate
GNU Guile into the various tools inside GNU coreutils. So for example, GNU
cat will have a "-g" flag that will allow embedding Scheme expressions, GNU
echo will gain a similar flag, and GNU true and GNU false will allow evaluating
Scheme expressions for truth or falsehood. It is not yet clear what
functionality GNU head and GNU tail will gain by the integration.
O’Reilly Media announced that it will publish a new edition of its
books, which includes Mastering cat and Mastering echo to
cover the additional functionality provided by GNU Guile, and we will give
an overview of the additional functionality in
usergroups of the cat mongers, the echo-chamberists, and the (GNU) true
“If it’s not bloat, it’s not us.”, said Richard Stallman, the colourful
head of the GNU project, and started to sing the Free Software song. Linus
Torvalds was not available for comments about the proposal to integrate
GNU Guile into the Linux kernel.
|Tech Tip: How to Copy a Remote File on rsync.net
||[Oct. 26th, 2013|03:14 pm]
|[||Tags|||||tech, tech tip, tip||]|
|||||Rita - Shir Ahovath Hasapan||]|
rsync.net is a good service (and a not too
pricey one) for remote storage of data (for backups/etc.) based on open
protocols and open source applications. One thing that bugged me there however,
was that I couldn't find a way to copy a remote file to a different
name, because the SFTP client does not support a copy operation, and because
I could not get to a login shell by sshing my rsync.net account. Apparently,
it's doable and not very hard.
What you need to do is type
ssh email@example.com cp [source filename] [destination filename] and
it will run the remote UNIX "cp" command to copy the file. You can access
some other remote UNIX commands like that such as "ls".
Hope it helps.
|Tech Tip: Tmux: Disabling the Time Display in the Status
||[Sep. 4th, 2013|02:06 pm]
tmux is a usable and open source
terminal multiplexer (that allows one to run several programs in the same
terminal, detach them, split them into windows and viewports, etc.) which
I've been happily using after switching to it from GNU screen. Some weeks
ago, I noticed that if I keep tmux open in a
konsole tab, then
eventually that tab got highlighted as modified, even if there was no activity
in the tab. I realised the problem had to do with the fact that tmux displays
the current time by default.
In order to fix it, you can use a line like the following in your
set -g status-right '#H'
-g applies the assignment globally, and
displays the hostname (and not the time or whatever else is there by default).
While searching for an answer, I ran into the
which provides much more functionality, seems like an overkill for me,
but may work for you.
Shanah Tovah to
||most recent entries