# run installer file right after boot, only once

**URL:** <https://forums.suse.com/t/run-installer-file-right-after-boot-only-once/23075>\
**Category:** SLES Install-Boot\
**Created:** [September 11, 2012, 1:06pm UTC](https://forums.suse.com/t/run-installer-file-right-after-boot-only-once/23075 "2012-09-11T13:06:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![satanowicz](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@satanowicz](https://forums.suse.com/u/satanowicz)\
**Post date:** [September 11, 2012, 1:06pm UTC](https://forums.suse.com/t/run-installer-file-right-after-boot-only-once/23075/1 "2012-09-11T13:06:13Z")

</div>

Hi.

I have an interactive installer in a .run file.  
It’s supposed to be installed after the system is installed (autoyast).  
I would like to run it right after the boot process ends and after KDE starts (the installer needs gui).  
The .run file should be executed only once.

BTW The autologin function is on.

Can anybody suggest me how to do it?  
I thought about mixing with the .profile i.e.:

```auto
./file.run &
sed --in-place '/run/d' .profile
sed --in-place '/in-place/d' .profile
```

But it doesn’t work right and it’s not a ‘clean’ method.

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [September 11, 2012, 4:09pm UTC](https://forums.suse.com/t/run-installer-file-right-after-boot-only-once/23075/2 "2012-09-11T16:09:52Z")

</div>

> [@satanowicz](#):
>
> Hi.
> 
> I have an interactive installer in a .run file.  
> It’s supposed to be installed after the system is installed (autoyast).  
> I would like to run it right after the boot process ends and after KDE  
> starts (the installer needs gui).  
> The .run file should be executed only once.
> 
> BTW The autologin function is on.
> 
> Can anybody suggest me how to do it?  
> I thought about mixing with the .profile i.e.:
> 
> ## Code:
> 
> ./file.run &  
> sed --in-place ‘/run/d’ .profile  
> sed --in-place ‘/in-place/d’ .profile
> 
> * * *
> 
> But it doesn’t work right and it’s not a ‘clean’ method.

Hi  
Create a wrapper script and place in the user home ‘autostart’  
directory that checks in the file (or a directory) from the installer  
exists. If it doesn’t run the file, if it does skip…

```auto
#!/bin/bash
if [! -f ~/.installed]; then
echo "Running installer"
touch ~/.installed
else
echo "Installed, not running"
fi
```

–  
Cheers Malcolm Â°Â¿Â° (Linux Counter #276890)  
openSUSE 12.2 (x86\_64) Kernel 3.4.6-2.10-desktop  
up 16:57, 3 users, load average: 0.01, 0.03, 0.05  
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU
