You are not logged in.

#1 2011-07-04 06:00:31

ace_w1zard
Member
Registered: 2010-07-07
Posts: 83

How can I make this script run?

Hey guys I want to make a script that when I click on it, it runs "xfwm4". The reason I want to do this is because every other log in my WM decides not to load up and I have to run xfwm4 to do so! SO, I made a small script to run it, bellow is the script.

!# /bin/bash 

#This is a basic script that will run xfwm4, Because my Computer is to 
#stupid to run it by its self some times at boot!

echo Running 'xfwm4' please wait...

xfwm4

echo Windows Manager Should be Up and Running, Thank you... 

And then I saved it as WM
And then I made the script executable...

sudo chmod u=rwx WM

But when I click on it, It does nothing. The script does not execute why? I see it is executable but I can execute it upon clicking it, only when I run bash WM! Please Help.

Offline

#2 2011-07-04 07:02:57

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How can I make this script run?

#! at the start - not !# .

btw - if your WM is not running, how do you click on the script? smile

Offline

#3 2011-07-04 13:20:23

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: How can I make this script run?

xfdesktop would be the one displaying the desktop icons, not xfwm.

Edit: oh, yes, I'm assuming his script is located in ~/Desktop or something smile.

BTW one way to prevent xfwm from not starting, is not to save the session at logout. Or maybe add it to Autostart in Session and startup, but I'm not sure how that works.

Last edited by stqn (2011-07-04 13:21:25)

Offline

#4 2011-07-04 15:12:37

chemicalfan
Member
From: United Kingdom
Registered: 2011-05-25
Posts: 58

Re: How can I make this script run?

Err, I'm running Xfce without any problems - what have you done differently OP?

Offline

#5 2011-07-04 15:54:05

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: How can I make this script run?

chemicalfan wrote:

Err, I'm running Xfce without any problems - what have you done differently OP?

Looks like it might be a case of using xfwm4 as a stand-alone WM.

@OP: Have you already tried the .xinitrc method?  For that matter, have you tried running it from CLI and checking the output?

Offline

#6 2011-07-04 16:06:54

chemicalfan
Member
From: United Kingdom
Registered: 2011-05-25
Posts: 58

Re: How can I make this script run?

ANOKNUSA wrote:

Looks like it might be a case of using xfwm4 as a stand-alone WM.

Hmm, I hadn't thought of that - but why would you want to?? Without a panel or desktop, I can't see the use. If you wanted a panel-less, desktop-less GUI, you'd use Openbox surely!!

Offline

#7 2011-07-04 16:46:17

ace_w1zard
Member
Registered: 2010-07-07
Posts: 83

Re: How can I make this script run?

tomk wrote:

#! at the start - not !# .

btw - if your WM is not running, how do you click on the script? smile

i did that, and when i click on it it still does not run... I placed the script into my /home/main section...

Offline

#8 2011-07-05 04:53:10

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: How can I make this script run?

try double-click neutral


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#9 2011-07-05 06:12:47

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: How can I make this script run?

Call me a stickler for details but that chmod command looks funny. You don't need sudo if you own the file ace_wizard and the command should be something like

chmod +x /path/to/script

and then run it from a terminal to check it.


You're just jealous because the voices only talk to me.

Offline

#10 2011-07-06 20:53:11

ace_w1zard
Member
Registered: 2010-07-07
Posts: 83

Re: How can I make this script run?

It runs from the terminal and yes I tried double clicking it, NOTHING! Why is this happening? Also I tried running a executable C++ hello world program I made, nothing when I click the executable!??!

Offline

#11 2011-07-06 22:01:22

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: How can I make this script run?

Can you navigate to the folder and post the output of

ls -la

Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#12 2011-07-07 00:10:56

ace_w1zard
Member
Registered: 2010-07-07
Posts: 83

Re: How can I make this script run?

