Thanks

Non-tech-support topic may be discussed here. Discussions on religion and politics are not allowed. This area is intended for fun and community building, not arguments; Please take those elsewhere.
rufwoof
Posts: 21
Joined: Thu Sep 15, 2016 10:49 am

Thanks

Post by rufwoof »

First post. Just like to say thanks to all those involved with LXDE development and support.

Installed Debian Stable (Jessie) 64 bit KDE ... and Libre Office focus didn't work as expected (had to repeatedly reach for the mouse to bring new dialogs into focus). Installed Gnome desktop ... and the fonts were uncomfortable with prolonged use. Debian Jessie LXDE .... is great. Nice and clear, snappy and works well. No doubt Debian stable version of LXDE is a older version, but it works fine. Panel Settings with a number of Application Launch applets is a bit awkward to distinguish between which one is for which application (I've set it up to have 1:1 pairing). Launching some programs with no 'hourglass' or other 'launching' type indicator tempts you to repeatedly try and launch some programs that take a while to actually load (I've added a script to put out a xxxx is loading type message for each individual slow to load program). Other than that ... delighted.

Thanks again.
Attachments
Screenshot.jpg
Screenshot.jpg (56.92 KiB) Viewed 6409 times
Rex Bouwense
Posts: 1093
Joined: Sat Aug 27, 2011 5:44 pm
Location: Sierra Vista, Arizona USA
Contact:

Re: Thanks

Post by Rex Bouwense »

Welcome to the LXDE forum. I am super glad that you find the LXDE desktop to your liking. This is a small forum dealing of course with just the desktop environment and an even smaller group of regulars who contribute. I would invite you to make a contribution when you can.
Rex
rufwoof
Posts: 21
Joined: Thu Sep 15, 2016 10:49 am

Re: Thanks

Post by rufwoof »

Rex Bouwense wrote:Welcome to the LXDE forum. I am super glad that you find the LXDE desktop to your liking. This is a small forum dealing of course with just the desktop environment and an even smaller group of regulars who contribute. I would invite you to make a contribution when you can.
Thanks Rex. With LXDE out of Debian Stable repository working so well I wont have much to post/write about :) I've bookmarked the board/forum and will periodically drop in.
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Thanks

Post by drooly »

cool!
say thanks to debian developers, too!

--------
rufwoof wrote:Launching some programs with no 'hourglass' or other 'launching' type indicator
strange, openbox should be capable of doing this:

Code: Select all

    <keybind key="W-w">
      <action name="Execute">
        <command>my browser</command>
        <startupnotify>
          <enabled>yes</enabled>
          <name>Web Browser</name>
        </startupnotify>
      </action>
    </keybind>
you should investigate your lxde-rc.xml, openbox documentation and whether startup-notification is actually installed.
rufwoof
Posts: 21
Joined: Thu Sep 15, 2016 10:49 am

Re: Thanks

Post by rufwoof »

Thanks Drooly. Tried your code in lxde-rc.xml and made no difference. Hunting around further and it looks like Debian Stable uses openbox 3.5.2 whilst there are some references that suggest startup notification was fixed in 3.5.2-3 so it looks like the current Debian stable choice excludes the fix.

Other program launching does show a busy type cursor (spinning circle on mine) such as PCManFM
rufwoof
Posts: 21
Joined: Thu Sep 15, 2016 10:49 am

Re: Thanks

Post by rufwoof »

As a workaround, I created a copy of the firefox.desktop (that I called /usr/share/applications/firefox-with-splash.desktop) that calls a python script. Exact same content except for the Exec line that reads

Exec=/usr/local/bin/firefox-splash_wrapper.py %u

Note that you need wmctrl to be installed

sudo apt-get install wmctrl

I've swapped out the prior Panel icon that uses firefox.desktop to now use that new version.

The new scripts (that needs to be made executable) are as follows :

/usr/local/bin/firefox-splash_screen.py

