LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-17-2013, 04:41 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Who starts the screen saver in Xfce 4.10?


Slackware 14.0
Xfce 4.10

Hi: I have been trying to find the script the screen saver is run from, after I run startx, if there is one. In 12.0, there was /etc/xfce/xdg/xfce4/xinitrc (f1), from where /usr/bin/xscreensaver (f2) was launched. f1 is now /etc/xdg/xfce4/xinitrc (f3), but f2 is not run from f3.

I do
Code:
 
root@darkstar:/etc# grep -irl xscreensaver * 
X11/app-defaults/XScreenSaver 
xdg/autostart/xscreensaver.desktop 
xdg/menus/xfce-settings-manager.menu 
root@darkstar:/etc#
but none of these files is a shell script. E.g., XScreenSaver is a configuration file, in spite of its title (the OS installer did not put any .xinitrc in ~/). ps shows that f2 is running while I am in the GUI. There must be some executable, either binary or written for an interpreter who starts f2. But where is it? That would be the question.
 
Old 01-17-2013, 07:57 AM   #2
cendryon
Member
 
Registered: Aug 2005
Location: France
Distribution: Slackware64 current
Posts: 82

Rep: Reputation: 30
Hi

That would be
Code:
xdg/autostart/xscreensaver.desktop
It is not a shell script, it is a Desktop Entry file (text file). The "Exec=" line states what to run.

As its path suggests, it is started automatically when you log in XDG-compliant DE like XFCE and KDE (see Desktop Application Autostart Specification). You could think of it as working like the "Startup" folder of Windows' Start menu.
System-wide settings (à la Windows' "All users") are in
Code:
/etc/xdg/autostart
User-specific settings are in
Code:
~/.config/autostart
User-specific settings for KDE only are in
Code:
~/.kde/Autostart
Cheers
 
1 members found this post helpful.
Old 01-17-2013, 02:57 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thank you. If I do 'less /etc/xdg/autostart/screensaver.desktop, I find a lot of unprintable characters, besides the following:
Code:
Icon=preferences-desktop-screensaver
Exec=xscreensaver -no-splash
TryExec=xscreensaver
OnlyShowIn=XFCE;
You'll see. Choosing a black screen as screen saver in the GUI, makes the GUI to make very strange things. In 12.0 I a similar problem, but then I simply commented out the line launching xscreensaver. I guess commenting out the Exec and TryExec lines would do the trick?
Without knowing all this, I had a feeling that things were done each time more like in Windows!?

Are the unprintable caracters unicode chararctes?
 
Old 01-17-2013, 04:54 PM   #4
cendryon
Member
 
Registered: Aug 2005
Location: France
Distribution: Slackware64 current
Posts: 82

Rep: Reputation: 30
Hi

I run KDE, not XFCE.
Yet, this How to disable xfce screensaver points us in the right direction.

According to the "important note" near the end of /etc/xdg/xfce4/xinitrc, the content of /etc/xdg/autostart is considered only if your are not using Xfce's session manager (xfce4-session).
If you actually use xfce4-session, and you certainly do if you didn't mangled your user's .xinitrc (better use xwmconfig as root to set XFCE as the system-wide DE default), you don't need to bother with the content of /etc/xdg/autostart.

Instead, start XFCE and just run xfce4-settings-manager to disable screensaver (see Xfce 4 Screensaver Settings for instance).

Lastly, yes, the unprintable characters are Unicode: "Name[xy]=" and "Comment[xy]=" are localized strings of "Name=" and "Comment=", where xy is a language code.

Cheers
 
Old 01-17-2013, 05:38 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
That is the great "Why": /etc/xdg/xfce4/xinitrc has the execute bit off. The installer did this!

About disabling from the GUI, it hanged the GUI in 12.0 and still has problems in 14.0. As nobody does this, disabling the screen saver, few people notices the disastrous effect. The effect in 14.0 is I am left without the window manager.
 
Old 01-17-2013, 06:46 PM   #6
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
Quote:
Originally Posted by stf92 View Post
That is the great "Why": /etc/xdg/xfce4/xinitrc has the execute bit off. The installer did this! ...
This is a "desktop" file, not a program or script, and the execute bit is not relevant. Think of it as a data file for the Xfce desktop system. It doesn't get executed - it is read by Xfce as data.
 
Old 01-17-2013, 07:39 PM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
No Sir. It begins '#!/bin/sh'. The xinitrc file was never anything but a shell script executable file. So the question remains: why this file has the 'x' bit off.

Last edited by stf92; 01-17-2013 at 07:42 PM.
 
Old 01-18-2013, 01:15 AM   #8
cendryon
Member
 
Registered: Aug 2005
Location: France
Distribution: Slackware64 current
Posts: 82

Rep: Reputation: 30
Hi

Follow the trail:
Code:
/usr/X11/xinit/xinitrc.xfce
calls
Code:
/usr/bin/startxfce4
which reads, not execute
Code:
/etc/xdg/xfce4/xinitrc
so no need to set its executable bit.

Cheers
 
Old 01-18-2013, 01:47 AM   #9
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
In /etc/xdg/xfce4/xinitrc, the last line is

'exec $prog /etc/xdg/xfce4/xinitrc $CLIENTRC $SERVERRC'.

$prog = '/bin/sh' here. And $CLIENTRC, $SERVERRC are just options. So /bin/sh executes /etc/xdg/xfce4/xinitrc.

Suppose not. But /etc/xdg/xfce4/xinitrc is a shell script:
Code:
semoi@darkstar:~$ head -n15 /etc/xdg/xfce4/xinitrc
#!/bin/sh

# fix broken $UID on some system...
if test "x$UID" = "x"; then
  if test -x /usr/xpg4/bin/id; then
    UID=`/usr/xpg4/bin/id -u`;
  else
    UID=`id -u`;
  fi
fi

# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
# over "applications.menu" in all Xfce applications.
if test "x$XDG_MENU_PREFIX" = "x"; then
  XDG_MENU_PREFIX="xfce-"
semoi@darkstar:~$
A contradiction.
 
Old 01-18-2013, 04:54 PM   #10
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
Quote:
Originally Posted by stf92 View Post
No Sir. It begins '#!/bin/sh'. The xinitrc file was never anything but a shell script executable file. So the question remains: why this file has the 'x' bit off.
Sorry, my mistake. I skipped over some stuff and thought we were talking about the autostart file.
 
  


Reply



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
Using windows screen savers (using .scr screen saver files) RussellChamp Linux - Software 7 12-23-2008 02:21 PM
Trigger bash script when screen saver starts of desktop gets locked BinWondrin Programming 4 08-01-2008 03:40 AM
Dark screen after screen saver O_o!! elekt Ubuntu 0 07-25-2007 09:54 PM
ATI 9200 SE screen flicker in screen saver gargamel Slackware 12 07-09-2005 04:10 PM
How to turn off screen blanking screen saver in run level 3? Arodef Linux - Software 1 01-04-2005 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:10 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