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

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mwshook
Level 2
Level 2
Posts: 65
Joined: Sun Nov 27, 2011 1:44 pm

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

Post by mwshook »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux newbie since 1997
richyrich

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

Post by richyrich »

Menu > Settings > Session & Startup . . go to the Application Autostart tab, Are they un-checked there too?
JosephM
Level 6
Level 6
Posts: 1463
Joined: Sun May 26, 2013 6:25 pm

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

Post by JosephM »

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

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

Post by gm10 »

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 2
Level 2
Posts: 65
Joined: Sun Nov 27, 2011 1:44 pm

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

Post by mwshook »

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.
Linux newbie since 1997
gm10

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

Post by gm10 »

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 20
Level 20
Posts: 10096
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 »

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?
gm10

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

Post by gm10 »

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
Locked

Return to “Xfce”