Symlink Advice


Recommended Posts

OK, I've got Windows 7 on one HDD and Kubuntu 9.10 on a different HDD. I'm trying to get my Firefox profile in Kubuntu to use the places.sqlite bookmarks in my Windows 7 Firefox profile.

Both profiles are for Firefox 3.5.5 and have a places.sqlite file which stores history, bookmarks, etc

Can I write a symlink in the Kubuntu Firefox profile that would make it utilize the places.sqlite file in the Windows 7 Firefox profile?

If so, any guidance or hints as to what the syntax would look like?

Link to comment
https://www.neowin.net/forum/topic/848486-symlink-advice/
Share on other sites

I'm sure you've got a good reason for doing so, but wouldn't xmarks be better? Used to be called FoxMarks

Anyway...

First you need to have your Win7 partition mounted.

Second, the command would look something similar;

ln [options] source destination

ln -s /path/to/source/places.sqlite /path/to/destination/places.sqlite

Edit:

Careful doing this, as when you open Firefox it copies places.sqlite to places.sqlite-journal and zeroes the .sqlite file. And does vice versa when closing.

So if Firefox crashes in Windows and you don't re-open it, when you switch to Kubuntu the file will essentially be empty.

Edited by YaZoR
Link to comment
https://www.neowin.net/forum/topic/848486-symlink-advice/#findComment-591885838
Share on other sites

ln [options] source destination

ln -s /path/to/source/places.sqlite /path/to/destination/places.sqlite

Thanks for the speedy response! I'm currently using Xmarks and it works fine - I'd just rather not have to rely on something having an internet link to sync my bookmarks on the same computer.

I'll try doing the link when I get home! Thanks for the Caution too!

Link to comment
https://www.neowin.net/forum/topic/848486-symlink-advice/#findComment-591885892
Share on other sites

It does work for me, 2 Linux and one windows. But sometime, new file are created with the wrong permissions. chmod 777 -R is needed sometime.

Elv13, thanks for the confirmation and advice but I have no clue where I'd put that in the syntax below, but feel free to educate me further.

Ok, here's what I'm thinking I'll need to do to get my Linux profile to use my Windows places.sqlite file (little confused on which is 'source' and which is 'destination' :unsure: ). Can one of you Linux veterans give it a look and let me know if I've got it right? Do I need to use sudo for this?

Open terminal

# Get to the right directory

cd /home/<me>/.mozilla/firefox/<profile>.default

# Rename the original file for backup in case I screw it up

rename places.sqlite bak_places.sqlite

# Create the symbolic link so linux profile uses windows profile places.sqlite

ln -s /media/NTFS_Windows_7/Users/<me>/AppData/Roaming/Mozilla/Firefox/Profiles/<profile>.default/places.sqlite places.sqlite

Link to comment
https://www.neowin.net/forum/topic/848486-symlink-advice/#findComment-591902620
Share on other sites

You can share the complete .mozilla folder between different OSes (windows and Linux, in this senario). But when one operating system create a new file, it will set the write permissions to itself. In both windows and Linux, only the current user can write in his/her personal files. The "chmod" command is the linux command to ajust permissions. You will have to give read and write permissions to those files. The "safe" line would +rw, but most peoples give "every" rights to file when they have those kind of problems. "777" is the short command to "everything for me", "everything to my user group" and "everything for everyone else". Its binary:

1 = read, 1 = write and 1 = execute. So:

7 = 111 = read, write and execute

6 = 110 = read and write

5 = 101 = execute and read

4 = 100 = read only

3 = 011 = write and execute (you will never see this one)

2 = 010 = write

1 = 001 = execute

Link to comment
https://www.neowin.net/forum/topic/848486-symlink-advice/#findComment-591903418
Share on other sites

# Rename the original file for backup in case I screw it up

rename places.sqlite bak_places.sqlite

No such command rename (unless you have it aliased). To rename you use the move command (mv). But you don't want to rename it you want to copy it (cp) to another filename so you have the original

# Create the symbolic link so linux profile uses windows profile places.sqlite

ln -s /media/NTFS_Windows_7/Users/<me>/AppData/Roaming/Mozilla/Firefox/Profiles/<profile>.default/places.sqlite ./places.sqlite

I'd put a ./ infront of the destination link for best practice since you've cd into it. Simply means 'current directory'

Link to comment
https://www.neowin.net/forum/topic/848486-symlink-advice/#findComment-591904080
Share on other sites

UPDATED - Open terminal

# Get to the right directory

cd /home/<me>/.mozilla/firefox/<profile>.default

# Rename the original file for backup in case I screw it up

cp places.sqlite bak_places.sqlite

# Create the symbolic link so linux profile uses windows profile places.sqlite

ln -s /media/NTFS_Windows_7/Users/<me>/AppData/Roaming/Mozilla/Firefox/Profiles/<profile>.default./places.sqlite places.sqlite

