SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-03-25 17:19:24

0day
#! CrunchBanger
Registered: 2010-02-06
Posts: 179

menu text file autostart

I created a text file, I would put it in autostart for wm2 to open with nano to have a command to paste on the terminal, how can I do?

wicd-gtk
firefox
midori
transmission-gtk
thunar
sudo synaptic
simple-scan
scrot
bleachbit
sudo bleachbit
unetbootin
nano
abiword
gnumeric
evince
sudo shutdown -h now

Offline

Help fund CrunchBang, donate to the project!

#2 2014-03-25 17:55:05

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,198

Re: menu text file autostart

Are you trying to make a menu for wm2?

If so, you're probably better off using dmenu and setting up a key binding.


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#3 2014-03-25 19:36:30

0day
#! CrunchBanger
Registered: 2010-02-06
Posts: 179

Re: menu text file autostart

http://manned.org/wm2-menu.1   

http://archive.debian.net/slink/wm2

how does it work? where can I download it?

Last edited by 0day (2014-03-25 19:42:11)

Offline

#4 2014-03-25 20:15:15

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,198

Re: menu text file autostart

9menu and menu are in the repos use apt to install them

Once you have them installed, you create a script that uses 9menu to generate your various menus. I suspect wn2-menu was some script the maintainer of wm2 wrote. Those links are for obsolete versions of debian, so you'll probably need to write your own. The man page for 9menu is pretty self-explanatory and has a couple examples.

March_1395778338_1366x768.jpg


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#5 2014-03-26 14:25:48

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,198

Re: menu text file autostart

You might be interested in this wm -

SithWm

cwm window manager

Both seem to have the features you want built in and are reviewed in the 30wm in 30 Days thread so there will some basic setup information for you there.

The man page for cwm and the cwmrc are both good.

Last edited by PackRat (2014-03-26 15:04:17)


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#6 2014-03-28 13:33:13

0day
#! CrunchBanger
Registered: 2010-02-06
Posts: 179

Re: menu text file autostart

i create menu: http://www.ghacks.net/2010/12/07/add-a- … ith-9menu/   but after reboot don't work.

Offline

#7 2014-03-28 14:22:45

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,686

Re: menu text file autostart

0day wrote:

i create menu: http://www.ghacks.net/2010/12/07/add-a- … ith-9menu/   but after reboot don't work.

Did you add it to autostart?

What happens if you try to run it from the command line?


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Offline

#8 2014-03-28 14:36:48

0day
#! CrunchBanger
Registered: 2010-02-06
Posts: 179

Re: menu text file autostart

What happens if you try to run it from the command line?  9menu appear with empty menu

Offline

#9 2014-03-28 15:04:26

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,686

Re: menu text file autostart

0day wrote:

What happens if you try to run it from the command line?  9menu appear with empty menu

You need to be more specific. What exactly are you doing? What commands are you trying to run?


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Offline

#10 2014-03-28 18:08:14

0day
#! CrunchBanger
Registered: 2010-02-06
Posts: 179

Re: menu text file autostart

solved, add:
9menu -popdown -label 'wm2 menu' thunar wicd-gtk firefox midori transmission-gtk simple-scan scrot bleachbit unetbootin geany abiword gnumeric evince &
wm2

in wm2-start

but sudo shutdown -h now and nano don't work

Last edited by 0day (2014-03-28 18:42:11)

Offline

#11 2014-03-28 18:57:03

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,198

Re: menu text file autostart

0day wrote:

but sudo shutdown -h now and nano don't work

You mean they don't work from the menu? Try -

xterm -e nano

in your menu (use your terminal of choice).

For shutdown in the menu, you might be able to use gksudo (gsudo?) but I don't recall the code to use.

Or do you mean that they don't work at all now that the menu is displayed on the desktop?

Last edited by PackRat (2014-03-28 18:57:58)


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#12 2014-03-28 21:21:04

xero
#! Junkie
From: 0x000000
Registered: 2013-09-30
Posts: 377
Website

Re: menu text file autostart

PackRat wrote:
0day wrote:

but sudo shutdown -h now and nano don't work

You mean they don't work from the menu? Try -

xterm -e nano

in your menu (use your terminal of choice).

For shutdown in the menu, you might be able to use gksudo (gsudo?) but I don't recall the code to use.

Or do you mean that they don't work at all now that the menu is displayed on the desktop?