[main@benford ~]$ ls -la
total 152
drwx------ 23 main users 4096 Jul  6 19:57 .
drwxr-xr-x  4 root root  4096 Jun 29 02:40 ..
drwx------  3 main users 4096 Jun 29 19:33 .adobe
-rwxr-xr-x  1 main users 6660 Jul  6 19:08 a.out
-rw-r--r--  1 main users   61 Jul  6 19:08 ball.c
-rw-------  1 main users 3661 Jul  6 20:10 .bash_history
-rw-r--r--  1 main users   21 May  7 21:46 .bash_logout
-rw-r--r--  1 main users   57 May  7 21:46 .bash_profile
-rw-r--r--  1 main users  141 May  7 21:46 .bashrc
drwxr-xr-x  6 main users 4096 Jul  1 06:23 builds
drwxr-xr-x  8 main users 4096 Jul  6 19:17 .cache
drwxr-xr-x  3 main users 4096 Jul  6 20:09 .codeblocks
drwxr-xr-x 19 main users 4096 Jul  4 01:27 .config
drwx------  3 main users 4096 Jun 29 14:02 .dbus
drwxr-xr-x  2 main users 4096 Jul  2 16:24 Desktop
drwx------  5 main users 4096 Jul  5 14:27 Downloads
drwx------  2 main users 4096 Jul  2 20:42 .emacs.d
drwxr-xr-x  2 main users 4096 Jul  6 19:53 .fontconfig
drwx------  5 main users 4096 Jul  6 19:52 .gconf
drwx------  2 main users 4096 Jul  6 19:55 .gconfd
drwxr-xr-x  2 main users 4096 Jun 30 00:46 .gstreamer-0.10
-rw-------  1 main users    0 Jun 29 14:22 .gtk-bookmarks
-rw-------  1 main users  318 Jul  6 19:52 .ICEauthority
drwxr-xr-x  3 main users 4096 Jun 29 14:03 .local
drwx------  3 main users 4096 Jun 29 19:33 .macromedia
drwx------  4 main users 4096 Jun 29 14:20 .mozilla
-rw-r--r--  1 main users   77 Jul  2 20:50 nad ~
drwx------  3 main users 4096 Jun 29 19:37 .pki
-rwxr--r--  1 main users   99 Jul  2 20:54 raw
drwx------  5 main users 4096 Jul  6 19:54 .Skype
drwxr-xr-x  3 main users 4096 Jul  1 03:24 .subversion
drwxr-xr-x  4 main users 4096 Jul  6 16:56 test
drwx------  3 main users 4096 Jun 29 14:22 .thumbnails
-rw-------  1 main users  609 Jul  6 19:08 .viminfo
-rwxr--r--  1 main users  243 Jul  4 12:45 WM
-rwxr--r--  1 main users  243 Jul  4 01:50 WM~
-rw-------  1 main users   52 Jul  6 19:52 .Xauthority
-rw-r--r--  1 root root   317 Jun 29 14:17 .xinitrc
[main@benford ~]$ 

Offline

#13 2011-07-07 01:13:09

ace_w1zard
Member
Registered: 2010-07-07
Posts: 83

Re: How can I make this script run?

There is what I get when I run it... Can anyone please help?

Offline

#14 2011-07-07 01:19:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How can I make this script run?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#15 2011-07-07 01:39:29

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: How can I make this script run?

OK to run a script clicking on it in some window manager ( like xfwm4 ) you would need, to add executable to all

chmod a+x WM

But I dont understant how you have something to launch by clicking on it if you are not already running a window manger. From your OP it seems your problem is xfwm4 doesnt start, well you should probaly look at how you are starting X, (ie ~/.xinitrc). If you explain the problem and not your attempt at a solution ( or at least in addition to your attempted solution ) you may get better results here.

Offline

#16 2011-07-07 06:19:11

lukaszan
Member
Registered: 2011-05-05
Posts: 117

Re: How can I make this script run?

tesjo wrote:

But I dont understant how you have something to launch by clicking on it if you are not already running a window manger. From your OP it seems your problem is xfwm4 doesnt start, well you should probaly look at how you are starting X, (ie ~/.xinitrc). If you explain the problem and not your attempt at a solution ( or at least in addition to your attempted solution ) you may get better results here.

I imagine he's clicking in a file manager.

@OP, if you can click/double click on our WM script, it means you are already running a WM. So another one won't start (unless you want 2 running at the same time, but it's tiny bit more complicated).

And your simple 'hello world' script is probably writing to stdout, which you won't see either if you run it by 'clicking' on the script.

Offline

#17 2011-07-07 16:12:33

ace_w1zard
Member
Registered: 2010-07-07
Posts: 83

Re: How can I make this script run?

I ran chmod a+x WM, and when I double click the WM script it still does not execute... Is there a problem with Arch? I can show you my xinitrc is you wish...

Offline

#18 2011-07-07 16:16:20

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: How can I make this script run?

how are you checking if the script is running or not? Did you read lukaszan's post? Do you know if xfwm runs multiple instances or follows the singleton pattern?

and no there is no problem with Arch.

Lets get back to basics and just explain what the problem is. Is your X not starting up at times? everytime?

A couple other people have pointed out that if your X is not running (which is what you indicated because you want to start xfwm4 in a script), how are you going to start up a file manager to click on your script? You haven't addressed that question yet you keep saying that its not working.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB