Discussion:
LibreOffice
(too old to reply)
Jack Fearnley
2020-11-20 04:48:01 UTC
Permalink
Would it be possible to write a small script which would open LibreOffice
Writer in a specific folder. The default mode opens in the last usage of
LibreOffice whether this is calc, writer or any other mode.

Ideally I would like a clickable icon which would open Writer in, say,
/home/jack/word and another icon that would open Calc in, say,
/home/jack/spread.

Unfortunately I lack the skill to perform these, I'm sure, simple tasks.

Best regards,
Jack Fearnley
Bit Twister
2020-11-20 05:37:17 UTC
Permalink
Post by Jack Fearnley
Would it be possible to write a small script which would open LibreOffice
Writer in a specific folder. The default mode opens in the last usage of
LibreOffice whether this is calc, writer or any other mode.
Yes it is possible. Sounds like a simple gash script where you pass it a
command line argument of which app to run, and a case statement
for each app to be used with which directory for a given app.

I would not think a script would be necessary.
Post by Jack Fearnley
Ideally I would like a clickable icon which would open Writer in, say,
/home/jack/word and another icon that would open Calc in, say,
/home/jack/spread.
First thing I would try would be to create your desktop shortcut/icon
and set the Command to: cd $HOME/whenever ; command_to_execute_here.

Examples:
For LibreOffice Command: cd $HOME/word ; libreoffice --writer
For Calc Command: cd $HOME/spread ; libreoffice --calc
Bit Twister
2020-11-20 05:38:16 UTC
Permalink
Post by Bit Twister
Post by Jack Fearnley
Would it be possible to write a small script which would open LibreOffice
Writer in a specific folder. The default mode opens in the last usage of
LibreOffice whether this is calc, writer or any other mode.
Yes it is possible. Sounds like a simple gash script where you pass it a
Oops, that should be bash, not gash.
Post by Bit Twister
command line argument of which app to run, and a case statement
for each app to be used with which directory for a given app.
I would not think a script would be necessary.
Post by Jack Fearnley
Ideally I would like a clickable icon which would open Writer in, say,
/home/jack/word and another icon that would open Calc in, say,
/home/jack/spread.
First thing I would try would be to create your desktop shortcut/icon
and set the Command to: cd $HOME/whenever ; command_to_execute_here.
For LibreOffice Command: cd $HOME/word ; libreoffice --writer
For Calc Command: cd $HOME/spread ; libreoffice --calc
--
The warranty and liability expired as you read this message.
If the above breaks your system, it's yours and you keep both pieces.
Practice safe computing. Backup the file before you change it.
Do a, man command_here or cat command_here, before using it.
Jack Fearnley
2020-11-20 17:05:12 UTC
Permalink
Post by Bit Twister
Post by Jack Fearnley
Would it be possible to write a small script which would open
LibreOffice Writer in a specific folder. The default mode opens in the
last usage of LibreOffice whether this is calc, writer or any other
mode.
Yes it is possible. Sounds like a simple gash script where you pass it a
command line argument of which app to run, and a case statement for each
app to be used with which directory for a given app.
I would not think a script would be necessary.
Post by Jack Fearnley
Ideally I would like a clickable icon which would open Writer in, say,
/home/jack/word and another icon that would open Calc in, say,
/home/jack/spread.
First thing I would try would be to create your desktop shortcut/icon
and set the Command to: cd $HOME/whenever ; command_to_execute_here.
For LibreOffice Command: cd $HOME/word ; libreoffice --writer For Calc
Command: cd $HOME/spread ; libreoffice --calc
Thanks Bit Twister and Gamo. Unfortunately it is not enough to simply
execute LO in the selected folder. Also, looking at the man libreoffice
entry, there seems to be no way to specify a working folder as an
argument.

The last usage of LO apparently saves its last working folder somewhere
in the depths of .config. .config/ibus/bus seems to contain a recently
modified GUID but it is beyond my skill to decipher it. This may be a
false trail and perhaps the file name is save elsewhere.

If I could find it I could overwrite it with my desired folder before
invoking LO.

Just my thoughts after some hours of futile searching.

