Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 20 Oct 2014, 19:06
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Log into server (with rdesktop) on bootup?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [25 Posts]   Goto page: 1, 2 Next
Author Message
plockery

Joined: 13 Jun 2005
Posts: 26

PostPosted: Mon 13 Jun 2005, 22:55    Post subject:  Log into server (with rdesktop) on bootup?  

How do I get puppy to run rdesktop when it boots up so as to log in to a server automatically?

I know the rdesktop parameters.

What I need to know is where I put the command so that it runs.

I have tried putting the following command in /root/.xinitrc (before and after "exec fvwm95") and /root/rc.d/rc.local but to no avail.

rdesktop -u test -p mypassword -a 16 -f myserveripaddress

I simply come up with the normal fvwm95 screen (no error that I can see).

The network itself is up and running and if I go to rxvt and type this rdesktop command in manually it works fine.

But I just want this terminal at work to bootup and connect to our windows terminal server automatically.

Can anyone help?
Back to top
View user's profile Send private message 
Ian
Official Dog Handler


Joined: 04 May 2005
Posts: 1237
Location: Queensland

PostPosted: Mon 13 Jun 2005, 23:43    Post subject:  

You may have to provide the full path for the command.
Back to top
View user's profile Send private message 
plockery

Joined: 13 Jun 2005
Posts: 26

PostPosted: Tue 14 Jun 2005, 03:18    Post subject:  

Have tried that.

/usr/local/bin/rdesktop -u test -a 16 -f myserveripaddress

Any other clues?
Back to top
View user's profile Send private message 
Guest
Guest


PostPosted: Tue 14 Jun 2005, 04:43    Post subject:  

This is just a quick off the top of the head hack, use a text editor and start with #!/bin/sh, on the next line enter the full path for the command, save it as rmtdsk and chmod a+x it.

Put an entry in rc.local like, exec /the path to rmtdsk, and see if it works.

I'm sorry I can't be more helpful at the moment but I am a bit busy.

If this doesn't work I'l try to spend a bit more time on it.
Back to top
plockery

Joined: 13 Jun 2005
Posts: 26

PostPosted: Tue 14 Jun 2005, 19:59    Post subject:  

Thanks guest.

But no. Unfortunately, that does not work either.

If I click on rc.local after boot-up it executes perfectly either way - through direct command or the exec rmtdsk option.

But for some reason it won't do it at boot-up.

It is just this command because I also have put a "modprobe sb" in rc.local to get my soundcard working and it seems to execute fine.

So not sure why rdesktop does not.

Any further ideas?
Back to top
View user's profile Send private message 
Ian
Official Dog Handler


Joined: 04 May 2005
Posts: 1237
Location: Queensland

PostPosted: Tue 14 Jun 2005, 21:00    Post subject:  

You could try putting it in /etc/profiles at the end after the exec xwin entry.
Back to top
View user's profile Send private message 
plockery

Joined: 13 Jun 2005
Posts: 26

PostPosted: Tue 14 Jun 2005, 23:09    Post subject:  

Thanks Ian

But still no luck. It seems crazy when you can run it perfectly well after boot-up.

I presume you meant to put it after "exec xwin" within the "if fi" argument in /etc/profile.

My rmtdsk looks like this:

!bin.sh
/usr/local/bin/rdesktop -u test -p testpassword -a 16 -f myserveripaddress

Like I say click on rmtdsk itself or run exec /root/rmtdsk and it goes straight in.

Could it not be finding the server yet?
Is there a log file where it might tells us what is going on?

Peter
Back to top
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Wed 15 Jun 2005, 00:24    Post subject:  

do not put it after exec xwin ... it will never execute ... exec xwin transfers to xwin, and never comes back

you can try it somewhere before exec xwin,
after export SHSQL_DB would be a good place
just before exec xwin might be better

there are things that are setup in /etc/profile that are not setup yet when rc.local runs ... for example, PATH and LD_LIBRARY_PATH, so if the program will not run from rc.local but will run after /etc/profile has executed, it is not surprising
Back to top
View user's profile Send private message 
Ian
Official Dog Handler


Joined: 04 May 2005
Posts: 1237
Location: Queensland

