WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Need help - simple and small popup that works with arguments (please).  (Read 3547 times)

Offline PCManiac

  • Newbie
  • *
  • Posts: 15
 Greetings,

I have been looking around on tiny core for a project.
I work at the local hospital and here we have plenty of terminal clients connected to 5 windows 2003 terminal servers.

Those terminal clients load the Linux image to RAM using PXE boot.
The actual image we have is quite outdated since no one knew linux around (before I joined them) so, as time went by, new terminals don't work (well or at all) since it's just not supported by the image.

I have been looking at changing that and so I stumbled upon tiny core which is just perfect for the job.
I got the PXE server configured to load the new image on some (2 old) test devices, it starts rdesktop with no problems at boot and all.

The problem I am facing in this moment is that I need some sort of a popup button so the user clicks it to start the rdesktop so the program isn't always bashing our old servers.

I have been looking around and found out about zenity, which could work but that means I would have to add more packages and, I am trying to keep it small for the low ram devices.
I then found out about popup and popask and, to my disappointment, found out as well they have no arguments or options.

So, I decided to post a call for help as I am not exactly a programmer.

I need a way to have a on-screen (preferably centered) button where the user presses to start working (aka: open rdesktop).

Thank you for any and every help.
PCManiac

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
One possibility is Xialog, see http://xdialog.free.fr/ It requires GTK2 packages, but TC extensions (packages) are loop mounted and do not use RAM itself, so it is not an issue.

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Look at idesk

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Code: [Select]
#!/bin/sh
while :
do
Xdialog --screen-center --title "rdesktop" --msgbox "Start rdesktop?" 0x0 && rdesktop
sleep 1
done

Download a copy and keep it handy: Core book ;)

Offline PCManiac

  • Newbie
  • *
  • Posts: 15
Thank you for your swift replies guys.

Will try the Xdialog approach then.

Thank you.

Offline PCManiac

  • Newbie
  • *
  • Posts: 15
Once again, thank you for your replies, everything is working. :)

But I have another question if I may, is there a way to disable/remove the minimize and the 2 "restore" buttons or change what they do on Xdialog?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10960
If you use a WM that supports per-app configuration, then yes. flwm does not support such.
The only barriers that can stop you are the ones you create yourself.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Depends on the window manager you are using.
I only know how to do this for Openbox and Fluxbox.

If you use this parameter on Xdialog, you can make the WM treat it individually with its own window decorations etc.
Code: [Select]
--wmclass "RDesktop-Xdialog"

~/.config/openbox/rc.xml
Code: [Select]
...
    <application name="RDesktop-Xdialog" class="RDesktop-Xdialog">
      <decor>false</decor>
      <focus>false</focus>
      <layer>Normal</layer>
      <iconic>false</iconic>
      <skip_pager>false</skip_pager>
      <skip_taskbar>true</skip_taskbar>
    </application>
...

~/.fluxbox/apps
Code: [Select]
[app] (name=RDesktop-Xdialog) (class=RDesktop-Xdialog)
  [Deco] {0x25}
[end]
Download a copy and keep it handy: Core book ;)

Offline PCManiac

  • Newbie
  • *
  • Posts: 15
ugh.. I am indeed using FLWM.. :\

Didn't really want to think about other windows managers to cut on the size of the image..

Offline PCManiac

  • Newbie
  • *
  • Posts: 15
Greetings,

Apparently, for some reason, I was using an older version of TC (3.6)..
Now, I am remastering the newest version (6.3) but I am having some issues, namely the fact that I am trying to include software like the previously said rdesktop, cifs utils and some others but, it seems it refuses to add things like Xapps or Xvesa (and their deps) giving the attached timeouts while trying to download.

If I try to dl manually, I can reach and dl those files.. :\

Any idea?  :-\

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Have you picked an alternate mirror via Apps tool? 'Apps' button -> Cloud (Remote) -> Select mirror
If so, try http://repo.tinycorelinux.net

(I cannot download attached file, sorry.
Not sure if that's a Firefox issue.)
Download a copy and keep it handy: Core book ;)

Offline PCManiac

  • Newbie
  • *
  • Posts: 15
Here it is:


I have tried both the repo.tinycore and the mirror provided by the vim project with no success..
I must add that I am behind a corporate proxy but I have no troubles to bypass it, hence how I can download rdesktop and what not. ???

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10960
I can access those files fine, on all mentioned mirrors. Before downloading it checks for them in your tce dir, so "tce-load -w fltk-1.3" before that should help.
The only barriers that can stop you are the ones you create yourself.

Offline PCManiac

  • Newbie
  • *
  • Posts: 15
Oh crap!..

I apologise for "wasting" your time guys..
I forgot that when a "sudo" happens, the http_proxy variable doesn't carry on to the new environment.

 :-X

--- Edit ---

Is there a way to pass the variable to the temporary root env?
« Last Edit: July 02, 2015, 01:22:42 AM by PCManiac »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
sudo VAR=xyz sh