You are not logged in.
Okay so, even stranger....
Last night when I got home and started messing with it, I decided to double-check whether quoting changes would help, and I must never have tried replacing the single-quoted string in the .desktop with double quotes, and lo and behold it fixed it! but....
1. I don't know why that would fix it and would really like to understand why...no biggie but....
2. I have an almost identical extension that works the same way only it provides a "rotate image" function instead of re-sizing, so after fixing the first one I thought YAY this should fix the other too...but it didn't, still fails on spaces in file/folder names...what the actual heck???
Here's the new re-size .desktop and it works perfectly, zero issues now:
[Desktop Entry]
Type=Action
Name=Resize Image
Comment=Shrink image and convert to jpg
Icon=edit-cut
Profiles=resize;
[X-Action-Profile resize]
Exec=sh -c "cd %d && shrink2 %f"
MimeTypes=image/bmp;image/jpeg;image/png;And here's the .desktop for the rotater,did the same thing, changed the single quotes to double quotes, again the only change I made:
[Desktop Entry]
Type=Action
Name=Rotate Image
Comment=Make rotated copy of image
Icon=edit-redo
Profiles=rot;
[X-Action-Profile rot]
Exec=sh -c "cd %d && rot %f"
MimeTypes=image/bmp;image/jpeg;image/png;As you can see, pretty much identical...dunno why it won't work here when it did on the other...here's the script for the rotater:
#!/bin/sh
rotbox=$(yad --fixed --window-icon=edit-redo --form --title="Rotate Image" --field="Rotate:":CB --width=300 --text-align=center --text="Select rotation (clockwise, in degrees)" '90!180!270')
rot=$(echo $rotbox | awk 'BEGIN {FS="|" } { print $1 }')
convert $1 -strip -rotate "$rot" -set filename:copy '%t-rotated.%e' '%[filename:copy]'
# Depends: yad, imagemagick
# (note: later versions of imagemagick may require a different command than 'convert')
# DESCRIPTION:
# This script makes a copy of an image file (JPG, BMP, PNG), rotates the copy to
# selection entered in yad dialog (90, 180 or 270 degrees clockwise), adds "rotated" to
# the original filename, and outputs the copy into the same directory as the original.
# It is intended to be used with a .desktop file for activation in PcmanFM to offer a "Rotate Image"
# option when you right-click an image file, but can also be used in terminal: rot [img file]Thanks y'all!
First thing I tried was all kinds of quotes around the %f and %d and didn't work for me, but will go back and try again to be sure, normally that works in terminal but seems like it wouldn't work here because the entire command string is quoted.
@dice: cd is to first change the directory to current one, or it will drop all output into the home folder regardless of what directory you're in.
Okay, just tried the recommended double quotes again, still no joy.
@Golinux: Hi there Lady! Hope all is well down there, FYI we may be moving back home soon, so maybe i'll get to see ya! ;-)
Hey guys, been out of touch for a long time now, big moves, covid, etc. been getting in the way of my linux'ing...anyhoo, had a question about some extensions i've been using and working on again and need some help if anybody has time. I'm still a terrible rookie coder, lol, trying to leanr more though.
Here's the main one, it's a right-click context menu extension for pcmanfm that re-sizes pics using imagemagick for the backend and yad, super-handy and fast, and works perfectly...except...spaces in file or folder names break it, and can't seem to fix it with usual methods. I can finagle it into working with spaces in filenames but then it drops all output into home folder instead of current directory and no amount of cd or mv commands seems to make it work right. I'm pretty good about not putting spaces in file/folder names, but ya know, would be nice if it didn't break script.
Here's the code, a .desktop file that goes into /home/user/.local/share/file-manager/actions and the script I made (usr/bin):
[Desktop Entry]
Type=Action
Name=Resize Image
Comment=Shrink image and convert to jpg
Icon=edit-cut
Profiles=resize;
[X-Action-Profile resize]
Exec=sh -c 'cd %d && shrink2 %f'
MimeTypes=image/bmp;image/jpeg;image/png;#!/bin/sh
sizebox=$(yad --fixed --window-icon=edit-cut --form --title="Resize Image" --field="Resize to:" --width=400 --text-align=center --text="Enter new size (W x H in pixels, i.e. 800x600, 1024x768 etc.)")
size=$(echo $sizebox | awk 'BEGIN {FS="|" } { print $1 }')
convert "$1" -resize "$size" -set filename:copy '%t-%wx%h' '%[filename:copy].jpg'
# Depends: yad, imagemagick
# (note: later versions of imagemagick may require a different command than 'convert')
# DESCRIPTION:
# This script makes a copy of an image file (JPG, BMP, PNG), resizes the copy to whatever
# dimensions are entered, converts it to a JPEG, adds the new dimensions to the original
# filename, and outputs the copy into the same directory as the original. It is intended to
# be used with a .desktop file for activation in PcmanFM to offer a "Resize Image"
# option when you right-click an image file, but can also be used in terminal: shrink2 [img file]Thanks!
~greenjeans
I loved me some Crunchbang, favorite distro for several years, it's part of what made me want to make Vuu-do, and it is unabashedly crunchbang-ish. Only thing I didn't like was dealing with the menu, that's why I went with obmenu-generator.
Hey guys, long time, you know how life gets in the way of linux sometimes, lol.
Just updating my intentions in case anyone is still interested in Vuu-do, I originally made Vuu-do to be an ultra-stable LTS version, with both parent distro (Devuan) and the kernel being LTS until 2020, and that's what it still is, haven't made any updated isos in a year, but all my machines on it are still running very smoothly, so I haven't seen a need. I usually just roll these mini-distros for myself once about every 3-5 years anyway.
I haven't messed with Devuan 2.0 much, and haven't seen a need to do so as i'm not quite ready to start making a new Vuu-do, so most likely scenario for the next Vuu-do will be Beowulf (Devuan 3) or even the version after that, depends on the support level for both the distro and the kernel, really wanting to stick with building on a stable LTS platform.
So though i'm gonna start playing with the new stuff this year, it will be early 2020 most likely before there is a new Vuu-do version. Takes me a ridiculously long time to do this stuff, lol, so it will probably take all year for me to get it right.
Hope everybody has been doing well! Have missed hanging out with y'all!
Much love,
~greenjeans
Hey I zipped up the extensions I use in pcmanfm and they are on my SF section, feel free to add them to your accessories if you feel like anyone could use them.
I need to document a tad better, also need to update a little code to work with newer Imagemagick before I make an ascii version of a couple of them, the current stuff all works 100% with jessie.
ON IT!
If you had donate button somewhere, i'd send you beer money
Thanks for all you do FSR!
Re-posting what I just posted from another pertinent thread:
I've never had to do anything extensive the times i've had a permission issue with polkit, edit the files in /usr/share/polkit-1/actions/ directly, you can spot the relative entries, it may not be the correct way, but it's quick and it works perfectly. The bolded part on a couple of entries in the udisks2 policy is all it takes.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/Po … config.dtd">
<policyconfig>
<vendor>The udisks Project</vendor>
<vendor_url>http://udisks.freedesktop.org/</vendor_url>
<icon_name>drive-removable-media</icon_name><action id="org.freedesktop.udisks2.filesystem-mount">
<description>Mount a filesystem</description><message>Authentication is required to mount the filesystem</message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
https://lists.dyne.org/lurker/message/2 … f8.en.html
This may help.
I've never had to do anything extensive the times i've had a permission issue with polkit, edit the files in /usr/share/polkit-1/actions/ directly, you can spot the relative entries, it may not be the correct way, but it's quick and it works perfectly.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/Po … config.dtd">
<policyconfig>
<vendor>The udisks Project</vendor>
<vendor_url>http://udisks.freedesktop.org/</vendor_url>
<icon_name>drive-removable-media</icon_name><action id="org.freedesktop.udisks2.filesystem-mount">
<description>Mount a filesystem</description><message>Authentication is required to mount the filesystem</message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
You can do that in alsa as well, I see it fairly often as a lot of machines have an hdmi output in addition to the regular one and alsa defaults to using card 0 which is usually the HDMI output, simple solution is adding an .asoundrc file in your home folder:
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}(Note: I know you solved your problem, i'm just posting this additional info for other folks who might be looking for solutions and read this thread)
Yes, a lot of people would stop after the apt-get remove pulseaudio ;-)
It seems that many machines these days have an HDMI sound outlet, which is often shared with a normal outlet, using the snd-hda-intel kernel module. This seems to cause problems. If you don't need the HDMI sound then disabling it makes things simpler, using the enable option :-
http://forums.debian.net/viewtopic.php?t=110572#p525601
Geoff
Or delete pulseaudio completely and use ALSA. ![]()
Not for nothing, but some livecd's write a sudo-nopassword entry for the duration of the live session so the user can use everything freely, but doesn't delete that entry when you install it, it breaks pkexec, and pkexec being the POS it is, when it breaks it defaults to allowing program to open with no password.
Good info Golinux!
Lots of examples of this, I personally try to NOT use Pulseaudio, but installing VLC drags in libpulse, not because VLC won't work on ALSA, but so it can communicate if need be with another machine on a network that does use it. So in practice it's never used expect for the above scenario. I simply deleted most of the pulse files and made it into a dummy package. Not that it wasn't a dummy to start with. ![]()
greenjeans wrote:(((...))), if you don't trust yourself to be root on your own machine then I don't know what to say to that.
I trust me in a shell but not separated from the system by a GUI.
Well... maybe better saying: I don't trust GUIs.
I think some of the people here and everywhere in the 'nix world that possess a lot of technical acumen and skill with computers, tend to forget that not everyone uses their computer that way, and not everyone develops exclusively for geeks like us, lol.
One of the primary reasons I do it, is for friends, family, and people in my community who don't have the money (for the dozenth time) to take their machine to a PC repair place and have it wiped (for the dozenth time) to get rid of all the garbage that has destroyed windoze (again) only to have the tech load freakin load windoze on it (again). The definition of insanity being doing the same thing again and again expecting a different result.
Most of these people don't have the time to learn what we know, they just want a simple GUI interface to everything, drag-n-drop functionality, a system of doing things they are basically familiar with and a small learning curve.
So that is always uppermost in my mind while developing. And so it stands to reason that while developing I should do as much as possible with GUI's myself, so as to constantly be able to test and verify that these systems work as intended, and if they DO get interested in learning more about linux and want to start experimenting themselves, it's very easy with the tools I have provided and is robust and well-tested.
I am already really pushing the envelope trying to convert windoze refugees to linux using Openbox, lol, I don't want to scare them off completely by taking away their GUI's.
I've just no idea why you'd need to run an X11 file manager as root? Can't see how it would effect "workflow", can't see the scenario where "work" involves being in a file manager as root... what are you doing?
Developing. I use this function constantly, it's super-easy to add/delete/modify/destroy-system-cruft when "Open as admin" is right there in the context menu, it absolutely speeds my workflow....I really don't understand why anyone would NOT make this available to themselves, if you don't trust yourself to be root on your own machine then I don't know what to say to that. ![]()
Trust me on this CW, it helps a LOT. Have had lots of people thank me in fact for making it so accessible in my systems. Possibly you and others use their machine differently, please don't discount this effective tool because you personally do it a different way.
Thanks for the kind words Stanz!!
Not sure why it's showing 27.6.2 on yours, is it the latest one? I just checked the build partition to be sure and it's showing me 27.7.2 as is this partition.
Or you could just install the .deb package, seems much simpler.
The XFCE power manager also works pretty well for me.
The mate power manager is a disgrace, everything is grayed out, none of the functions really work, I recommended it be dumped from the repo months ago.
Mate has really disappointed me in the last year, not only are longstanding bugs still not fixed, there are regressions now that are a big PITA. It's gotten way worse as they have progressed to GTK3, it's almost as bad as Gnome now, and with good reason as they are no longer anything like a fork of gnome 2, they are simply falling into line with the new gnome glitchware. It's embarassing really, windows 7 is more stable.
we cannot fork all that are "eating" by the systemd monster! we must thing in less work due are directed respect the amount of developers/manpowers
What's this "we" stuff? Are you part of the Devuan development team? You certainly don't speak for me, i'm quite capable of forking over systemd. ![]()
FOR NOW SUDO HANDLE DIRECTLY THE RIGHTS FOR XAUTHORITY.. but runs app as root user are stupid.. there's a userspace for taht, there's the main reason of the dissapear of gksu
Well I don't use sudo in the first place, nor pkexec, giving a user any sort of admin rights is a silly security risk IMO, it defeats the whole purpose of having separate user/admin accounts, but whatever works for you....personally I use su for everything, but I will always give people who use my project the option of using sudo if they like. Gksu WILL be forked and that's what i'll be using.
That "we can't" crap is for those who blithely accept the status quo even if it's garbageware. In case you hadn't noticed, Devuan is a can-do distro. Might want to take that defeatist attitude elsewhere, Redhats love that stuff, i'm sure they'd welcome your compliance with open arms.
greenjeans wrote:fungus wrote:gksu gksudo will be removed from debian repositories.
Well good lord, does the stupid never end?
It stops here. We can fork those those functions.
You freakin ROCK Golinux! ![]()
gksu gksudo will be removed from debian repositories.
Well good lord, does the stupid never end?
There's nothing wrong with gksu, it has never failed me, while pkexec has caused multiple issues, I delete that garbage regularly.
It's sad really, I have really liked Debian for a long time and appreciate their efforts usually, but I just did a test install of 9.3 using the Mate desktop on a late model laptop, and it's so buggy I almost did a video about it but didn't figure it would help any....horrible, worst version of Debian i've ever used.
So glad Devuan is here, that experience the other day really underscored how great my results have been with Devuan, working on a new Vuu-do now that will be the first EFI version, and the minimal version at least will be translatable in 2.0.0. Gonna be trying out some of the new options too, eudev, elogind etc. It's awesome how we are all growing and getting better here. ![]()
Great times, tough for sure, but challenge drives innovation and Devuan is the tip of the spear. ![]()
It starts with the kernel, which is 25 mb larger than the 3.16 kernels.
Continues with larger packages for firmware, drivers, X, etc. etc.
Next, it's important to understand that not everything on that iso is going to be installed when you build your system, there's LOTS of things you won't use. Using grub? Then you won't need lilo which is available on the disk, lots of other examples of this.
Want a 100 mb install iso? You can maybe build one if it's a CLI-only builder iso you want, but it will take some work for sure, I would abandon the netinstall idea and just roll up your own using Refracta-Snapshot.
Use the netinstall iso, do not install any DE's or printer support etc, once installed a lot of stuff will go bye-bye on it's own, then purge any other stuff you don't want, install Refractasnapshot and Installer + depends, clear out the cruft and squash you a nice lightweight base iso. ![]()
![]()
WOO-HOO!! GAME ON!! THANKS VUA'S!!!
Working on EFI Vuu-do now...arrgh...lol. But needs to be done I guess.
Whew...I'm thinkin' of locking desktop-base for awhile! LOLOLOL!!!
I threw the whole package outta Vuu-do, lol, just so I wouldn't have to deal with this stuff. ![]()
Not that I don't like purpy and all....:D