Skip to content

Instantly share code, notes, and snippets.

@purpleidea
Created May 29, 2014 06:11
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save purpleidea/aae7b91f8cc714b04803 to your computer and use it in GitHub Desktop.
Save purpleidea/aae7b91f8cc714b04803 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Restart the GNOME shell by commandline via SSH. Similar to nohup.
# Copyright (C) 2013-2014 James Shubin
# Written by James Shubin <james@shubin.ca>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# README: https://ttboj.wordpress.com/2014/05/29/restarting-gnome-shell-via-ssh/
export DISPLAY=:0.0
# do a nohup bash style according to:
# http://seejeffrun.blogspot.com/2008/05/bash-nohups-background-jobs.html
{ `gnome-shell --replace &> /dev/null`; } < /dev/stdin &
@mcepl
Copy link

mcepl commented May 29, 2014

I think you should triple license it under GPLv3/LGPLv2+/MPL1 ... ratio of code/license is not crazy enough still, besides the immense intellectual value of the script should not be protected just by GPL.

@purpleidea
Copy link
Author

I think you should triple license it under GPLv3/LGPLv2+/MPL1 ... ratio of code/license is not crazy enough still, besides the immense intellectual value of the script should not be protected just by GPL.

It's the default license header that comes out when I write code. Please respect the license or don't use it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment