Jump to content

I want to make a startup script for my servers running arch linux

I would like to make a startup script that does these things:

1. auto login

2. starts the GUI(LXDE)

3. opens all the terminal tabs I need

4. starts my vnc (tigervnc) in one of those terminals

5. starts my minecraft servers in those terminals

6. maybe auto update?

7. moves all the tabs to the position that I need them in.

Link to comment
Share on other sites

Link to post
Share on other sites

40 minutes ago, Lemon797 said:

1. auto login

2. starts the GUI(LXDE)

https://wiki.archlinux.org/index.php/LightDM#Enabling_autologin

41 minutes ago, Lemon797 said:

3. opens all the terminal tabs I need

4. starts my vnc (tigervnc) in one of those terminals

5. starts my minecraft servers in those terminals

https://wiki.archlinux.org/index.php/Xprofile

 

depending on which terminal you use the command to run a program upon opening it will be different.

 

Also vnc and your minecraft server can be made into systemd services, which is a much cleaner way of doing this.

41 minutes ago, Lemon797 said:

6. maybe auto update?

Bad idea on Arch, some updates require manual intervention.

 

43 minutes ago, Lemon797 said:

7. moves all the tabs to the position that I need them in.

Not sure you can do that

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

Quote

ok I will look at that.

Quote

https://wiki.archlinux.org/index.php/Xprofile

 

depending on which terminal you use the command to run a program upon opening it will be different.

I use the LXTerminal witch I can just use the LTXerminal command to run.

Quote

Also vnc and your minecraft server can be made into systemd services, which is a much cleaner way of doing this.

Could you explain how to do this, and if I did would the terminal tabs open for them so I could monitor them?

Quote

Bad idea on Arch, some updates require manual intervention.

Ok.

Quote

Not sure you can do that

Ok. I was hopeing I could because it's a lot easier to monitor everything that way.

@Sauron

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, Sauron said:

Bad idea on Arch, some updates require manual intervention.

Also a bad idea because Arch (or, at the very least, some random package/dependency you need) loves to break itself when you upgrade.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, kelvinhall05 said:

Also a bad idea because Arch (or, at the very least, some random package/dependency you need) loves to break itself when you upgrade.

ok. how can I make the minecraft server and vnc into systemd services?

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Lemon797 said:

ok. how can I make the minecraft server and vnc into systemd services?

Not sure about VNC, but for the MC server you can make a systemd service that just runs a bash script that starts the server. There are tons of guides on how to do that online.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, kelvinhall05 said:

Not sure about VNC, but for the MC server you can make a systemd service that just runs a bash script that starts the server. There are tons of guides on how to do that online.

ok. will the mc servers gui boot up if I make the mc server a systemd service?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Lemon797 said:

ok. will the mc servers gui boot up if I make the mc server a systemd service?

GUI? Both the official vanilla MC server from Mojang and Paper (what you should be using tbh) are interacted with through CLI.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, kelvinhall05 said:

GUI? Both the official vanilla MC server from Mojang and Paper (what you should be using tbh) are interacted with through CLI.

yes i know and I am using paper, but I mean the Minecraft server java gui.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Lemon797 said:

yes i know and I am using paper, but I mean the Minecraft server java gui.

I still have no idea what you're talking about, and why do you need a GUI?

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, kelvinhall05 said:

I still have no idea what you're talking about, and why do you need a GUI?

How to Run a Simple Local Minecraft Server (With and Without Mods)

This is what I mean. and I use it to run the commands.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Lemon797 said:

How to Run a Simple Local Minecraft Server (With and Without Mods)

This is what I mean. and I use it to run the commands.

You can view all that information and run commands from the cli interface...

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, kelvinhall05 said:

You can view all that information and run commands from the cli interface...

I know but will the cli launch?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Lemon797 said:

I know but will the cli launch?

You can have the script open a screen for minecraft and run it in there, and then you can just connect to that screen whenever you need to do something on the server.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, kelvinhall05 said:

You can have the script open a screen for minecraft and run it in there, and then you can just connect to that screen whenever you need to do something on the server.

Is there a way to have it launch in a terminal on the main screen?

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Lemon797 said:

Is there a way to have it launch in a terminal on the main screen?

Yes, just have the script open whatever terminal emulator you want.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

@Lemon797 By "screen" I don't mean a physical display.

https://linux.die.net/man/1/screen

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, kelvinhall05 said:

Yes, just have the script open whatever terminal emulator you want.

So if I made a script that says lxterminal -e bash -c "cd /dir/to/server" -e bash -c "./update.sh"

(update.sh is the script the updates and runs the mc server)

Link to comment
Share on other sites

Link to post
Share on other sites

26 minutes ago, Lemon797 said:

ok. how can I make the minecraft server and vnc into systemd services?

Read the wiki...

https://wiki.archlinux.org/index.php/TigerVNC#Starting_and_stopping_x0vncserver_via_systemd

https://wiki.archlinux.org/index.php/Minecraft#Starting_the_server_2

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Lemon797 said:

So if I made a script that says lxterminal -e bash -c "cd /dir/to/server" -e bash -c "./update.sh"

(update.sh is the script the updates and runs the mc server)

Where do I put the file and what type of file is it?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Lemon797 said:

So if I made a script that says lxterminal -e bash -c "cd /dir/to/server" -e bash -c "./update.sh"

 

(update.sh is the script the updates and runs the mc server)

Why all those arguements? iirc you should be able to just run

lxterminal -e /path/to/update.sh

 

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, kelvinhall05 said:

Why all those arguements? iirc you should be able to just run


lxterminal -e /path/to/update.sh

 

ok.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Sauron said:

OP is running a Paper server which iirc does not create a systemd service when run for the first time. It has to be started and run with java.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×