Author Topic: shell script to .exe?  (Read 4738 times)

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: shell script to .exe?
« Reply #30 on: September 23, 2011, 02:08:36 PM »
One of the silliest things I've seen with this file manager is when I went to place a new backdrop for her in the wallpapers area it told me "access denied" and I was stymied! WHAT??? That's not right. Something is wrong with PCManFM. If it can't allow that something is extremely wrong. I had to put the background in the "pictures" folder instead. That is nuts.

Hi again,

You are just doing a few mistakes. I would suppose you tried to add your wallpaper in the folder /usr/share/wallpapers ? If that is so you can do it, but you must open PCManFM as root to be able to do that : else than your own home all belongs to root or to some system entities, which is the way the security is ensured in Linux distributions.

I say : open PCManFm as root : there is a menu which has for name "Tools", so you first browse to /usr/share/wallpapers and once there you  go to the "menu > Tools > Open current folder as root". It's simple in fact.

Another way : in you home user you can do what you want with almost all files (except a few in the /home/user/tmp) so you can create new directories, remove the ones you don't use and so on. There are a few directories created prior providing the ISOs for the comfort of the newcomers, but it could as well be provided with just "Desktop" and "tmp" and it would work as well.

Now you will find also hidden directories ! they can be seen when you select the menu > View > Show hidden

These are meant for the configurations, configurations of the user's applications and environment. You can adapt and tweak some of them, and the preferences you select in applications will be registered in the related files there.

For the wallpapers there is the directory .local/share/wallpapers or maybe .local/wallpapers, I don't remember exactly. You can put your wallpapers there, or create a hidden .wallpapers just in the /home/user directory, and then select the one you want with the menu "Preferences > Desktop Prefs" from the main menu in the Openbox right-click menu.

I hope this will help.

Regards,
Mélodie

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: shell script to .exe?
« Reply #31 on: September 23, 2011, 02:17:43 PM »
Once everything is installed EVERYTHING WORKS EXCEPT for that silly menu that pops up.

That's about it. I'm wondering if I need to place the folder for DBGL somewhere else since I can't configure the file manager on Openbox. What else can I do? Any ideas? I may follow Taco's advice on the first pages of this thread and see if it works or not. Perhaps something else is missing.

Who knows.

Too bad DBGL isn't a package yet in the repos. This would end that frustration for installation. Heh, I made a funny! :p



Ok, I see now.

Just put your script in that place:

Code: [Select]
/usr/local/bin
be root in PCManFM to do that and make it belong to owner root, group root (see the screenshot I posted as a model) and make it have execution rights of course.

Then you will need a launcher on the Desktop. Send me your script, and I'll try to make a working launcher for you. Also manage to provide the name of a small icon (48x48 pixels, png type) and add that icon into /usr/local/icons. Then the launcher  on the desktop will have a nice look.

The directory /usr/local/bin can receive packages and scripts installed out of the package manager : this way you always know where to find them and don't risk forgetting they are in the system. (Asyou might not remember which one you installed if you install several, and if they were in the same location as the programs installed with Synaptic).

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline billy7720

  • Full Member
  • ***
  • Posts: 222
  • DBGL = DosBox Game Launcher! Games coming!
Re: shell script to .exe?
« Reply #32 on: September 23, 2011, 03:27:27 PM »
Thanks Melodie!

I have the newest "bonsai" installed 2011.

I'll check out what you've posted and get back to you. I appreciate this very much.

I'm sure she'll love this machine since I have a nice "Littlest Petshop" backdrop for her on it with her name when the machine first boots. She'll love it.

As for the Educational PCLinuxOS version, if it was about 300MB I would download it. 692 is a bit too much.

Thanks again and I'll get back to you on this. :)

Sincerely;
Will
aka billy7720
MY LAPTOP:
DUAL BOOT Windows XP/PCLinuxOS KDE 2011:
hp ze4900 - Intel 1.4 GHz Celeron M - 2 GB RAM - 1024x768 graphics - 60 GB Hitachi Travelstar HD
Oldie but goodie! Runs PCLinuxOS PERFECT!
PCLinuxOS: Radically Simple, graphically superior!

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: shell script to .exe?
« Reply #33 on: September 23, 2011, 04:57:30 PM »
I've just got out of bed, shiny new morning - and finally with the answer to this script issue, but Mélodie has beaten me to it!  What she says is quite right.  For the script to "just work" it needs to be in a system folder, and /usr/local/bin is a popular choice.  There are a number of places that can be used, and the system automatically knows where to look.

