Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-02-26 08:26:00

p.sagharchi
Member
Registered: 2022-02-23
Posts: 6

Logout button in XFCE can't be disabled

Hello My Friends Is there any way how to disable logout button in XFCE logout dialog? I know how to disable shutdown, restart or remove SaveSession secttion but no luck with logout.

Thanks

Offline

#2 2022-02-26 08:50:45

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Logout button in XFCE can't be disabled

Hello and welcome to our lovely forum.

Unfortunately, the logout button is hard-coded to be present at all times.

However, you can try decreasing the size of its box or moving it away with gtk.css. Use this as a template.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#3 2022-02-26 08:59:01

p.sagharchi
Member
Registered: 2022-02-23
Posts: 6

Re: Logout button in XFCE can't be disabled

KBar wrote:

Hello and welcome to our lovely forum.

Unfortunately, the logout button is hard-coded to be present at all times.

However, you can try decreasing the size of its box or moving it away with gtk.css. Use this as a template.


thank you

actually, I want to use this template but I can't do that, even I do that template I couldn't see any changes

name file should be gtk.css or gtk.css. ?
and what about chmod ?

Last edited by p.sagharchi (2022-02-26 09:03:03)

Offline

#4 2022-02-26 09:03:10

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Logout button in XFCE can't be disabled

Here is the code to "move" it out the main dialog (tested on Xubuntu 20.04):

.xfsm-logout-buttons > box:first-child button:nth-child(1) { margin-left: -100px; margin-right: 100px; }

Before:                           After:
IrNr16ss.pngmdWbnb4s.png


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#5 2022-02-26 09:07:47

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Logout button in XFCE can't be disabled

p.sagharchi wrote:

actually, I want to use this template but I can't do that, even I do that template I couldn't see any changes

To make and see changes in real-time, you need GtkInspector. On Debian-based systems, the libgtk-3-dev package has it.

name file should be gtk.css or gtk.css. ?

You'd want to look inside $HOME/.config/gtk-3.0/. If the file gtk.css isn't there, simply create it. If it already exists, just add that line wherever you see fit. The file name is gtk.css without a trailing period.

and what about chmod ?

None. Irrelevant.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#6 2022-02-26 12:55:18

p.sagharchi
Member
Registered: 2022-02-23
Posts: 6

Re: Logout button in XFCE can't be disabled

KBar wrote:
p.sagharchi wrote:

actually, I want to use this template but I can't do that, even I do that template I couldn't see any changes

To make and see changes in real-time, you need GtkInspector. On Debian-based systems, the libgtk-3-dev package has it.

name file should be gtk.css or gtk.css. ?

You'd want to look inside $HOME/.config/gtk-3.0/. If the file gtk.css isn't there, simply create it. If it already exists, just add that line wherever you see fit. The file name is gtk.css without a trailing period.

and what about chmod ?

None. Irrelevant.



thank you very much I wrote the exact command that you told me but I didn't see any changes, Xubuntu 18.0.4 , arm64

path: ~/.config/gtk-3.0/gtk.css

Last edited by p.sagharchi (2022-02-26 13:29:08)

Offline

#7 2022-02-26 13:43:24

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Logout button in XFCE can't be disabled

p.sagharchi wrote:

thank you very much I wrote the exact command that you told me but I didn't see any changes, my Linux is 18.0.4 LTS

path: ~/.config/gtk-3.0/gtk.css

Alright. Let's tackle these one by one.

I wrote the exact command that you told me

They aren't commands; the shell doesn't know anything about CSS. They are rule sets that describe the rendering of elements on your screen.

GTK is a toolkit used to create graphical user interfaces; one that you're using right now. To modify the look of said interfaces, themes are created; the ones available to your system are listed in the Appearance app.

Like many other things in Linux, themes are also modular. When your computer starts and the graphical user interface loads, GTK first reads the contents of your main theme stored and defined typically in its own subdirectory inside /usr/share/themes/. Next, it reads user-defined configuration files, settings and rules stored in $HOME/.config/gtk-3.0/, which override their system-wide counterparts. Themes for individual users can also be stored in the .themes subdirectory in their home directory.

but I didn't see any changes,

You didn't and you won't see any changes until you re-login or reboot because xfce4-session is already up and running, which is why GTK can't apply new rules to it.

my Linux is 18.0.4 LTS

Linux is not like Windows. There are many so-called distributions that ship with the Linux kernel and GNU utilities that form the base for most of them. Which distribution are you using? I'm guessing it's Xubuntu but it could also be Linux Mint. Open a terminal emulator—which is typically bound to Ctrl+Alt+T—and type in the following command:

cat /etc/os-release

It should print out many lines that will help us determine your distribution and its version. Click and drag your mouse, right-click and select Copy. Finally, paste it here inside code tags, which are explained in one of the links below your reply box.

~/.config/gtk-3.0/gtk.css

Also, open this file with a text editor and share its content with us inside code tags.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#8 2022-02-26 14:18:30

p.sagharchi
Member
Registered: 2022-02-23
Posts: 6

Re: Logout button in XFCE can't be disabled

Thank you very much for your support

output of

cat ~/.config/gtk-3.0/gtk.css

.xfsm-logout-buttons > box:first-child button:nth-child(1) { margin-left: -100px; margin-right: 100px; }


and

output of

cat /etc/os-release

NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Last edited by p.sagharchi (2022-02-26 14:18:54)

Offline

#9 2022-02-26 16:48:55

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Logout button in XFCE can't be disabled

Thanks.

Can you also share the contents of /var/log/installer/media-info?


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#10 2022-02-27 07:18:37

p.sagharchi
Member
Registered: 2022-02-23
Posts: 6

Re: Logout button in XFCE can't be disabled

Actually there isnt any path with this name /var/log/installer/media-info
i couldnt see this dir in my rasspberypi /var/log/installer

Offline

#11 2022-02-27 10:48:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Logout button in XFCE can't be disabled

I believe Bionic Beaver runs Xfce 4.12, which is based on GTK2, so GTK3 directives won't work here. I don't think the logout button can be removed here unless you change the code and re-build the package.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#12 2022-02-28 07:07:21

p.sagharchi
Member
Registered: 2022-02-23
Posts: 6

Re: Logout button in XFCE can't be disabled

ToZ wrote:

I believe Bionic Beaver runs Xfce 4.12, which is based on GTK2, so GTK3 directives won't work here. I don't think the logout button can be removed here unless you change the code and re-build the package.


yes I use this command in terminal 

xfce4-about --version

, I figure out that this version is 4.12

Last edited by p.sagharchi (2022-02-28 07:07:58)

Offline

#13 2022-02-28 07:14:47

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Logout button in XFCE can't be disabled

I don't know if it's a Xubuntu installation or an Ubuntu installation with Xfce on top, since you seem to be missing /var/log/installer/media-info. If it's the former, this version reached its end-of-life almost a year ago and an upgrade to 20.04 is highly recommended.

Regardless, it looks like you won't be able to achieve what you wanted (at least, easily) in this specific version, as ToZ said.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.013 seconds, 9 queries executed - Memory usage: 611.47 KiB (Peak: 628.31 KiB) ]