Jack
Bit Twister
2020-11-20 17:30:11 UTC
Permalink
Post by Jack Fearnley
Post by Bit Twister
Post by Jack Fearnley
Would it be possible to write a small script which would open
LibreOffice Writer in a specific folder. The default mode opens in the
last usage of LibreOffice whether this is calc, writer or any other
mode.
Yes it is possible. Sounds like a simple gash script where you pass it a
command line argument of which app to run, and a case statement for each
app to be used with which directory for a given app.
I would not think a script would be necessary.
Post by Jack Fearnley
Ideally I would like a clickable icon which would open Writer in, say,
/home/jack/word and another icon that would open Calc in, say,
/home/jack/spread.
First thing I would try would be to create your desktop shortcut/icon
and set the Command to: cd $HOME/whenever ; command_to_execute_here.
For LibreOffice Command: cd $HOME/word ; libreoffice --writer For Calc
Command: cd $HOME/spread ; libreoffice --calc
Thanks Bit Twister and Gamo. Unfortunately it is not enough to simply
execute LO in the selected folder.
Well, I did the following:
mkdir spread
cd $HOME/spread ; libreoffice --calc
Up came calc, I made a change and ran Save. Had to pick spread.
Next launch from $HOME, click Open, and selection Untitled 1.ods
from $HOME/spread
Post by Jack Fearnley
Also, looking at the man libreoffice
entry, there seems to be no way to specify a working folder as an
argument.
The last usage of LO apparently saves its last working folder somewhere
in the depths of .config. .config/ibus/bus seems to contain a recently
modified GUID but it is beyond my skill to decipher it. This may be a
false trail and perhaps the file name is save elsewhere.
If I could find it I could overwrite it with my desired folder before
invoking LO.
A quick cd ~/.config
grep -r spread/Untitled
turned up libreoffice/4/user/registrymodifications.xcu with a few lines.
gamo
2020-11-20 10:46:58 UTC
Permalink
Post by Jack Fearnley
Would it be possible to write a small script which would open LibreOffice
Writer in a specific folder. The default mode opens in the last usage of
LibreOffice whether this is calc, writer or any other mode.
Ideally I would like a clickable icon which would open Writer in, say,
/home/jack/word and another icon that would open Calc in, say,
/home/jack/spread.
Unfortunately I lack the skill to perform these, I'm sure, simple tasks.
Best regards,
Jack Fearnley
I'm afraid you don't have at least 3 icons for libreoffice. You have to.

'man libreoffice'

It said that you can run:

lobase
localc
lodraw
lofromtemplate
loimpress
lomath
loweb
lowriter

Best.
--
http://gamo.sdf-eu.org/
“Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer
in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is
taht the frist and lsat ltteer be at the rghit pclae. The rset can be
a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae
the huamn mnid deos not raed ervey lteter by istlef, but the wrod as
a wlohe.”
Mike Easter
2020-11-20 18:38:44 UTC
Permalink
Post by Jack Fearnley
Would it be possible to write a small script which would open LibreOffice
Writer in a specific folder. The default mode opens in the last usage of
LibreOffice whether this is calc, writer or any other mode.
Ideally I would like a clickable icon which would open Writer in, say,
/home/jack/word and another icon that would open Calc in, say,
/home/jack/spread.
I think it would be easier to create an icon which would open a
particular .odt doc in that /word dir and/or a particular .ods doc in
that /spread dir.

All the icon would have to do would be to correspond to the .odt doc
location/.dir which .odt opens LO writer by default and which .ods doc
opens LO calc by default.

Or, have the icon simply open the /word dir; when there, when you open
the .odt file within, it will open LO writer. Likewise an icon for the
/spread dir and the .ods file within.
--
Mike Easter
Jack Fearnley
2020-11-20 19:12:00 UTC
Permalink
Post by Mike Easter
Post by Jack Fearnley
Would it be possible to write a small script which would open
LibreOffice Writer in a specific folder. The default mode opens in the
last usage of LibreOffice whether this is calc, writer or any other
mode.
Ideally I would like a clickable icon which would open Writer in, say,
/home/jack/word and another icon that would open Calc in, say,
/home/jack/spread.
I think it would be easier to create an icon which would open a
particular .odt doc in that /word dir and/or a particular .ods doc in
that /spread dir.
All the icon would have to do would be to correspond to the .odt doc
location/.dir which .odt opens LO writer by default and which .ods doc
opens LO calc by default.
Or, have the icon simply open the /word dir; when there, when you open
the .odt file within, it will open LO writer. Likewise an icon for the
/spread dir and the .ods file within.
Great idea! Now all I have to figure out is how to build an icon.

Jack
Mike Easter
2020-11-20 19:14:42 UTC
Permalink
Post by Jack Fearnley
Now all I have to figure out is how to build an icon.
Do you want it to be in the Menu or on the desktop?

Personally, I'm 'never' on the desktop. The taskbar is as close as I
get :-)
--
Mike Easter
Mike Easter
2020-11-20 19:29:37 UTC
Permalink
Post by Mike Easter
Post by Jack Fearnley
Now all I have to figure out is how to build an icon.
Do you want it to be in the Menu or on the desktop?
Personally, I'm 'never' on the desktop.  The taskbar is as close as I
get :-)
Cinnamon lets you create a launcher graphically and put it in the menu,
the taskbar or the desktop.

If you start from the desktop, a R click has a context menu for 'create
launcher here'; if you start from a R click on the menu icon, you can
create it in the menu or the panel/taskbar.
--
Mike Easter
Mike Easter
2020-11-20 19:39:19 UTC
Permalink
Post by Mike Easter
Cinnamon lets you create a launcher
Oops. I got my threads mixed up. I was talking about cinnamon in
another thread and then I wrongly assumed 'we' were talking about Cinn
here.

If this is about Ubuntu, I guess it is Gnome, which I don't have open in
front of me just now. So; are we talking about Ub Gnome 20.04 or what?
--
Mike Easter
Jack Fearnley
2020-11-20 21:31:34 UTC
Permalink
Post by Mike Easter
Post by Mike Easter
Cinnamon lets you create a launcher
Oops. I got my threads mixed up. I was talking about cinnamon in
another thread and then I wrongly assumed 'we' were talking about Cinn
here.
If this is about Ubuntu, I guess it is Gnome, which I don't have open in
front of me just now. So; are we talking about Ub Gnome 20.04 or what?
Yes we are talking about Ubuntu 20.04 and I should have said so.

Jack
Mike Easter
2020-11-20 21:44:19 UTC
Permalink
Post by Jack Fearnley
Yes we are talking about Ubuntu 20.04
I have an Ub 20.04.1, but not yet on a bootable USB. I'll write it to a
multiboot and see if Gnome can do some of what I've seen w/ Cinn.
--
Mike Easter
Mike Easter
2020-11-20 22:29:08 UTC
Permalink
I'll write it to a multiboot and see if Gnome can do some of what I've
seen w/ Cinn.
From the gitgo, I see that it isn't nearly as easy (graphically
speaking) in Gnome as Cinnamon.

For a desktop launcher, it appears that the command line is a strategy:

In order to research this I'm going to enable a couple of repo/s which
are not enabled in the default Ub, namely universe and multiverse, then
install synaptic to get a better view of the available software, which
synaptic now shows nautilus-scripts, nautilus-actions (and
filemanager-actions) and python-nautilus. Those are all useful for
context menu help.

