Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the creation of 'vso tasks rotate' autostart file #130

Closed
nellfs opened this issue Jun 23, 2024 · 0 comments · Fixed by #131
Closed

remove the creation of 'vso tasks rotate' autostart file #130

nellfs opened this issue Jun 23, 2024 · 0 comments · Fixed by #131

Comments

@nellfs
Copy link
Contributor

nellfs commented Jun 23, 2024

Currently vso creates a file that ran vso tasks rotate in /home/user/.config/autostart/

// makeTasksRotatorAutostart creates an autostart file for vso if it doesn't exist
func makeTasksRotatorAutostart() error {
curUser, err := getRealUser()
if err != nil {
fmt.Println("Cannot determine real user. Autostart will not be created.")
return err
}
autostartFolder := "/home/" + curUser + "/.config/autostart"
autostartFile := autostartFolder + "/vso.desktop"
if _, err := os.Stat(autostartFile); os.IsNotExist(err) {
fmt.Println("Creating vso autostart file for user in " + autostartFile)
err = os.MkdirAll(autostartFolder, 0755)
if err != nil {
return err
}
file, err := os.Create(autostartFile)
if err != nil {
return err
}
defer file.Close()
_, err = file.WriteString("[Desktop Entry]\nType=Application\nName=vso\nExec=/usr/bin/vso rotate-tasks\n")
if err != nil {
return err
}
}
return nil
}

There are a few problems with this:

  1. The created file uses the old command for vso tasks rotating (so the file actually doesn't work currently).
    Core dumps gets stored in random places desktop-image#141

  2. Writing a file in the user's home directory makes it hard to update; we would need to directly modify the user's home to correct the error mentioned above.


The best thing to do in this case would be to create a systemd service to start vso tasks rotate as mentioned by @taukakao
Vanilla-OS/desktop-image#141

In fact I already have an issue and a PR open to solve this, so this issue complements it.

@taukakao taukakao changed the title fix: remove the creation of 'vso tasks rotate' autostart file remove the creation of 'vso tasks rotate' autostart file Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant