LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-16-2006, 03:13 AM   #1
bnj
Member
 
Registered: Apr 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 70

Rep: Reputation: 16
How to launch Krfb using the command line?


Hello,

I'd like to access my desktop from a remote machine. I can easily log in to my computer using ssh. But I would like to have a graphical interface. So I would like to use VNC. I have installed Krfb on my computer and it works fine.
But in order to make it really usefull, I would have to be able to launche the Krfb server using the command-line. Because that is the only thing I can do when I am not physically on my computer. How do I do this?

Thank you,

Benjamin
 
Old 02-16-2006, 06:15 AM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Have you tried enabling X forwarding in /etc/sshd.conf, and using ssh -X -l username host to log in with X active?
 
Old 02-16-2006, 06:36 AM   #3
bnj
Member
 
Registered: Apr 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 70

Original Poster
Rep: Reputation: 16
Yes. And it works. But what if I am on a client that does not support X. (Windows, OSX, ...). I should still be able to use VNC, should I not? So I'd like to be able to launch a VNC server on my linux-machine without the need of opening the Krfb window. I cannot believe there is no way to do so. I just want to know the command that I have to type for that.

Thank you,

Benjamin
 
Old 02-16-2006, 08:11 AM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Yes, you should. What do you have in your ~/.kde/share/kinetdrc and kinetd.events files? It's been a while since I used mine, but they look like this:
Code:
$ cat ~/.kde/share/config/kinetdrc
[ListenerConfig]
enable_srvreg_krfb=true
enable_srvreg_krfb_httpd=true
enabled_expiration_krfb=2935093,2,28,0,0,0
enabled_expiration_krfb_httpd=2935093,2,28,0,0,0
enabled_krfb=true
enabled_krfb_httpd=true
$ cat ~/.kde/share/config/kinetd.eventsrc
[IncomingConnection]
commandline=
logfile=
presentation=4
soundfile=

[ProcessFailed]
commandline=
logfile=
presentation=4
soundfile=
I'd suggest setting up a few invitations on you system, and looking at how the settings change (especially the expiration ones) to see if you could just leave some open invitations for your clients on your system. (CAUTION: This may be a security risk. Try to limit access to the port (:5000, I think) to known IP addresses in your firewall.[/b])

I notice that there is a --kinetd option listed when you do a $ krfb --help-all command, but -- as you probably know -- the KDE Krfb help file is somewhat less than complete, so I've no idea how it might be used.

Another option, again not well documented is the --waitforwm one. I don't know what the WM_NET protocol for which that instructs krfb to wait is, but you might try it from a client system to see if it tries to open a window on the client system using the local window manager.

Edit: Have you looked at this HOW-TO?

Last edited by PTrenholme; 02-16-2006 at 08:18 AM.
 
Old 03-20-2006, 01:56 PM   #5
bnj
Member
 
Registered: Apr 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 70

Original Poster
Rep: Reputation: 16
Hello!
Remember me?
It's been a while, right?
Well. It looked so complicated that I was discouraged and did not look at this problem anymore until now.
I just found the solution to my problem!
Actually, there are two solutions. The first one is called vncserver, the second is called x11vnc.
vncserver is cool if no X-session is on on the remote PC. For example if the remote PC has no screen at all, or if nobody is logged in. Connect to your remote host via ssh, and then type
Code:
vncserver
You will be prompted for a password: You can type anything there, but remember it! This is the password that your VNC-client will need to connect to your PC. That's all, you can now launch your VNC-client.

x11vnc is cool if somebody is already logged in on the remote computer, and you want to see the same screen he does. Log in on the remote computer as this user. Then type
Code:
x11vnc
And there you are. You can now launch your VNC-client.

Three issues that I have not solved yet (but I guess a bit of googling will do that):
- vncserver gives a pretty bad resolution. I guess there is an option to change that.
- x11vnc does not by default create a password-protected VNC-session. I think there is a way to change that but I still have to look how it works.
- x11vnc closes the session as soon as the client disconnects. When does vncserver close the session?
 
1 members found this post helpful.
Old 11-06-2009, 08:08 AM   #6
ph_gachoud
LQ Newbie
 
Registered: Nov 2003
Posts: 2

Rep: Reputation: 0
krfb: cannot connect to X server

You should try:
Code:
krfb --display :0
and then connect to it, but dont forget to set the ~/.kde/share/config/krfbrc file with following content:
Quote:
[Invitations]
invitation_num=0

[Notification Messages]
systemtrayquitDesktop Sharing=false

[Security]
allowUninvitedConnections=true
askOnConnect=false
uninvitedConnectionPassword=<SetPasswordHere>
Then you can try to connect with:
Quote:
krdc localhost:10000
if you did a port forwarding like
Quote:
ssh -p22 -L10000:192.168.2.92:5900 sshUser@sampleSite.dyndns.org
It resolved my problem... hoping it helps...
 
Old 02-09-2019, 08:49 PM   #7
Lunar
Member
 
Registered: Feb 2005
Location: Texas, USA
Distribution: opensuse
Posts: 106
Blog Entries: 1

Rep: Reputation: 8
Quote:
Originally Posted by bnj View Post
Hello,

But in order to make it really usefull, I would have to be able to launche the Krfb server using the command-line. Because that is the only thing I can do when I am not physically on my computer. How do I do this?

Benjamin
How I do it is:
ssh to remote system
# krfb --nodialog

also you can put the same command in your kde system settings (configure desktop) > startup and shutdown applet under Application.

Landis.
 
  


Reply

Tags
krdc, linux



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
How do you launch Mozilla Firefox from the command line ? pppaaarrrkkk Linux - Newbie 1 10-07-2005 02:06 PM
gnome: launch application associated to a document type from command line cweiske Linux - Software 1 09-28-2004 06:47 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
Editing launch command... Beppe83 Linux - Laptop and Netbook 11 04-10-2004 03:49 PM
How to find the command line to launch app ScreeminChikin Linux - General 2 09-18-2002 11:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:21 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