Saturday, April 25, 2009

Linux: Share folders from windows to Kubuntu

I had a little trouble sharing my folders from windows to kubuntu, so with a little digging around i found this command that'll create a folder that'll link to your networkdrive. Of course you can change the location of where you want the mount to which ever folder
sudo mount -t smbfs -o username=james,password=bond //FileServer/Files /home/james/shares/FileServer
Of course if you do this, you may want to give your windows box a static ip, or use the name of the computer instead of the ip address.

To have this network folder permanently mounted, edit your /etc/fstab file to add
//FileServer/Files /home/james/shares/FileServer cifs username=james,password=bond 0 0

Curious tho that it uses cifs rather than smbfs, but i read somewhere that its being deprecated...

*******note: I was trying this on my work laptop, trying to mount a server folder onto my local system, and I kept getting this error in my syslog (/var/log/syslog)
smbfs: mount_data version 1919251317 is not supported
Turns out, it was because i didn't have the smbfs package installed. i don't know why it would have just said that, but in either case simply running
sudo apt-get install smbfs
Fixed it right up

Wednesday, April 22, 2009

Linux: Remoting into Kubuntu

Seems simple enough, here are the ingredients;

Kubuntu (duh)
VNC
Your IP address

So if you go to your start menu and go to your application tab, then Internet->Desktop sharing, you'll bring up Krfb, Kubuntu's native desktop sharing manager. With this app you can send invitations either explicitly (an email) or implicity (where the the invitee has 1 hr to log on).

Once you have Krfb up, click on Configure, then check off "Allow uninvited Connections" (to allow you to connect whenever) and uncheck Ask before accepting uninvited connection (so that you'll go straight in when you remote). Finally, be sure to put a password.

Once thats done you'll have to make sure that the computer, or rather the default port of 5900, is open to the outside world through your router/firewall. You may want to change the port just for security reasons.


Well, i've tried it and i have to say it sucks. or atleast not up to what i was hoping. I vnc'd to my machine at home and it was very laggy (not due to my connection, i can remote desktop in) and the desktop was very jagged. Looks like i'll have to find something better.

Friday, April 17, 2009

Livecycle: Connecting to webservices through Javascript

This is extremely helpful in that you don't have to have hidden fields and have to worry about binding fields to webservices.

First things first, you have to know the address of the webservice. You may have made it through so other server, but if you had created it using livecycle (ie a webservice endpoint), you can either hardcode the address in (in which case skip to the Note), or you can dynamically establish the location of the server;
var server = event.target.URL;
Once you open the form inn WORKSPACE, server will contain an address. This address will contain the address of the server, it'll be in a format of;
http://wfdev:8080/workspace/tksdfjh

So what you'll have to do is to strip out the first part of the address;
server = server.substring(0,server.indexOf("/",8));

And you just tack on the endpoint to the server;
var myUrl = getServerURL.GetServerURL() + "/soap/services/myWebService?wsdl";

This makes it pretty handy if your webservice resides in a test server a prodction server (as an example) and you're transfering the form between servers and you don't want to have to keep changing the address.

******
Note: if your webservice is not on the Livecycle server, and the address is same no matter where you use the form, u can start from here
******

And then once you have the address you make a connection to it
var connection = Net.SOAP.connect(myUrl);
Now once you have this connection, you can call the methods of the service using the dot notation;
var result = connection.myMethod({"paramenter1": value, "parameter2":value2});

Note the way that the parameters are passed in.

Monday, April 13, 2009

Linux: Cheat sheets

I'm trying to brush up on my linux skills and commands, and i constantly searching the web for commands and such. I was thinking about creating a type of "cheat sheet" or commands that i use most often. But until i do, here is a really, really comprehensive listing of different commands that I've found posted on Scott Klarr's website;

http://www.scottklarr.com/topic/115/linux-unix-cheat-sheets---the-ultimate-collection/

Livecycle: maxChars

This was strangely difficult to figure out, it took quite a bit of tracking down to figure out how to accomplish.

I've been trying to figure out to dynamically set the maximum number of characters in a text field and I was misled by a whole bunch of info. But basically heres the line of code;

field.value.text.maxChars = "x";

where x is an integer representing the number of characters.

Simple enough, eh?