You are not logged in.

#1 2013-06-01 18:02:13

ravicious
Member
From: Poland
Registered: 2011-06-07
Posts: 69
Website

Xfce runs some apps twice at startup

Usually Xfce runs conky and keepassx twice during the startup. I tried cleaning ~/.cache/sessions while unlogged, but it didn't work.

These apps figure only once in xfce4-sessions-settings and these are my settings.

Offline

#2 2013-06-01 19:12:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,728

Re: Xfce runs some apps twice at startup

Take a look in ~/.config/autostart as well.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2013-06-01 19:50:36

ravicious
Member
From: Poland
Registered: 2011-06-07
Posts: 69
Website

Re: Xfce runs some apps twice at startup

As I said, these apps figure only once in xfce4-sessions-settings and AFAIK xfce4-sessions-setting checks .config/autostart and /etc/xdg/autostart.

Offline

#4 2013-06-01 19:58:59

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,728

Re: Xfce runs some apps twice at startup

ravicious wrote:

...these apps figure only once in xfce4-sessions-settings and AFAIK xfce4-sessions-setting checks .config/autostart and /etc/xdg/autostart.

I missed that.   How do you start Xfce4?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2013-06-01 20:33:55

ravicious
Member
From: Poland
Registered: 2011-06-07
Posts: 69
Website

Re: Xfce runs some apps twice at startup

I use SLiM and have `exec startxfce4` in .xinitrc.

Offline

#6 2013-06-01 21:29:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,728

Re: Xfce runs some apps twice at startup

That is what I working towards.  I'm guessing there is nothing in there that is doing this.  Using pestree or ps -ef can you determine what started them, or if, not, determine whether they have different parent processes?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2013-06-02 10:10:48

ravicious
Member
From: Poland
Registered: 2011-06-07
Posts: 69
Website

Re: Xfce runs some apps twice at startup

Here's my pstree. I believe the keepassx and conky instances that are ran by xfce4-session are causing problems.

Offline

#8 2013-06-02 11:35:09

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Xfce runs some apps twice at startup

I had this problem in XFCE, ages ago, worked around by auto-starting a bash script, rather than the apps themselves, then having a bit of checking in the bash script - snippets:

#!/bin/bash
export DISPLAY=":0.0"

# To get evolution to use gnome's secrets keyring
# From http://bugs.archlinux.org/task/18930
if [[ -z "$(pidof -s gnome-keyring-daemon)" ]] ; then
    export `gnome-keyring-daemon -s --components=pkcs11,secrets,ssh`
fi

# Optimize firefox databases
for f in ~/.mozilla/firefox/*/*.sqlite ; do sqlite3 "$f" vacuum ; sqlite3 "$f" reindex ; done

# Done here, so it takes effect reliably!
xrdb -merge ~/.Xresources

# Make pidgin minimized at startup
sed -i -e "/list_visible/s/value='1'/value='0'/" -e "/list_maximized/s/value='1'/value='0'/" ~/.purple/prefs.xml

# Run terminal if not already running
pgrep -u myusername xfce4-terminal > /dev/null || xfce4-terminal &

(sleep 15 ; if [[ -z "$(pgrep -u myusername xscreensaver)" ]] ; then xscreensaver -no-splash ; fi) &

Offline

#9 2013-06-02 19:55:15

creatid
Member
From: Netherlands
Registered: 2009-12-19
Posts: 75
Website

Re: Xfce runs some apps twice at startup

ravicious wrote:

I use SLiM and have `exec startxfce4` in .xinitrc.

Same here and I get the same behaviour.

As I only autostart one application (Getting Things Gnome), I simply close that one before shutting down the laptop. Not elegant but it works. It appears to me that XFCE remembers the started applications at the end of the session and starts those plus those in 'Application Autostart' in 'Session and Startup', ending up with 2 instances of those in 'App Autostart' if they are still active when ending a session.

Offline

#10 2013-06-03 12:29:20

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Xfce runs some apps twice at startup

Saving the session with XFCE doesn't work very well, you have just found another glitch. Other problems include XFCE not starting at all or getting only half of what you expect (such as launchers/applets), use at your own risk tongue


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#11 2013-06-03 15:58:21

ravicious
Member
From: Poland
Registered: 2011-06-07
Posts: 69
Website

Re: Xfce runs some apps twice at startup

creatid wrote:
ravicious wrote:

I use SLiM and have `exec startxfce4` in .xinitrc.

Same here and I get the same behaviour.

As I only autostart one application (Getting Things Gnome), I simply close that one before shutting down the laptop. Not elegant but it works. It appears to me that XFCE remembers the started applications at the end of the session and starts those plus those in 'Application Autostart' in 'Session and Startup', ending up with 2 instances of those in 'App Autostart' if they are still active when ending a session.

Yeah, but it's weird that it happens only to these two apps. I launch Transmission and wicd-gtk at startup too and they don't start twice.

Offline

#12 2013-06-06 04:16:43

ravicious
Member
From: Poland
Registered: 2011-06-07
Posts: 69
Website

Re: Xfce runs some apps twice at startup

Any more ideas?

Offline

#13 2013-06-06 04:26:05

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Xfce runs some apps twice at startup

You probably have saved sessionapps in .cache. By looking at the dates on the files there you can work out which one is used. Edit that to your liking.

Offline

#14 2013-06-07 14:45:39

alroar
Member
Registered: 2012-10-15
Posts: 27

Re: Xfce runs some apps twice at startup

if you are in the shutdown/reboot/logout/standby dialog, have a look at it´s bottom. there´s a small checkbox. i ran over that for months always wondering..

Last edited by alroar (2013-06-07 14:46:06)

Offline

#15 2013-06-07 15:01:25

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Xfce runs some apps twice at startup

alroar wrote:

if you are in the shutdown/reboot/logout/standby dialog, have a look at it´s bottom. there´s a small checkbox. i ran over that for months always wondering..

You will also have to delete the saved sessions manually, otherwise it will keep loading the last saved one, which if you are lucky, is in a good state and doesn't cause havoc.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#16 2013-06-07 15:24:58

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Xfce runs some apps twice at startup

If the workaround script I posted is somehow unacceptable, then I suggest going to the XFCE (desktop) forum.

Here's a thread mentioning open bugs with saving sessions.

Offline

#17 2013-06-09 07:18:15

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Xfce runs some apps twice at startup

As I siad; Take a look in here:
.cache/sessions
You'll find a file like; xfce4-session-xxxxxxxx:0 which is editable. Then you can take control.

Offline

#18 2013-06-09 07:49:16

ravicious
Member
From: Poland
Registered: 2011-06-07
Posts: 69
Website

Re: Xfce runs some apps twice at startup

Well, I've just made .cache/sessions read-only, but I don't think that's a good solution. I'll look into editing that file.

Offline

#19 2024-02-05 23:22:03

avarus
Member
Registered: 2024-02-05
Posts: 1

Re: Xfce runs some apps twice at startup

Oldie but goodie - appreciate this thread, helped me fix some odd session/startup behavior. cheers.

Offline

#20 2024-02-06 00:11:01

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,642

Re: Xfce runs some apps twice at startup

Please do not necrobump.

Closing.


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

Board footer

Powered by FluxBB