I don't mind using the command line when there are articles that tell me
how to do something, but I also like to be able to do it graphically
when possible. Even if it isn't quite as easy as commands :-)
--
Mike Easter
Mike Easter
2020-11-21 16:48:25 UTC
Permalink
Post by Jack Fearnley
Yes we are talking about Ubuntu 20.04
I have an Ub 20.04.1, but not yet on a bootable USB.  I'll write it to a
multiboot and see if Gnome can do some of what I've seen w/ Cinn.
I haven't forgotten about this thread. I never work w/ configuring
gnome (mostly because I don't like it compared to other DEs) and this
task has shown me some more things I don't like about gnome. Usually
when I boot a live gnome, I just 'fiddle' w/ using it w/o reconfiguring
from the default.

As I said upthread, I don't normally work 'from the desktop' per se. I
launch my applications from the taskbar or open the application menu.
I'm also accustomed to finding more functions or configurations by R
clicking, which gnome is mostly lacking.

I'm finding that I can configure gnome to let me open a particular
directory by clicking an icon from the desktop, which would solve the
problem from the desktop (open the /word dir icon then open a .odt in
it; or open the /spread dir icon & open a .ods in it) but unless one
likes to work from the desktop, I would rather have more flexibility
than the dash gives me. The dash only holds favorite applications. I'm
considering one of the gnome extensions of dash to dock or dash to panel.
--
Mike Easter
Jonathan N. Little
2020-11-21 02:57:45 UTC
Permalink
Post by Jack Fearnley
Post by Mike Easter
Post by Mike Easter
Cinnamon lets you create a launcher
Oops. I got my threads mixed up. I was talking about cinnamon in
another thread and then I wrongly assumed 'we' were talking about Cinn
here.
If this is about Ubuntu, I guess it is Gnome, which I don't have open in
front of me just now. So; are we talking about Ub Gnome 20.04 or what?
Yes we are talking about Ubuntu 20.04 and I should have said so.
For Ubuntu install alacarte

sudo apt install alacarte
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
wicklowham
2020-11-22 17:25:00 UTC
Permalink
Post by Jonathan N. Little
Post by Jack Fearnley
Post by Mike Easter
Post by Mike Easter
Cinnamon lets you create a launcher
Oops. I got my threads mixed up. I was talking about cinnamon in
another thread and then I wrongly assumed 'we' were talking about Cinn
here.
If this is about Ubuntu, I guess it is Gnome, which I don't have open in
front of me just now. So; are we talking about Ub Gnome 20.04 or what?
Yes we are talking about Ubuntu 20.04 and I should have said so.
For Ubuntu install alacarte
sudo apt install alacarte
Alacarte ....a nice menu app Tnx Jonathan

Frank in County Wicklow-Ireland
Jonathan N. Little
2020-11-22 19:14:36 UTC
Permalink
Post by Jonathan N. Little
Post by Jack Fearnley
Post by Mike Easter
Cinnamon lets you create a launcher
Oops.  I got my threads mixed up.  I was talking about cinnamon in
another thread and then I wrongly assumed 'we' were talking about Cinn
here.
If this is about Ubuntu, I guess it is Gnome, which I don't have open in
front of me just now.  So; are we talking about Ub Gnome 20.04 or what?
Yes we are talking about Ubuntu 20.04 and I should have said so.
For Ubuntu install alacarte
sudo apt install alacarte
Alacarte ....a nice menu app    Tnx Jonathan
Personally I do it old school manually:

/usr/bin/desktop-file-edit
/usr/bin/desktop-file-install
/usr/bin/desktop-file-validate
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Mike Easter
2020-11-21 18:15:09 UTC
Permalink
Post by Jack Fearnley
Post by Mike Easter
Post by Jack Fearnley
Ideally I would like a clickable icon which would open Writer in, say,
/home/jack/word and another icon that would open Calc in, say,
/home/jack/spread.
Or, have the icon simply open the /word dir; when there, when you open
the .odt file within, it will open LO writer. Likewise an icon for the
/spread dir and the .ods file within.
Great idea! Now all I have to figure out is how to build an icon.
Altho' I don't like to do things w/ an icon on the desktop, gnome is a
funky DE IMO.
Post by Jack Fearnley
As of GNOME 3.28 this functionality has been removed and desktop icons are no longer available in GNOME. Possible workarounds include using Nemo (a fork of Files which still has desktop icons functionality) or installing gnome-shell-extension-desktop-iconsAUR, which replicates the desktop icon functionality available in GNOME 3.26 and prior, but with some minor differences.
... where 'this functionality' is icons on the desktop were provided by
Files.

So, if I start w/ default live Ub 20.04.1, I add the repo/s
mulit-uni-verse & synaptic (for general principles) and reconfigure
files preferences behavior to include 'show action to create symbolic
links'. Then for purposes of demonstration I create 2 new dir/s in
Documents of /word and /spread.

(Here I discover that I don't need the symlink function)

Then I R click the /word dir and copy it to the desktop; and similarly
the /spread dir.

Then I open LO Writer and create an empty .odt file in the desktop /word
dir and LO Calc and create an empty .ods file in the desktop /spread dir.

Now, from the desktop, I can open the /word file and click on the .odt
file (of my choice) and it auto-opens the file in LO Writer and/or I can
open the /spread file and click on the .ods file of my choice and it
auto-opens the file in LO Calc.

Personally, I would rather have a taskbar, but that would be for my
personal taste if I were using gnome on a regular basis for which I
prefer Cinnamon. It is much easier to do many different things
encountered in this task w/ Cinn than Gnome.
--
Mike Easter
Mike Easter
2020-11-21 18:22:52 UTC
Permalink
Post by Mike Easter
Now, from the desktop, I can open the /word file and click on the .odt
file (of my choice) and it auto-opens the file in LO Writer and/or I can
open the /spread file and click on the .ods file of my choice and it
auto-opens the file in LO Calc.
Oops; I'm using the wrong words above.

Now, from the desktop, I can use the /word icon to open that dir and
click on the .odt file of my choice which opens that file in LOWriter or
I can click the /spread icon to open that dir and click on the .ods file
of my choice which opens that file in LOCalc.
--
Mike Easter
Mike Easter
2020-11-21 18:30:16 UTC
Permalink
Then for purposes of demonstration I create 2 new dir/s in Documents of
/word and /spread.
(Here I discover that I don't need the symlink function)
Then I R click the /word dir and copy it to the desktop; and similarly
the /spread dir.
Of course, I could have just R clicked the desktop and created the dir/s
there; but I was thinking about the OP dir/s /home/jack/word and
/home/jack/spread.

If jack wants to continue to have those dirs in the locations above and
ALSO on the desktop, there would need to be a symlink after all.
--
Mike Easter
Continue reading on narkive:
Loading...