Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-01-26 19:46:45

daniele82
Member
Registered: 2013-01-26
Posts: 7

Launcher with parameters

Hello everyone,
I switched to Xubuntu for a few days and I have a problem that I just can not solve.
How do I create a launcher with parameters? More precisely, in Ubuntu I created the link in this way:

~/opt/eclipse-juno/eclipse -vm /opt/java/bin

In this way, I start Eclipse with a specific version of Java. In Xubuntu / XFCE does not work. Eclipse is started with the version of Java officially installed in the operating system.
I also tried to create the following file:

#!/bin/sh

~/opt/eclipse-juno/eclipse -vm ~/opt/java/bin

Run from the console, Eclipse starts with the specified version of Java. If you start the script with a launcher, Eclipse is started with the wrong version of Java.
How can I fix this?

Thanks in advance.

Offline

#2 2013-01-27 08:39:21

wkr
Member
Registered: 2011-01-01
Posts: 88

Re: Launcher with parameters

May be adding quotes and provindig a full path?

"/home/yourusername/opt/eclipse-juno/eclipse -vm ~/opt/java/bin"

Offline

#3 2013-01-27 13:52:31

Clio
Member
Registered: 2011-01-25
Posts: 101

Re: Launcher with parameters

You can created a .desktop file and put in the parameters,
e.g Exec=/opt/eclipse-juno/eclipse -vm /opt/java/bin

Last edited by Clio (2013-01-27 14:02:46)

Offline

#4 2013-01-27 21:10:48

daniele82
Member
Registered: 2013-01-26
Posts: 7

Re: Launcher with parameters

Thank you very much wkr and Clio to the quick response.
wkr I've already tried your solution and it does not work. Clio I've already tried your solution, always with negative results.
it is possible that XFCE is not possible to create a launcher with parameters?
Hello and thanks for your support.

Offline

#5 2013-01-28 22:23:55

daniele82
Member
Registered: 2013-01-26
Posts: 7

Re: Launcher with parameters

No one knows how to solve? It is possible that XFCE does not support a basic function like this?
Thanks anyway for your help.

Offline

#6 2013-01-29 02:08:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: Launcher with parameters

Assuming that your shell is bash, try:

bash -c "/home/yourusername/opt/eclipse-juno/eclipse -vm /home/yourusername/opt/java/bin"

Make sure you replace "yourusername" with your actual username.

Last edited by ToZ (2013-01-29 02:08:37)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2013-01-29 20:49:41

daniele82
Member
Registered: 2013-01-26
Posts: 7

Re: Launcher with parameters

Hello ToZ, thanks for the reply.
I tried your solution. From the command line works, but using a launcher, does not work. This problem is getting ridiculous: (.
Thanks again for the help, I hope someone has the answer to the problem, partly because I have the same problem also creating launchers to file .sh.

Offline

#8 2013-01-29 21:15:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: Launcher with parameters

Can you post back the command you used in the launcher? Just to confirm?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2013-01-29 21:27:39

daniele82
Member
Registered: 2013-01-26
Posts: 7

Re: Launcher with parameters

I've tried:
1) bash -c "/home/my_username/opt/eclipse-juno/eclipse -vm /home/my_username/opt/jdk1.6.0_38/bin/"
2) /home/my_username/opt/eclipse-juno/eclipse -vm /home/my_username/opt/jdk1.6.0_38/bin
2) "/home/my_username/opt/eclipse-juno/eclipse -vm /home/my_username/opt/jdk1.6.0_38/bin"
and other variants.

For files ".sh" I've tried:
1) bash -c "/home/my_username/opt/smartsvn-7_5_3/bin/smartsvn.sh"
2) /home/my_username/opt/smartsvn-7_5_3/bin/smartsvn.sh
3) "/home/my_username/opt/smartsvn-7_5_3/bin/smartsvn.sh"
4) /bin/sh "/home/my_username/opt/smartsvn-7_5_3/bin/smartsvn.sh"
and other variants.

Thank you very much for your help.

Offline

#10 2013-01-30 14:43:25

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: Launcher with parameters

I just installed eclipse and jdk1.6.0_38, created the launcher with the command:

bash -c "/home/toz/opt/eclipse/eclipse -vm /home/toz/opt/jdk1.6.0_38/bin/"

...and if I'm reading this correctly, it seemed to work:

*** Date: Tuesday, 29 January, 2013 2:32:41 PM Eastern Standard Time

*** Platform Details:

*** System properties:
applicationXMI=org.eclipse.ui.workbench/LegacyIDE.e4xmi
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.buildId=M20120914-1800
eclipse.commands=-os
linux
-ws
gtk
-arch
x86
-showsplash
/home/toz/opt/eclipse//plugins/org.eclipse.platform_4.2.1.v201209141800/splash.bmp
-launcher
/home/toz/opt/eclipse/eclipse
-name
Eclipse
--launcher.library
/home/toz/opt/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20120522-1813/eclipse_1502.so
-startup
/home/toz/opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.overrideVmargs
-product
org.eclipse.epp.package.jee.product
-vm
/home/toz/opt/jdk1.6.0_38/bin/../jre/lib/i386/client/libjvm.so
eclipse.home.location=file:/home/toz/opt/eclipse/
eclipse.launcher=/home/toz/opt/eclipse/eclipse
eclipse.launcher.name=Eclipse
eclipse.p2.data.area=@config.dir/../p2
eclipse.p2.profile=epp.package.jee
eclipse.product=org.eclipse.epp.package.jee.product
eclipse.startTime=1359487638741
eclipse.vm=/home/toz/opt/jdk1.6.0_38/bin/../jre/lib/i386/client/libjvm.so
eclipse.vmargs=-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-Djava.class.path=/home/toz/opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
equinox.use.ds=true
file.encoding=UTF-8
file.encoding.pkg=sun.io
file.separator=/
gosh.args=--nointeractive
help.lucene.tokenizer=standard
http.nonProxyHosts=
http.proxyHost=
http.proxyPort=
http.proxySet=true
https.nonProxyHosts=
https.proxyHost=
https.proxyPort=
https.proxySet=true
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.awt.printerjob=sun.print.PSPrinterJob
java.class.path=/home/toz/opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
java.class.version=50.0
java.endorsed.dirs=/home/toz/opt/jdk1.6.0_38/jre/lib/endorsed
java.ext.dirs=/home/toz/opt/jdk1.6.0_38/jre/lib/ext:/usr/java/packages/lib/ext
java.home=/home/toz/opt/jdk1.6.0_38/jre
java.io.tmpdir=/tmp
java.library.path=/home/toz/opt/jdk1.6.0_38/jre/lib/i386/client:/home/toz/opt/jdk1.6.0_38/jre/lib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=1.6.0_38-b05
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.6
java.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
java.version=1.6.0_38
java.vm.info=mixed mode, sharing
java.vm.name=Java HotSpot(TM) Client VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.vendor=Sun Microsystems Inc.
java.vm.version=20.13-b02
line.separator=

If I omit the -vm parameter, it starts up with jdk version 7 - which is the default jdk install on my system.

Last edited by ToZ (2013-01-30 14:44:43)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2013-01-30 15:11:50

daniele82
Member
Registered: 2013-01-26
Posts: 7

Re: Launcher with parameters

Hello ToZ,
unfortunately this is not enough. To understand what I tell you, you have to install Android SDK.
If you started with an incompatible version, when I open the Android SDK Manager you get errors on XML files.
The inexplicable thing is that running your command from the console everything works. If I enter your command in a launcher, Eclipse starts but there is the problem that I mentioned at the beginning.
If I try to start Eclipse without any arguments, Eclipse generates the following warning: "GCJ has been detected as the current Java virtual machine. Use of GCJ is untested and unsupported. Please consult the documentation for more information.", and then will not start. I removed OpenJDK from my car but if anything is left.
I finished ideas!

Thank you very much for your help.

Offline

#12 2013-01-31 11:27:23

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: Launcher with parameters

The inexplicable thing is that running your command from the console everything works.

Maybe try starting up a terminal and running it?

xfce4-terminal -e "/home/username/opt/eclipse/eclipse -vm /home/username/opt/jdk1.6.0_38/bin/"

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#13 2013-01-31 21:22:17

daniele82
Member
Registered: 2013-01-26
Posts: 7

Re: Launcher with parameters

Interesting your idea, but apparently the absurdity prevails.
I put the command in the launcher. Eclipse starts normally, but the Android SDK manager does not start, worse than before.
If I run the command from your console, Eclipse starts and everything works.
How to use Terminator console, but I do not think this is the problem. At this point I give up the absurd. I will start the programs from the console, even if it is very uncomfortable.

Thank you very much for your help.

Offline

#14 2024-09-09 02:35:54

toutyug
Member
Registered: 2024-09-09
Posts: 1

Re: Launcher with parameters

This used to be quite easy. For example, on CentOS7 (Xfce4 version 4.12) passing parameters to the launcher was quite straightforward. Creating a shell script that accepts arguments calls the application would do the job most of the time.
However, with more recent versions (for example Xfce4 4.18 On Ubuntu 24.04), I could only get it to work using the approach suggested by Toz. I wonder what motivated this paradigme change.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 601.02 KiB (Peak: 617.87 KiB) ]