Launch script every time I start my session

Hello, I just want to know if I can have a script running every time I start my session.
For the moment this is just a basic update script, but I think it will be very useful in the future.
For the record, my script is already in my PATH, and run with admin right.
If anyone has any clues, that will be very helpful !

If it needs privileges then maybe you want a systemd service/timer.

Hi @anthony05, and welcome!

There are many options, like you can see from what @cscs said.

Best would be to describe what you want to do and why you are trying to do it the specific way you are trying to do it.

Hi @cscs and @Mirdarthos, and thank you

Actually, what I want to do is to have a script that runs automatically as soon as I log in.
For the moment, my script is just :

pacman -Syyuu

Before I was on Mint, and it was quite easy to do this kind of manipulation, but on Manjaro I can’t find a way to do it.
Do you see what I’m getting at?

Yes. That is totally unnecessary and will lead to problems. It’ll cause breakage and all kinds of problems.

  1. You don’t need a script for that 1 command.
  2. That’ll do an update using pacman and while pacman is awesome, it’s much better and recommended to use pamac.
  3. It will lead to breakage. There are update announcements here, on the forum when there is an update. (See #announcements) Keep an eye on them, follow them, apply them as necessary and you’ll be good.

Is it?

In fact I would recommend the opposite.

Noreinstall, Nobackup Crew :kissing_cat:

6 posts were split to a new topic: Pamac-only suggestions

Ok guys thanks a lot for your answers/advices, I won’t do that auto-update, but I’ll keep in mind your systemd service solution @cscs it can be very useful.
And I will remind your discussion about pacman, pamac and all the stuff, I’ll just go deeper on my research on it.
As I said before, I’m not very comfortable with Manjaro yet, I’ve only been using it for a few days.

Thanks a lot for your time and your reactivity, that helps a lot.

Yeah, we went a bit OT, I split the comments. Sorry :blush:


Well, be that as it may, it wasn’t the only and first time this sort of recommendation made it to the anouncements. It was only the quickest example I could find.

And, once again, I’m not trying to warm people off pacman. Instead, I’m trying to make people’s life on Manjaro easier and better with the result of Manjaro being more attractive,

But it seems we’ll have to ‘agree to disagree’ here. Let me just assure you I’m not trying to make pacman look bad, nor am I insulting pacman.

Hello @anthony05 and Welcome

Manjaro is a rolling release. There’s no need for such scripts.

I think by default pamac checks for updates every 6 hours or so…
Open pamac, click on the three vertical dotsPreferences and you will see in the General tab updates and see updates check frequency.

Just my two cents :slight_smile:


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.