LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-15-2009, 04:48 PM   #1
Jim Isbell
Member
 
Registered: Nov 2007
Location: Third Coast
Distribution: Freespire and Puppy...fpr now
Posts: 31
Blog Entries: 1

Rep: Reputation: 16
Modifying a Linux program??


This is probably NOT the place for this question, but I gotta start somewhere.

I am using tightVNC in my computers to access other computers on the LAN.

I would like to modify the program so that it can take arguments so that on each computer I can have a script run tightVNC for a particular destination. IOW, I dotn want to have to type in the address and password every time I attempt access to anothe computer. I want the Icon to display the name of the computer I want and then I want to click on that icon and be there with no further input.

The problem is that I dont know how to access the source code to fix it.
 
Old 03-15-2009, 05:20 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
why would you want to mess with the source code for this?? Just put a little bash wrapper script around it. Or actually if you just want an icon, then just put different command line arguments for each one.
 
Old 03-15-2009, 06:22 PM   #3
Jim Isbell
Member
 
Registered: Nov 2007
Location: Third Coast
Distribution: Freespire and Puppy...fpr now
Posts: 31

Original Poster
Blog Entries: 1

Rep: Reputation: 16
I already have a bash script that calls tightvnc when I click on the icon I designed for the script. But tightvnc does not take arguments so it then queries me, first, for the address, and then second, for the password.

The script I use is:

#! /bin/sh
tightvnc

Simple, but as you can see, tightvnc is not designed to recieve passed variables. I want to redesign it to accept the two variables, address and password from the bash script.
 
Old 03-16-2009, 03:58 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
As I can see? All I can see is that you've not given it any options. read the man page and you'll see all the options you want.
 
Old 03-16-2009, 09:43 AM   #5
Jim Isbell
Member
 
Registered: Nov 2007
Location: Third Coast
Distribution: Freespire and Puppy...fpr now
Posts: 31

Original Poster
Blog Entries: 1

Rep: Reputation: 16
Quote:
Originally Posted by acid_kewpie View Post
As I can see? All I can see is that you've not given it any options. read the man page and you'll see all the options you want.
Follows is the greek in the man page:

ENVIRONMENT
When started with the -via option, vncviewer reads the VNC_VIA_CMD environment variable, expands patterns beginning with the "%" character, and executes result as a command assuming that it would create TCP tunnel that should be used for VNC connection. If not set, this environment variable defaults to "/usr/bin/ssh -f -L %L:%H:%R %G sleep 20".

The following patterns are recognized in the VNC_VIA_CMD (note that all the patterns %G, %H, %L and %R must be present in the command template):

%%
A literal "%";
%G
gateway host name;
%H
remote VNC host name, as known to the gateway;
%L
local TCP port number;
%R
remote TCP port number.


I think asking for help here is a waste of my time. A simple example would be more helpful. That is why I want to make my changes since no one is willing to explain how the current model works.
 
Old 03-16-2009, 01:54 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
I'm totally lost mate, you seem to think this is much much harder than it is... you want to click one of a series of icons and have each icon supply a password?
Code:
-passwd passwd-file
    File from which to get the password (as generated by the vncpasswd(1) program). This option affects only the standard VNC authentication.
the -via options are all about tunneling and such, which you've not said you want to use at all. Do you need to use that option? it doesn't seem to relate to what you're originally asking about.

Last edited by acid_kewpie; 03-16-2009 at 01:56 PM.
 
Old 03-16-2009, 04:52 PM   #7
Jim Isbell
Member
 
Registered: Nov 2007
Location: Third Coast
Distribution: Freespire and Puppy...fpr now
Posts: 31

Original Poster
Blog Entries: 1

Rep: Reputation: 16
Angry

All the theses in the world don't help without an example of syntax. So would take it upon myself to examine the code directly and determine the syntax...if I could get to it....or I would rewrite it so I understood the syntax.

There is no mention of syntax on any page I have looked at.

I have tried:

tightvnc -passwrd=12345 -host=192.168.1.103

and it does not pass the password or address.

I have tried:

tightvnc [192.168.2.103]

And it does not pass the address.

I have tried:

tightvnc [passwrd=12345][host=192.168.1.103]

I have tried:

$1=12345
$2="192.168.1.103"
tightvnc ($1, $2)

and a plethora of various iterations of syntax possibility's. NONE work and NO ONE has offered a simple example of the correct syntax.

Why is what I am trying to do so difficult for others to see????
 
Old 03-16-2009, 07:09 PM   #8
Jim Isbell
Member
 
Registered: Nov 2007
Location: Third Coast
Distribution: Freespire and Puppy...fpr now
Posts: 31

Original Poster
Blog Entries: 1

Rep: Reputation: 16
Quote:
Originally Posted by acid_kewpie View Post
As I can see? All I can see is that you've not given it any options. read the man page and you'll see all the options you want.
I read the man page. It doesnt give the syntax and I have tried every variation of syntax I can and cannot get it to work. Whats wrong with an example???
 
Old 03-17-2009, 04:00 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
well firstly it clearly says "passwd" and not "passwrd" and secondly it says "File from which to get the password (as generated by the vncpasswd(1) program)" not "your password", I really can't see how that could be much clearer.

When i read the manpage I see "vncviewer [options] [host][:display]" which coupled with the -passwd option makes an example:

tightvnc -passwd mypasswdfile 1.2.3.4

Last edited by acid_kewpie; 03-17-2009 at 04:04 AM.
 
Old 03-17-2009, 12:13 PM   #10
Jim Isbell
Member
 
Registered: Nov 2007
Location: Third Coast
Distribution: Freespire and Puppy...fpr now
Posts: 31

Original Poster
Blog Entries: 1

Rep: Reputation: 16
Quote:
Originally Posted by acid_kewpie View Post
well firstly it clearly says "passwd" and not "passwrd" and secondly it says "File from which to get the password (as generated by the vncpasswd(1) program)" not "your password", I really can't see how that could be much clearer.

When i read the manpage I see "vncviewer [options] [host][:display]" which coupled with the -passwd option makes an example:

tightvnc -passwd mypasswdfile 1.2.3.4


The page refers to vncviewer....which I clearly dont have......


I am moving on to another forum. This one clearly only wants to argue semantics and typos rather than being helpfull. If this person were one of the forum members, and not a "Moderator" I would just say, one bad apple. But clearly the management of this forum is anti solution and only argumentative.

If anyone other than this person reads this and has a solution, I would welcome hearing from you at my emailo address, ***, but I have no more interest in linuxquestions.org

Last edited by reddazz; 03-17-2009 at 07:42 PM. Reason: removed email address
 
Old 03-17-2009, 04:52 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
There is no solution, you just need to read the words in the manpage, it's really really really basic. I'm sorry if what I said seems rude to you, honestly is not the intention, but there's a limit as to how basic I'd expect to have to get, so i do apologize if i've missed the mark in terms of your technical capabilities, and I notice that i did refer to a tightvnc binary, when it is indeed called vncviewer. But you seem to have completely missed the mark in terms of your expectations of the software you're trying to use and have not actually tried to read the *extremely* simple and straight forward documentation you have right infront of you. Everything you want is right there waiting for you, with trivial usage of a very simple command.
 
Old 03-17-2009, 05:20 PM   #12
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian 11
Posts: 6,135

Rep: Reputation: 420Reputation: 420Reputation: 420Reputation: 420Reputation: 420
Quote:
There is no solution, you just need to read the words in the manpage, it's really really really basic.
To pour oil on troubled waters, I'll second this post.
It is indeed "really really really basic".

And as for arguments over "semantics and typos", these things matter. for example, the command to change a user's password is passwd not "password" or "passwrd". The reasons are historical and no longer matter, but typos matter, and not just in linux.

Quote:
I have tried:

tightvnc -passwrd=12345 -host=192.168.1.103
tightvnc [192.168.2.103]
tightvnc [passwrd=12345][host=192.168.1.103]

$1=12345
$2="192.168.1.103"
tightvnc ($1, $2)
Trying random syntax with any computer is unlikely to work.

You have received a decent apology for misunderstandings, and if you wish to leave LQ, so be it. I would consider it your loss. If you wish to reconsider, post again, we are truly trying our best to help you, if you can resist the temptation to "fly off the handle" at the first hurdle.

Meanwhile, you might like to go back to your post #10 and edit out your email address. Your address will otherwise be harvested by spam-bots and you will be deluged.

Good luck with linux.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying the Linux boot process.... jackstrat Linux - Newbie 3 01-15-2008 03:57 PM
Linux won't start after modifying partition rufus1 Linux - Newbie 4 11-28-2005 03:54 PM
modifying a linux database. alejan74 Linux - General 5 02-15-2005 03:19 PM
modifying linux core spyghost Linux - Software 3 12-03-2004 09:53 AM
modifying kde/desktop in linux zacherrin Linux - Software 3 10-19-2004 11:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration