LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices

Reply
 
Search this Thread
Old 04-27-2014, 08:39 PM   #1
Fixit7
Member
 
Registered: Mar 2014
Posts: 223

Rep: Reputation: 0
Script to restart x server


I am trying to restart the x server using a script like the shutdown manager does.

I think this is partially working ?

#!/bin/sh
sudo kill `cat /tmp/.X0-lock`
startx
xwin [fvwm95|jwm]
_________________
Andy

Slacko Puppy 5.6.0
Windows XP SP3
 
Old 04-30-2014, 02:16 PM   #2
Karl Godt
Member
 
Registered: Mar 2010
Location: Kiel , Germany
Distribution: once:SuSE6.2,Debian3.1, aurox9.2+3,Mandrake?,DSL? then:W7st,WVHB, #!8.10.02,PUPPY4.3.1 now:Macpup
Posts: 308

Rep: Reputation: 45
Code:
PID_OF_X=`pidof X`

for aPID in $PID_OF_X
do

kill -9 $aPID

done

sleep 1s

read CURRENTWM </etc/windowmanager
test "$CURRENTWM" || CURRENTWM=jwm
which "$CURRENTWM" || CURRENTWM=unknown

if test "$CURRENTWM" != 'unknown';
then xwin $CURRENTWM
else echo "Probably only window in the wall installed , but not on OS.."
fi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script require to restart the tomcat on remote server. qarar Linux - Newbie 8 11-12-2014 08:26 AM
[SOLVED] Script to restart JJJCR Linux - General 4 05-11-2013 09:05 PM
Bash script to restart a dead script nathanpayne Programming 9 07-22-2011 11:28 PM
restart script glennbtn Linux - Newbie 1 07-20-2010 06:13 AM
Restart script blablaman Linux - Newbie 1 08-20-2004 07:09 AM


All times are GMT -5. The time now is 08:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration