LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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, 07:39 PM   #1
Fixit7
Member
 
Registered: Mar 2014
Posts: 167

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, 01: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
[SOLVED] Script to restart JJJCR Linux - General 4 05-11-2013 08:05 PM
Bash script require to restart the tomcat on remote server. qarar Linux - Newbie 7 08-30-2012 07:16 PM
Bash script to restart a dead script nathanpayne Programming 9 07-22-2011 10:28 PM
restart script glennbtn Linux - Newbie 1 07-20-2010 05:13 AM
Restart script blablaman Linux - Newbie 1 08-20-2004 06:09 AM


All times are GMT -5. The time now is 07:05 AM.

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