Where does Nautilus store it’s folder share info?

Using a GUI is nice and all but sometimes I want to know where configuration data is stored.

The Gnome file manager, Nautilus, allows Linux users to share folders on a Windows network. Users of other operating systems will find this hard to believe but before this it was difficult to do as you needed to be an administrator and edit a configuration file called /etc/samba/smb.conf (Users of other desktop managers use similar tools).

This was convenient but I wanted to know where Nautilus puts this configuration data. I searched my home directory, I looked in /etc/samba/ (just in case) and eventually found this page:

I located the config files.

It appears as though /var/lib/samba/usershares holds a text file for each share that has been created.

The usershares directory is owned by root:sambashare and the files inside are owned by the user sharing the folder, so I guess it’s a compromise between a system process (Samba) and users wanting to configure it.

Editing those files is simple, and I guess I could use “net usershare” too. I had to restart Samba too which probably wouldn’t be needed if I had use the “net” command.

Mount box.net drives in Linux

I was one of the lucky few to receive a 50GB upgrade from box.net, (or box.com where they now live, marketing fail?) when I installed their Android app. I don’t have a use for that much storage on my phone but on my desktop machines? Oh yes!

This forum post describes in detail how to mount a Box drive on a Debian/Ubuntu machine although the instructions will mostly apply to other systems too as long as they have the davfs2 package.

There is a gotcha. Instead of using http://www.box.net/ you can use https://www.box.com/ which is a good gotcha. Also, I’m not the only person to notice that the mount point has a lot less storage than I thought it would have. It should be 50GB total but this is what I see from df -h:

https://www.box.com/dav 26G 13G 13G 50% /mnt/box.net

It’s enough for my needs. I’m going to copy snapshots of my local email there every night.

PS. Are you a Windows user? Sync any folder with Google Drive using the instructions here (but it uses “hardlinks” which have limitations, read the comments for more).
Actually, forget what it says in that post. Copy your files to your Google Drive and then place a symlink on your local drive to the copied files or folders using mklink. Make sure you run cmd.exe as an Administrator. I found this worked perfectly to sync the Pictures folder after I had copied it to my Google Drive:

cd c:\Users\USERNAME\
mklink /d Pictures “c:\Users\USERNAME\Google Drive\Pictures”

Any files copied into the Pictures folder are copied to the Google Drive now!

Scroll like you mean it in Windows

One of the most annoying aspects of Windows after using Linux on the desktop for 10+ years was how the mouse wheel scrolled windows.

On Linux desktops I could hover over a window and scroll it without focusing. It was really useful when I had a browser window with instructions behind a terminal or just comparing the contents of two windows. The same happened when scrolling panes in file managers. I could scroll directories when hovered over that side of the window and files when over on the other..

So, imagine my frustration when I realised I had to click the side of the Explorer window I wanted to scroll in Windows? It was doubly annoying if I had selected files as I’d have to click an empty area or CTRL click an already selected file to select that side of the window.

Well, there’s a simple solution. Alex Leonard found and blogged about Wizmouse. It simply does what I expect, it scrolls the window under my pointer, whether it’s focused or not.

Wonderful!

Install Ubuntu on your Android Phone

With this app you can install Ubuntu on your Android phone. It has to be rooted obviously and it’s definitely not this.

It looks like this installs Ubuntu in the same way as in the video above. It’s an app that runs in the background and you use a VNC client to connect to it. You could of course use VNC on a local desktop machine to connect to it too making it more useful but I think this is more a curiosity for those who like to tinker with their phones …

Pity he couldn’t get WordPress running on that Ubuntu install. That would have been fun to see!

Howto: Install XFCE in Ubuntu 11.10

You realise how spoiled you are by the ease at which software can be installed in Linux only when you’ve done the same in Mac OS X or Windows. apt-get or aptitude will install a wide variety of software and in the case of aptitude will remove the software and all it’s dependencies afterwards.

Yeah, I’m saying goodbye to Unity and embracing XFCE (for the moment at least. Choice is good!)

