Have you ever gone to hit ctrl-tab (to switch tabs) or ctrl-w (to close current tab) in Firefox and suddenly all your Firefox windows (even the one playing radio on another desktop) disappear? (I'm using Ubuntu and Gnome, but I get the impression this problem affects all Linux distros and all window managers.)
It must be old age making my fingers clumsier but I didn't even know ctrl-q did that until a few weeks ago. Yet I've done it a couple of times by accident recently, and when I did it today I decided Something Has To Be Done.
The solution is not just joyously simple, but I also learnt another cool function while I was there. First the solution: System|Preferences|Keyboard Shortcuts. Assign ctrl-q to do something; then Firefox never gets to see it. I assigned it to the calculator app which is nicely harmless.
I learnt this trick here, which also mentions that the same idea works in XCFE (go to keyboard panel). I'm betting KDE has something similar.
And the cool function? Looking through the other keyboard shortcuts I saw Alt+Print takes a screenshot of just the current window! You have no idea how many times I've clicked Print, then opened up Gimp to crop the screenshot to show just the window of interest. I'm now alternating between feeling very foolish and feeling very empowered.
Showing posts with label gnome. Show all posts
Showing posts with label gnome. Show all posts
Thursday, April 29, 2010
Wednesday, January 21, 2009
Gnome file extensions are screwing up my life!
Okay, perhaps a touch of frustration crept into that choice of subject.
When you double click a file in gnome file manager a lot of the time it works. When it doesn't you are in deep trouble. I've visited this problem before:
http://darrendev.blogspot.com/2008/06/gnome-file-associations-air-and-zip.html
http://darrendev.blogspot.com/2008/05/gnome-whether-under-redhat-or-ubuntu-is.html
I never did fix the AIR problem - I had to uninstall AIR completely.
Now, since yesterday, all my inc files refuse to open in SciTE. They say "this claims to be an inc file, but the contents look like PHP. Even though SciTE is your editor of choice for both inc and php files I'm not going to let you open it. Please also check behind the sofa for terrorists."
I suspect it was because I was editing an inc file in jedit a few days ago and manually chose PHP for the syntax highlighting. But if so, how and why is jedit allowed to alter my system configuration??
(I've also noticed that when clicking links within zip files gedit is now associated with txt files; it used to be open office writer. Something weird is going on, but at least this one is an improvement: application associations in zip files are a world of their own, and I've never tracked down any method of configuring them.)
Following my advice in the second of my above blog entries I tried making a php.xml file for *.inc files. But no luck there.
Somebody help! How do I restore this? Or, even better, how do I switch off Gnome's stupid wrong-extension-is-a-security-risk check? In many years of using gnome it has never once complained in a useful way, or detected a genuine problem. Every single time it has just got in the way.
(If you type "gnome-control-center" there is supposed to be an icon in there for file types. It is missing in ubuntu 7! Or perhaps it was only in there in gnome 1 and got removed in gnome 2.)
UPDATE: Problem half-solved. I've installed PC File Manager, and replaced Nautilus everywhere. See the instructions here:
http://linuxondesktop.blogspot.com/2008/05/replacing-nautilus-with-quicker-and.html
(they say Ubuntu 8 but everything seems to apply to Ubuntu 7 fine.)
I had to go through each text file extension and assign it to /usr/bin/scite (it was defaulting to jedit for most of them, and defaulting to nothing for the troublesome *.inc), but after I did that it is working nicely. File associations appear to be much more transparent than in Nautilus.
However following instructions in 2nd post here: http://ubuntuforums.org/showthread.php?t=692238 for replacing the desktop didn't go so well. The icons cannot be moved around on the desktop, and launchers were not working. So I undid those changes, and will now try and change my directory launchers on my desktop to use pcmanfm. It seems I'll need to go through and replace each "location launcher" with an application launcher that calls pcmanfm. A bit of a pain, but looks like it will work.
Perhaps I'll investigate kubuntu... Surely KDE cannot be worse than Gnome/Nautilus?
When you double click a file in gnome file manager a lot of the time it works. When it doesn't you are in deep trouble. I've visited this problem before:
http://darrendev.blogspot.com/2008/06/gnome-file-associations-air-and-zip.html
http://darrendev.blogspot.com/2008/05/gnome-whether-under-redhat-or-ubuntu-is.html
I never did fix the AIR problem - I had to uninstall AIR completely.
Now, since yesterday, all my inc files refuse to open in SciTE. They say "this claims to be an inc file, but the contents look like PHP. Even though SciTE is your editor of choice for both inc and php files I'm not going to let you open it. Please also check behind the sofa for terrorists."
I suspect it was because I was editing an inc file in jedit a few days ago and manually chose PHP for the syntax highlighting. But if so, how and why is jedit allowed to alter my system configuration??
(I've also noticed that when clicking links within zip files gedit is now associated with txt files; it used to be open office writer. Something weird is going on, but at least this one is an improvement: application associations in zip files are a world of their own, and I've never tracked down any method of configuring them.)
Following my advice in the second of my above blog entries I tried making a php.xml file for *.inc files. But no luck there.
Somebody help! How do I restore this? Or, even better, how do I switch off Gnome's stupid wrong-extension-is-a-security-risk check? In many years of using gnome it has never once complained in a useful way, or detected a genuine problem. Every single time it has just got in the way.
(If you type "gnome-control-center" there is supposed to be an icon in there for file types. It is missing in ubuntu 7! Or perhaps it was only in there in gnome 1 and got removed in gnome 2.)
UPDATE: Problem half-solved. I've installed PC File Manager, and replaced Nautilus everywhere. See the instructions here:
http://linuxondesktop.blogspot.com/2008/05/replacing-nautilus-with-quicker-and.html
(they say Ubuntu 8 but everything seems to apply to Ubuntu 7 fine.)
I had to go through each text file extension and assign it to /usr/bin/scite (it was defaulting to jedit for most of them, and defaulting to nothing for the troublesome *.inc), but after I did that it is working nicely. File associations appear to be much more transparent than in Nautilus.
However following instructions in 2nd post here: http://ubuntuforums.org/showthread.php?t=692238 for replacing the desktop didn't go so well. The icons cannot be moved around on the desktop, and launchers were not working. So I undid those changes, and will now try and change my directory launchers on my desktop to use pcmanfm. It seems I'll need to go through and replace each "location launcher" with an application launcher that calls pcmanfm. A bit of a pain, but looks like it will work.
Perhaps I'll investigate kubuntu... Surely KDE cannot be worse than Gnome/Nautilus?
Sunday, June 15, 2008
Gnome file associations, AIR and ZIP
I thought I'd conquered the black-box that is gnome file association configuration (see http://darrendev.blogspot.com/2008/05/gnome-whether-under-redhat-or-ubuntu-is.html)
but I'm stuck again.
Since installing Adobe AIR for linux it has associated itself with zip files. So the icon is now AIR, and the default action is to open AIR (and so when I double-click a zip file it gives me an error saying this isn't an AIR file). The only way I can open zip files is by right-clicking them now.
How do I remove that association and restore archive manager? I don't know. AIR hasn't installed anything in /usr/share/mime. And I cannot see anything in the myriad of configuration directories that live under my home directory. So, where else does gnome get its file association information from?
Please help!
but I'm stuck again.
Since installing Adobe AIR for linux it has associated itself with zip files. So the icon is now AIR, and the default action is to open AIR (and so when I double-click a zip file it gives me an error saying this isn't an AIR file). The only way I can open zip files is by right-clicking them now.
How do I remove that association and restore archive manager? I don't know. AIR hasn't installed anything in /usr/share/mime. And I cannot see anything in the myriad of configuration directories that live under my home directory. So, where else does gnome get its file association information from?
Please help!
Sunday, May 18, 2008
Controlling file associations in Gnome
Gnome, whether under redhat or ubuntu, is very hard to configure. Especially controlling the behaviour when you double-click on a file. However I may've got it cracked.
First, the easy way, is right-click a file, choose properties, and there is the open with tab. The setting there affects all files with that extension. (I still think that is one of those things that isn't even obvious once you know about it!)
But sometimes that is not enough. E.g. *.as files were associated with x-applix-spreadsheet, instead of my text editor. And then it then complains I'm trying to open a suspicious file.
Solution: I created this xml file as
/usr/share/mime/packages/actionscript.xml:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-actionscript">
<comment>Actionscript</comment>
<glob pattern="*.as">
</mime-type>
</mime-info>
Wow, that seemed to do the job!
First, the easy way, is right-click a file, choose properties, and there is the open with tab. The setting there affects all files with that extension. (I still think that is one of those things that isn't even obvious once you know about it!)
But sometimes that is not enough. E.g. *.as files were associated with x-applix-spreadsheet, instead of my text editor. And then it then complains I'm trying to open a suspicious file.
Solution: I created this xml file as
/usr/share/mime/packages/actionscript.xml:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-actionscript">
<comment>Actionscript</comment>
<glob pattern="*.as">
</mime-type>
</mime-info>
Wow, that seemed to do the job!
Subscribe to:
Posts (Atom)