maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia 770 (https://talk.maemo.org/forumdisplay.php?f=24)
-   -   Startup Script (https://talk.maemo.org/showthread.php?t=8430)

zzzBrett 2007-08-03 15:26

Startup Script
 
I'm looking for a way to setup my n770 so that once it starts up, it automatically uses rdesktop to connect to a server. Preferrably it'd type in the IP, username, and password for me, but even just starting that program would be great.

Is there a script I could write that would allow me to do this?


Thanks,
Brett

brendan 2007-08-03 15:50

Re: Startup Script
 
first thing is to determine if the rdestop binary file takes command like parameters. if it does, figure out what ones have to be specified, their appropriate values, and attempt to launch the session you desire, from the command line.

if that works, you could put the start up script in place. i dont know if there is a user accessible startup option, which would make things easier. if that doesnt exist, read up on startup scripts and /etc/init.d and /etc/rc2.d filesystems

zzzBrett 2007-08-03 17:45

Re: Startup Script
 
So the first thing I have to do is find the rdesktop binary file in my n770's file system. Keep in mind i'm very new to linux in general.

I navigate through xterm, and open the "/etc/" folder. Thats where a lot of the applications seem to be, but I don't see an "rdesktop" folder or anything that may contain it.

Might be easier with a gui file manager but i can't get to the main filesystem through the stock one.


Thanks for the help.
Brett

Rtalian 2007-08-03 18:08

Re: Startup Script
 
Quote:

Originally Posted by zzzBrett (Post 65316)
So the first thing I have to do is find the rdesktop binary file in my n770's file system. Keep in mind i'm very new to linux in general.

I navigate through xterm, and open the "/etc/" folder. Thats where a lot of the applications seem to be, but I don't see an "rdesktop" folder or anything that may contain it.

You probably don't need the full path of the executable, but you can use "which rdesktop" to get that, unless the executable is something other than "rdesktop." I don't have it installed; so, I can't answer that part for you.
If you can run the command "rdesktop" then that is the executable. You can then run "rdesktop --help" to get the available command-line options.

kbarter 2007-08-03 18:10

Re: Startup Script
 
The easiest way to find a binary file is to use the command which
Code:

root@Nokia-N800-26 # which rdesktop
/usr/bin/rdesktop

A quick google search turns up this man page for rdesktop that details the command line options:
http://www.linuxcommand.org/man_pages/rdesktop1.html

Something like the following should work:
Code:

rdesktop -u username -p password windowsServerName
As for writing the script, I will leave it up to you.

zzzBrett 2007-08-03 18:53

Re: Startup Script
 
When I run 'rdesktop', i get the following error:


Quote:

/home/user # rdesktop
rdesktop[1403]: GLIB ERROR ** default - file rdesktop.c: line 869 (main): assertion failed: (data->osso)
aborting...
Aborted

Any idea why?

brendan 2007-08-03 18:58

Re: Startup Script
 
try rdesktop --help.

it may require certain parameters which the GUI specifies, when calling the app.

zzzBrett 2007-08-03 19:07

Re: Startup Script
 
Same error when i do:
rdesktop --help

Tried uninstalling / reinstalling - still have the problem.

brendan 2007-08-03 20:57

Re: Startup Script
 
since i dont have it installed, i am guessing here. try this one out...

sudo rdesktop

or

sudo gainroot
rdesktop

it may be that the user has sudo access to the app, and as plain old "user" in xterm, you arent using the sudo access.

zzzBrett 2007-08-03 23:46

Re: Startup Script
 
Yep, when I got the error I was root. Any other ideas?
I'm surprised i'm the only one with this problem, I don't see it anywhere else.

Brett

brendan 2007-08-04 00:59

Re: Startup Script
 
i just installed rdesktop and when i ran it from the command line, i got

"Autoselected keyboard map en-us"

and then the GUI loaded. now, when i installed, the app manager told me that rdesktop was not installed because of an issue with ncurses-bin. that didnt seem to be the case, but i digress.

it may be that you have to reflash and try over. i hope thats not the case, but it may be an inevitability.

zzzBrett 2007-08-04 06:09

Re: Startup Script
 
Quote:

Originally Posted by brendan (Post 65440)
i just installed rdesktop and when i ran it from the command line, i got

"Autoselected keyboard map en-us"

and then the GUI loaded. now, when i installed, the app manager told me that rdesktop was not installed because of an issue with ncurses-bin. that didnt seem to be the case, but i digress.

it may be that you have to reflash and try over. i hope thats not the case, but it may be an inevitability.


Ok this is what I did:

-I researched how to reflash my device, and I did it with the latest image.
-I followed the maemo.org wiki article on gaining root access "the really easy way". -- I installed becomeroot and osso-xterm.
-I typed in the following URL into the n770 browser, and downloaded the .install file: https://garage.maemo.org/docman/view...esktop.install
-Ran the install, said it installed successfully after it automatically added a new catalouge.
I open up xterm and do a sudo gainroot, and type "rdesktop" and I get the same error as before!

I really hoped reflashing the device would fix this. What could be wrong?


Thanks,
Brett

zzzBrett 2007-08-05 04:19

Re: Startup Script
 
I might have found another clue to this god-awful mystery :)

I tried using VNCviewer from the command line, and when i gain root and type:
vncviewer
(i think that was the command i typed, but whatever i typed it was right)

and i got the exact same error!

Except if i did vncviewer --help then it did work, unlike when i did rdesktop --help.


Any ideas now? Remember this is a brand-newly flashed n770 with only becomeroot, oss-xterm, rdesktop, and vncviewer installed.

Thanks,
Brett


All times are GMT. The time now is 13:04.

vBulletin® Version 3.8.8