Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Native Citrix client for remote connections Apps
An anonymous tipster told me he had the Citrix java client running on X. Citrix is a remote access server that's used in many offices (including mine!), and it usually runs on an NT box. There's a Mac client, but I couldn't get it to run in Classic.

The tipster (sorry, no name given) stated that he had it working, but that it needed a couple of scripts to work right (which he would provide via email). Unfortunately, the email address he provided didn't work! With a bit of digging on Citrix site, however, I figured out the scripts (not too hard!), and now have a working client!

So if you'd like a native Citrix java client for remote access to your corporate network, read the rest of this article...

Thanks to Mr. Anonymous for most of's what you need to do.

1) Go to the Citrix Java Client download page and download the "ICA Java Client". After agreeing to some legalese, you'll be on the download page. Download the client (version 6.0.1146) and the client admin guide PDF.

2) Once downloaded, create a home for the Citrix program. This example assumes you make a new directory in Applications called citrix.

3) Move the downloaded setup.class into the new directory (using the GUI or terminal, your choice).

4) Start a terminal, and cd /Applications/citrix.

5) Now we'll run the setup.class program by typing /usr/bin/java setup. This will take a couple of minutes, but at the end, you should wind up in a nice Citrix GUI installer.

6) The first thing it asks you is where to put the files. Do not hit the browse button. Just type the path to your new Citrix directory, /Applications/citrix in this example.

7) The installer will walk you through a few more screens, then finish with an error saying a couple of scripts were not created. That's our next step.

8) Make sure you're in the Citrix directory, then launch your favorite text editor (I'll use pico to keep it simple) on a new file, pnsession. Once you start the editor (pico pnsession), type the following three lines:
/usr/bin/java $@
Save your changes (ctrl-O in pico), then exit (ctrl-X).

9) Create another new file, jicasession, again using a text editor (pico jicasession) and type this:
/usr/bin/java com.citrix.JICA $@
Again, save your changes and exit.

10) Make the new jicasession file executable by typing chmod 755 jicasession.

11) That's it! You can now use the Java Citrix client from the command line by typing:
This will bring up a command window, into which you can type your connection commands. This is where the PDF guide comes in VERY handy, showing you all the options. Here's just one example, showing the options I used to connect tonight:
./jicasession -address:999.999.999.99 -width:1024 -height:768 -desiredColor:4
(Obviously I entered our real IP number!) All in all, very very cool, and thanks again to Mr. Anonymous for getting me started with it!
  • Currently 2.43 / 5
  You rated: 4 / 5 (7 votes cast)

Native Citrix client for remote connections | 31 comments | Create New Account
Click here to return to the 'Native Citrix client for remote connections' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Wonder why Citrix Java does that?
Authored by: mergy on Apr 26, '01 01:26:56PM

Something about the setup of that Java Client - I wonder why it won't create the jicasession and pnsession scripts for the JVM on Mac OS X? Why would Citrix put the kind of logic in the setup.class that wouldn't complete the install on an unknown JVM?

Same thing happened on Classic with MRJ (hence mandatory the JBindery application build). setup.class should only really care that there is a compatible jvm and the files are where they need to be- oh well.

[ Reply to This | # ]
Authored by: jgardner on Apr 27, '01 05:23:14PM

Did the Citrix shuffle; works great. I knew there had to be a way to get the dang thing to work. Now, is there a way to create a "double-clickable" shell script? I don't want to have to open a terminal session just to open the Citrix client; I've tweaked the shell script such that it works if I open it with Terminal, but I still don't have a clickable icon to start it. Any ideas?

[ Reply to This | # ]
Authored by: Anonymous on Apr 27, '01 05:48:37PM

Append .command to the script-that should do ya. You can of course drag the script to the dock as well, the .command portion makes it a defacto launcher...

[ Reply to This | # ]
Authored by: rwintheiser on May 09, '01 04:09:21PM

as a complete newbie, but learning..... can anyone post a step by step to do this? I want to get the java gui up and have it type the command line there too. Then I don't have to remember the whole statement.... thnx

[ Reply to This | # ]
Authored by: Tastannin on Jul 03, '01 01:27:19PM

I tried the .command appended on the shell script, and still can't get it to launch. Am I doing something wrong in the shell script - call me an UNIX newbie, excuse me :)

Thx a bunch.

[ Reply to This | # ]
Can anyone get farther?
Authored by: ricwash on Apr 30, '01 07:51:18AM

I was able to get a double-clickable solution to work several weeks ago. That was easy and I didn't have to do all the command line stuff listed in this article, I used MRJAppBuilder. This program and ProjectBuilder, are available with the developer tools that come on the Developer CD packaged with your MacOS X CD. The only command line thing I had to do was run setup.class from it, everything else is pretty easy using MRJAppBuilder.

In Classic I was able to do this all in Jbindery as mention in a previous post, MRJAppBuilder seems to be the replacement. I was also able to get the Network Neigborhood to work in Classic, I hate command line.

I have been unable to get it to work in MacOS X with the Network Neighborhood. I have posted in many forums and nobody seem to be able to help (IE, I have gotten no replys to my posts). I have also tried to get help from Citrix both through the forums and through our licensing channels. Still no luck.

I am also not having any luck with local printing using the Java version in either MacOS. The native Mac Client handles this very well and I wish it was as easy in Java.

Is there anyone that can help me? Point me to a person that can help? Anything, please...this may determine how long Mac continue to have support were I work...

Thanks in Advance...


[ Reply to This | # ]
Can anyone get farther?
Authored by: mergy on May 01, '01 12:53:07AM

Why not have the printer setup from the citrix server? Is the printer not on the network?

Have you tried this Citrix doc?

How to Map Printers with the Java Client
Document ID -- CTX122360
Last modified on: Tue Aug 01 17:49:29 2000
Send this document to a colleague.

This solution pertains to:

* ICA Client

Send us your feedback

The ICA Java Client can be configured to map client printers to an ICA session so that client system users can print to their local or network printers. Printers can be created with ICA Client Printer Configuration, auto-created, or manually created.

ICA Client Printer Configuration

After starting your ICA session, click Start and point to Programs. Next point to MetaFrame Tools (Common) and click ICA Client Printer Configuration. From the Printer menu, click New . The Add ICA Client Printer Wizard appears. Use the Printer Wizard to create the client printer.

If you start your ICA session from the command line, you can use the -inidir parameter to create a file so your printer configuration is saved between sessions. For example, to start your ICA session using the c:config directory to store the configuration file, type the following (along with any other required parameters): jicasession -inidir:c:config.

Auto-Created Printers

Auto-created printers are configured in the HTML page or from the command line. When users log on to a Citrix server, their printers appear in Print Manager or in the Printers folder and are ready for use. When users log off, their local printers are deleted from the Citrix server.

To auto-create printers, the ICA Java Client must be passed three values:

1. Printer name. Can be any name by which you would like to identify the printer.

2. Port name. Specify a file name, port name, or printer IP address (or network name) and print queue.

3. Driver. Specify the printer driver. This name must exactly match the driver name on the Citrix server. Check the driver list on the server.

To auto-create a printer, the Citrix server must have the printer driver installed. If the driver is not installed, the printer is not auto-created. In this case, the user must manually add the printer during the ICA session.

Manually Created Printers
It is only necessary to manually create a printer when either the printer driver is not installed on the server, or the server is configured to not allow auto-created printers.

1. Make an applet or application mode connection to a MetaFrame server.

2. In the remote session window, double-click My Computer and then double-click Printers.

3. Double-click Add Printer. Select Network printer server and click Next.

4. In the Shared Printers field, double-click Client Network and then double-click Client.

5. Double-click the LPT port to which the local printer is attached.

6. If the server does not have a suitable printer driver installed, you are prompted to install the driver on the client computer. Click OK.

7. In the Manufacturer field, select your printer's manufacturer. In the Printers field, select the model of your printer. Click OK.

8. If prompted for the location of the printer driver, click OK and enter the location of the files in the Copy files from field. Click OK.

9. Click Finish.

[ Reply to This | # ]
Can anyone get farther?
Authored by: ricwash on May 03, '01 01:13:45PM

Yes the printer(s) are on the network, but if the user changes their printer in the mac environment, it does not change in the Citrix environment to the same printer.

I need it to work like the Native Mac client....

I also want the Network Neigborhood to work. I have it working in pre-MacOS X, but have been unable to get it to work in X.

I have seen those instructions and I still have been unsuccessfull.

[ Reply to This | # ]
Exception in thread
Authored by: bonibak on Apr 30, '01 03:38:09PM

I followed your description word by word and assumed to get my Citrix client running ...

After typing the command ./jicasession I got the message:

Exception in thread "main" java.lang.NoClassDefFoundError: com/citrix/JICA

Whatever it means, it's no good (-;

Can anybody assist ?!

[ Reply to This | # ]
Exception in thread
Authored by: mergy on May 01, '01 12:34:23AM

Make sure jicasession is in the same folder (directory) that all the setup files and classes are in. If it isn't, then you will have such an error.

[ Reply to This | # ]
Exception in thread
Authored by: bonibak on May 01, '01 04:21:02PM

Today I started all over and did the whole installation as described in the first post.
Everything is in place and I even chose the same directory names as describred just to keep it simple. I can go through all installation steps with no error.
But when I try to run './jicasession' in the directory '/Applications/citrix' I get the error message 'Exception in thread "main" java.lang.NoClassDefFoundError: com/citrix/JICA'
Assistance still very appreciated!

[ Reply to This | # ]
Weird...very weird!
Authored by: robg on May 01, '01 06:46:23PM

My machine was running 10.0.1, with Dev Tools installed, when I did this. I'd also added PHP and mySQL and a few miscellaneous UNIX apps, but that's about it. I know I'd never touched the Java directory prior to Citrix. I have X and 9 on one partiiton, 9 (normal) on another. X was installed on a cleanly formatted partition.

What machine are you running, and how is X installed? Does the Java Applet Runner work, and can you run the demo apps?


[ Reply to This | # ]
Dev Tools ?!
Authored by: bonibak on May 02, '01 02:43:48PM

I'm running a Titanium G4 with 256 Megs, OS x 10.0.1 installed on one partition, the classic environment on another, and both strictly seperated from good old 9 with all applications on it. Pretty clean I guess ... BUT, I have not installed the Dev Tools - Could this cause all the trouble ??
I am able to run the "JEdit 3.1" which I think is a Java application, right ? This would tell me that my Java environment is not corrupted -

[ Reply to This | # ]
No clue...
Authored by: robg on May 03, '01 01:25:42PM

Hmmm ... something is definitely odd. As an experiment, you could try creating a new user, and compiling in the new user's space, just to see what happens -- but that's total guesswork, as I really don't know what's going on with your setup. For me, the above instructions worked perfectly on two different machines...



[ Reply to This | # ]
Wrong language
Authored by: bonibak on May 03, '01 01:49:08PM

I tried the same procedure on my Cube at the office today; same problem. Next things I'll try:
- new user as you recommended
- OS X installation in US English (not German)
I'll keep you posted ...
Thanks for your help anyway!

[ Reply to This | # ]
Maybe this is it...
Authored by: robg on May 04, '01 01:34:46AM

I managed to get your error tonight, when I tried a shell script that had the whole command on one line (/Applications/citrix/./jicasession etc). When I switched it to two commands, one to 'cd' and one to 'jicasession', it worked perfectly.

Not sure if that's what you were doing, but it only seems to want to run if you're actually IN the directory.

[ Reply to This | # ]
Sorry g-money...
Authored by: acyoda on May 04, '01 11:45:33AM

But I'm getting the same error running the North American release of OS X, and running"jicasession" from the Citrix directory. Other than that, my java is acting like a rabid crack baby with bottle of effidrin(sp?), that is as in: Not good. Maybe if I fprotted my tarball... ;P

[ Reply to This | # ]
Problem solved !
Authored by: bonibak on May 04, '01 04:12:09PM

Sometimes it's better to start again at the very beginning. I did so. I did a clean new installtion of a German Mac OS X with NO developer tools plus the updates 10.0.1 and 10.0.2. Then I did the citrix installation again, and SURPRISE: it works !!
Thanks for your assistance!

[ Reply to This | # ]
Still need VPN connection
Authored by: pcrawfor on May 07, '01 10:03:16PM

I have the Citrix Java Client installed but I have not tested it yet. I need to take the PowerBook G3 500, that has OS X on it, to work to connect to my company's network. I assume that it will work OK and I will report back in a few days on that.

What I really need is a Mac OS X VPN client that will let me connect to the LAN, on which the Citrix server is located, via the Internet. Presently I am using Virtual PC and Win2K to make a PPTP connection and then a Windows ICA client to connect to the Citrix server. I have tried the application "PPTP-gui", but it seems to do absolutely nothing. I have also heard that Apple may put a VPN client in OS X in a future update. Does anyone have any help on this?

Thanks and best regards,

Paul Crawford

[ Reply to This | # ]
Still need VPN connection
Authored by: pcrawfor on May 16, '01 10:51:50PM

So, I got the Java ICA client running when connected directly to the company network. The first time it crashed but the second and subsequent times it was fine. Unfortunately the Java client does not seem to have a full screen option and the application I am using needs a full 1024 x 768, but I lose the Mac menu bar and the window title bar at top.

Is there any way to get an application to go full screen?

Will Citrix develop a Mac OS X client?

How can I get a VPN connection to our company network from within OS X?


Paul Crawford

[ Reply to This | # ]
Citrix and Published Application
Authored by: lsheaves on May 15, '01 03:00:42AM


Thanks to the tips posted here, I have managed to get Citrix to work quite nicely, but I am having one problem...

here is the command that I am using...

./jicasession -address:x.y.c.a -initialprogram #progname -width:1024 -height:768 -desiredColor:4

I really want to be able to get an application up and running straight away. With a connection document under windows, it works fine, but under the java client I end up at the Windows NT user/password prompt.

Any ideas?



[ Reply to This | # ]
Citrix and Published Application
Authored by: joshb on May 30, '01 02:26:13PM
./jicasession -address:Publishedappname -tcpbrowseraddress:ServerName -InitialProgram:#Publishedappmname seems to work for me -- but I seem sto have a hard time getting connected to my apps as they have two names in them and the "-address:APP NAME" leads to a dialog saying that it's connecting to APP instead of APP NAME and then I get a dialog with a Red X taht says "The application or" but it is cut off so I can't read it.

Tried a program neighborhood connection but it seems to bomb...


[ Reply to This | # ]

Citrix and Published Application
Authored by: Keith_Morgan on Jun 06, '01 09:55:03AM

I am also having trouble with two name apps. You mention that you tried program neighborhood and it bomded. I have not been able to get pn to run. I am entering the following:
java -address: (Ip address of data collector for metaframe XP)
When I enter this I get the following error:
"Exception in thread "main" java.lang.NoClassDefFoundError: com/citrix/pn" I am running this from /Applications/Citrix

any suggestions would be greatly appreciated.

[ Reply to This | # ]
Double-Clickable version of the Citrix client
Authored by: jgardner on Jun 20, '01 06:24:30PM
I have posted fairly detailed instructions on creating a double-clickable app using the Citrix Java client files. See

[ Reply to This | # ]
Double-Clickable version of the Citrix client
Authored by: Tastannin on Jul 03, '01 01:34:30PM

I tried your instructions, and they work great. The only problem is that it seems that MRJAppBuilder won't parse anything inside " " as a single word. It's similiar to the issue someone else raised when using syntax from the command line such as -address:Citrix Server, you need to enter it as -address:"Citrix Client" so that the correct name is passed. Well, it seems like "Citrix Server" doesn't get parsed correctly, and when the java app is launched, it searches for "Citrix not Citrix Server as it should. How do I get around this limitation?

thanks a bunch!

[ Reply to This | # ]
Double-Clickable version of the Citrix client
Authored by: jgardner on Feb 05, '02 11:40:11AM
MRJAppBuilder has problems passing quotes in the parameters. If you're setting up a full desktop session, use the IP address or hostname (which don't contain spaces) in the -address and -tcpbrowseraddress tags. If you're trying to connect to a published app with spaces in its name, then the easiest thing to do is to change the name of the published app to eliminate the spaces.

[ Reply to This | # ]
JICA and pn classes failing to load.
Authored by: pccdonl on Jul 18, '01 04:55:02PM

I have created the batch files. I am able to run com.citrix.JICA. However, at times it crashes I do not know why. There is no error in the console. After a user logs in and presses OK on the Citrix login screen it crashes.

I am totally unable to use The following is the error that I receive when it is being run. It gets as far as the splash screen and then dies with a NULLPOINTEREXCEPTION. It appears that this is happening when a new menu is being created. Anyone been able to get around this or maybe not experiencing this? We are able to use the on Windows, Windows NT, Windows 2000, Mac OS 8.5 and later, and Linux. I am thinking that this would then be a problem within the MRJ. Is anyone else experiencing this problem? Or if you are not can you help me with getting this to work?

[LaunchRunner Error][]) threw an exception:

at java.awt.PopupMenu.addNotify(
at java.awt.Component.addNotify(
at java.awt.Container.addNotify(
at java.awt.Window.addNotify(
at java.awt.Frame.addNotify(
at java.awt.Window.pack(
at Source)
at Source)
at java.lang.reflect.Method.invoke(Native Method)

Thanks for any information you can provide.

Don Lindsay
LQ Computer Consultants
Click here to send me a message directly.

[ Reply to This | # ]
making a mac partition the C drive
Authored by: chabotd on Nov 15, '01 10:44:03AM


I got this solution to work, as well as the double-clickable solution proposed by
Jon Gardner. The latter worked well except that half of the task bar at the bottom
of the screen disappears.
To the point now. With the Citrix client, I have no difficulty having one of my
mac partitions act as a C: drive during a session. I tried doing this with the java
client, both using the command line and the double-clickable solutions. No success.
Thinking it could be related to the presence of blanks in the partition's name
(similar to the problem described by Tastannin on Tue, Jul 3 '01 at 01:34PM in
this thread), I also tried another partition with no blank (called Divers). That did not work either.
Here are the things I tried:
-DrivePathC:Mac HD-OS 9
-DrivePathC:Mac HD-OS 9 -DriveEnabledC:on -DriveReadAccess:0 -DriveWriteAccess:0
-DrivePathC:"Mac HD-OS 9"
-DrivePathC:"Mac HD-OS 9" -DriveEnabledC:on -DriveReadAccess:0 -DriveWriteAccess:0
-DrivePathC:Divers -DriveEnabledC:on -DriveReadAccess:0 -DriveWriteAccess:0

The session opens, but I do not see my mac partition among the available drives.

Has anyone succeeded in using a mac partition during an ICA session? I do need the
ability to pass data files from my mac partition to some of the drives available
within the ICA session.

Thanks in advance,


[ Reply to This | # ]
accessing a Citrix server over modem
Authored by: chabotd on Nov 15, '01 12:46:48PM


I have another question.

Has anyone been successful connecting their java client to a Metaframe server over modem?

With the Citrix client under OS 9, I can connect to the NT server via ethernet AND over a modem connection, using RemoteAccess.

This client runs well under classic, and I was in no rush to try the java client... until I noted that the Citrix client did not like working over a modem connection under classic. Please note that this solution works under Mac OS 9.2 (and 9.1 before that).

So I tried the java client, which works fine over ethernet. In fact, if it was not for the problem with mapping of a mac partition (see my other post) I'd use it routinely for work.

But from home it suffers from the same drawback as the regular Citrix client: it cannot find the metaframe server over a modem connection established by Internet Connect and OS X.

I get my modem connection to the NT server to open, and I can use email (even with MS Outlook 2001 in Classic) and surf the web. But the Java client tells me it is unable to find the server (or some other wording to this effect).

Would you happen to know why? Or even to suggest things I may try? If possible solutions that do not require any action from the people running the network and server, as they do their best to stop me from using a Mac.



[ Reply to This | # ]
Best Citrix client for X yet
Authored by: chabotd on Feb 28, '02 02:07:53PM


I tried compiling my own client using instructions left here and elsewhere, but it never worked perfectly (like cutting down the bottom of windows, not allowing mapping to local drive, etc.

Well I have found a better client, obviously be someone more skilled than myself.

Go try the MysteryMachine at

I think you'll like it.

Denis Chabot

[ Reply to This | # ]
Citrix client encryption setting
Authored by: anuragj on Mar 21, '02 04:42:41PM

I got the native citrix client installed , but my citrix session fails complaining the encryptionlevel set is not correct for the session.
I've used command line parameter "-EncryptionLevel:4" for setting 56bit encrption for the session but without success..
Is there anyway to fix this ?


[ Reply to This | # ]