Code: Select all

#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, Pango

class Splash(Gtk.Window):

    def __init__(self):
        Gtk.Window.__init__(self, title="splashtitle")
        maingrid = Gtk.Grid()
        self.add(maingrid)

        image = Gtk.Image()
        # set the path to the image below
        image.set_from_file("/usr/share/icons/nuoveXT2/48x48/apps/firefox.png")
        maingrid.attach(image, 1, 0, 1, 1)

        maingrid.set_border_width(40)
        # set text for the spash window
        label = Gtk.Label("Firefox loading ...  ")
        label.modify_font(Pango.FontDescription('Ubuntu 15'))
        maingrid.attach(label, 0, 0, 1, 1)

def splashwindow():
    window = Splash()
    window.set_decorated(False)
    window.set_resizable(False)
    window.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(0,0,0,1))
    window.modify_fg(Gtk.StateFlags.NORMAL, Gdk.color_parse("grey"))
    window.set_opacity(0.8)
    window.set_position(Gtk.WindowPosition.CENTER)
    window.show_all()
    Gtk.main()

splashwindow()
/usr/local/bin/firefox-splash_wrapper.py

Code: Select all

#!/usr/bin/env python3
import subprocess
import time

# Rufwoof note :
# needs sudo apt-get install wmctrl
#

# set the application below
application = "firefox-esr"
# set the path to the splash script below
path = "/usr/local/bin/firefox-splash_screen.py"

subprocess.Popen([application])
subprocess.Popen(["python3", path])

while True:
    time.sleep(0.5)
    try:
        pid = subprocess.check_output(["pidof", application]).decode("utf-8").strip()
        w_list = subprocess.check_output(["wmctrl", "-lp"]).decode("utf-8")
        if pid in w_list:
            splashpid = [l.split()[2] for l in w_list.splitlines()\
                         if "splashtitle" in l][0]
            subprocess.Popen(["kill", splashpid])
            break
    except subprocess.CalledProcessError:
        pass
Note that I've hard coded filenames (application = value) and icons (image.set_from_file value)

I repeated that for a couple of other slower to start programs (namely Skype and MasterPDFEditor3). Really I should have parameterised the script but I just created individual copies for each.

So now when I click the firefox icon in the panel up pops a dialog to show that firefox is loading ... and once the firefox window is opened then that dialog gets killed off (disappears).

Libre (another slow to load) in my installation has its own splash screen, so I didn't have to include that. The rest of the programs I use tend to be near instant at loading anyway.

Attached image shows a copy of the skype version (I've since added also showing the skype icon within that dialog since that image was captured, which the above code includes).

BTW that's not my code : I copied it from here http://askubuntu.com/questions/702762/h ... ram/702789
Attachments
Screenshot.jpg
Screenshot.jpg (22.13 KiB) Viewed 6373 times
rufwoof
Posts: 21
Joined: Thu Sep 15, 2016 10:49 am

Re: Thanks

Post by rufwoof »

Debian are strict about open-source, however their official web site does include ISO's that include non-free firmware by default. The following are the LXDE versions of Debian's current stable (Jessie) live CD versions :

64 bit http://cdimage.debian.org/cdimage/unoff ... onfree.iso

32 bit http://cdimage.debian.org/cdimage/unoff ... onfree.iso

Which is sensible, as otherwise if your PC doesn't have the firmware (i.e. is non-free firmware dependent) to connect to the internet there's otherwise no way to connect to the internet to get those firmware/install things.

Personally I run a frugal install of that. I downloaded the ISO and extracted the /live folder out of that into a empty partition (ext3 format in my case) on my HDD, and set the boot flag of that partition ON and gave it a Label of 'persistence'.

I installed grub4dos to that partition (bootloader) and edited the menu.lst file to contain

title Debian Jessie Frugal RO only
find --set-root /debian-usb
kernel /live/vmlinuz boot=live config rw rw-basemount nofastboot persistence persistence-read-only persistence-label=persistence quickreboot noprompt showmounts live-media-path=/live/ config quiet silent splash
initrd /live/initrd.img

Note that I created a empty file called debian-usb in the root of that partition for grub4dos to find

touch /debian-usb

If you replicate that but without the peristence-read-only parameter then the session will boot read-write and save all changes as they occur to disk. As above it will boot and read prior preserved changes, but only record changes in memory, that are lost at shutdown/reboot. I like running in such a read-only mode for testing things out, such as installing/trying packages or changes, knowing that a reboot has all of those experiments undone.

I also have another script that when run flushes all changes recorded in memory to disk (makes them persistent). So if I'm in a read-only session and make some changes that I'd like preserved I can just run that script.

Initially running read/write is good for setting things up. But once set up you can switch to booting read-only mode, so you boot the exact same system each and every time. And if any virus is caught during a read only session then that's removed after a reboot. The downside is that any changes are lost, so you have to store docs/files in a different location (disk/partition).

Running that way and the same single partition is used for booting (menu.lst and grub), the main filesystem (/live folder) and as a preservation of changes storage (persistence). A benefit of running from a squashed (compressed) filesystem (/live/filesystem.squashfs) is that generally compression halves the size, so half as much IO at the expense of having to decompress. Combined however half size IO and decompression is faster than twice as much IO of non-compressed, so overall things are quicker. That said I have switched to fully extracting the content of the filesystem.squashfs into the / folder and I recreated a empty filesystem.squasfsh, so now its more like a conventional full install. I did that because Debian sometimes update the kernel and having it arranged as a full install better ensures that such updates are installed OK.
rufwoof
Posts: 21
Joined: Thu Sep 15, 2016 10:49 am

Re: Thanks

Post by rufwoof »

Just added a hot corner type action to Debian Jessie LXDE, where if you push the mouse to the bottom left (or any other corner you choose, I have my panel at the top of screen so bottom left for a hot corner is the better choice for me) you see a small preview of the desktop and all open apps spread out so you can select to activate that app.

Install skippy-xd I grabbed a .deb from http://main.mepis-deb.org/mx/repo/pool/ ... skippy-xd/ and installed by running

install dpkg -i skippy*.deb
apt-get -f install

edit ~/.config/openbox/lxde-rc.xml

Just after the keyboard and chainQuitKey section

Code: Select all

<keyboard>
  <chainQuitKey>C-g</chainQuitKey>
add the keybind

Code: Select all

<!-- Launch skippy -->
  <keybind key="A-w">
      <action name="Execute"><command>skippy-xd</command></action>
  </keybind>
... which attaches skippy to a manual key combination of ALT-w

In Synaptic install brightside

in a terminal run brightside-properties

for the desired corner set a custom action of skippy-xd. Before you close that dialog activate the bottom two alternative actions one at a time and set their respective delay slider all the way down to zero (left) and deactivate them again. Oddly the response of the hot corner is much quicker if you do that (despite them being inactive functions!!!).

Next add

@brightside

to /etc/xdg/lxsession/LXDE/autostart so it starts at reboot.

Create a folder ~/.config/skippy-xd and within that create a skippy-xd.rc file containing :

Code: Select all

# Copy this to ~/.config/skippy-xd/skippy-xd.rc and edit it to your liking
#
# Notes:
#
# - colors can be anything XAllocNamedColor can handle
#   (like "black" or "#000000")
#
# - distance is a relative number, and is scaled according to the scale
#   factor applied to windows
#
# - fonts are Xft font descriptions
#
# - booleans are "true" or anything but "true" (-> false)
#
# - opacity is an integer in the range of 0-255
#
# - brighness is a floating point number (with 0.0 as neutral)
#
# - if the update frequency is a negative value, the mini-windows will only
#   be updated when they're explicitly rendered (like, when they gain or
#   lose focus).
#
# - the 'shadowText' option can be a color or 'none', in which case the
#   drop-shadow effect is disabled
#
# - Picture specification:
#   [WIDTHxHEIGHT] [orig|scale|scalek|tile] [left|mid|right] [left|mid|right]
#   [COLOR|#FFFFFFFF] [PATH]
#
#   Examples:
#   background = 500x400 tile right mid #FF0000 /home/richard/screenshots/256.png
#   background = orig mid mid #FF000080
#
# - Bindings in [bindings] section can bind to "no" (do nothing), "focus"
#   (focus to window), "iconify", "shade-ewmh" (toggle window shade state),
#   "close-icccm" (close window with ICCCM method), "close-ewmh" (close
#   window with EWMH method), or "destroy" (forcefully destroy the window).
#

[general]
distance = 50
useNetWMFullscreen = true
ignoreSkipTaskbar = true
updateFreq = 10.0
lazyTrans = false
pipePath = /tmp/skippy-xd-fifo
movePointerOnStart = false
movePointerOnSelect = false
movePointerOnRaise = false
switchDesktopOnActivate = false
useNameWindowPixmap = false
forceNameWindowPixmap = false
includeFrame = true
allowUpscale = true
showAllDesktops = false
showUnmapped = true
preferredIconSize = 48
clientDisplayModes = thumbnail icon filled none
iconFillSpec = orig mid mid #00FFFF
fillSpec = orig mid mid #FFFFFF
background =

[xinerama]
showAll = true

[normal]
tint = black
tintOpacity = 0
opacity = 200

[highlight]
tint = #101020
tintOpacity = 64
opacity = 255

[tooltip]
show = true
followsMouse = true
offsetX = 20
offsetY = 20
align = left
border = #ffffff
background = #404040
opacity = 128
text = #ffffff
textShadow = black
font = fixed-9:weight=bold

[bindings]
miwMouse1 = focus
miwMouse2 = close-ewmh
miwMouse3 = iconify
Reboot (or log out and back in again) and push the mouse to the bottom left corner (or whichever corner you set) to see what happens. Should look something like the attached image where all the open windows are spread out and available to have one clicked to be brought into focus.
Attachments
s.jpg
s.jpg (36.9 KiB) Viewed 6346 times
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Thanks

Post by drooly »

rufwoof wrote:Thanks Drooly. Tried your code in lxde-rc.xml and made no difference. Hunting around further and it looks like Debian Stable uses openbox 3.5.2 whilst there are some references that suggest startup notification was fixed in 3.5.2-3 so it looks like the current Debian stable choice excludes the fix.

Other program launching does show a busy type cursor (spinning circle on mine) such as PCManFM
my code was meant as an explanation & inspiration, not as a fix.

i had a slightly closer look at startup notifications; they don't seem to work on my system either. sorry.

nice workarounds you found there, and thanks for sharing!
rufwoof
Posts: 21
Joined: Thu Sep 15, 2016 10:49 am

Re: Thanks

Post by rufwoof »

drooly wrote:I had a slightly closer look at startup notifications; they don't seem to work on my system either. sorry.

nice workarounds you found there, and thanks for sharing!
Thanks Drooly.

Libre was the oddity for me in showing a splash screen whenever you start calc/writer ...etc. Since having added that workaround having firefox, skype, masterpdfeditor3, chromium ....also (optionally) showing splash screens works well IMO, quite like it now. Doubles up on the number of .desktop files though for those programs (firefox.desktop and firefox-with-spash.desktop for instance).

I've posted a highlight over on the Debian forum http://forums.debian.net/viewtopic.php?p=624896#p624896 but given that the problem looks to have been evident for years, but the current September 2016 stable repository is still at Openbox 3.5.2 and not moved on to 3.5.2-3 that apparently fixes the problem .... don't hold your breath whilst waiting :)
Locked