tags:

views:

157

answers:

3

I'm trying to build a closed loop ftp client, currently using slax.

The idea is that the user follows a menu to choose a site and then the system starts gFTP full screen (1024x768 or 1280x1024) and when this exits it closes X windows and logs off.

Now all I need is making gFTP start with a prescribed size and its done.

I've tried to compile wmctrl to test this but my slax build has an issue with glib headers not matching the library version.

Cheers for any pointers. Phil

+1  A: 

Get wmctrl and start gFTP like this:

gftp && wmctrl -r "gFTP" -b toggle,fullscreen

It will run gftp and maximize it to a point where the window title is hidden.

Spidey
If there are multiple gFTP windows or it takes unexpectedly long to open, this is not so good...
ephemient
Quoting the author: "when this exits it closes X windows and logs off"
Spidey
A: 

If you are using KDE, KWin allows you to configure application- and window-specific rules. Just launch gFTP, right-click on the title bar, find the "Window-specific settings" entry, check "Fullscreen: Force", and save. You can also use kstart --fullscreen gFTP.

In Gnome, you can use the add-on program Devil's Pie for the same functionality as KWin's built-in window matching rules.

Many X programs accept a -geometry WxH+X+Y argument, which means "window sized WxH at position (X,Y)". If you are running without a window manager, and gFTP supports this switch, this will be your best option.


[Edit]

Given your updated description, it sounds like you really just want a full-screen window manager. Matchbox is a lightweight and highly-customizable fullscreen window manager, and would be much better suited for this task than any of Gnome's or KDE's full-featured window managers.

ephemient
Unfortunately, gFTP does not support the -geometry option
Spidey
A: 

Cheers!

A great couple of suggestions, its such a shame that gFTP does not support -geometry option. I was hoping it would and guessing with no WM (just X) that wmctrl wouldn't have anything to talk to, so wont work either.

Unless there's any other suggestions I think it might be game over :(

Thanks for your suggestions so far, great community spirit here!

Phil


PS...

Just had a thought, if anybody knows a way to strip KDE right down to nothing so that the application is the onlything on the screen then we may be onto something :)

If its easier with gnome then so be it - i'll grab a new copy of slax. The only reason I want slax is that its very light so good for a VM. My other servers are Gentoo and CentOS but thats off topic :S

Just to clarify; there will only be one copy gFTP window open ever, when you exit it (status 0 or otherwise) I want X11 to close and logout. I dont want any widgity grubs for the users to play with! So no clock, panel, menu. Geez I sound like the BOFH. Hmmmmmmmm...

The login details for gFTP remote site will come from a TUI menu before X11 starts.

You should use the same account you used before (see http://stackoverflow.com/questions/53598 if you need help merging your user IDs 151153 and 151571) and edit the original question, instead of posting an "Answer".
ephemient