To make the script appear in the apps menu you need to write a .desktop file, or launcher - Mélodie has offered to do that.  To make the script appear on the desktop, just copy and paste it from /usr/local/bin to the Desktop folder I've previously mentioned.

It's interesting - my preferred fm is Thunar, but as I build yet another system on Bonsai, I am finding the combination of pcmanfm with thunar to be ideal.  Thunar does the day to day work with a proper list view, handles removable devices, and is scripted to open root objects on the fly.  Pcmanfm works in the background - sets the wallpaper, shows icons, and when needed auto mounts partitions.  Yet for all of that pcmanfm takes up less than 300kb.  A nice marriage of convenience :D.

 
     
Linux Registered User # 529407


Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: shell script to .exe?
« Reply #34 on: September 23, 2011, 05:24:40 PM »

To make the script appear in the apps menu you need to write a .desktop file, or launcher - Mélodie has offered to do that.  To make the script appear on the desktop, just copy and paste it from /usr/local/bin to the Desktop folder I've previously mentioned.


Hi Taco,

You are mistaking. A desktop file just contains a few informations, nothing more. You can read the specifications at the Freedesktop website. I don't read all from there because it is too much for my ease with English and for my eyes, so generally I look at a desktop file belonging to the same category software, and try to mimic what is in there, while adapting to another program. Usually that works well enough.

http://standards.freedesktop.org/desktop-entry-spec/latest/

Example, a desktop file to launch Gamine:
Quote
[Desktop Entry]
Encoding=UTF-8
Name=Gamine
Comment=Young child educational game
Exec=gamine
Icon=gamine
Terminal=false
Type=Application
Categories=Game;KidsGame;X-MandrivaLinux-MoreApplications-Games-Other;


billy7720, So there would be the need for a Tiny Edu ?

What programs would you keep from the list, and which ones would you remove to get it smaller ? (I won't fit in less than 300 MB anyway, only Bonsai with almost nothing installed can).

I'll explain for the tint2 panel next. Maybe would you rather have a Lxpanel instead of tint2 ? Same as in the full Openbox, or the Education version ?

Until then you may want to have a look into $HOME/.config/openbox/autostart.sh file. And in the PCLOS Mag articles about Openbox from August to September. The authors did a great job providing plenty useful informations !

Regards,
Mélodie


melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: shell script to .exe?
« Reply #35 on: September 23, 2011, 06:11:52 PM »
Sorry Mélodie, you're quite right.  The script needs a launcher, although I thought that was another term for .desktop file(?).  It's something I had to do a couple of times in BlackCat - creating .desktop files that started shell scripts that launched apps.  The new .desktop then appears in the normal menu.  

With BlackCat I copied the Chromium-browser .desktop, renamed it, and copied it to the Desktop folder.  That way a link icon to the introductory home page was established on the desktop.  On install it disappears, but the link in the apps menu remains 8).  Now if I could get the browser to launch and open a specific page, that would be cooler!

Taco.22
« Last Edit: September 23, 2011, 09:02:50 PM by Taco.22 »
Linux Registered User # 529407


Offline billy7720

  • Full Member
  • ***
  • Posts: 222
  • DBGL = DosBox Game Launcher! Games coming!
Re: shell script to .exe?
« Reply #36 on: September 23, 2011, 08:24:01 PM »
Thanks Melodie!

It worked - the "open as root" for the particular menu for the wallpapers folder. I placed the new wallpaper in there then. PERFECT!

Now to put the "actual" program for DBGL to be found by the menu. I gather that the shell script would also be needed as well. Let me get the shell script sent to you. It does use a link to java in which no matter where you place the shell WITH the actual DBGL software it works.

EMAIL me please and I'll send the DBGL program itself as a tar file. You then can decompress it and check it out. It's a great program to run ANY dos games/proggies! LOVE this program as it's all "point and click" and you don't have to type in ANY dos commands for games.

