You are not logged in.
sxhkd was not in /usr/bin. Something is obviously wrong with the package.
Did you have a look into /usr/local/bin as well?
I am not sure that sxhkd can be compiled under Devuan. I therefore gave up, and installed a .deb package that I had compiled under Ubuntu 16.04 before I eschewed systemd.
There is a pre-compiled binary package in Debian Stretch, meaning it is also in Devuan ASCII. So, if you're on ASCII anyway, you could give that a shot. Installing an Ubuntu package sounds like a rather bad idea. If you're on Devuan Jessie, you could instead get the source package from ASCII, use that to build a personal backport and see if it works.
On a side note: Depending on what you're trying to achieve, you might spare yourself the hassle of compiling your window manager (one that "is in active development" (https://github.com/windelicato/dotfiles … or-dummies)) etc. from source. From what I can see, there are nine tiling window managers available through the official package repositories in Devuan Jessie, some of which are surley very lightweight and may suit your needs in a more out-of-the-box-like manner.
Ok, how about commenting out the line starting sxhkd in your .xinitrc, then starting X and running sxhkd from the terminal. There might be error messages.
Upon installing Devuan, I noticed that (unlike with my fresh Debian installations) the "contrib" and "non-free" repositories are enabled by default.
Thanks for bringing this up. The issue is already known: https://bugs.devuan.org/db/19/190.html
Are you on jessie or ascii? And could you post your sources.list?
"Make sure ~/.config/bspwm/bspwmrc is executable." (https://wiki.archlinux.org/index.php/Bs … n.27t_work)
Btw, what's the reason you're trying to use bspwm?
After upgrading from Jessie to Ascii, the Chromium package was held back.
Using apt-get dist-upgrade usually solves that kind of problem for me.
I don't have any experience with bspwm. However, from what I can see in the screenshot, it seems like the window manager is not being started when you start X. Do you have an .xinitrc file in your home directory? If so, what does it look like?
Also, did you build bspwm from source or install it through the package manager (which would be possible in ascii or ceres)?
Here are two pieces I like:
An elaborate blend of ambient music and cut up drum 'n' bass.
Lazerhawk – The King of the Streets
A track of 80s retro-style synth music. I especially like the video the uploader created, not because I'm into cars, but because its visual style is quite different from the sci-fi action comic aesthetic that often goes with this kind of music.
Right. I already noticed this is causing problems when, at one point, the script would not exit the window manager even though I had put all remaining windows on the ignore list. The reason was that one text editor window I was running had a 5-digit process id.
After searching the web for a bit, I found a really neat solution, allowing me to go back to using the initial cut command. As mentioned above, the problem with cut is that it cannot collapse multiple spaces into single ones. But you can have tr do that before you pipe the output to cut:
wmctrl -l -p | tr -s ' ' | cut -d ' ' -f 3
tr -s, as the manual page states, "replace(s) each input sequence of a repeated character (...) with a single occurrence of that character."
Trying to use sed, I realized that it's probably not the right tool for what I want to do here. cut is actually fine. You just have to use it properly, which would mean using cut -c 15-18 in this case.
But then I thought: This is nothing but a simple substring extraction, so there should be a way to do it using parameter expansion. And there is: Once a line printed by wmctrl has been assigned to a variable, you can just use "${line:14:4}", where the first number is the starting position and the second the substring's character count.
I'm not understanding the behavior of cut.
It is a bit strange indeed. Thanks for spotting that.
The problem seems to have two causes: First, the second column of wmctrl's output, which displays the number of the virtual workspace a window is on, has a different width for sticky windows (those that are visible across all workspaces), since they are identified by a value of -1. (The same goes for windows with a workspace number above 10.)
Then, as ralph.ronnquist has already pointed out, cut -d " " doesn't seem to collapse multiple spaces into one. What it seems to do instead is a bit weird: If there is only one space between two printable character strings, it obviously takes that space as a delimiter, e.g.:
$ var1="one two"
$ echo "$var1" | cut -d " " -f 1
one
$ echo "$var1" | cut -d " " -f 2
two
But if there's more than one space, cut seems to count the first one as a delimiter only, but the following ones each as both a delimiter and a field, so:
$ var1="one two" # 3 spaces inbetween
$ echo "$var1" | cut -d " " -f 1
one
$ echo "$var1" | cut -d " " -f 2 # will print the 2nd space
$ echo "$var1" | cut -d " " -f 3 # will print the 3rd space
$ echo "$var1" | cut -d " " -f 4
two
There seems to be no way to have wmctrl not show the second column, so the script should rather use sed with a regular expression instead of cut there. I'll change that.
As I've already mentioned over there, I've been working on a Bash script that will display a warning dialog in case the user tries to exit the window manager when there are remaining open windows.
The whole thing is sort of finished for now, though it surely requires some additional tweaks and fixes. The source can be found at https://github.com/msiism/desktop-scripts.
Testing results (though there's not really much to test there) and comments on the code would be much appreciated. I've been using it without a problem up until now.
Two additional remarks: While the README file on GitHub states the script can currently be used with Openbox or JWM only, it should be able work with any window manager that can be queried by wmctrl and offers an exit switch as a command line option. It would simply have to be added. Also, I deliberately chose xmessage for the GUI for two reasons: One, it's part of X and doesn't depend on anything else. Two, my plan is to expand and re-write the whole script in Python and use Tk for the GUI eventually. So it doesn't have to look totally beautiful yet.
The script has already seen a good deal of changes since my initial post, mainly because I found out I was making some structural mistakes. I'll try to get it into a presentable shape as soon as possible, put it on GitHub and post a link on this forum.
Nested checks or not, I expect it would need "special case" exceptions handling. For instance, conky "use_own_window=true" would need to be recognized, and handled (whitelisted)...
Because you don't want to be warned about that conky window, right? A list of programs to ignore can be provided through command line parameters.
and, can I really hang my hat on, and trust, who a given window is "owned by"? What about text editor instance(s) launched as sudo to edit config files?
They will be handled like any other remaining window.
What about any long-running windowless processes I may have running (as me, or as sudo) that I've forgotten about?
Can you give an example? I know that xmobar, which I use for system monitoring, is not recognized as a window by wmctrl. But that's the way I'd want it anyway.
I hear ya about "oops, dangit!", but I would skip the prone-to-failure guessing/checking and just wire an unconditionally triggered yad or xdialog prompt inline with the desktop session exit script.
Openbox actually has that. It asks for confirmation before it exits (unless you run openbox --exit directly). My issue with that is: If there are no remaining open windows (of possible interest), I don't want to be asked for confirmation. However, if there are, I want to be warned about that. In my experience, that really makes a difference.
Just reposting this Howto here from http://188.26.90.203:8888/w/devuan-jess … o-v1.1.txt.
HOW TO RUN LINUX DEVUAN JESSIE WITH /dev/rtc ON LOCALTIME
by: Peter P. / _abc_ / ccbbaa @ irc.freenode.net
version: 1.1 - tested on one system, works fine, small fixes, terser
In this document tz is an abbreviation for timezone, and TZ is a variable set
to the local timezone.
1. The problem:
Using RTC in local time is discouraged by manual pages and howtos, yet, people
need it, for dual boot and other reasons. It is not at all clear how to do this
even for experienced users. "Don't do it" is not the correct answer.
1.1 Initial Outcome (broken):
- RTC set to local time displays correct time in the linux system only when TZ
is set to UTC. Otherwise, the time offset of the TZ is added even if
/etc/adjtimex is set to LOCAL and /etc/timezone is ln -s to the proper tz
file.
- This leads to insanity soon enough, especially when working remotely and or
comparing remote log dates. Both for humans and for software. Note that all
date etc commands show the correct time, but the wrong tz. tz based
arithmetic will always be broken, like "how long ago was that server event on
a different tz" when analyzing logs and or determining whether a host is up
or down. Also lots of fun when working remotely with ssh on a different tz
machine etc.
- In addition to the above, using a set TZ causes the hw clock to be set wrong
upon rebooting, i.e. the system hw clock will be changed in unwanted ways.
2. The solution (for the impatient):
As root edit /etc/default/hwclock and add the line:
export TZ="Europe/Bucharest"
(run tzselect to find the proper tz name)
sudo rm -f /etc/timzone
sudo ln -s /usr/share/zoneinfo/Europe/Bucharest /etc/timzone
(edit location exactly as above, at TZ=...)
edit /etc/adjtimex and change the 3rd line from UTC to LOCAL
edit /etc/profile /etc/skel/.profile and all user /home/$user/.profile
files and add at the end:
if [ -z "$TZ" ] && [ -r /etc/default/hwclock ]; then
. /etc/default/hwclock
fi
-- done -- a reboot is required (see below why at [**]). You MUST set the
rtc properly to local time while rebooting. Stop in BIOS setup and set it.
Note that DST can cause problems with this system if you skip any steps.
2.8 There seems to be a bug in hwclock with at least kernel 3.16.0-4-686-pae
(current devuan jessie):
hwclock --show --utc run under the conditions above, shows the WRONG time,
specifically, it applies the tz related offset positively. Example: Europe/
Bucharest is 2 hours ahead (+120mins) of UTC. When running in localtime RTC
as set up above, the command:
hwclock --show --utc
displays a time 2 hours ahead (+120mins) of LOCAL time! This is clearly a
sign error somewhere in hwclock(8) or in the kernel.
3. Explanation
The kernel and hwclock and hwclock.sh scripts changed several times, at least
once or twice due to systemd's appearance. This broke several things and was
sort of fixed several times along the times since ~2011 until today. And it
continues to be a moving target.
The following things happen during boot time script execution:
- the kernel copies the rtc time to the kernel time some time during boot [*]
- later /etc/init.d/hwclock.sh start is executed. This will source
/etc/default/hwclock for settings, and then run hwclock --hctosys, BUT this
does not happen if udevd is running. If udevd is detected as running, then
/etc/init.d/hwclock.sh start does nothing! Instead, udevd triggers
/lib/udev/hwclock-set at some time it likes (!) based on other rules too.
- /lib/udev/hwclock-set reads /etc/default/hwclock and then runs the following
key commands, importantly, the 1st 1-2 times after boot [**]
/sbin/hwclock --rtc=$dev --systz
/sbin/hwclock --rtc=$dev --hctosys
- as an interesting factoid, the kernel marks the moment when it, itself, copies
the rtc to the system clock using the sysfs. This may be important for RTC
less systems like rpi where this is an important clue to need to copy the
time in from some other source later, but is unrelated to the present issue:
/sys/class/rtc/rtc0/hctosys contains 1 if rtc copied to sys
- what our humble edit above does, adding export TZ="thetimezone" in
/etc/default/hwclock , is: we inject an environment variable into the env
of /sbin/hwclock when executed by /lib/udev/hwclock-set and then the hwclock
does the right thing, setting the kernel's timezone once per boot, when it is
FIRST executed [**]. Note /lib/udev/hwclock-set locks itself out from running
again by writing a lock file in /var/run . Therefore, this cannot be done
at any later time, i.e. from user mode, and it is probably not safe to change
the kernel tz in a running system at any time, since the developers said so,
and I am not about to prove them wrong [**]
- the remaining bug wrt hwclock --show --utc was probably introduced while other
things were fixed. Since the source of hwclock from util-linux contains cruft
dating back to at least 1995 (I looked), I cannot propose a quick fix, maybe
the maintainers could take a look. Anyway, it is a minor bug.
The stars:
[*] see the bug thread below for details
[**] the nightmare which requires this is explained briefly in the hwclock
manpage at or near --systz , and also in man settimeofday(2) C system
function manual, and is also touched upon in this horrible systemd
related thread (linked courtesy of KatolAZ on #devuan at irc.freenode.net)
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855203
I'm working on a Bash script that will display a warning dialog in case the user tries to exit the window manager when there are remaining open windows. The reason I'm doing this is that I use Openbox stand-alone without any task bar and it has happened to me time and again that I, e.g., lost notes from text editor windows that I had minimized or moved to another workspace at some point and then forgotten about.
Because I want this to be a sane script, I've created a function that performs some environment checks after the command line parameters have been processed and before any of the main script is being executed.
Currently, that function looks like this:
# Perfom environment checks
function f_check_env {
# Check if wmctrl can be found (and executed)
if [ ! -x "$(type -p wmctrl)" ]
then
return 1 # Leave function with error code 1: wmctrl not found
fi
# Check if given window manager is supported
local wm_supported=0
for item in "${wm_list[@]}"
do
if [ "$item" = "$wm" ]
then
wm_supported=1
break
fi
done
if [ "$wm_supported" != 1 ]
then
return 2 # Leave function with error code 2: $wm is not supported
fi
# Check if given window manager can be found on the system (and executed)
if [ ! -x "$(type -p "$wm")" ]
then
return 3 # Leave function with error code 3: $wm not found
fi
# Check if given window manager is currently being run by the current user
if [ ! "$(ps -u "$(whoami)" | grep "$wm")" ]
then
return 4 # Leave function with error code 4: $wm is not currently
# being run by the user executing this script
fi
}
A bit of explanation: wmctrl is a tool that can be used to query and control EWMH/NetWM compatible window managers. I use it to get a list of existing windows at a later point in the script. wm_list is an array containing a list of all the window managers that the script can work with.
Now, I have two questions about this function:
1. Wouldn't it be better to nest all the checks performed there instead of having them as independent blocks? One advantage of nesting I can think of is that it would enable me to put else return 0; fi at the end of the function return 0 into the innermost else statement, which would then be executed if no error condition is met.
2. Is there anything wrong with how I'm using error codes? The function's return value will be dealt with in a case statement later, containing the messages corresponding to the error codes.
Using GParted to resize the partitions has been successful, only that there is 1MB of unallocated space left over from shrinking the root partition:
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 403455 401408 196M 83 Linux
Free space 403456 405503 2048 1M
/dev/sda2 405504 29394943 28989440 13,8G 83 Linux
/dev/sda3 29394944 33300479 3905536 1,9G 82 Linux swap / Solaris
/dev/sda4 33300480 625141759 591841280 282,2G 83 Linux
Couldn't you boot off a USB memory stick which has gparted, so that your real disk is not mounted. Then you can use gparted to shrink a partition and move it/them up to give you the room to grow sda1.
Thanks for the hint. I've looked into that and it's really a far better idea and a lot easier than what I was going to try. (I would have used a live system to work on the disk, though.)
I should probably include a warning about backing up...
I wouldn't dare doing anything like that without a backup.
Yes, that fixes it. Thanks a lot!
Ok, I checked this.
For the terminal started directly calling /usr/bin/urxvt, the output is:
WM_CLASS(STRING) = "urxvt", "URxvt"
If I run x-terminal-emulator, I get:
WM_CLASS(STRING) = "x-terminal-emulator", "URxvt"
I'm unsure what to make of this, however.
I'm planning to upgrade my main system to ASCII, but there's a problem with my partition scheme that I'd also like to solve. Making a fresh installation instead of upgrading would give me the opportunity to do that, but I don't want to spend time installing again all the software I use and re-configuring it. That's just tedious, even with all the configs in your backup.
The problem with my partition scheme is this: When I originally installed the system, I chose to create a pretty small boot partition (50MB). That has already turned out as a bad decision on the current system. And as the Linux kernel will probably continue to get bigger, I think I really shouldn't leave it like that.
Now, all my partitions are primary partitions and together they make use of all the space available on my hard drive. So, resizing anything there won't be too easy. The possible solution I've come up with is as follows:
First, here's my current partition scheme:
NAME MOUNTPOINT SIZE
sda 298,1G
├─sda1 /boot 47M
├─sda2 / 14G
├─sda3 [SWAP] 1,9G
└─sda4 /home 282,2G
What I would want to do is give 100-150MB more to the boot partition. Those could easily be taken from my half-empty root partition. So, what if I made a backup of both (using rsync), then used fdisk to delete them, then used fdisk again to create a boot partition at the beginning of the drive that is 100-150MB bigger as well as a root partiton taking up the rest of the space between the boot and swap partitions and finally played in the backups?
I can't think of any reason for which that shouldn't work generally. But there are probably some dangers and caveats. For example, I'm unsure if it will cause any trouble if I use ext4 as the file system on the new root partition instead of ext3, which is being used on the current one.
Yes, but don't install everything in backports - that could get you into big trouble. Just download what you need and comment that repo again.
IIRC, you shouldn't actually have to deactivate the repo again, as nothing should be pulled from backports automatically, except for updates of those packages you've installed from that source. Maybe someone can confirm that.
After reading about X terminal emulators recently, I switched from XTerm to RXVT – rxvt-unicode-256color, to be exact, so that Vim color themes would be displayed nicely.
Now, I was trying to set this as the default X terminal emulator, using update-alternatives:
# update-alternatives --config x-terminal-emulator
There are 5 choices for the alternative x-terminal-emulator (providing /usr/bin/x-terminal-emulator).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/lxterm 30 auto mode
1 /usr/bin/koi8rxterm 20 manual mode
2 /usr/bin/lxterm 30 manual mode
3 /usr/bin/urxvt 20 manual mode
4 /usr/bin/uxterm 20 manual mode
5 /usr/bin/xterm 20 manual mode
Press enter to keep the current choice[*], or type selection number:
Number 3 seems to be the right choice here, so I selected it and hit enter. But if I use x-terminal-emulator instead of /usr/bin/urxvt now to start the terminal, the configuration (colors, fonts) in my .Xresources file is being ignored and I'm presented with a small white box containing a bit of tiny text in an ugly font and an ugly scroll bar on the left on top of that.
That's pretty strange, because x-terminal-emulator should do nothing but point to /usr/bin/urxvt, which it does. How is it possible then that I get a fully configured RXVT when running /usr/bin/urxvt directly, but not when running x-terminal-emulator?
I'm on Jessie, FWIW.
I've made a small website that will allow anyone to see the codes used for the various MiyoLinux Accessories...in case they would like to use them on their own system or distro.
[...]
http://miyolinux.weebly.com/
Very interesting, especially the Control Center and OB Menu Generator scripts! I've been thinking a lot about putting together a clean and lean desktop environment around Openbox lately and these things look very inspiring. Unfortunately, I still lack any serious programming skills. Also, I would not be able to use Yad, since the list of design dogmas I've come up with so far includes "Thou shalt have no GTK3 UI".
I'm not a fan of the various "Git-hubaloo" sites, so I made this site instead.
But contrary to weebly, "Git-hubaloo" let's you navigate the site without having to allow third-party (or any) Javascript code to be executed and also offers version control and collaboration features, which is very useful.
If anyone is interested in using any of these, feel free to do so. I have no concern as to whether you acknowledge MiyoLinux or not...
I suppose, the best way to communicate that would be putting the code under an appropriate license. You could maybe use the WTFPL if that suits your taste.
But, maybe, after init freedom there comes bootloader freedom (by way of a menu to select from in the Debian Installer).
I've just found out that you can actually choose LILO over GRUB in the expert installation. So, I tried LILO. It takes ages to boot now, but it works.
As good as your intentions appear to be, I think you've kind of put your foot in it with this ad.
To be honest, I find it amusingly off, which is why I've chosen to reply in the end. (I was going to ignore the whole thing at first.) So, let's evaluate this – at least some of it.
As a preliminary remark: If at any point I should come across a bit cynical or nitpicky, don't take offense. I'm just trying to clarify what's wrong with your approach to the best of my knowledge (some of it newly acquired while writing this).
1. "I boot classically"
What's that supposed to mean? Presumably, using SysVinit. But Devuan is not about booting classically, it's about booting reasonably. Therefore, it's not about using SysVinit in particular, but about offering the freedom not to use systemd and, ultimately, to use a variety of reasonable init systems. As a first step towards that, OpenRC will be available as an alternative to SysVinit through the expert install in ASCII.
And then, booting also involves a bootloader, doesn't it? Devuan, like most Linux systems these days, uses GRUB. And while it's also possible to use something else, there'd be some tinkering involved there. But, maybe, after init freedom there comes bootloader freedom (by way of a menu to select from in the Debian Installer). Anyway, you'd probably tread on quite some people's toes going out and suggesting that GRUB is the classic Linux bootloader. Before it, there was LILO, which had been the de-facto standard bootloader for Linux systems from the release of Linux 1.0 in 1994 up until the early 2000s. Additionally, there are a bunch of other bootloaders available for Linux systems, SYSLINUX (which is actually a bundle of different bootloaders) being one of the more prominent ones.
2. "I use SysVinit"
See above.
3. "I browse the internet"
First, it should be "browse the web", not the "the internet".
The second problem here is that you're advertising Firefox as Devuan's way of browsing the web. Despite Firefox being part of the default desktop installation, this is not the best idea – for two reasons. First, there are at least five other (graphical) browsers in the package repositories for Jessie and some people might occasionally choose to use a console browser like Lynx or w3m. And second, quite some people involved with Devuan are seeking refuge from what Firefox has become (including me). There has been some discussion about this on this forum, too. For example, see:
Life after Firefox – https://dev1galaxy.org/viewtopic.php?id=672
The hunt for a good browser 2017 edition – https://dev1galaxy.org/viewtopic.php?id=1697
Firefox Quantum – https://dev1galaxy.org/viewtopic.php?id=1728
Then, just two days ago, the documentation team has put up a list of alternative browsers – basically meaning: alternatives to Firefox and Chromium – on the Friends of Devuan Wiki.
3. "I am always new and secure"
I would never trust any operating system vendor telling me that the system they provide is "always new and secure". Luckily, the Devuan project has never done that and I'm pretty sure it never will. Why? Because there's something fundamentally wrong with making such a claim. Everybody who knows a few bits about software – and believe me, I'm really not an expert – also knows that there is no such thing as "always secure". While Devuan's current stable release is very stable from what I can tell, this doesn't make it secure per se. Security depends very much on how responsibly you run a system. Also, there's no fits-all solution to make a system secure, because, one, there are several aspects to security that might not be able to coexist easily, two, the meaning of "secure" may vary across different use cases.
Additionally, being "always new _and_ secure" is kind of self-contradictory. There's a reason that, for example, Debian has an unstable, a testing and a stable branch. And that reason obviously is that new software, especially when it is supposed to work smoothly in an environment as diverse as a general-purpose or "universal" operating system, often needs extensive testing.
Generally, I'd say that being new is not a reasonable category for evaluating software at all. What really counts for software is, I think: being mature and stable, getting things done efficiently and getting bug fixes deployed in proper time. (Ok, you might, for what it's worth, consider the latter as a form of being "always new" as long as there are bugs to fix.)
And if there's one thing you can definitely name a drawback of using Devuan, it is that the software packaged for the stable release is rather dated. For example, nano 2.2.6, which is in Devuan Jessie, doesn't even have the undo/redo functionality that was introduced with version 2.4 in March 2015. This is because creating and maintaining a fork is a time-consuming effort. However, this doesn't mean Devuan will always drastically lack behind. Further optimization might bring it pretty close to Debian's release cycle in the future. This is already evident if you compare the length of the time period between the release of Debian 8.0/Jessie and the Devuan 1.0.0./Jessie beta to that between the release of Debian 9.0/Stretch and the Devuan 2.0.0/ASCII beta: Debian 8 was released in late April 2015, the Devuan 1.0.0 beta release followed 19 months later, on the 1st of December 2016. Debian 9 was released in mid June 2017 and, this time, the corresponding Devuan 2.0.0 beta followed only 8 months later on the 14th of February, which is already less than half the time it took to put out the Jessie beta.
By the way, Devuan's software not being "always new" is also pretty much exactly the reason why you would download the latest and greatest version of LibreOffice from their website rather than install it from Devuan's package repositories – "if you're a technology enthusiast, early adopter or power user", that is. But if you do that in a presentation, you should seize the opportunity to demonstrate how to handle these things correctly, which would include getting the checksums and PGP signature for the package you've dowloaded and verifying it before you execute it. (They are clevery hidden under the "Info" link beneath the yellow "DOWNLOAD" button.) You should actually never execute unverified software on your working system if you have a choice.
4. "I can do anything"
Bold claim. Well, it includes "I can crash badly", when you think about it. Still, you may want to insert "virtually" there and explicitly restrict that to operating systems.