Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-02-16 11:01:09

svirus
Member
Registered: 2017-02-16
Posts: 3

right-click run terminal (like fvwm-crystal)

Hello,
I'am new to xfce4, and I just switched from fvwm-crystal (I used it for last 15 years).
Everything works perfect, but I don't find one of my favorite option.
In fvwm-crystal if I right click  on empty space in desktop, it run a termianl (xterm/aterm).

There is any option to do that in XFCE ?

Thanks in advanced,
sVirus

Offline

#2 2017-02-16 13:53:21

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,502

Re: right-click run terminal (like fvwm-crystal)

Hello and welcome.

Try creating a thunar custom action to open a terminal. It will work on the desktop as well.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#3 2017-02-16 15:58:54

svirus
Member
Registered: 2017-02-16
Posts: 3

Re: right-click run terminal (like fvwm-crystal)

Hmm... it's not exactly what I want.
In fvwm-crystal when I click right mouse button on empty space, there is no menu... it's just run command (in my settings it's run xterm).
look here: https://youtu.be/9bMSeGgw_Eg?t=51s (51s~54s)

Offline

#4 2017-02-16 17:07:51

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,502

Re: right-click run terminal (like fvwm-crystal)

That's not possible with xfdesktop unless you change the code. The closest you can get is by using a custom action (or by doing something totally different like assigning the terminal command to a keyboard shortcut and using that).

If its possible to capture a mouse button click on the desktop using a tool like xinput, xev, etc, you might be able to script something to look for the event and react to it.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#5 2017-02-17 10:41:42

svirus
Member
Registered: 2017-02-16
Posts: 3

Re: right-click run terminal (like fvwm-crystal)

ToZ wrote:

That's not possible with xfdesktop unless you change the code. The closest you can get is by using a custom action (or by doing something totally different like assigning the terminal command to a keyboard shortcut and using that).

hmm... I'am using gentoo, so for me it's not hard to create own ebuild and add private path for this.
Do You know where I find this ?
all suggestion will be good wink

Offline

#6 2017-02-17 13:09:21

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,502

Re: right-click run terminal (like fvwm-crystal)

Here is a very simple patch to replace the right-button click action to launch your default terminal (using exo):

diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index 8923bd2a..e17fa5b2 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -1198,7 +1198,8 @@ xfce_desktop_button_press_event(GtkWidget *w,
             if(!gtk_widget_has_grab(w))
                 gtk_grab_add(w);
 
-                xfce_desktop_popup_root_menu(desktop, button, evt->time);
+//                xfce_desktop_popup_root_menu(desktop, button, evt->time);
+                xfce_spawn_command_line_on_screen( gdk_screen_get_default(), "exo-open --launch TerminalEmulator", 0, 0, NULL );
                 return TRUE;
         } else if(button == 2 || (button == 1 && (state & GDK_SHIFT_MASK)
                                   && (state & GDK_CONTROL_MASK)))

Note: you need to have the desktop menu right-click enabled (Settings Manager > Menus) and you will no longer see the root menu. If you want, you can extend the patch and separate the right-click and Shift+right-click actions and maybe have Shift+right-click bring up the root menu - if you still want that around.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

Board footer

Powered by FluxBB