[SOLVED (Solution Removed Need to Find a Solution, lol)]How Do I Add a Terminal Command to "Startup?"

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
MtnDewManiac
Level 6
Level 6
Posts: 1491
Joined: Fri Feb 22, 2013 5:18 pm
Location: United States

[SOLVED (Solution Removed Need to Find a Solution, lol)]How Do I Add a Terminal Command to "Startup?"

Post by MtnDewManiac »

Once in a blue moon, I will stream a podcast (audio) from my cell phone to my computer. Everything functions except that I need to paste this:

Code: Select all

pactl load-module module-bluetooth-discover
into a terminal window. The actual pasting part is no problem. But I do not remember things well due to past TBI. Therefore, I end up trying several times to get my laptop to receive/play the bluetooth stream until I decide to do a web search for the error (something about stream... setup(?) failing). Then I find the web page that tells me to paste the above into a terminal window after installing pulse audio.

I finally managed to start remembering that I have that thing installed, lol. But I will probably never manage to remember that terminal command. Or that I have apparently bookmarked the web page containing it long ago :roll: .

The web page did say something about adding the above command to my "startup." What is the proper way to do this in Xfce? And is there any possible downside to doing this?

Thanks,
MDM
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mint 18 Xfce 4.12.

If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: How Do I Add a Terminal Command to "Startup?"

Post by MrEen »

Hi MDM,

This works on 18.3. In Menu > Settings > Session and Startup > Application Autostart tab

You can add commands there. You may want a delay in front of the command (no idea, myself.) It should be pretty self-explanatory.

No idea on downsides, either.

Hope this helps.
User avatar
JoeFootball
Level 13
Level 13
Posts: 4673
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: How Do I Add a Terminal Command to "Startup?"

Post by JoeFootball »

MtnDewManiac wrote:The actual pasting part is no problem. But I do not remember things well due to past TBI.
Not to dissuade you from making this part of your startup, you can always use the up/down arrow keys in the terminal window to scroll through your command history. :)

Joe
Sir Charles

Re: How Do I Add a Terminal Command to "Startup?"

Post by Sir Charles »

pactl is used to issue control commands to the PulseAudio sound server.
So I guess you could addpactl load-module module-bluetooth-discover to/etc/pulse/default.pa and the module should get loaded at startup.
MtnDewManiac
Level 6
Level 6
Posts: 1491
Joined: Fri Feb 22, 2013 5:18 pm
Location: United States

Re: How Do I Add a Terminal Command to "Startup?"

Post by MtnDewManiac »

MrEen wrote: Sun Apr 15, 2018 12:32 pmThis works on 18.3. In Menu > Settings > Session and Startup > Application Autostart tab

You can add commands there. You may want a delay in front of the command (no idea, myself.) It should be pretty self-explanatory.
Yes, a delay seems like a good idea. I would probably want something that acts on bluetooth, pulse audio, or both to wait until that/those thing(s) is/are fully loaded until IT loads (or, in this case, runs?). I wonder how many seconds would be best for a delay value? Would 20 seconds be enough, do you think? The little bluetooth icon usually appears within ten seconds after my desktop's background image finally gets around to loading, but I do not know when the clock starts ticking for these kinds of things - and, altogether, it takes quite a while for everything to settle in and down after the bare "blank gray slate" desktop starts to appear.

I hope that menu option you mentioned has a handy setting for the delay value, so I don't have to guess at the syntax (delay=20 ???) .

BtW, that bluetooth panel application loads probably nine out of ten times, but approximately one out of ten times it never makes it to the panel. Would having this

Code: Select all

pactl load-module module-bluetooth-discover
command in my autostart recipe cause me any problems when that one time out of ten happens? Perhaps I would be better off NOT adding it to the start up.
JoeFootball wrote: Sun Apr 15, 2018 12:36 pmNot to dissuade you from making this part of your startup, you can always use the up/down arrow keys in the terminal window to scroll through your command history. :)
THAT is the solution! I should have thought of that, even with my personal issues. That's how I manage to do a

Code: Select all

sudo shutdown -P +70
when I cannot sleep and with to use VLC + public domain science documentary video/audio content as a sleep aid.
Marziano wrote: Sun Apr 15, 2018 12:45 pm pactl is used to issue control commands to the PulseAudio sound server.
So I guess you could addpactl load-module module-bluetooth-discover to/etc/pulse/default.pa and the module should get loaded at startup.
Hmm... Perhaps people who have trouble stepping onto curbs should not attempt to free-climb Everest. OTOH, that probably works great for people who understood what you typed (or at least were pretty sure of what language you typed it in ;) ).

Regards,
MDM
Mint 18 Xfce 4.12.

If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: [SOLVED (Solution Removed Need to Find a Solution, lol)]How Do I Add a Terminal Command to "Startup?"

Post by smurphos »

history | grep "snippet-of-command" is good way to search your bash history if you can remember a bit of a command but not the whole thing.

E.g.

history | grep "bluetooth"
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Locked

Return to “Xfce”