and if the window is closing right away you might need to tell it to "hold"

xterm -hold -e <script>

▬▬ι═════════ﺤ
dotfiles http://git.io/.files

Offline

#13 2014-03-29 07:36:29

0day
#! CrunchBanger
Registered: 2010-02-06
Posts: 179

Re: menu text file autostart

does not accept spaces, for example: gksu bleachbit
opens gksu

Offline

#14 2014-03-29 08:37:31

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 11,951

Re: menu text file autostart

^ Double quotes? e.g. `"gksu bleachbit"`

edited a few times... ops

Last edited by pvsage (2014-03-29 08:45:39)


I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

#15 2014-03-29 09:27:17

iMBeCil
WAAAAT?
From: Zgb, Croatia
Registered: 2012-03-22
Posts: 660

Re: menu text file autostart

0day wrote:

does not accept spaces, for example: gksu bleachbit
opens gksu

It depends on how you start it, i.e. whether you start it with xterm or terminator. To start, for example, 'nano .bashrc' this is your options:

1) with xterm

$ xterm <options> -e nano .bashrc

2) with terminator

$ terminator <options> -x nano .bashrc

(see 'man terminator' and 'man xterm').

Both versions require that the '-e'/'-x' part is the last one!

3) all this is a bit complicated by the fact that it is possible to do:

$ terminator <options> -e nano <other terminator options>

but then you cannot add arguments to 'nano'. (Unless you, probably, put it in double quotes.)

4) Furthermore, this doesn't work:

$ xterm -x nano .bashrc    # doesn't work; 'xterm' doesn't have '-x' option

since 'xterm' doesn't have a '-x' option.

5) and finally, all this is additionally complicated if 'xterm' is somehow alias for terminator  yikes Therefore, it is important to know if your '9whatever' starts programs with xterm or terminator ... or something else ...


Postpone all your duties; if you die, you won't have to do them ..

Offline

#16 2014-03-29 13:53:17

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,198

Re: menu text file autostart

pvsage wrote:

^ Double quotes? e.g. `"gksu bleachbit"`

edited a few times... ops

This -

gksu '<command>'

i.e to shutdown

gksudo 'shutdown -h now'

works in fluxbox, openbox, and fvwm menus.

Last edited by PackRat (2014-03-29 13:54:10)


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#17 2014-03-31 16:33:44

0day
#! CrunchBanger
Registered: 2010-02-06
Posts: 179

Re: menu text file autostart

don't work, 9menu do not accept space only single command: e.g. :  firefox bleachbit but not sudo or gksu bleachbit

Offline

#18 2014-03-31 19:00:05

porkpiehat
#! Die Hard
Registered: 2012-10-02
Posts: 699

Re: menu text file autostart

0day wrote:

don't work, 9menu do not accept space only single command

No. This command works fine:

9menu "gksu bleachbit" "urxvt -e mocp" pcmanfm audacious

Look: 2014_03_31_114945_1280x1024_scrot.jpg

A better way is to put the menu commands in a file (I called it .9menu-test, but you can call it anything):

bleachbit : gksu bleachbit
mocp : urxvt -e mocp
ranger : urxvt -e ranger
pcmanfm : pcmanfm
  
exit

Then call 9menu like this:

9menu -file .9menu-test

Look: 2014_03_31_115232_1280x1024_scrot.jpg

Read the man page! "man 9menu"


Sarcasm is often an appropriate response to stupidity.

Offline

#19 2014-04-02 17:01:19

0day
#! CrunchBanger
Registered: 2010-02-06
Posts: 179

Re: menu text file autostart

thanks, works fine:

my autostart:
#!/bin/bash

# script to "autostart" wm2

## GNOME PolicyKit and Keyring
eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh,gpg) &

## Detect and configure touchpad. See 'man synclient' for more info.
if egrep -iq 'touchpad' /proc/bus/input/devices; then
    synclient VertEdgeScroll=1 &
    synclient TapButton1=1 &
fi

nitrogen --restore &
conky &
9menu -popdown -label 'wm2 menu' thunar wicd-gtk firefox midori transmission-gtk simple-scan scrot bleachbit "gksu bleachbit" unetbootin "gksu synaptic" geany "terminator -x nano" abiword gnumeric evince "xterm -e sudo halt" &
wm2

Last edited by 0day (2014-04-03 13:48:46)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo