Passing an Environment Variable Through Alacarte?

0

I am trying pass an environment through alacrate in a launcher.

For example, I would like to run: SWT_GTK3=0 /opt/eclipsecdt/eclipse

as a launcher.

But alarate grays out the okay button if I have SWT_GTK3=0.

Any idea how to get around it?

Thanks in advance.

Hei

Posted 2015-04-24T01:32:12.640

Reputation: 121

Answers

0

  1. Make a bash file with the content:

    #!/bin/sh SWT_GTK3=0 /opt/eclipsecdt/eclipse

  2. make the file executable: chmod +x

  3. run that new bash file from alacarte

second alternative would be to create an own .desktop file

  1. create a new entry with alacarte
  2. find the new file in /home/artur/.local/share/applications it will be named alacarte-made-x.desktop
  3. edit the file [Desktop Entry] Comment= Terminal=true Name=export Exec=/bin/sh -c "export SWT_GTK3=0; /opt/eclipsecdt/eclipse" Type=Application Icon=gnome-panel-launcher

alacarte will not let you save that entry if you try to edit it with alacarte again but still that should be a valid .desktop file

For more information about what you can do with the .desktop file see the GNOME Developer documentation

INDIVIDUAL-IT

Posted 2015-04-24T01:32:12.640

Reputation: 271

Hmm...that's probably the only way. Was hoping that alacarte supports environment variable.. – Hei – 2015-04-24T02:40:08.860