Link to comment
https://www.neowin.net/forum/topic/848486-symlink-advice/#findComment-591904388
Share on other sites

I'd put a ./ infront of the destination link for best practice since you've cd into it. Simply means 'current directory'

No, for symlink it is better to avoid relative path. "./" will not be converted, it will stay as it is, so if the symlink is interpreted the wrong way, it will brake, and it will not will full path.

Salgoth:

ln -s /media/NTFS_Windows_7/Users/<you>/AppData/Roaming/Mozilla/ /home/<you>/.mozilla

Don't mess with profiles, its much easier to share the whole thing.

Link to comment
https://www.neowin.net/forum/topic/848486-symlink-advice/#findComment-591905310
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Sandboxie Plus 1.17.8 / Classic 5.72.8 by Razvan Serea Run programs in a sandbox to prevent malware from making permanent changes to your PC. Sandboxie allows you to run your browser, or any other program, so that all changes that result from the usage are kept in a sandbox environment, which can then be deleted later. Sandboxie is a sandbox-based isolation software for 32- and 64-bit Windows NT-based operating systems. It is being developed by David Xanatos since it became open source, before that it was developed by Sophos (which acquired it from Invincea, which acquired it earlier from the original author Ronen Tzur). It creates a sandbox-like isolated operating environment in which applications can be run or installed without permanently modifying the local or mapped drive. An isolated virtual environment allows controlled testing of untrusted programs and web surfing. Sandboxie is available in two flavors Plus and Classic. Both have the same core components, this means they have the same level of security and compatibility. What's different is the user interface the Plus build has a modern Qt based UI which supports all new features that have been added since the project went open source. The Classic build has the old no longer developed MFC based UI, hence it lacks support for modern features, these features can however still be used when manually configured in the Sandboxie.ini. Sandboxie Plus 1.17.8 / Classic 5.72.8 release notes: Added added DisableCustomTitleOpt=[process,][y|n] to allow [#] sandboxie title markers on custom-titlebar windows (Delphi VCL, Qt, Electron) that were previously skipped to prevent DWM repaint CPU loops #5387 Changed updated bundled ImDisk driver to 3.0.2 #5419 Fixed fix Suppress logs for expected non-user SIDs #5422 SbieSvc.exe: SBIE2218/2219 error when run program as administrator #5417 fixed explorer.exe crashes in Application Compartment when Huorong Security is installed #5423 Download: Sandboxie Plus (64-bit) | 23.5 MB (Open Source) Download: Sandboxie Classic (64-bit) | 3.0 MB Links: Sandboxie Website | GitHub | ARM64 | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Hello, Christian Maas' XVI32 is a nice (and very small) hex editor. Speaking of hex editors, many years ago a colleague and I who both worked at Tribal Voice managed to edit a copy of the company's PowWow instant messaging client to make it behave better now that all of its lookup servers and other server-side tech was gone.  The program didn't support NAT (RFC-3022 was introduced in January 2001, the same time Tribal Voice was shuttered), but it still worked okay if you manually set up port-forwarding on your router.  The server at http://powwow.jazy.net/ hosts a copy (usual warnings about downloading and running untrusted code from random internet servers apply). I occasionally use some tools like Funduc Software's Search and Replace and Application Mover when I need to make mass-edits to text-based files or move programs with a hard-coded installation directories, respectively.  When I need to figure out the exact LCD panel inside of a laptop, EnTech Taiwan's Monitor Asset Manager is my go-to tool for that purpose. JD Design's website (now hosted on github.io) has a number of interesting freeware and shareware utilities.  I used to use their TouchPro utility to set the file timestamps on software I was mastering to match its version number (e.g., version 3.00 of a program had all of its files dates set to 3:00AM, and so forth). Karenware has a number of interesting freeware utilities, too. Regards, Aryeh Goretsky  
    • I still use HexChat! Not really as ancient as the 1994 AutoCAD above my post, but I have never found anything better to replace it. Yes we still operate an IRC server https://www.neowin.net/irc/ 😛 
    • At work we still have a couple of people that use a version of AutoCAD LT purchased in 1994. This predates Windows 95 and works fine on versions of Windows up to XP. Its long since run in an locked down isolated XP VM, accessible via RDP. I did install LibreCAD for them, however they said it was just too different to get to grips with. In all fairness one of them is now 75 and the other is almost 60.
    • On my music making (non internet) PC Sony Acid Pro 7.0 Adobe Audition 2015 Korg Legacy Collection Windows 7 SP1
  • Recent Achievements

    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
    • Week One Done
      rolfus earned a badge
      Week One Done
    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
    • Conversation Starter
      flexorcist earned a badge
      Conversation Starter
    • One Month Later
      AndreaB earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      509
    2. 2
      +Edouard
      198
    3. 3
      PsYcHoKiLLa
      138
    4. 4
      ATLien_0
      90
    5. 5
      Steven P.
      82
  • Tell a friend

    Love Neowin? Tell a friend!