0

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
2
  • Try replacing && 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?
    – danzel
    Dec 3, 2018 at 17:41
  • @danzel Yes. This is a way to fix two issues of dropbox: lack of dropbox indicate icon and dropbox menu and the crashed window of selective download. I found them on the internet. But after your question, I thought that they are not clean. Sth like a hack. So I have no way and will risk a little.
    – trzczy
    Dec 3, 2018 at 21:47

0

You must log in to answer this question.

Browse other questions tagged .