Please email me. As soon as you do I'll send the tar file to you.

Thanks!

Sincerely;
Will
aka billy7720

MELODIE:

Where you told me to place the DBGL icon doesn't exist: /usr/local/icons
Here is where I had to place it with the others for the OS: usr/share/icons
The DBGL icon is now there. Now where to place the actual program with the shell script. Any ideas?
« Last Edit: September 23, 2011, 08:33:22 PM by billy7720 »
MY LAPTOP:
DUAL BOOT Windows XP/PCLinuxOS KDE 2011:
hp ze4900 - Intel 1.4 GHz Celeron M - 2 GB RAM - 1024x768 graphics - 60 GB Hitachi Travelstar HD
Oldie but goodie! Runs PCLinuxOS PERFECT!
PCLinuxOS: Radically Simple, graphically superior!

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: shell script to .exe?
« Reply #37 on: September 23, 2011, 10:49:25 PM »
Well that was an exercise in frustration!!

Downloaded the DBGL and expanded it.  No problems running it from the script - anywhere including from within /usr/local/bin.  Made a .desktop file with a path to the script for it which failed to work.  Eventually I pulled the DBGL out of and put it in a folder which DBGL had automatically created in the user folder called "dosroot".  Put the contents of DBGL into there, aimed the dbgl.desktop file at it and  - bingo, it worked!  Copied the dbgl.desktop to the Desktop folder and - voila, an icon!  Don't ask me, I'm just confused ;D.

So, as root, create a new text file in /usr/share/applications called dbgl.desktop.  Copy in the text below.

Quote
[Desktop Entry]
Name=DBGL
Comment=DosBox game launcher
Exec=/home/guest/dosroot/dbgl
Icon=/usr/share/pixmaps/dbgl.png
StartupNotify=true
Terminal=false
Type=Application
Categories=X-MandrivaLinux-MoreApplications-Games;
MimeType=
Encoding=UTF-8
X-Desktop-File-Install-Version=0.11
GenericName=
 
Be aware of the paths - make sure it is your user name.  Icons in /pixmaps need a full path.  If you want to use a different folder, even make it hidden, just change the path after the user name.  Hidden files are prefixed with a ".".  You will have a menu entry, and if you copy and paste the .desktop file to the Desktop folder you will also have a desktop icon.

At the very least, it is a bodge that I managed to make work on my system ;D.  No doubt there are other ways of skinning this cat!  Anyway, off for a drive in the country.
Linux Registered User # 529407


Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: shell script to .exe?
« Reply #38 on: September 24, 2011, 03:26:44 AM »
Now if I could get the browser to launch and open a specific page, that would be cooler!

Taco.22

Hi,
You do that with the command "firefox myspecific-page".

I hope that helps.

Regards,
Mélodie

/I see you are having fun with desktop files ! ^^

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: shell script to .exe?
« Reply #39 on: September 24, 2011, 04:19:55 AM »
Hi Mélodie,

\\O//

That is way too cool ;D.  Set up a trial run with Chromium - shell script, .desktop file - the lot.  Works an absolute treat.  I will have to put that into the next BlackCat remix.  And yes, you're right - been having fun with .desktop files!!

Thankyou.

Taco.22   
Linux Registered User # 529407


Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: shell script to .exe?
« Reply #40 on: September 24, 2011, 04:25:57 AM »
Hi Mélodie,

\\O//

That is way too cool ;D.  Set up a trial run with Chromium - shell script, .desktop file - the lot.  Works an absolute treat.  I will have to put that into the next BlackCat remix.  And yes, you're right - been having fun with .desktop files!!

Thankyou.

Taco.22   

Taco ! \o/ !

I can "see" you ! :D

If you put "chromium yourwebpage" in the "Exec=" line of a desktop file on the Desktop then you have your very launcher. If you want it to be for all users, you will have it in /usr/share/applications as well. Is that how you have understood it ?

And have you not tried pinoc's latest lomanager ? At one moment it launches Firefox on the page where he gives the "howto" about the lomanager ways. That is very clever.

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: shell script to .exe?
« Reply #41 on: September 24, 2011, 06:58:43 AM »
Sorry, got a bit carried away there :D

Well there you go!  Putting the .desktop file in the Desktop folder but not in /usr/share/applications gives you an icon, but no menu entry.  Very good for live cd.  Wow.  The possibilities! 

Hey, I just like playing with this stuff ;D.  I have this thing about connecting dots, and making things link and click!  Bit like spreadsheets - you know, push a button here and something over there happens - can all get a bit addictive :D.

I really like how learning is not an even curve.  It is fits and starts, spasms and hiccups, flashes and sparks.  Those "eureka" moments when things suddenly fall into place.  Love it - never know where it will lead to next!

Linux Registered User # 529407


Offline billy7720

  • Full Member
  • ***
  • Posts: 222
  • DBGL = DosBox Game Launcher! Games coming!
Re: shell script to .exe?
« Reply #42 on: September 24, 2011, 09:19:11 AM »
Thanks guys!

TACO: I'll check that out. Looks easy enough ;) Seems it's not so hard after all since you took the burden right off my shoulders on doing all that installation. Thanks fo doing that for me! :)

MELODIE: A smaller version of "Linux Kids" would be a better alternative. Reason I'm saying is that some of us folk have a lower end "wi-fi" connection and cannot download a 700MB file so that's why Openbox "Bonsai" is a great alternative for that. It's very barebones and things can be added with a bit of learning.

As for adding what program and such, I have no idea. I have not downloaded the 700MB file so I can't even begin as to what to remove or keep. Sorry. But I think a "basic" smaller version might just work for some. Who knows, I could be wrong.

Once again to all of you, thank you. I've never had a problem with help or support on this forum and I hope in the future I can help with other things.

THANK YOU!

Sincerely;
Will
aka billy7720
MY LAPTOP:
DUAL BOOT Windows XP/PCLinuxOS KDE 2011:
hp ze4900 - Intel 1.4 GHz Celeron M - 2 GB RAM - 1024x768 graphics - 60 GB Hitachi Travelstar HD
Oldie but goodie! Runs PCLinuxOS PERFECT!
PCLinuxOS: Radically Simple, graphically superior!

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: shell script to .exe?
« Reply #43 on: September 24, 2011, 09:33:15 AM »
Will,

You are most welcome. 

Now all I have to do is find some games to play on this DBGL I've now got installed in my computer ;D.

Taco.22
Linux Registered User # 529407


Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: shell script to .exe?
« Reply #44 on: September 24, 2011, 10:19:33 AM »
MELODIE: A smaller version of "Linux Kids" would be a better alternative. Reason I'm saying is that some of us folk have a lower end "wi-fi" connection and cannot download a 700MB file so that's why Openbox "Bonsai" is a great alternative for that. It's very barebones and things can be added with a bit of learning.

As for adding what program and such, I have no idea. I have not downloaded the 700MB file so I can't even begin as to what to remove or keep. Sorry. But I think a "basic" smaller version might just work for some. Who knows, I could be wrong.


Hi Will,

The full list and detailed description of the Edu iso has been done by djohnston. He didn't take 5 minutes for that, but some of his valuable time. I would like you to read it, so that you can't answer that you didn't see it.

PCLinuxOS Edu - http://www.pclinuxos.com/forum/index.php/topic,96553.0.html

I have downloaded ISOS in the paste, with a low band connection (56k). I used wget, or torrents. wget:

In console something like this:

Code: [Select]
$ wget -c --limit-rate=3k http://path-to-the-iso
will allow resuming when you have stopped downloading, limit the download rate to 3k in order to keep bandwidth for surfing, download the iso little by little.

While selecting the console where the download is performed the keys Ctrl+c will interrupt the download. When you are not using the computer, you stop the download and resume with a 0 limit-rate:
Code: [Select]
$ wget -c --limit-rate=0 http://path-to-the-iso
which will make it unlimited.

You can start to train on small files or isos, if you like. You may find more informations in "man wget" (type man wget in a console).

The sign '$' in front of the command just means you are in a console in user mode. You must not type it. If in a root console, the sign will be '#' as when you su to root the end of the prompt changes from '$' to '#'.

Looking forward to read what you would like to do.

Regards,
Mélodie

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode