[Solved] Remote desktop, where are you?

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
User avatar
guttaslax
White ninja
White ninja
Posts: 23
Joined: 29 Dec 2010, 08:16
Location: EU GMT+1 N41.48.60 E12.30.30

[Solved] Remote desktop, where are you?

Post#1 by guttaslax » 02 Jul 2012, 09:24

Well, a newbye question needs to be in its own section.
Some days ago I needed to revive an old practice to take a look to another pc running Porteus with ftp and dlna servers in another floor, and started hacking on it. Soon I realized it couldn't be done in the usual way by remote desktop;
the feature consists of two executables included in the KDE environment, KRFB (the server) and KRDC (the client).
The second one is there, working, even an entry in the kmenu is present. The first one is missing. I actually don't know if it's no longer supported or it's due to a stripped down KDE.
I see here

http://porteus.org/forum/viewtopic.php? ... 9615#p9615

the feature will be restored, but the thread is 64-bit related. so I'm not sure if I'll find it in the new 32-bit version too;

while waiting for the new release, can anyone suggest a module VNC compatible to get the same result?

E
Last edited by guttaslax on 12 Jul 2012, 17:23, edited 3 times in total.
everyone is master of what he knows and slave of what he says

User avatar
brokenman
Site Admin
Site Admin
Posts: 5659
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Remote desktop, where are you?

Post#2 by brokenman » 03 Jul 2012, 02:53

Hey guttaslax,

Yes both krdc and krfb will be available in 32bit.

Download tightVNC

Download vnc-server
Run the server with x11vnc or x11vnc -h for options
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
guttaslax
White ninja
White ninja
Posts: 23
Joined: 29 Dec 2010, 08:16
Location: EU GMT+1 N41.48.60 E12.30.30

Re: Remote desktop, where are you?

Post#3 by guttaslax » 03 Jul 2012, 09:28

Thank you admin, both work fine.

The viewer ir useless indeed, I connect by a win box or an android phone or tablet.

The server does its job after learning to pass some parameters;
running AS IS it only accepts the first connection, and after a logout automatically stops the task;
must specify at least a -forever to keep the server alive.

What about the new release?


E.
everyone is master of what he knows and slave of what he says

User avatar
brokenman
Site Admin
Site Admin
Posts: 5659
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Remote desktop, where are you?

Post#4 by brokenman » 03 Jul 2012, 14:27

Should be live by tomorrow. I'll test the remote desktops later and if there is a problem i will update them.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
guttaslax
White ninja
White ninja
Posts: 23
Joined: 29 Dec 2010, 08:16
Location: EU GMT+1 N41.48.60 E12.30.30

Re: [Near to be Solved] Remote desktop, where are you?

Post#5 by guttaslax » 06 Jul 2012, 09:05

Now that 1.2 is running on that machine, with a nice lxde desktop (I always used kde before) I'm planning even to unplug and remove the monitor but here begins the trouble:
can't find a way to start some services I need (the mentioned krfb or something similar and a simple ftp server) at boot.
If I add to the <b>autoexec=</b> cheatcode they seem to be ignored.
If I use the new feature in the settings centre to modify the startup scripts
I get a strange behavior:
-x11vnc fails to find an x server to connect (so this script isn't the last thing the system runs, I suppose);
-krfb doesn't start at all, maybe for the same reason?
-ftp servers more or less start listening for an incoming connection and stop the boot process, and this could be a mistake on some arguments.
More, every time I open the settings centre and try to add a line to the startup script,
it's rewritten from scratch and I lose the previous entries (maybe it's possible to open the existing script for editing?).
So, what is the right way to autostart daemons and/or applications once the system is up and running?
everyone is master of what he knows and slave of what he says

User avatar
brokenman
Site Admin
Site Admin
Posts: 5659
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: [Near to be Solved] Remote desktop, where are you?

Post#6 by brokenman » 06 Jul 2012, 11:23

guttaslax the overwriting of startup commands is an oversight on my part. I will patch that up and add it to the next porteus update.
To clarify the boot process, the rc.M is the script run when entering multiuser mode (runlevel 2 and 3). This is the default runlevel in Porteus. This script calls the sysvinit scripts towards the end in the last three lines which runs everything in /etc/rc.d/S-*.

rc.local is run after sysvinit scripts so ensure you are not overwriting something there. The last call is to run the autoexec= line in your cheatcodes (cmdline to be more precise). If you need to execute several commands here, separate them using ';'

Code: Select all

# Run SystemV init scripts for this runlevel:
[ -x /etc/rc.d/rc.sysvinit ] && . /etc/rc.d/rc.sysvinit

# Start the local setup procedure:
[ -x /etc/rc.d/rc.local ] && . /etc/rc.d/rc.local

# If autoexec= boot parameter is present, automatically start the command given.
# If you need to execute several commands, separate them using ';'
# If you need to use spaces in your command, use ~ instead
# If you wish to reboot/poweroff after the command's execution is finished,
# simply use autoexec=yourCommand;poweroff for example.
AUTOCMD=`egrep -o " autoexec=[^ ]+" /proc/cmdline | cut -d= -f2 | tr "~" " "`
[ "$AUTOCMD" = "" ] || { echo "Starting autoexec commands"; su --login -c "$AUTOCMD"; }
While the sysvinit scripts would be the correct way to start your daemons, in your case you could try the following.

-x11vnc fails to find an x server to connect (so this script isn't the last thing the system runs, I suppose)
Perhaps you could try using a script in the lxde startup script path (read here) to ensure the $DISPLAY is up before running.

-krfb doesn't start at all, maybe for the same reason?
See above

-ftp servers more or less start listening for an incoming connection and stop the boot process, and this could be a mistake on some arguments.
Try running the ftpserver start with a '&' on the end to send it to the background and allow booting to continue.

Let us know how it pans out.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
guttaslax
White ninja
White ninja
Posts: 23
Joined: 29 Dec 2010, 08:16
Location: EU GMT+1 N41.48.60 E12.30.30

Re: [Solved] Remote desktop, where are you?

Post#7 by guttaslax » 12 Jul 2012, 17:28

Tried the .desktop way as described in the link you provided, but had some problems.
If I'm not wrong you can shoot only one command in this way.
So that command had to be a script including the other commands.
Well, for some reason I couldn't get the desired result :wall: (note that I'm not a specialist on these systems and all my solutions come from some previous experience).

I found instead an alternative method wandering online, based on the file

/root/.config/lxsession/LXDE/autostart

It's a script itself with little own properties,
see here if you didn't know
https://wiki.archlinux.org/index.php/LX ... t_Programs

I included the command lines i needed, and after tuning a bit my apps the system is actually up and running smoothly. :good:

Job completed...
no, not yet. :evil:

Before unplugging the monitor I'd like to add on the desktop (I'll control from remote) some big buttons to stop/restart these apps (of course icons are good too);
but this is the next episode.
E.
everyone is master of what he knows and slave of what he says

Post Reply