3

When I create link to new note in Gnote, I have to change the notebook manually. Can I change set the default notebook for every new note?

Close look at screenshot

See also full screenshot.

2 Answers2

2

Use command line option --open-note=title for Gnote, which will display the existing note matching title. This by itself will not set the note as default.

How it works

To see how the option works, the note must have appropriate title and run Gnote from command line.

  1. First, create a new note in Gnote by clicking New button in headerbar or toolbar, or click Gnote menu ➜ New note (appearance may vary by desktop environment).

  2. Then, change the note title from "New Note 1" to title of choice i.e. "Test New Note". The title is not case sensitive i.e. "new note" and "New Note" are same in Gnote.

    Gnote with a new note

  3. Open a Terminal or an application launcher, type the command i.e. gnote --open-note="Test New Note" and press Enter key. The note i.e. "Test New Note" will open directly.

    Gnote open the new note directly

Pseudo default

To open Gnote with the pseudo default note, user can either use system-wide application shortcuts, or use application menu (configuration may vary by desktop environment).

  • Using system-wide application shortcuts, for example, I have assigned Super+N as shortcut to run the command.

    Application shortcuts in Xubuntu

  • Using application menu, for example, I have created a new launcher using MenuLibre menu editor and the launcher is accessible from both application menu and application launcher.

    Application menu and launcher in Xubuntu

Additional notes

By default, Gnote keep notes created by user at ~/.local/share/gnote/. If user wanted to open notes from elsewhere, use another option --note-path=path to create a new note directory first.

  • To create new note directory i.e. ~/Notebooks:

    gnote --note-path="Notebooks"
    
  • To create new note directory with subdirectory i.e. ~/Notebooks/Project1:

    gnote --note-path="Notebooks/Project1"
    

Then, create a new note and change the title i.e. "coding". Close the note and Gnote window. This time, to open the "coding" note, append the earlier option --open-note=title.

gnote --note-path="Notebooks/Project1" --open-note="coding"

Similarly, run the command in a Terminal or an application launcher. Also, the command can be added to system-wide application shortcuts with shortcut keys of choice to open the pseudo default note.

Tested using Gnote 3.10.3 in Xubuntu 14.04.

1

Comment on Additional Notes section, possibly helpful to others:

Quote:

By default, Gnote keep notes created by user at ~/.local/share/gnote/. If user wanted to open notes from elsewhere, use another option --note-path=path to create a new note directory first. To create new note directory i.e. ~/Notebooks: gnote --note-path="Notebooks"

Yes, this works, but it doesn't allow control over placing the new directory in gnote's default location -- or elsewhere, wherever the user may desire.

I wanted to keep all gnote directories together and made these notes to follow, if I ever have to do it again:

Create a new data directory system.
$ gnote --note-path="gnote-memos" (name given, as example.)

Only a file name is relevant, as gnote will always, uncontrollably, put it directly off of ~/ directory -- no matter what the user requests for the path. So, in my experience, the word 'path' in this parameter's name is misleading.

Be careful of the '~' as it doesn't always work, in all locations.

Cut this newly-created directory, looking for the name you gave it -- as it will not be in gnote's default data file location.

Paste it into the desired directory of your own choice, with a preference for original default directory, i.e.: ~/.local/share/gnote

Start gnote from terminal, or edit the original menu entry, to show the path to the data files:

~$ gnote --note-path ~/.local/share/gnote

to start gnote with original data. Then make another menu entry (or enter at terminal) the above line, with the new directory's name: ~$ gnote --note-path ~/.local/share/gnote-memo (new filename given as example). Starting gnote as usual, without a path specification, may now be erratic in determining which data set it opens. This should not happen, but in my experience gnote was'flipping back-and-forth' between the old, and new, data sets for the first few runs. Therefore, always specify.


System info: gnote v.3.10.3, Bodhi Linux

Ron
  • 11
  • 2