Clan x86

Technical (Development, Security, etc.) => JavaOp Board => JavaOp Support Archive => Topic started by: luna on May 03, 2007, 01:33:08 AM

Title: minimize to notification area in gnome/ubuntu
Post by: luna on May 03, 2007, 01:33:08 AM
i'm using gnome & alltray, but i can't get this to work. :(
alltray /home/gail/javaop/Core/JavaOp2.jar as a launcher Application or Application in Terminal command dont work. making a link dont work either since i cant seem to modify the command... and doing alltray /home/gail/javaop/Core/JavaOp2.jar gives an error:


gail@badassness:~$ alltray /home/gail/javaop/Core/JavaOp2.jar
/home/gail/javaop/Core/JavaOp2.jar: 3: Syntax error: ")" unexpected


putting sudo before that command makes no difference.
Title: Re: minimize to notification area in gnome/ubuntu
Post by: Sidoh on May 03, 2007, 01:50:13 AM
Running a command as root rarely fixes syntax errors. :-\.

Also, should it not be

alltray "java -jar ~/javaop/Core/JavaOp2.jar" ?

You can't execute a jar directly in such a way, I don't think.
Title: Re: minimize to notification area in gnome/ubuntu
Post by: luna on May 06, 2007, 02:04:44 PM
that command doesnt work in start up or running from terminal. sudo makes no difference....
Title: Re: minimize to notification area in gnome/ubuntu
Post by: Sidoh on May 06, 2007, 03:06:42 PM
Quote from: luna on May 06, 2007, 02:04:44 PM
that command doesnt work in start up or running from terminal. sudo makes no difference....

I don't understand the relevance of anything you've said.  If you don't have an X session started, why would you expect anything to be minimized to tray?

I didn't say that sudo should make a difference.  In fact, I implied the opposite.
Title: Re: minimize to notification area in gnome/ubuntu
Post by: chuck on May 06, 2007, 04:45:09 PM
Try this:

Quote
$ cat > execjavaop.sh
#!/bin/sh
java -jar /path/to/javaop.jar
^D
$ chmod +x execjavaop.sh
$ alltray ./execjavaop.sh

Your basicly trying to execute the .jar file as you would execute any program. That won't work on most linux systems.

And, by the way, sudo only gives you the ability to overcome permission errors. Infact, on a debian system, (Ubuntu is based on debian?) this will make X11 programs unable to connect to the display.
Title: Re: minimize to notification area in gnome/ubuntu
Post by: Sidoh on May 06, 2007, 08:57:59 PM
The script, in effect, does the same thing I told him to do, yes?

I'm guessing he knows what sudo does but is perhaps misguided as to when it is a viable solution.
Title: Re: minimize to notification area in gnome/ubuntu
Post by: chuck on May 07, 2007, 11:24:12 AM
Quote from: Sidoh on May 06, 2007, 08:57:59 PM
The script, in effect, does the same thing I told him to do, yes?

I'm guessing he knows what sudo does but is perhaps misguided as to when it is a viable solution.
Yup.

I was like that before. I was bad an ran apache as root.... Luckly the machine was behind a firewall, otherwise it was cooked.
Title: Re: minimize to notification area in gnome/ubuntu
Post by: Joe on May 11, 2007, 07:15:45 PM
Quote from: chuck on May 06, 2007, 04:45:09 PM
Try this:

Quote
$ cat > execjavaop.sh
#!/bin/sh
java -jar /path/to/javaop.jar
^D
$ chmod +x execjavaop.sh
$ alltray ./execjavaop.sh

Your basicly trying to execute the .jar file as you would execute any program. That won't work on most linux systems.

And, by the way, sudo only gives you the ability to overcome permission errors. Infact, on a debian system, (Ubuntu is based on debian?) this will make X11 programs unable to connect to the display.

I never had that issue, and I often ran 'sudo synaptic' (I think that's what the program was named, the package manager).
Title: Re: minimize to notification area in gnome/ubuntu
Post by: chuck on May 11, 2007, 08:14:53 PM
Quote from: Joex86/64] link=topic=9281.msg118617#msg118617 date=1178925345]
I never had that issue, and I often ran 'sudo synaptic' (I think that's what the program was named, the package manager).
Well, its just the way debian is for me. Basicly, KDM sets up X11 to only allow the user who started the session to connect programs to it, and only listens on a socket and localhost.