How to get something to autostart in Cinnamon but not XFCE?

Forum rules
Before you post please read how to get help
Post Reply
mwshook
Level 1
Level 1
Posts: 26
Joined: Sun Nov 27, 2011 1:44 pm

How to get something to autostart in Cinnamon but not XFCE?

Post by mwshook » Sun Jul 08, 2018 9:25 pm

I am running Tara 19

I generally use Cinnamon on my desktop under normal circumstances. But I also run a VNC desktop for remotely logging in. For that I like XFCE.

There are two applications in my ~/.config/autostart directory (conky and dropbox) that I do not want to run when I start up XFCE. It seems both XFCE and Cinnamon use the same directory for autostart.

Is there a way I can tell XFCE not to run those apps? Is there an argument I can add to xfce4-session to tell it to use a custom autostart directory?
The man page for xfce4-session says:

XDG_CONFIG_HOME
Specifies the root for all user-specific configuration files. If
this environment variable is unset, it defaults to ~/.config/


That seems like it might be a solution, but it's not clear to me how to set XDG_CONFIG_HOME. Is it supposed to be in a config file? Should it somehow be set in ~/.vnc/xstartup ?

Thanks,
-Matt

User avatar
richyrich
Level 18
Level 18
Posts: 8820
Joined: Mon May 04, 2009 8:31 pm

Re: How to get something to autostart in Cinnamon but not XFCE?

Post by richyrich » Sun Jul 08, 2018 9:40 pm

Menu > Settings > Session & Startup . . go to the Application Autostart tab, Are they un-checked there too?

JosephM
Level 6
Level 6
Posts: 1036
Joined: Sun May 26, 2013 6:25 pm

Re: How to get something to autostart in Cinnamon but not XFCE?

Post by JosephM » Mon Jul 09, 2018 1:16 am

If possible in your situation create two separate user accounts. I do this often when having multiple desktop environments installed.
When I give opinions, they are my own. Not necessarily those of any other Linux Mint developer or the Linux Mint project as a whole.

gm10
Level 7
Level 7
Posts: 1582
Joined: Thu Jun 21, 2018 5:11 pm

Re: How to get something to autostart in Cinnamon but not XFCE?

Post by gm10 » Mon Jul 09, 2018 2:05 am

Just use a startup script to differentiate, something like:

Code: Select all

wm-detect | grep -i cinnamon
if [ "$?" -eq "0" ]; then
    echo "running cinnamon"
else
    echo "running xfce"
fi

mwshook
Level 1
Level 1
Posts: 26
Joined: Sun Nov 27, 2011 1:44 pm

Re: How to get something to autostart in Cinnamon but not XFCE?

Post by mwshook » Mon Jul 09, 2018 4:46 pm

Richyrich: Dropbox does not appear in the GUI startup tool in Cinnamon, but does appear in xfce. I disabled it in xfce and it seems to have fixed the problem for that app. Conky is listed in Cinnamon's app, but not in xfce, but still autostarts in xfce.

gm10: I'm not clear one what that script would accomplish. Wouldn't it just display some text? If I put it in my ~/.vnc/xstartup , how would it help?

Honestly now that dropbox is fixed, I will probably just live with this problem. When I log in to xfce I just run xkill and click on conky.

gm10
Level 7
Level 7
Posts: 1582
Joined: Thu Jun 21, 2018 5:11 pm

Re: How to get something to autostart in Cinnamon but not XFCE?

Post by gm10 » Mon Jul 09, 2018 4:56 pm

mwshook wrote:
Mon Jul 09, 2018 4:46 pm
gm10: I'm not clear one what that script would accomplish. Wouldn't it just display some text? If I put it in my ~/.vnc/xstartup , how would it help?
That script is just an example of how you can run different commands depending on the desktop environments. Of course you'd replace the "echo" command for the one of your choosing. I don't think running it at vnc startup would help since you said you only run vnc under Xfce, so you wouldn't need to distinguish then, right?

User avatar
Flemur
Level 15
Level 15
Posts: 5914
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How to get something to autostart in Cinnamon but not XFCE?

Post by Flemur » Mon Jul 09, 2018 5:06 pm

You could check the environment variable:

Code: Select all

DESKTOP_SESSION=fluxbox
But I just discovered, that since modern linux is turning into an offshoot of Windows, there are TWO MORE variables with the same value and apparently the same meaning:

Code: Select all

XDG_SESSION_DESKTOP=fluxbox
GDMSESSION=fluxbox
https://superuser.com/questions/1074068 ... nd-xdg-cur
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

gm10
Level 7
Level 7
Posts: 1582
Joined: Thu Jun 21, 2018 5:11 pm

Re: How to get something to autostart in Cinnamon but not XFCE?

Post by gm10 » Mon Jul 09, 2018 5:45 pm

Flemur wrote:
Mon Jul 09, 2018 5:06 pm
You could check the environment variable:

Code: Select all

DESKTOP_SESSION=fluxbox
But I just discovered, that since modern linux is turning into an offshoot of Windows, there are TWO MORE variables with the same value and apparently the same meaning:

Code: Select all

XDG_SESSION_DESKTOP=fluxbox
GDMSESSION=fluxbox
https://superuser.com/questions/1074068 ... nd-xdg-cur
I also have a fourth

Code: Select all

XDG_CURRENT_DESKTOP=MATE

Post Reply

Return to “Xfce”