# aptitude install xfce4 xfce4-goodies
The following NEW packages will be installed:
desktop-base{a} exo-utils{a} gtk2-engines-xfce{a} hddtemp{a} libexo-1-0{a} libexo-common{a} libexo-helpers{a} libgarcon-1-0{a} libgarcon-common{a} libkeybinder0{a} libtagc0{a} libthunar-vfs-1-2{a}
libthunar-vfs-1-common{a} libthunarx-2-0{a} libtumbler-1-0{a} libxfce4ui-1-0{a} libxfce4util-bin{a} libxfce4util-common{a} libxfce4util4{a} libxfcegui4-4{a} libxfconf-0-2{a} lm-sensors{a} mousepad{a}
orage{a} ristretto{a} squeeze{a} tango-icon-theme{a} thunar{a} thunar-archive-plugin{a} thunar-data{a} thunar-media-tags-plugin{a} thunar-volman{a} tumbler{a} tumbler-common{a} xfburn{a}
xfce-keyboard-shortcuts{a} xfce4 xfce4-appfinder{a} xfce4-artwork{a} xfce4-battery-plugin{a} xfce4-clipman{a} xfce4-clipman-plugin{a} xfce4-cpufreq-plugin{a} xfce4-cpugraph-plugin{a}
xfce4-datetime-plugin{a} xfce4-dict{a} xfce4-diskperf-plugin{a} xfce4-fsguard-plugin{a} xfce4-genmon-plugin{a} xfce4-goodies xfce4-mailwatch-plugin{a} xfce4-mixer{a} xfce4-mount-plugin{a}
xfce4-netload-plugin{a} xfce4-notes{a} xfce4-notes-plugin{a} xfce4-panel{a} xfce4-places-plugin{a} xfce4-power-manager{a} xfce4-power-manager-data{a} xfce4-quicklauncher-plugin{a} xfce4-screenshooter{a}
xfce4-sensors-plugin{a} xfce4-session{a} xfce4-settings{a} xfce4-smartbookmark-plugin{a} xfce4-systemload-plugin{a} xfce4-taskmanager{a} xfce4-terminal{a} xfce4-timer-plugin{a} xfce4-utils{a}
xfce4-verve-plugin{a} xfce4-volumed{a} xfce4-wavelan-plugin{a} xfce4-weather-plugin{a} xfce4-xkb-plugin{a} xfconf{a} xfdesktop4{a} xfdesktop4-data{a} xfwm4{a} xfwm4-themes{a} xscreensaver{a}
0 packages upgraded, 82 newly installed, 0 to remove and 0 not upgraded.
Need to get 40.9 MB of archives. After unpacking 144 MB will be used.
Do you want to continue? [Y/n/?] y

Once installed, logout and select XFCE from the login menu.

XFCE has it’s own quirks and gotchas but it feels lighter and more responsive than Unity. The most difficult part was making the top menu bar autohide. I had to remove the “running programmes” list to get at the panel preferences. Only later did I notice the “Panel” item when you right click some of the menu widgets. The full screen mode in Gnome Terminal gets me back the extra 2-3 lines of terminal I missed. So winning all around as a certain actor once said …

Installing Gnome 3.2 is just as easy and looks gorgeous!

aptitude install gnome-shell

Ubuntu: ALT TAB between browser windows?

I’m still using Ubuntu’s Unity desktop, which is saying a lot as I switched back to Gnome within a week or so of the previous release of Ubuntu.

One of the remaining bugbears I had with Unity was the window or task switcher. It was impossible to switch between Chrome browser windows. I had to click on the Chrome icon in the Unity sidebar and select the window I wanted. It felt like Ubuntu had tried to emulate what Windows 7 did with their taskbar, but Windows did it better because the window previews are close to the taskbar.

I’m not the only one to have this problem. You can either change window switcher in CCSM (oh oh, watch out when using CCSM!) or use ALT-`. That character is the tick character which normally sits above the TAB key on UK/English/US keyboards but may be elsewhere on other locales. I now need to get used to it like I did with Mac OS X.

Ubuntu 11.10: Be wary of Compiz Config Settings Manager (ccsm)

Have you recently installed Ubunty 11.10 and are you marvelling at the Unity Desktop? Not many are. Marvelling at the desktop that is, but it’s growing on me. I said that last time too so we’ll see how it goes.

Anyway, the point of this little rant is to tell you to avoid or be very careful with CCSM, or “Compiz Config Settings Manager” as it’s known to it’s enemies. This little app allows you to edit practically everything related to Compiz settings. Literally everything!

Unfortunately it can also lead to a world of pain. After fiddling around with it I went into the preferences and clicked on the “Plugins” link at which time my desktop froze and I couldn’t even CTRL-ALT to a different session. Forced reboot was the other of the day.

When I finally got back in my external monitor wasn’t detected and I was left with a 1024×768 display. I spent a few hours trying to figure out what the hell had gone wrong. I deleted .config/monitors.xml and tried editing it but nothing worked. Eventually I rebooted a few times and suddenly my monitor was recognised again!

Then it was on to the workspace switcher. It didn’t work the way it used to. I hesitantly fired up ccsm and dug into the settings in Viewport switcher, then in Rotate Cube, then Desktop Wall. It was then I discovered I couldn’t deselect “Desktop Cube”. ccsm would segfault every time. Switching workspaces using the cube was painful as my hardware just isn’t up to the task. Open windows would flicker slightly after I rotated the workspace. Eventually I discovered that I could take drastic action to restore normality. First I had to login as a different user and then go into my home directory and then move some configuration directories out of the way.

mkdir bak
mv .gconf .gconfd .gnome .gnome2 bak/

After logging in again I fired up ccsm and Desktop Cube was disabled! I usually switch between workspaces using CTRL 1-4 and I was able to configure Viewport Switcher to do just that with a minimal sliding animation.

After looking in the bak directory it appears that Compiz stores it’s configuration data in various compiz directories in .gconf/apps/. I suspect it’s enough to remove them rather than all the Gnome configuration files.

I like Ubuntu 11.10 so far, I’m getting used to Unity but the top menu bar feels to me like it’s crowding out the screen. The lack of Unity themes included is troubling too as there are only 4 (2 of which are for visually impaired users by the looks of things). I’ll have to go look for some more.

How open is Android?

The Android Wikipedia page is quite a read. I’m particularly taken with the research into how “open” it is (not really, compared to other projects) as I’ve never seen a commit log or discussion of patches for it.

Moreover, our findings suggest that Android would be successful regardless of whether it is an open source project or not, to the extent that the vast majority of developers working on the project (the platform itself) are actually Google employees.

The section on Linux is intriguing too. Linus Torvalds says that Android and Linux would come back to a common kernel but that presumes Google will open it’s development and “innovate” in the open. I’ll just leave this here to check back on in 5 years time..

Meanwhile, there’s the Replicant project, an effort to make a completely Free Software version of Android. They want to remove proprietary device drivers and discourage the use of Google Market. Their list of supported phones is limited but I was surprised to see the iPhone listed there!

I did wonder what the difference was between Replicant and CyanogenMod. Various posts I’ve read on the XDA forums have stated over and over again that the project was more interested in open source solutions rather than using proprietary software but this thread on LWN shines some light on the issue.

Found the official line:
“CyanogenMod does still include various hardware-specific code, which is also slowly being open-sourced anyway.”

So, they’re being realistic about their efforts. They’ll use proprietary software when necessary but they’ll work towards replacing that software. At the rate that handset hardware changes I applaud them for taking this pragmatic route. The only phone the Replicant project fully supports is the relatively ancient HTC Dream. Yes, open source drivers should be released by manufacturers but that won’t happen.

Android isn’t really that open in terms that an Open Source advocate would understand. The traditional public CSV or SVN repository and a daily changelog is nowhere to be seen. It’s definitely developed in a cathedral rather than a bazaar. Does it matter to the vast majority of its users? Probably not, but I for one am happy it is Open Source and the code is out there. Without the (admittedly late) release of source code it would be much more difficult to use other after-market firmwares on Android phones.

Hello Ubuntu 11.04

Today is the big day. A new release of Ubuntu Linux is out. Version 11.04 or “Natty Narwhal” is the first to ship with the Unity desktop and I’m very impressed! If you haven’t seen it yet, check out the Ubuntu website or this handy guide.

I like:

  • The auto hiding sidebar of icons. When a window is maximised it hides. Long click on an icon to move it around, and right click for a context dialog to remove it.
  • Control Center is 2 clicks away in the top right where there appears to be a light switch. That menu also has a lock screen item and various session controls.
  • Apps with multiple windows show a corresponding number of dots next to their icon on the sidebar. Click on the icon and you see all the windows of that application.
  • Application menus are in the top toolbar ala Mac OS. Some, like Chrome, aren’t however.
  • Long press Windows key and the sidebar icons are highlighted with numbers 0-9 to quick choose them.
  • Click the Ubuntu logo in the top left and you get a nice applications dispay.
  • Speedy alt-tab previews of each Window.
  • Left and right maximising of windows like in Windows 7. I think you need to drag it a bit further than in Windows 7 however, no bad thing. Full screen maximise on dragging a window to the top of the screen.
  • Painless upgrade from 10.10.

And what I didn’t like:

  • The window display for multi window apps requires you select a window. It’d be great if I could click the app icon again to return to the same window. ESC does the job though.
  • GIMP tear away menus are still broken, but this is likely an issue with GIMP. It was present in the last release of Ubuntu too and I just found a work around this evening.

    The menus you are looking for are no longer part of the drop-down menus, but rather part of a right-click menu visible when clicking on the canvas.

    I found using the space bar after clicking the menu option worked on torn off menus. This may be a bug.

  • The lack of formal application menus is off putting initially but it’s actually easy enough to find things with the new launcher.
  • I doubt I’ll ever like the thin scrollbar. There is a way to change that, must find out how.
  • Why does Ubuntu keep installing Evolution every time I upgrade? I’m fairly sure I uninstall that each and every time ..

In previous versions of Ubuntu I always felt the eye candy was there just to make things look pretty. With Unity they’re actually putting that graphical horsepower to good use. If you haven’t tried Ubuntu yet, give it a spin! You can even try it without installing anything simply by booting from the install disk (or usb drive) and opting for that. Check out the download page for further details.