Bug 102606

Summary: Beagle open a window after first login as root
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Danny Al-Gaaf <dalgaaf>
Component: GNOMEAssignee: Gary Ekker <gekker>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Blocker    
Priority: P5 - None CC: aj, gnome-bugs, joe, meissner, sonstiges
Version: Beta 2   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Component Test Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Danny Al-Gaaf 2005-08-08 15:49:14 UTC
I installed Beta1 with all from KDE and GNOME. After the first login as root to 
KDE beagle opens a window for search and there is no systray icon. Automatically 
load as systray icon is o.k., but open a window is bad.

The related process is: mono-best (started with --debug and --no-tray)

Other problem: mono-best is started, but no beagle daemon is running
Comment 1 Stanislav Brabec 2005-08-09 09:14:28 UTC
I got a comment by mail from Fredrik Hedberg:

The best.desktop file that ships in the beagle tarball is for running
Best from the application menu, thus it has the --no-tray argument.

So, as i understand it, we need a designated .desktop file for autostart
in KDE, which will make best run in the tray instead of popping up a
window.

What spec's do you want for that .desktop file?

Thanks, 

/Fredrik
Comment 2 Stanislav Brabec 2005-08-09 09:19:13 UTC
SuSE RPM of beagle has beagled.desktop, which is IMHO the correct desktop file
for starting best in Autostart. Note that this desktop file is not a part of
official source. FOr more see http://bugzilla.gnome.org/show_bug.cgi?id=310151#c6

beagled.desktop

[Desktop Entry]
Encoding=UTF-8
Exec=beagled --bg
Name=Beagle Daemon
Terminal=false
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
Comment 3 Fredrik Hedberg 2005-08-09 14:07:59 UTC
That should be the correct way to start the beagle daemon.

However, besides that you will also have to make sure that Best is launched, and
given that Danny reported that Best was running with the --no-tray argument,
somehow KDE must be launching the best.desktop automatically too.

The best.desktop that is shipped in the beagle tarball is for launching it from
the menu (and thus opening a new window), and we'll have to ship another one for
autostarting, which will run it in the tray.
Comment 4 Danny Al-Gaaf 2005-08-09 16:40:18 UTC
Is there any good reason why we should start beagle or/and mono-best with KDE by 
default? I can't see a usecase where a KDE program use beagle atm. I think we 
should never start beagle with autostart in KDE (only if started first time by 
user and the user requested autostart for the future)

Btw: note IMO you can't start beagle as root or in a root-desktop session. 
Because of this: don't start beagle as root and never by default in KDE.
Comment 5 JP Rosevear 2005-08-09 17:07:03 UTC
There is a release coming this week with Kopete support.  Also if you use
firefox/openoffice its relevant.
Comment 6 Danny Al-Gaaf 2005-08-09 17:44:14 UTC
Btw. Don't start beagle within a (KDE) root session. 

And what if I never start kopete (I use sim and konversation), firefox (opera/
koqueror) or OO (KOffice)? Beagle startet by default? IMO beagle should only 
started in KDE by default if you use one of this programs the first time. In 
this case the user should be asked if he want to use beagle. 
Comment 7 Gary Ekker 2005-08-09 20:57:25 UTC
x11-tools now added as a builddep and requirement for beagle, now for the code
to run desktop-launch ...
Comment 8 Gary Ekker 2005-08-09 21:04:56 UTC
ugh, ignore the last comment, wrong bug.

I have fixed best.desktop in /opt/kde3/share/autostart, it no longer execs "best
--no-tray" just "best" as it should.
Comment 9 Gary Ekker 2005-08-09 21:44:19 UTC
Assigning to JPR to determine if anymore will be done in beagle to not start it
as root.

We are starting it in KDE because Andreas asked us too, iirc.
Comment 10 Danny Al-Gaaf 2005-08-09 21:55:02 UTC
If you start this by default in KDE: there should be a dialog if you stop/exit/
end best from the tray icon to ask the user if he would autostart best 
automatically with next login (e.g. in KPowersave). 

It is not acceptable if the user must remove the desktopfile on commandline as 
root from /opt/kde3/share/autostart or edit any other file if the user would 
start best anymore automatically.
Comment 11 Danny Al-Gaaf 2005-08-12 12:51:59 UTC
*** Bug 104380 has been marked as a duplicate of this bug. ***
Comment 12 Marcus Meissner 2005-08-12 12:54:27 UTC
also it will use XX more Megabytes of memory then the standard KDE session 
if you just start the beagle viewer... Not a good idea. 
Comment 13 Andreas Jaeger 2005-08-12 14:06:10 UTC
We need that dialog from #10 - or not start it automatically.  The user needs to
be able to control it.  Btw. this applies to both GNOME and KDE.
Comment 14 Fredrik Hedberg 2005-08-12 15:32:37 UTC
I've added a '--autostarted' argument to beagled and best. The option of not
having beagle/best run at is available throught the search control-panel applet,
and as a dialog when closing an autostarted best instance.

We just need to add the --autostarted argument to the .desktop files KDE uses
for autostart, and to the gnome-session code.
Comment 15 Gary Ekker 2005-08-12 19:51:17 UTC
Fix submitted to gnome-session and beagle packages for beta2.
Comment 16 Danny Al-Gaaf 2005-08-17 19:02:43 UTC
This is bug is present in KDE on Beta2. Nothing changed! Now the following 
happens:

- if you stop/end best/beagle search you get no dialog as descriped in 
  #10 and #13
- best starts at every KDE start, also if you stop it
- best starts with a open window. It _should_ start minimized!
- best starts with a "--autostarted" in the search line
- if you not stop best before logout from KDE you get for each new login one 
  more best icon in the system tray

The current behavior is unacceptable. Best/beagle is full broken on KDE and 
_must_ be fixed or removed!

Comment 17 Gary Ekker 2005-08-18 14:59:50 UTC
apparently the code for the new switch wasn't committed to cvs?

I'll remove the autostart foo for BETA3 if it isn't working.
Comment 18 Gary Ekker 2005-08-19 21:36:18 UTC
This is packaged and tested. Just need permission to submit the new version,
which includes linking against gtk-sharp2.
Comment 19 Andreas Jaeger 2005-08-22 06:59:20 UTC
Go ahead and submit.
Comment 20 Gary Ekker 2005-08-22 17:37:44 UTC
This bug is fixed. Additionally, it was decided to not start beagle by default
on KDE.
Comment 21 Joe Shaw 2005-09-12 19:49:57 UTC
*** Bug 116404 has been marked as a duplicate of this bug. ***