PostPosted: Wed 15 Jun 2005, 02:09    Post subject:  

Thanks for the input GuestToo.
Back to top
View user's profile Send private message 
plockery

Joined: 13 Jun 2005
Posts: 26

PostPosted: Wed 15 Jun 2005, 20:44    Post subject:  

Thanks GuestToo.

But this does not work either.

If I put "exec /root/rmtdsk" in before "exec xwin" in /etc/ profile it just stops with the error "failed to open display" and then waits for me to enter xwin manually to boot-up.

If I put the command "rdesktop [and appropraite options]" I get the same message but it then ignores the command and then boots xwin anyway.

It seems to be clear that for whatever reason rdesktop cannot execute properly until a window manager opens.

What I need therefore is the equivalent of windows "startup" feature in its start menu which can run programs after the gui is loaded.

Is there an equivalent in puppy?
That is, is it possible to automatically start a program after xwin loads?

Peter
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Wed 15 Jun 2005, 22:05    Post subject: Run at startup  

/root/.etc/rc.d/rc.local


Idea

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 15 Jun 2005, 22:12    Post subject:  

Yes, you can run a program after the X GUI is started.

Open up /root/.xinitrc with a text editor.

Insert your program execution just before the last line.
Not after the last line, as "exec $CURRENTWM" exits from the script.
Back to top
View user's profile Send private message Visit poster's website 
plockery

Joined: 13 Jun 2005
Posts: 26

PostPosted: Thu 16 Jun 2005, 04:22    Post subject:  

Thanks Barry.

That worked perfectly once I included the full path to rdesktop.

Much appreciated!

Peter
Back to top
View user's profile Send private message 
Mikrodots

Joined: 31 Mar 2006
Posts: 30
Location: Boston, MA USA

PostPosted: Tue 05 Jun 2007, 17:46    Post subject: Start rdesktop from ip-up; Failed to open display
Subject description: similar problem to plockery's start rdesktop on bootup
 

I am trying to launch rdesktop from ip-up by calling a script named start_rdc:
/etc/rc.d/start_rdc

start_rdc runs perfectly when started directly. When I call it from ip-up I get the error ERROR: Failed to open display when the line /usr/bin/rdesktop -a 16 -f 1.2.3.4 runs

Also, gxmessage -title "rdesktop" -buttons "EXIT" "Quit" fails with the error: "gxmessage: unable to initialize GTK". gxmessage works fine if I call the script directly.

Not sure what the difference is running this script directly as opposed to launching it from ip-up. It looks like a user/permissions issue...

Puppy is fully booted at this point and xwin is running when start_rdc is launched from ip-up.

Any help would be appreciated.

Thanks,
Mikrodots
Back to top
View user's profile Send private message Visit poster's website 
sodes

Joined: 22 Jan 2009
Posts: 7
Location: Chi-town

PostPosted: Thu 22 Jan 2009, 18:48    Post subject: rdesktop
Subject description: Old thread... New problem
 

I found this thread through the miracles of google...

I'm trying to convert some older PCs to become thin clients for a Windows Server 2003 Terminal Server. I installed the standard distro of puppy 4.1.2 and trimmed it down a bit. All in all, it's working fine. I installed rdesktop and got it working through the command line. I created a script in /bin so that i can run rdesktop with just one click once i put a sym link on the desktop.

There are two things more that i would like to accomplish:

1. Automatically start the rdesktop script once xwindows loads. I have tried putting the link to the rdesktop script into /root/startup but to no avail. It wouldn't run. I placed the line "/bin/rdesktop.sh" into the .xinitrc before the line "#exec $CURRENTWM". It won't startup because the network connection isn't available yet. Once loaded, if i restart the xserver it works just fine.

How can I get this script to run AFTER the network connection has been established?

2: I would like to have some kind of Daemon running to monitor the rdesktop process so that if the user closes it by logging out of rdesktop, the script will run and rdesktop will start back up.

Please help me if you can. I searched high and low to find a free alternative to convert old PCs into thin clients. Puppy and rdesktop is what i have come up with.

Thanks in advance.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [25 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0742s ][ Queries: 12 (0.0041s) ][ GZIP on ]