Forum


You must be a registered user to participate in this chat.

Run ET with elevate…
 
Notifications
Clear all

Run ET with elevated CPU priority in linux (new script)

9 Posts
2 Users
0 Reactions
440 Views
(@the-whole-cake)
Reputable Member
Joined: 15 years ago
Posts: 225
Topic starter  

Hello fellow cakers! This is cake’s brand new CPU booster script for ET on linux.

What it does is it prompts you for your root password, and then launches ET with elevated privileges that only root could provide.
I have rewritten this fancy script so now its easy to use. It actually writes additional cpu-boosting niceness scripts on the fly and executes them (fancy cake coding).

This file is not a replacement for ET’s et.x86 binary.
This file is a replacement for your shortcuts. This script calls et inside itself.
This file is compatible with et-sdl-sound.

Installation Instructions:

Extract the archive etcakeboost.sh.tar, sucking out the file (etcakeboost.sh) and save it to some weird safe place.
(If you double-click this file, it will launch ET for you.)

    Replace your shortcuts to ET to point to this file. (like on your desktop, or for me I have ET launched by a game utility called XQF):
    Your shortcut should say et.x86 or just et with a bunch of crap after it.
    It might also have the full path (for example /usr/bin/et.x86).
    If you see those, replace them with the path to et/home/dude/etcakeboost.sh or where ever you put this script. All the stuff after it (for example +game bla bla) should remain.
    All arguments passed to etcakeboost.sh get passed to regular et.x86

For those using et-sdl-sound:
This script is rigged to run et. Simply change the last line to et-sdl-sound as described in the file.

Troubleshooting:
It wont execute!
It should already be marked as executable. If not, set the +x bit.

It wont find et!! it returns to the prompt
Et is usually set in the PATH. If not, replace ‘et’ on the last line with the fully qualified path eg /usr/local/bin/et or whatever it is.

I smell bad and noone will talk to me!
Hygiene is important. Especially in the workplace. Make sure you take a shower and wash your clothes regularly.

Something else! Wah wah wah!! ๐Ÿ™
Its ok there there. Message me and I will help. I will rub ur back and make u burp. But stay away from my whiskey.

does this box go out to the internetnt? HI MUM! LOOK IM BPUTTING WORDS ON THE COMPUTR AND THEY COME OUT THE OTHTER SIDE ON OTHER PEEOPLESSSSS COMPUTER


   
Quote
(@noobitup)
Noble Member
Joined: 15 years ago
Posts: 1380
 

Hey cake, I looked at your script & i’m not sure I like the idea of generating a child script on the fly each time.

Couldn’t you put all that stuff in a function and exec the function in the background? That way no writing to /tmp is needed?

Test.


   
ReplyQuote
(@the-whole-cake)
Reputable Member
Joined: 15 years ago
Posts: 225
Topic starter  

mebbe?

I dont know how to fork functions to background. This basically writes a temporary script then calls root to run it.
Maybe if im really nice you can show me how ๐Ÿ™‚

does this box go out to the internetnt? HI MUM! LOOK IM BPUTTING WORDS ON THE COMPUTR AND THEY COME OUT THE OTHTER SIDE ON OTHER PEEOPLESSSSS COMPUTER


   
ReplyQuote
(@noobitup)
Noble Member
Joined: 15 years ago
Posts: 1380
 

Hey cake, I was thinking more like this…

1: #!/bin/ksh
2:
3: background()
4: {
5: sleep 10
6: echo “Background”
7: sleep 10
8: }
9:
10: echo “ps before background function”
11: ps
12: background &
13: echo “My PID=$$”
14: echo “Background function PID=$!”
15: echo “ps after background function”
16: ps
17: exit 0

Of course this is ksh, but I reckon bash would be pretty similar.

I got the example from here

Also, I your parameters could use being named something meaningful, even though they are just passthroughs (is that a word?). Sorry for being picky, I do a lot of shell script reviews @ work.

Test.


   
ReplyQuote
(@the-whole-cake)
Reputable Member
Joined: 15 years ago
Posts: 225
Topic starter  

Hello! Actually I rather appreciate you helping me out.
I wouldnt know what to call them ๐Ÿ™‚ Except I could add a remark in there. i try forking the process n see if it goes! brbbrbrbrbrb

does this box go out to the internetnt? HI MUM! LOOK IM BPUTTING WORDS ON THE COMPUTR AND THEY COME OUT THE OTHTER SIDE ON OTHER PEEOPLESSSSS COMPUTER


   
ReplyQuote
(@noobitup)
Noble Member
Joined: 15 years ago
Posts: 1380
 

I did shell scripting on and off at work for a few years. The more I did, the more I ended up writing functions a lot & having the majority of my logic inside them.

The main part of the shell script then becomes just a composition of the functions.

I guess thats why I suggested using a function to execute the code in the background.

Test.


   
ReplyQuote
(@the-whole-cake)
Reputable Member
Joined: 15 years ago
Posts: 225
Topic starter  

hey nice work noobitup. thats a damn handy trick.

Attention everyone: There is now going to be a third version so dont download that crap attached.
yeah i am a big fan of having hierarchy, and having worker-bee scripts.
i rather enjoy having multiple scripts running looped that communicate via the file system with their own pids and stuff.

does this box go out to the internetnt? HI MUM! LOOK IM BPUTTING WORDS ON THE COMPUTR AND THEY COME OUT THE OTHTER SIDE ON OTHER PEEOPLESSSSS COMPUTER


   
ReplyQuote
(@noobitup)
Noble Member
Joined: 15 years ago
Posts: 1380
 

Did u get a new version of your script working cake?

Pls post when its done and i’ll code review it & tell u all the stuffs ur doing wrong.

Test.


   
ReplyQuote
(@the-whole-cake)
Reputable Member
Joined: 15 years ago
Posts: 225
Topic starter  

Yusss I found a corn chip that looks like the atari logo
OH NO I ATE IT

well this sucks ๐Ÿ˜ฅ

does this box go out to the internetnt? HI MUM! LOOK IM BPUTTING WORDS ON THE COMPUTR AND THEY COME OUT THE OTHTER SIDE ON OTHER PEEOPLESSSSS COMPUTER


   
ReplyQuote
Share: