This forum has been archived. All content is frozen. Please use KDE Discuss instead.

LibreOffice Autostart in Systray

Tags: None
(comma "," separated)
Arny006
Registered Member
Posts
14
Karma
0
OS

LibreOffice Autostart in Systray

Mon Oct 15, 2012 9:22 am
Dear community,

I don't know if here is the right place to set this question, I'm new in the forum and in Kubuntu but collect small experience with Gnome.
Is a method to let appear LibreOffice in the Systray by login and thence start the different applications multitasking?
Tried a lot of variants found in the internet (ksystraycmd, kstart, alltray, etc.) but not one works like e.g. in Gnome also not if I set LO-options to start minimized in the systray.
Is the problem that LO-autostart is basically a start-menu and not a single application?

Strange thing is that the LO-autostart show the icon of "emesene", I'm really confused.
If that is not the right place to set this question, please let me know where I can do it.
Thanks in advance and best regards. Arny
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
Moved to Other KDE software.

Not sure what you mean. If LibreOffice has an option to autostart in system tray, it should work the same in GNOME and KDE workspaces. You could also try the option "Place in system tray" in kmenuedit -> (browse to LibreOffice) -> click on the checkbox -> Save.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
Arny006
Registered Member
Posts
14
Karma
0
OS
I mean, by/after login to have the LO-icon in the systray and thence start writer, calc, etc.
Tried already all possible combinations, none works. Maybe cause of update LO through PPA?
Code: Select all
sudo add-apt-repository ppa:libreoffice/ppa

or a bug in LO Version 3.6.0.2 (Build ID: 360m1(Build:102))? or I made so many changes that now none works?
Minio
Registered Member
Posts
177
Karma
1
OS

Re: LibreOffice Autostart in Systray

Mon Oct 15, 2012 11:15 am
Quickstarter (this is app that was in tray icon) was dropped by LO developers in 3.4 or 3.5. In reasonably new version of suite you can't have it anymore.

The real question is: why do you need quickstarter?

If you want to preload LO (so it will start faster next time), then you can use script like that (add it to KDE Autostart):
Code: Select all
#!/bin/sh

sleep 60
ooffice -nodefault -nologo &
PID=$!
sleep 10
kill $PID


If you want to have quick access to different LO apps, then things are a bit more complicated.
You could write yourself an app that would register tray icon and listen for right-mouse button clicks. When they happen, it would display list of LO apps and start selected program. Such app should be quite easy to write with Qt, but if you are not familiar with programming, things might be complicated.

Another approach would be writing simple shell script (using kdialog) that would display list of LO apps and start selected one. Then you could put some launcher plasmoid (there are plenty of them) near tray. Such plasmoid should have only one launcher - to launch previously mentioned shell script.


Best regards
Mirosław Zalewski
Arny006
Registered Member
Posts
14
Karma
0
OS
Hi Minio & thanks,
Quickstarter (this is app that was in tray icon) was dropped by LO developers in 3.4 or 3.5. In reasonably new version of suite you can't have it anymore.
Now is clear. Than is unusefull to install anymore "libreoffice-gtk" with "libreoffice-gnome" & "lo-menubar"?

The real question is: why do you need quickstarter?
Is not only confortable for maself but also for parents using the machine. We use "quickstarter" in every OS's

If you want to preload LO (so it will start faster next time), then you can use script like that (add it to KDE Autostart):

No problem, I know how to, the question is: Where to store/save the script for all users?

Code: Select all
#!/bin/sh

sleep 60
soffice -nodefault -nologo &
PID=$!
sleep 10
kill $PID

Other/additional code-lines or options reccommended?

If you want to have quick access to different LO apps, then things are a bit more complicated.
You could write yourself an app that would register tray icon and listen for right-mouse button clicks. When they happen, it would display list of LO apps and start selected program. Such app should be quite easy to write with Qt, but if you are not familiar with programming, things might be complicated.
That's the problem, only small experience at my side.

Another approach would be writing simple shell script (using kdialog) that would display list of LO apps and start selected one. Then you could put some launcher plasmoid (there are plenty of them) near tray. Such plasmoid should have only one launcher - to launch previously mentioned shell script.
Tha's best solution for me!

1) Should I delete the "libreoffice.desktop"-files created before?
2) Should I put anyway the script in the "system>autostart"?
3) How to start "kdialog" in order to write the script?
4) How to put plasmoid-launcher?

Thanks again & regards. Arny
Minio
Registered Member
Posts
177
Karma
1
OS
Arny006 wrote:Now is clear. Than is unusefull to install anymore "libreoffice-gtk" with "libreoffice-gnome" & "lo-menubar"?

These has nothing to do with quickstarter. First two are for GNOME integration. If you or any other user of this machine prefers GNOME to KDE, then you should leave these packages installed.
I am not sure what does the last one does. Perhaps this is part of Unity integration? If I am right and you don't have Unity installed, then you may remove this package as well.

Arny006 wrote:No problem, I know how to, the question is: Where to store/save the script for all users?

/etc/xdg/autostart/ seems to be a good place.

Arny006 wrote:1) Should I delete the "libreoffice.desktop"-files created before?

I don't know. It depends on what these files contain. If you feel like they are not needed anymore, then of course you should delete them.

Arny006 wrote:2) Should I put anyway the script in the "system>autostart"?

If you put script for all users (at system-level) - no, you should not put this script in user's KDE "System settings".
If you did not put script for all users, then you might put it in user's settings. It will not make any visible change and definitely will not put anything beside tray. It's only that LO will loader a bit faster (because part of it will be already in memory).

Arny006 wrote:3) How to start "kdialog" in order to write the script?

Well, start with "kdialog --help-all" command.
If you are not familiar with writing shell scripts then sorry, but I do not have time to write one for you.


Best regards
Mirosław Zalewski
Arny006
Registered Member
Posts
14
Karma
0
OS
Well, the "libreoffice-gtk" contain as dependency the other two files. After install them you will find in:
LO/Extras/Options/LibreOffice/User Memory/
not only possiblities to dimension the memory, in my case the value are: 100; 256; 12,8; 00:10; 20
but also to set the hack to "Start with the System in the tray" something like this.

In the mean time I use your script, named "LibreOffice-preload.sh" & made it executable.
Minio wrote:
/etc/xdg/autostart/ seems to be a good place.

The store-folder is also OK, I know already from Gnome. From

Minio wrote:
Well, start with "kdialog --help-all" command.
I can say that it appear like a better (more featured) "ksystraycmd" with which I already play a little bit around.
The open Questions are:
1) If I want use the "kdialog", should I still put the script in the "/etc/xdg/autostart/"?
2) How to tell "kdialog" to pick the script, execute it and let appear the LO-icon in the "systray" by boot/login?

I'm luky you answer my questions and can experiment with "kdialog" no worry!

Thanks again.
Minio
Registered Member
Posts
177
Karma
1
OS
Arny006 wrote:Well, the "libreoffice-gtk" contain as dependency the other two files. After install them you will find in:
LO/Extras/Options/LibreOffice/User Memory/
not only possiblities to dimension the memory, in my case the value are: 100; 256; 12,8; 00:10; 20
but also to set the hack to "Start with the System in the tray" something like this.


This is irrelevant. This checkbox is there because of old version of LO, not because of graphical toolkit used/installed.
Or are you trying to say that despite having this box checked, GNOME displays tray icon and KDE does not? This is perhaps problem that could be solved, most likely by looking at .desktop files from LO. I can not assist you, since I am using LO version that does not have quickstarter anymore.

Arny006 wrote:1) If I want use the "kdialog", should I still put the script in the "/etc/xdg/autostart/"?

As you like. This script and systray-workaround I have posted serve two completely different purposes. You may use one of them or both, it depends on your needs.

Arny006 wrote:2) How to tell "kdialog" to pick the script, execute it and let appear the LO-icon in the "systray" by boot/login?

kdialog will not display LO-icon in tray or anywhere near it.
This is other way around. You should put plasmoid (like Quicklaunch) on your panel and configure it to launch script that will use kdialog to ask user for input.
If you ask on how to place plasmoid on panel, then take a look here:
http://userbase.kde.org/Plasma/HowTo/4.5 (especially 1.1.2).


Best regards
Mirosław Zalewski
Arny006
Registered Member
Posts
14
Karma
0
OS
Hi Minio and thanks again taking time for me,
at first would inform you that the script don't bring any advantage in therm of speed. Increse of LO-Start-Speed only possible by let creating a autostart in the system-settings, to modify it with the parameters (--nodefault, etc.) and finally to move the same in the "/etc/xdg/autostart/".

You should put plasmoid (like Quicklaunch) on your panel and configure it to launch script that will use kdialog to ask user for input.
If you ask on how to place plasmoid on panel, then take a look here:
http://userbase.kde.org/Plasma/HowTo/4.5 (especially 1.1.2).

Quicklauch? you mean i should look for "quicklauch-widget/plasmoid"? I look already for, but no found any!
Anyway, i start thr script in the "konsole" and nothing appear, so i though it's not working at all.
I follow your link and i discovery how to build a menu but neither a chance to set an icon beside nor have I an idea how to put e.g. templates-menu-entry in such a menu. That become slowly but sure a big topic for us* Arny006 for all if i think i'm newbee.

Have you or anybody else an idea how to solve the issue?
How to write a libreoffice-widget?

Thanks again and regards. Arny


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]