How can I change the Eclipse installed shortcut to open in terminal where my bashrc environment gets set.
I know if I right click and select "Open in terminal" works. but it would be nice to have that as an open. Presenty,
it is
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Terminal=false
Encoding=UTF-8
Version=1.1
Name=Eclipse IDE for C/C++ Developers - 2021-09
Exec=env GTK_IM_MODULE=ibus /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse
Categories=Development;IDE;
Icon=/home/mwremote/eclipse/cpp-2021-09/eclipse/icon.xpm
Alter shortcut to open in terminal eclipse
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Alter shortcut to open in terminal eclipse
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.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Alter shortcut to open in terminal eclipse
This seems to work:
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Terminal=false
Encoding=UTF-8
Version=1.1
Name=Eclipse IDE for C/C++ Developers - 2021-09
Exec=sh -c ". /opt/intel/oneapi/setvars.sh; GTK_IM_MODULE=ibus; /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse"
Categories=Development;IDE;
Icon=/home/mwremote/eclipse/cpp-2021-09/eclipse/icon.xpm
Name[en_US]=sh Eclipse IDE for C/C++ Developers - 2021-09
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Terminal=false
Encoding=UTF-8
Version=1.1
Name=Eclipse IDE for C/C++ Developers - 2021-09
Exec=sh -c ". /opt/intel/oneapi/setvars.sh; GTK_IM_MODULE=ibus; /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse"
Categories=Development;IDE;
Icon=/home/mwremote/eclipse/cpp-2021-09/eclipse/icon.xpm
Name[en_US]=sh Eclipse IDE for C/C++ Developers - 2021-09
Re: Alter shortcut to open in terminal eclipse
Exec=sh -c ". /opt/intel/oneapi/setvars.sh; /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse" works.
GTK_IM_MODULE=ibus may be unnecessary as it is already set https://discourse.ubuntu.com/t/ibus-no- ... ibus/17727 elsewhere and I suspect but don't know that GTK_IM_MODULE=ibus sets nothing as written.
If I use "&&" instead of ";",
Exec=sh -c ". /opt/intel/oneapi/setvars.sh && GTK_IM_MODULE=ibus && /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse" works, so GTK_IM_MODULE=ibus) must not be returning error.
GTK_IM_MODULE=ibus may be unnecessary as it is already set https://discourse.ubuntu.com/t/ibus-no- ... ibus/17727 elsewhere and I suspect but don't know that GTK_IM_MODULE=ibus sets nothing as written.
If I use "&&" instead of ";",
Exec=sh -c ". /opt/intel/oneapi/setvars.sh && GTK_IM_MODULE=ibus && /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse" works, so GTK_IM_MODULE=ibus) must not be returning error.
-
- Level 5
- Posts: 579
- Joined: Tue Jul 13, 2021 5:13 am
Re: Alter shortcut to open in terminal eclipse
Try this (opens a Terminal window, runs eclipse in that and closes when eclipse is closed):mgwx wrote: ⤴Thu Dec 02, 2021 6:28 pm How can I change the Eclipse installed shortcut to open in terminal where my bashrc environment gets set.
I know if I right click and select "Open in terminal" works. but it would be nice to have that as an open. Presenty,
it is
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Terminal=false
Encoding=UTF-8
Version=1.1
Name=Eclipse IDE for C/C++ Developers - 2021-09
Exec=env GTK_IM_MODULE=ibus /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse
Categories=Development;IDE;
Icon=/home/mwremote/eclipse/cpp-2021-09/eclipse/icon.xpm
Exec=x-terminal-emulator -e /bin/bash -c 'GTK_IM_MODULE=ibus /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse'
If you want the Terminal window to be open even after Eclipse closes, use this:
Exec=x-terminal-emulator -e /bin/bash -c 'GTK_IM_MODULE=ibus /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse ; bash'
Re: Alter shortcut to open in terminal eclipse
Typo made me think previous suggestion did not work for me
Last edited by mgwx on Fri Dec 03, 2021 8:04 pm, edited 1 time in total.
Re: Alter shortcut to open in terminal eclipse
I made a typo and that works as well with
Exec=x-terminal-emulator -e /bin/bash -c '. /opt/intel/oneapi/setvars.sh && GTK_IM_MODULE=ibus && /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse'
Exec=x-terminal-emulator -e /bin/bash -c '. /opt/intel/oneapi/setvars.sh && GTK_IM_MODULE=ibus && /home/mwremote/eclipse/cpp-2021-09/eclipse/eclipse'