mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-12-22 13:34:55 +01:00
chromium autostart should be also working w/o sudo
This commit is contained in:
parent
8b2aaace1e
commit
e044545a5b
1 changed files with 2 additions and 2 deletions
|
@ -202,7 +202,7 @@ class CraftBeerPiCli():
|
|||
if os.path.exists(os.path.join("/etc/xdg/autostart/","chromium.desktop")) is False:
|
||||
srcfile = self.config.get_file_path("chromium.desktop")
|
||||
destfile = os.path.join("/etc/xdg/autostart/")
|
||||
shutil.copy(srcfile, destfile)
|
||||
shutil.os.system('sudo cp "{}" "{}"'.format(srcfile,destfile))
|
||||
print("Copied chromium.desktop to /etc/xdg/autostart/")
|
||||
else:
|
||||
print("chromium.desktop is already located in /etc/xdg/autostart/")
|
||||
|
@ -214,7 +214,7 @@ class CraftBeerPiCli():
|
|||
print("Remove chromium.desktop from /etc/xdg/autostart/")
|
||||
try:
|
||||
if os.path.exists(os.path.join("/etc/xdg/autostart/","chromium.desktop")) is True:
|
||||
os.remove(os.path.join("/etc/xdg/autostart/","chromium.desktop"))
|
||||
shutil.os.system('sudo rm -rf "{}"'.format(os.path.join("/etc/xdg/autostart/","chromium.desktop")))
|
||||
print("Deleted chromium.desktop from /etc/xdg/autostart/")
|
||||
else:
|
||||
print("chromium.desktop is not located in /etc/xdg/autostart/")
|
||||
|
|
Loading…
Reference in a new issue