LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-18-2021, 06:15 AM   #1
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,714

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Question Can't get 'Open root terminal here' Thunar Custom Action to run.


Hi.

This used to work with gksudo.

Now I try this
Code:
pkexec xfce4-terminal --default-working-directory=%F
A dialog window opens, I put in my password, then nothing happens.

I use these settings:
File pattern: *
Appears if selection contains: Directories

Thanks.
 
Old 10-18-2021, 06:30 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Probably won't help with your issue, but shouldn't %F be lowercase %f?
 
Old 10-18-2021, 09:39 AM   #3
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,714

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Post

Quote:
Originally Posted by shruggy View Post
Probably won't help with your issue, but shouldn't %F be lowercase %f?
Hi shruggy. I tried lowercase 'f' also. Still no result.
 
Old 10-18-2021, 11:00 AM   #4
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
%d is the directory. %f is the filename (with full path). I think you want %d.
 
Old 10-18-2021, 11:13 AM   #5
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
@enigma9o7. Not in this case. See the example in XFCE wiki.
 
Old 10-18-2021, 11:59 AM   #6
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
Well hard to argue with that! I use thunar with different distro and different terminal, and set it for %d myself which seemed logical... perhaps %f works if Appearance Condition is set to "directory" so avoids the problem if you have a file selected, whereas %d would work even if you select a file I believe.... (edit: it seems irrelevant, it starts in whatever directory you opened it from in thunar even if nothing specified...)

In any case, that's probably not the issue. Instead of pkexec and having to type password in GUI, why not sudo and enter password in the terminal instead? Works for me... but I dont fully understand policykit vs sudo myself so perhaps you have good reason for wanting it that way...

edit: maybe try: xfce4-terminal -e "sudo -s"
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2021-10-18 09-58-24.jpg
Views:	48
Size:	171.4 KB
ID:	37502  

Last edited by enigma9o7; 10-18-2021 at 01:10 PM.
 
Old 10-19-2021, 09:43 AM   #7
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,714

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by enigma9o7 View Post
%d is the directory. %f is the filename (with full path). I think you want %d.
Hi enigma9o7. No joy.
 
Old 10-19-2021, 09:44 AM   #8
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,714

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Thumbs up

Quote:
Originally Posted by enigma9o7 View Post
Well hard to argue with that! I use thunar with different distro and different terminal, and set it for %d myself which seemed logical... perhaps %f works if Appearance Condition is set to "directory" so avoids the problem if you have a file selected, whereas %d would work even if you select a file I believe.... (edit: it seems irrelevant, it starts in whatever directory you opened it from in thunar even if nothing specified...)

In any case, that's probably not the issue. Instead of pkexec and having to type password in GUI, why not sudo and enter password in the terminal instead? Works for me... but I dont fully understand policykit vs sudo myself so perhaps you have good reason for wanting it that way...

edit: maybe try: xfce4-terminal -e "sudo -s"
Perfect! Thank you, sir.
 
  


Reply

Tags
custom action, root, terminal, thunar, xfce



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't write custom action for non-admin Thunar Fixit7 Ubuntu 1 08-01-2016 07:02 PM
Thunar custom action not working Fixit7 Puppy 1 05-30-2015 07:33 AM
Thunar custom action: navigate to directory instead of opening new window. Teufel Linux - Desktop 1 04-04-2013 05:20 PM
LXer: Delete directly without using/needing Trash in Xfce’s Thunar file manager with a Custom Action LXer Syndicated Linux News 0 03-13-2013 01:31 AM
[SOLVED] Change terminal for Thunar: 'Open Terminal Here' custom action.... andrew.46 Slackware 2 01-17-2012 05:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration