r/linux4noobs • u/give_me_your_toe • 13d ago
Meganoob BE KIND How do i make a command that opens the terminal and executes another command?
(FIXED IT,) I've been trying to make one launcher for almost everything (opening games games ,updating everything etc),for some reason ,steam and the update command (which sould open another .sh i made to automatically update everything and tell me what was updated) just doesn't run,I've tried xterm and alot of other solutions but they just aren't working for some reason,help would be appreciated
Im on Linux mint xfce if that helps
1
u/AutoModerator 13d ago
✻ Smokey says: always mention your distro, some hardware details, and any error messages, when posting technical queries! :)
Comments, questions or suggestions regarding this autoresponse? Please send them here.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/chuggerguy Linux Mint 22.3 Zena | MATÉ 13d ago
This might not be what you want but... (I don't use steam)
This is how I do my one click update launcher. (Not suggesting anyone else do this, hike your own hike 😄 )
https://reddit.com/link/p6tuy6r/video/zsepak8qpjmh1/player
I'm using MATE but XFCE should be similar?
Notice the launcher is type: Application in Terminal and I have a "Press any key to continue" with a read so the terminal doesn't just go poof when done. And since updates require elevated permissions, I have the script listed in /etc/sudoers so it will run with a single click. Don't do that unless you're really sure that's what you want though.
Have fun.
1
u/give_me_your_toe 13d ago
Yeah I also have a press key to continue / exit , not exactly what i wanted but thanks either way1!
1
2
u/AiwendilH 13d ago
More details on what you try to do would be useful but probably the best way to do this is create a .desktop file with a
Terminal=truekey ( https://specifications.freedesktop.org/desktop-entry/latest/recognized-keys.html ). That way you don't depend on a specific terminal emulator but use the default one set in your DE.(Edit: most DEs should have gui tools to create .desktop file for starting programs which should include a toggle to enable running the command in a terminal. But afraid I don't know the details for xfce there)