I updated my “sudo make me a sandwich” post. Go check it out and try running the posted code on your machine 🙂
Tag Archives: gnu/linux
SUSE Studio rocks
I’ve taken it for a spin. It’s a heavily-AJAXed system that allows you to create your own mini-distro of Linux, a.k.a. “appliance”, based upon SUSE. You can build it into bootable ISO or into bootable HDD or USB flash drive image. You basically customize it, add SUSE packages into it, add additional custom files, and press build.
Mount remote GNU/Linux filesystem over SSH wth Dokan
If you are impaired with Windows, and you want something similar to sshfs (that is, mount a remote system as a local drive) look no further:
Debian/Ubuntu Gnome: Restoring Nautilus as default folder viewer opener
UPDATE 2016-10-21: Consider the newer article on the same topic, which uses xdg-mime.
So, you installed Thunar, PCManFM, Dolphin or Konqueror and now when you doubleclick on a folder on your Gnome desktop (techically, nautilus desktop) or choose a folder in your Gnome panel, you don’t get Nautilus? For all files you can choose the default program to open with, but not so with folder?
Honestly, I don’t know what smartass from Gnome team thought it’s a good idea to honor, occasionally, setting set through external file that specifies which program to use for opening folders … yet to provide no way to change this through GUI. Especially when you already support same thing for all other files!
So let’s change the default folder handler manually!
This problem occured to me a lot of times by now. Solution is quite simple and completely nonintuitive.
Key file is
/usr/share/applications/mimeinfo.cache
This file is one source of information for which program to use to open a specific file type. File types are designated by their mime type. Folders are internally listed as “x-directory/normal” and “inode/directory“. From my experience the latter one is actually being used.
So let’s edit this file. Edit /usr/share/applications/mimeinfo.cache as root. Now, find the line which starts with “inode/directory“. In that line you’ll find “nautilus-folder-handler.desktop;“. Together with the semicolon, move it to be the LAST entry in the line.
Example!
Original line:
inode/directory=pcmanfm.desktop;Thunar-folder-handler.desktop;pcmanfm-find.desktop;pcmanfm-folder-handler.desktop;nautilus-folder-handler.desktop;kde4-dolphin.desktop;kde4-cervisia.desktop;kde4-kfmclient_dir.desktop;kde4-kdesvn.desktop;
Edited line:
inode/directory=pcmanfm.desktop;Thunar-folder-handler.desktop;pcmanfm-find.desktop;pcmanfm-folder-handler.desktop;kde4-dolphin.desktop;kde4-cervisia.desktop;kde4-kfmclient_dir.desktop;kde4-kdesvn.desktop;nautilus-folder-handler.desktop;
I’d now recommend that you restart nautilus. Easiest way is logging out and logging back in.Or run “killall nautilus” from shell; this should shut down nautilus, but the session manager should restart it immediately.
Hope this helps. Questions and comments welcome.
GLDM – login manager based on SDL, OpenGL and whatever else
I’ve started writing some code today for GLDM. It’s something I’ve wanted to do for many months now, and well, I feel like I gotta start.
See, GDM and KDM … they’re beautiful pieces of code, I’m sure. But I just don’t feel like studying them. And yet, I want a nice graphical login. I want framework that’ll allow me to design whatever interface I want.
Y’know, because after Compiz, Metacity ain’t smooth enough. Same about GDM and KDM.
Since I’m too lazy to actually take time to look for one such, I’ve decided to take these ideas whirling in my head and scrap something up. Who knows, maybe it turns up popular. If you’re interested in some basic code, I applied for Sourceforge project today and it was already approved. So hop on here: http://sf.net/projects/gldm and tell me if you want to work on something around GLDM. I promise I won’t reject proposals… at least those I like 😉
Edited October 7th 2010.
Some preview videos:
September 19th 2009: Luna Lunatic
November 27th 2010: Luna
sudo make me a sandwich
xkcd 149 – punch this in your terminal:
cat > Makefile << _EOF SHELL=/bin/bash all: sandwich me: `echo $'\t'`@touch me a: `echo $'\t'`@if [ -e me ]; then rm me; touch a; fi sandwich: `echo $'\t'`@bash -c 'if [ -e a ]; then rm a; if [ \`whoami\` == "root" ] ; then echo "Ok"; else echo "Make it yourself"; fi; else echo "...?"; fi' _EOF
After that, try telling your command line to make you a sandwich, like this:
$ make me a sandwich Make it yourself $ sudo make me a sandwich [sudo] password for ivucica: Ok $
corrected on August 11 2009, to adjust for differences in Ubuntu’s shell 🙂
corrected on September 24 2015, to explicitly specify use of /bin/bash and fix breakage on Debian Jessie