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

You are not logged in.

#1 Re: Tutorials » Automatic notification of updates » 2015-09-27 01:00:23

Sector11 wrote:

I use "up2" almost daily.  wink

    $ up2
alias up2 = sudo apt-get update ; sudo apt-get upgrade --no-install-recommends

I don't have synaptic installed.

I use

command1 && command2

I understand that "&&" requires the preceding command to be executed successfully whereas with ";" the following command executes whether or not the previous command is successful.

#2 Re: Tips, Tricks & Scripts » Iceweasel about:config - fix for dark themes » 2015-09-24 12:10:42

Thanks for posting that code. I used it and code I picked up from to make up this stylesheet:

@-moz-document url("about:config") {
#config { background: #1A1F24; color: #BDC3C7; }
textbox { background: #1c2126; color: #BDC3C7; border-color: #6C7A89; }
tree { border: 1px solid #1c2126; }
treecol:not([hideheader="true"]), treecolpicker { -moz-appearance: none; border: none; background-color: #39424d; color: #BDC3C7; }
treecol:not([hideheader="true"]):not([sortable="false"]):hover, treecolpicker:hover { background-color: #0c2126; color: #BDC3C7; }
treechildren::-moz-tree-row(even) { background-color: #666!important; }
treechildren::-moz-tree-row(odd) { background-color: #777!important; }
treechildren::-moz-tree-row(selected) { background-color: #888!important; }
treechildren::-moz-tree-cell-text(selected) { color: #000000 !important; }

#3 Re: Help & Support (Beginners) » [Solved] Maximize window » 2015-09-12 05:24:43

ohnonot wrote:
ghorvath wrote:

Thank you. Alt+space and then x works for me.

so you prefer doing 3 keypresses a thousand times, instead of reading the openbox wiki once and setting your openbox up to maximize with 2, or even 1 keypress(es)?

I'm to blame for that sad

ToggleMaximize is definitely the way to go! I'm now using Super+X to ToggleMaximize and Super+I to Iconify instead of Alt+F6 and Alt+F5 because the function keys on my laptop are printed in tiny letters and are darkish blue on a black background.

PS: I read the Openbox wiki quite often but how much I retain is another matter wink

#4 Re: Help & Support (Beginners) » [Solved] Maximize window » 2015-09-11 13:42:32

ghorvath wrote:

... Is there a key-combination defined in Bunsenlabs for maximizing the active window?

Even if BL doesn't have such a key combination, you can add your own keybind, making sure the key combination isn't already being used by BL's rc.xml or by other programs. This works for me:

    <keybind key="W-x">        # Maximize
      <action name="MoveResizeTo"><height>100%</height><width>100%</width></action>

#5 Re: Help & Support (Beginners) » [Solved] Maximize window » 2015-09-11 13:34:47

ghorvath wrote:

Thank you. Alt+space and then x works for me.

Edit: How can I mark the thread to be solved?

I think the custom here is to edit the title of the first post to insert [SOLVED] at the start of the title.

#6 Re: Help & Support (Beginners) » [Solved] Maximize window » 2015-09-11 08:28:42

I use Alt+Spacebar followed by X (maximize). That's built-in with Openbox.

#7 Re: Tips, Tricks & Scripts » Favorite alterations you've done » 2015-09-05 17:54:03

Head_on_a_Stick wrote:
flaneur wrote:

What is the "Menu" key, please?

Keycode 0xff67

The symbol on the key looks like a menu list (or the old "hamburger" symbol that Windows is so fond of).

Yes, thanks! I figure it out using xev.

And I prefer to open the Openbox Main Menu at a fixed position on my screen (1366x768). For that I have a small script which provides a "mouse right-click" at specified position on my screen which is empty:

#!/usr/bin/env bash
xdotool mousemove 630 5
#sleep 0.2
xdotool mousemove 650 5
sleep 0.2
xdotool click 3

#8 Re: Tips, Tricks & Scripts » Favorite alterations you've done » 2015-09-05 17:37:26

damo wrote:

Dunno, but I bind the Openbox main menu to the Menu key.

What is the "Menu" key, please? And by "Openbox main menu" do you mean the one to display menu.xml's contents?

#9 Help & Support (Beginners) » Unnecessarily using Bash instead of sh? » 2015-09-05 04:15:17

Replies: 16

I came across this from HoaS:

I can't see any bashisms in those scripts (unless I've missed something) -- they would run quicker and consume fewer resources if you used a /bin/sh shebang (in Debian at least).

over here: … 57#p438457.

I'm one of those who use #!/usr/bin/env bash because I don't know better. I guess I could work out, by trial and error, whether my scripts will work with #! /bin/sh but are there any guidelines or pointers about when #! /bin/sh will suffice? I guess it's not a big deal for small scripts or "modern" computers but I feel its worth it anyway.

Here's one that seems to require Bash:

#!/usr/bin/env bash

# hint: use "xdotool getmouselocation" to get values for your situation

xgg="$(xdotool getactivewindow getwindowname)"

if [[ "$xgg" == *" - LibreOffice Calc" ]]
    xdotool mousemove --sync 218 144 click 1

I think it's because of the [[ and ]]

(I use this script in LibreOffice Calc to sum contiguous cells without resorting to actually using the mouse; it works only on maximized windows or those snapped to the left and maximized vertically.)

#10 Re: Off Topic / General Chat » [Solved] how does geany recognize syntax, not based on filename? mime? » 2015-09-04 14:16:00

iMBeCil wrote:

The 'line' here is a variable, not statement, and 'line[0]' represents the very first character of (string) variable 'line'.

Similarly, 'line[1]' represents the second character of (string) variable 'line'.


Thanks! That explains it very well.

#11 Re: Off Topic / General Chat » [Solved] how does geany recognize syntax, not based on filename? mime? » 2015-09-04 13:39:15

Could you please explain

if (strlen(line) > 2 && line[0] == '#' && line[1] == '!')

I don't know any coding language but doesn't the code above look like '#' should be on the first line (line 0) and '!' be on the second line (line 1)?

#12 Re: WM/DE Talk » Do you tile or stack? And why? » 2015-09-03 05:15:05

isosceles wrote:

In Windows 7 I have a handy shortcut, super key plus left or right arrow, to quickly fill half the screen with a window. It's a nice tiling-like feature. Can this be implemented in Openbox?

It's been there for years!

isosceles wrote:

I know the shortcut for resizing with snapping, but it's cumbersome in comparison to the Windows feature I describe. ...

How so? I too use Super+L, Super+R, Super+UpArrow, Super+DownArrow to snap half screen to the left, right, up, or down, respectively.

    <!-- Keybindings for window tiling -->
    <keybind key="W-Left">        # HalfLeftScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>0</y><height>100%</height><width>50%</width></action>
    <keybind key="W-Right">        # HalfRightScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>-0</x><y>0</y><height>100%</height><width>50%</width></action>
    <keybind key="W-Up">        # HalfUpperScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>0</y><width>100%</width><height>50%</height></action>
    <keybind key="W-Down">        # HalfLowerScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>-0</y><width>100%</width><height>50%</height></action>
    <keybind key="W-5">        # 50% width, height
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>center</x><y>center</y><width>50%</width><height>100%</height></action>
    <keybind key="W-w">        # Center on screen
      <action name="MoveResizeTo"><x>center</x><y>center</y></action>
    <keybind key="W-7">        # Top left corner
      <action name="MoveResizeTo"><x>0</x><y>0</y></action>
    <keybind key="W-8">        # Top right corner
      <action name="MoveResizeTo"><x>-0</x><y>0</y></action>
    <keybind key="W-9">        # Bottom right corner
      <action name="MoveResizeTo"><x>-0</x><y>-0</y></action>
    <keybind key="W-0">        # Bottom left corner
      <action name="MoveResizeTo"><x>0</x><y>-0</y></action>

If you like, you can look at these two links. They helped me smile ::: LXDE: Meet The Heart & Soul — lxde-rc.xml ::: Openbox - Edit rc.xml to Gain Control

#13 Re: Off Topic / General Chat » [Solved] how does geany recognize syntax, not based on filename? mime? » 2015-09-03 02:30:38

Good work! I learned a lot from this thread. Maybe you could suggest that Geany make it easier to use custom "headers". The Geany mailing lists are pretty active:

#14 Re: Off Topic / General Chat » [Solved] how does geany recognize syntax, not based on filename? mime? » 2015-09-01 12:42:30

johnraff wrote:


flaneur wrote:

For me, files like gtkrc, tint2rc, leafpadrc, .conkyrc, all are seen by Geany 1.23.1 as filetype "config". (As are those with .conf or .ini extensions.)

This is defined in /usr/share/geany/filetype_extensions.conf. ...

Thanks for that!

I copied over /usr/share/geany/filetype_extensions.conf to ~/.config/geany. Then I edited the copied over file to change




. Then, I made a copy of .conkyrc called default. Opening either file in Geany shows the same syntax highlighting and Geany sees both as "Config file":

#15 Re: Off Topic / General Chat » [Solved] how does geany recognize syntax, not based on filename? mime? » 2015-09-01 06:09:27

johnraff wrote:

@flaneur - that's about the 'file' command though. I'm not sure if geany uses file when determining filetypes.

Even I don't know that but if I double-click on .conkyrc (or the other config files I mentioned earlier), Geany opens it with syntax highlighting and Document > Set Filetype > Miscellaneous > Config file is what I see.

I'm pretty sure I haven't done anything to train Geany.

(Confession: I'm using the Openbox session of Lubuntu 14.04 and installed Geany 1.23.1 from the stock Ubuntu repo.)

My guess is that if Geany opens a plain text file, it scans the "initial" part of the file to somehow get information about whether the file is actually plain text or a config file and then automatically uses syntax highlighting if it feels it is appropriate.

#16 Re: Off Topic / General Chat » [Solved] how does geany recognize syntax, not based on filename? mime? » 2015-09-01 05:37:09

I came across this link: … ux?lang=en

I read the man page and found that there are three sets of tests, performed in this order: file system tests, magic tests, and language tests.
The file-system tests are based on examining the return from a stat(2)
system call. The program checks to see if the file is empty, or if it's
some sort of special file. Any known file types appropriate to the system
you are running on (sockets, symbolic links, or named pipes (FIFOs) on
those systems that implement them) are intuited if they are defined in the
system header file .
The magic tests are used to check for files with data in particular fixed
formats. These files have a “magic number” stored in a particular place
near the beginning of the file that tells the UNIX operating system that
the file is a binary executable, and which of several types thereof. The
concept of a “magic” has been applied by extension to data files.
If a file does not match any of the entries in the magic file, it is
examined to see if it seems to be a text file.
Once file has determined the character set used in a text-type file, it
will attempt to determine in what language the file is written. The
language tests look for particular strings (cf. ) that can appear anywhere
in the first few blocks of a file. For example, the keyword .br indicates
that the file is most likely a troff(1) input file, just as the keyword
struct indicates a C program. These tests are less reliable than the
previous two groups, so they are performed last.

I don't know whether the above is helpful but can someone please explain what is meant by "The language tests look for particular strings (cf. ) that can appear anywhere in the first few blocks of a file" in the last part of the quote?

#17 Re: Off Topic / General Chat » [Solved] how does geany recognize syntax, not based on filename? mime? » 2015-08-31 12:00:39

ohnonot wrote:

and here's the problem:
i'd like a similar functionality for my config files.

Could you please provide the names of some of your config files, the ones without extensions?

For me, files like gtkrc, tint2rc, leafpadrc, .conkyrc, all are seen by Geany 1.23.1 as filetype "config". (As are those with .conf or .ini extensions.)

#18 Re: Off Topic / General Chat » Top 10 commands you use frequently » 2015-08-29 18:52:30

Temetka wrote:

I also use these: ... ps -ef | grep "process name" ...

You may like pgrep -a "process name" although it gives a little less information.

#19 Off Topic / General Chat » Reader View (mode) in Firefox » 2015-08-29 04:53:07

Replies: 1

What is your experience of using Reader View aka Reader Mode in Firefox?

While on some pages it's a treat, on others, content is missing. Even in this forum, does anyone see a complete page in Reader View if there more than a couple of posts on the page?

There are more instances reported by others. For example, if you visit and look at a question that has responses, you may see just the question or one answer and nothing else. … er+view%22

#20 Re: Tips, Tricks & Scripts » Firefox/Iceweasel reader mode: How to change the font families » 2015-08-29 04:28:52

hhh wrote:

Sorry about that, my CSS is rusty.

And my knowledge of CSS is minimal. I understand that using * { whatever !important } isn't really recommended. And that it's better to drill down a bit and use something more specific in place of "*".

Edit: removed OT stuff. Will post in a more appropriate area.

#21 Re: Tips, Tricks & Scripts » Firefox/Iceweasel reader mode: How to change the font families » 2015-08-28 17:37:31

ssray23 wrote:

Thanks a ton - syntax errors are gone and I can see the new font color reflect in reader mode.

The line-height value, somehow does not seem to have any effect. I tried multiple values like 12px, 8x, 90%, 110% etc. etc. but none of these seem to have any effect on the default line spacing (quite generous, actually) in Firefox's Reader mode.

No compilation or parsing errors though, thankfully. :-)

Not a big deal right now, but will be good to know if there is any remedy for the line-height property.

@-moz-document url-prefix("about:reader") {
  * {
    line-height: 10px !important;

squishes things for me. Using 50px increases the distance between lines. So I'd say line-height should work. is with line-height 15px

#22 Re: Ideas & Suggestions » Starting an app on a desktop » 2015-08-27 04:29:19

Just to add to damo's recommendation, to get the program's name, you can use xprop or obxprop.

I use an alias:

myxprop='xprop | grep -E "_OB_APP"'

to trim the output of xprop.

I'm mentioning this because sometimes the program's name as required by the <applications> section isn't always "intuitive" and is case-sensitive. Here's what I get for Firefox:

$ myxprop
_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Mozilla Firefox"
_OB_APP_NAME(UTF8_STRING) = "Navigator"
_OB_APP_ROLE(UTF8_STRING) = "browser"

#23 Re: Ideas & Suggestions » How about Fluxbox instead of Openbox for BunsenLabs » 2015-08-04 07:47:59

hudson wrote:
schwim wrote:
hudson wrote:

I'm sorry, but I'm just not going to read it all!

Not to burst your bubble, but I believe the community's Care-O-Meter is at 0 on that.

That's very funny...but, snark is easy on the Internet, isn't it smile

As easy as the sense of entitlement that people must indulge my whims smile

#25 Re: Help & Support (Other) » Compiling Compiz 0.9.4 » 2015-07-18 05:14:50

Have you contacted Martin Wimpress? He's doing a lot of work for Ubuntu MATE (and Compiz).

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.
Server: acrobat

Debian Logo