Author |
Message |
koli
Doesn't have much of a life
Joined: Fri Apr 24, 2009 5:12 pm Posts: 1171
|
I need to implement this (add -forever option) to my x11vnc under latest Ubuntu: http://ubuntuforums.org/showpost.php?p= ... ostcount=5I have set up x11vnc to run at the startup so I assume I need to modify the "exe" file for it. I just don't know how...
|
Thu Jun 03, 2010 8:16 am |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
How have you specified x11vnc to be run on startup? Can you not specify the flag then?
Modifying the binary file could be impossible, and even if it is possible it would be not be advisable (what happens when one day you don't want to use the flag?).
|
Thu Jun 03, 2010 8:29 am |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
I presume you did this: And added this to that file: I would say you could probably do this: If that doesn't work, try quoting it with double quotes or back ticks like this: Ben
|
Thu Jun 03, 2010 8:34 am |
|
 |
koli
Doesn't have much of a life
Joined: Fri Apr 24, 2009 5:12 pm Posts: 1171
|
I have set up start-up by going admin-sessions in the menus and added the x11vnc file to the list. I haven't done any command lines except for setting a password for vnc sessions.
Those command lines you have suggest seem very complicated. Do I need them all? Right now I need to add -forever and -password options (vnc is not asking for a password when I connect even though password was specified by a command line I have done).
I could probably do with -localhost option too so nobody from outside can connect to it. I am behind a firewall so port forwarding is better left out as well, just to be safe.
|
Thu Jun 03, 2010 10:11 am |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
I looked at this site here: http://wiki.linuxquestions.org/wiki/X11vncI you would only need to do one of them, probably the following: I'm not sure of using the Linux service framework as Solaris works quite differently. But out of the reading I've done on from the link above, I think that's right...
|
Thu Jun 03, 2010 10:36 am |
|
 |
koli
Doesn't have much of a life
Joined: Fri Apr 24, 2009 5:12 pm Posts: 1171
|
Ok, I will run that in the console tonight and will report my findings. Thanks.
|
Thu Jun 03, 2010 11:01 am |
|
 |
EddArmitage
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 9:40 pm Posts: 5288 Location: ln -s /London ~
|
Just a bit of explanation around Ben's advice, so you understand what you're doing. I'm not sure what the inetd.conf file is for, or what the line in the file means, but I guess Google will explain if you're curious/it doesn't work. sudo - Run as Super User (Super User DO) nano - A text editor /etc/inetd.conf - The file you want to edit Then you just need to add or edit the second line into text file from within the nano editor.
|
Thu Jun 03, 2010 2:56 pm |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
 |  |  |  | EddArmitage wrote: Just a bit of explanation around Ben's advice, so you understand what you're doing. I'm not sure what the inetd.conf file is for, or what the line in the file means, but I guess Google will explain if you're curious/it doesn't work. sudo - Run as Super User (Super User DO) nano - A text editor /etc/inetd.conf - The file you want to edit Then you just need to add or edit the second line into text file from within the nano editor. |  |  |  |  |
Sorry, I tend to forget that people switch to Linux and don't necessarily dive into the command line... If you'd rather use a nice graphical editor to edit the file, do something like this: It is exactly as Edd explained, but will use GNOMEs graphical editor (like notepad) to edit the file. After looking here: http://www.faqs.org/docs/securing/chap5sec36.htmlI've found this much out about the file: In my mind, that is exactly what you want to do. You may not even need the -forever option, though I'm not sure...
|
Thu Jun 03, 2010 3:05 pm |
|
 |
koli
Doesn't have much of a life
Joined: Fri Apr 24, 2009 5:12 pm Posts: 1171
|
In that file I had: I added this: And this is what it looks like now: But I don't think the this is correct as it is not having any effect. Is the syntax correct? I am not sure whether to replace stuff or just add it. Also, when I change the file, do I need to reboot for it come into effect or is it gonna work on the fly?
|
Thu Jun 03, 2010 6:45 pm |
|
 |
EddArmitage
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 9:40 pm Posts: 5288 Location: ln -s /London ~
|
I don't know about the rebooting, but try putting the last bit in back-ticks or double quotes, as Ben suggested would be my first thing.
|
Thu Jun 03, 2010 7:10 pm |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
You may need to alert the daemon that reads that file that the file has changed... There may be several ways to do this, but the most universal is to do a reboot (you might be able to just restart the service, or even pass something to the service to tell it to check the file, but I don't know that much about Linux I'm afraid)
|
Thu Jun 03, 2010 8:05 pm |
|
 |
koli
Doesn't have much of a life
Joined: Fri Apr 24, 2009 5:12 pm Posts: 1171
|
Ok, I have done some googling and this is what I've found: If I run that in terminal it does exactly what I need: 1. It asks me for a password 2. When I disconnect I can connect again without having to terminate the session and reboot So the question is: How do I get that command to run in terminal at startup?
Last edited by koli on Fri Jun 04, 2010 7:35 pm, edited 1 time in total.
|
Thu Jun 03, 2010 8:13 pm |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
OK, I've done more googling too. I think this will work: After doing this you will have to do a single reboot, then the service is active. It should be available every time you boot your machine. From here: http://ubuntuforums.org/showthread.php?t=673126
|
Thu Jun 03, 2010 8:22 pm |
|
 |
koli
Doesn't have much of a life
Joined: Fri Apr 24, 2009 5:12 pm Posts: 1171
|
Thanks Ben, that code created the file with the text I wanted and made it executable but after reboot it didn't work. I think it might have something to do with the third line of code. However this worked from that link you gave me: And it is working as it should. After reboot it starts x11vnc, when I try to connect it asks for a password and after I disconnect I can connect again. Thank you very much guys for your help. I will write (very simple) "How to" for this when I have some time couple of weeks. It might save somebody the hassle I've had with it.
|
Thu Jun 03, 2010 9:18 pm |
|
|