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

Forum rules
Before you post please read how to get help
Post Reply
User avatar
MtnDewManiac
Level 6
Level 6
Posts: 1307
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 » Sun Apr 15, 2018 11:52 am

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 MtnDewManiac on Sun Apr 15, 2018 1:06 pm, edited 2 times in total.
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.

MrEen
Level 5
Level 5
Posts: 668
Joined: Mon Jun 12, 2017 8:39 pm

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

Post by MrEen » Sun Apr 15, 2018 12:32 pm

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 6
Level 6
Posts: 1309
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 » Sun Apr 15, 2018 12:36 pm

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

Marziano
Level 6
Level 6
Posts: 1359
Joined: Thu Jan 04, 2018 1:00 pm

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

Post by Marziano » 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.
"Those are my principles, and if you don't like them...well, I have others." -Marx...
Groucho { Marx

User avatar
MtnDewManiac
Level 6
Level 6
Posts: 1307
Joined: Fri Feb 22, 2013 5:18 pm
Location: United States

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

Post by MtnDewManiac » Sun Apr 15, 2018 1:04 pm

MrEen wrote:
Sun Apr 15, 2018 12:32 pm
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.
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 pm
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. :)
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 5
Level 5
Posts: 697
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

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

Post by smurphos » Sun Apr 15, 2018 1:11 pm

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"

Post Reply

Return to “Xfce”