You are not logged in.

#1 2014-03-23 03:38:06

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 161
Website

what does % do when executing a command?

So I was doing some looking around at some of the actual commands that are executed when starting an application when I noticed that some of the programs have an % simbol appended to the command. This is then accompanied by a letter (usually U, or u)

I'm thinking this is a way of allowing an application to run with certain group privileges, though I'm not sure. If that is the case, what is the difference between the U and the u?

For example, if I wanted to give a program like HandBrake the privilege of being able to shut down the system when done, would the command look like this:

ghb %power


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#2 2014-03-23 03:56:08

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,723
Website

Re: what does % do when executing a command?

http://standards.freedesktop.org/deskto … -variables

I'm not sure if handbrake can shutdown your PC when it's done.. You could write a script to run handbreak-cli, then poweroff your machine when that command exits though.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2014-03-23 03:58:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: what does % do when executing a command?

WorMzy wrote:

I'm not sure if handbrake can shutdown your PC when it's done.

Last year it could: https://bbs.archlinux.org/viewtopic.php … 0#p1311590

Last edited by karol (2014-03-23 03:59:43)

Offline

#4 2014-03-23 04:23:00

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 161
Website

Re: what does % do when executing a command?

karol wrote:
WorMzy wrote:

I'm not sure if handbrake can shutdown your PC when it's done.

Last year it could: https://bbs.archlinux.org/viewtopic.php … 0#p1311590

That was a thread I started a while back which I could not get a solid answer about. So far, the best option is to append a shutdown command to the initial command.


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#5 2014-03-23 04:26:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: what does % do when executing a command?

What about upstream? Any luck?

Offline

#6 2014-03-23 04:29:23

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 161
Website

Re: what does % do when executing a command?

I'm starting to get the idea that HandBrake can't do it (though the preferences gives the option to) The thing that gets me though is that the option to suspend the system when done does work. I use it all the time. Could it be that suspending the system doesn't require root access? I've tried running HandBrake as root, but that doesn't work either. It's easy enough to create a .desktop file to start with the option to shut down appended, though it just irritates me that the option is there, but it doesn't work. Other programs I use that offer the option are unsuccessful in shutting down the system as well (such as Qbittorrent) Since I've only had this problem on Arch, Manjaro, and Archbang, I assume it's got something to do with systemd, but of that I'm not sure of either.

I just think things should work properly.


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#7 2014-03-23 04:30:29

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 161
Website

Re: what does % do when executing a command?

karol wrote:

What about upstream? Any luck?

I've posted my question on HandBrake's forum, and have gotten even less results than any other.


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#8 2014-03-23 04:35:34

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 161
Website

Re: what does % do when executing a command?

this is why I like programs like Transmission, which gives you the option of calling any executable you want when it's done. All I have to do is create either a shutdown launcher, or a suspend launcher.


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#9 2014-03-23 11:55:11

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: what does % do when executing a command?

If this is about %something in .desktop files you should look for answer in freedesktop documentation: http://standards.freedesktop.org/deskto … 01s06.html

EDIT: duh! shouldn't reply on forum threads just woken up (WorMzy posted the same link on second post, sorry)

Last edited by ooo (2014-03-23 13:09:18)

Offline

#10 2014-03-23 12:02:20

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: what does % do when executing a command?

ooo wrote:

If this is about %something in .desktop files you should look for answer in freedesktop documentation: http://standards.freedesktop.org/deskto … 01s06.html

https://bbs.archlinux.org/viewtopic.php … 0#p1395860 :-)



wchouser3, can you list what programs don't work (don't shut down the computer when finished) even though they should? HandBrake, Qbittorrent, which ones else?

Offline

#11 2014-03-23 15:12:19

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,723
Website

Re: what does % do when executing a command?

Looks like Handbrake uses gnome power management's and gnome session manager's dbus interfaces to try and shut the PC down.

https://github.com/HandBrake/HandBrake/ … ks.c#L4423
https://github.com/HandBrake/HandBrake/ … ks.c#L4630

However, I don't know enough about dbus or gnome to know why suspend works, but shutdown doesn't.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#12 2014-03-23 16:45:39

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 161
Website

Re: what does % do when executing a command?

karol wrote:

wchouser3, can you list what programs don't work (don't shut down the computer when finished) even though they should? HandBrake, Qbittorrent, which ones else?

Oh man....off hand, those are the only two that use now-a-days. I used to use Avidemux, which had the option, but I haven't used it in a couple of years now. HandBrake is the one I need it most for. I've switched from Qbittorrent to Transmission for another reason. As I commented earlier, I may stay with Transimission because it allows you to call any command or script you want when it's done, which works flawlessly.


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#13 2014-03-23 16:50:02

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 161
Website

Re: what does % do when executing a command?

WorMzy wrote:

Looks like Handbrake uses gnome power management's and gnome session manager's dbus interfaces to try and shut the PC down.

https://github.com/HandBrake/HandBrake/ … ks.c#L4423
https://github.com/HandBrake/HandBrake/ … ks.c#L4630

However, I don't know enough about dbus or gnome to know why suspend works, but shutdown doesn't.

That's kind of the same answer Handbrake's developer gave me on their forum some time back, though he never gave me any thing else. I asked the question again on their forums, as well as on LinuxDistroCommunity, though this forum is the only one I've gotten a response from. (which doesn't surprise me)

lol...I guess I'd be satisfied if he would just come out and say it just won't work with Arch. It least then, I could move on. I'm a little silly that way.


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#14 2014-03-23 22:44:22

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: what does % do when executing a command?

@wchouser3
Please use the edit link to add information to your previous post when there are no intervening posts. Multiple sequential posts from the same user are a form of bumping, which is against our forum etiquette (linked in my sig).

Thanks


My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone

Offline

#15 2014-03-23 23:26:01

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 161
Website

Re: what does % do when executing a command?

Xyne wrote:

@wchouser3
Please use the edit link to add information to your previous post when there are no intervening posts. Multiple sequential posts from the same user are a form of bumping, which is against our forum etiquette (linked in my sig).

Thanks

I'm not sure what you mean. As I scrolled up, the only time I saw that I did that is when I replied to two different people, one after another, or replied to someone, then posted something else. Am I supposed to combine replies (quotes)?

I apologize for my ignorance here, I'm still learning


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#16 2014-03-23 23:29:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: what does % do when executing a command?

wchouser3 wrote:

Am I supposed to combine replies (quotes)?

Yup. These three posts https://bbs.archlinux.org/viewtopic.php … 1#p1395871 should be one:.

Offline

#17 2014-03-23 23:36:46

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 161
Website

Re: what does % do when executing a command?

karol wrote:

Yup. These three posts https://bbs.archlinux.org/viewtopic.php … 1#p1395871 should be one:.

hmm...Ok, sorry.....lol....jeez...so many rules

I do appreciate you setting me straight though. I won't do it again.


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#18 2014-03-24 20:17:09

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: what does % do when executing a command?

It was really meant as more of a friendly nudge than a slap on the wrist.

We appreciate your compliance, user 74059. Long live the Arch Overlard.


My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone

Offline

#19 2014-03-25 00:34:25

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 161
Website

Re: what does % do when executing a command?

Xyne wrote:

It was really meant as more of a friendly nudge than a slap on the wrist.

We appreciate your compliance, user 74059. Long live the Arch Overlard.

I know....it's cool


If you can't be helpful, don't say anything at all. Fair enough?

Offline

Board footer

Powered by FluxBB