I have Xubuntu 16.04 for 2 days.
I am trying to set an entry in Session and Startup
>Application Autostart
that will set several bash variables and execute a command.
I have managed how to do it without variable settings. The entry that worked is this
dbus-launch dropbox start -i
But how to add variable settings? My attempts have been these but failed:
dbus-launch DBUS_SESSION_BUS_ADDRESS="" QT_STYLE_OVERRIDE="" dropbox start -i
and
DBUS_SESSION_BUS_ADDRESS=""&&QT_STYLE_OVERRIDE=""&&dropbox start -i
and
DBUS_SESSION_BUS_ADDRESS=""&&QT_STYLE_OVERRIDE=""&&dbus-launch dropbox start -i
and
dbus-launch --sh-syntax 'DBUS_SESSION_BUS_ADDRESS=""&&QT_STYLE_OVERRIDE=""&&dropbox start -i'
These work well in the terminal not in the autostart:
DBUS_SESSION_BUS_ADDRESS=""&&QT_STYLE_OVERRIDE=""&&dropbox start -i
and
DBUS_SESSION_BUS_ADDRESS=""&&QT_STYLE_OVERRIDE=""&&dbus-launch dropbox start -i
I also tried to add the command
#!/bin/bash
DBUS_SESSION_BUS_ADDRESS=""&&QT_STYLE_OVERRIDE=""&&dropbox start -i
to files ~/.xinitrc
and ~/.xsession
, but not succeed.
How to add the variable settings to the command in the autostart?
Update
I found a solution but I do not put it as the answer because such a way of handling dropbox would be rather hacky. But as far as variables are considered, in a universal way, a solution was found.
Create a command in a $PATH directory.
dropbox-fix
#!/bin/bash
DBUS_SESSION_BUS_ADDRESS=
QT_STYLE_OVERRIDE=
dropbox start -i
Add the entry in Session and Startup
>Application Autostart
dbus-launch dropbox-fix
&&
by newlines (i.e. one command per line). Do you really set the variables to the empty string (""
) or did you leave the values out for readability?