Changing .xinitrc makes /root/Startup stop working in F96 (SOLVED)

Moderator: Forum moderators

Post Reply
User avatar
nilsonmorales
Posts: 205
Joined: Thu Dec 26, 2019 1:47 am
Location: El Salvador
Has thanked: 78 times
Been thanked: 134 times
Contact:

Changing .xinitrc makes /root/Startup stop working in F96 (SOLVED)

Post by nilsonmorales »

Please help us to understand.
When install xfce4 enviroment in F96 everything in stop to work even chmod +x the files but when id change the .xinitrc from a dpupbuster @josejp2424 anything works
why, idk well here is the diff file

Code: Select all

8,11c8,9
< export XDG_SESSION_TYPE=x11
< 
< [ -f /etc/desktop_app ] && read -r desktop < /etc/desktop_app
< [ "$desktop" = "" ] && desktop=rox
---
> #[ -f /etc/desktop_app ] && read -r desktop < /etc/desktop_app
> #[ "$desktop" = "" ] && desktop=rox
14c12,13
< 
---
> #kodi josejp2424
> #export KODI_HOME=/usr/share/kodi/
18c17
< #/sbin/pup_event_frontend_d &
---
> /sbin/pup_event_frontend_d &
20a20,27
> #w482 reshape background image if widescreen...
> #120708 need to reshape for PUPMODE=2 also...
> #[ $PUPMODE -eq 5 ] && /usr/sbin/background_reshape
> NEEDRESHAPE='yes'
> [ -f /usr/share/backgrounds_original/ORIGINAL-default.jpg ] && NEEDRESHAPE='no'
> [ -f /usr/share/backgrounds_original/ORIGINAL-default.png ] && NEEDRESHAPE='no'
> [ "$NEEDRESHAPE" = "yes" ] && /usr/sbin/background_reshape
> 
44c51,55
< xhost +local: 2>/dev/null
---
> CURRENTWM="`cat /etc/windowmanager`"
> if [ "$CURRENTWM" = "startkde" ];then
>  /sbin/pup_event_frontend_d & #130525
>  exec startkde
> fi
74,85d84
< CURRENTWM="`cat /etc/windowmanager`"
< if [ "$CURRENTWM" = "startkde" ];then
<  /sbin/pup_event_frontend_d & #130525
<  exec startkde
< fi
< CURRENTWM="`cat /etc/windowmanager`"
< if [ "$CURRENTWM" = "startxfce4" ];then
<  /sbin/pup_event_frontend_d & #130525
<  exec startxfce4
< rox --pinboard= 
< fi
< 
102,103d100
< 
< 
128a126,134
> else
>  ##Xorg has it's own fontpath settings in /etc/X11/xorg.conf...
>  #if [ "`readlink /usr/bin/X`" != "Xorg" ];then
>  # #xset fp+ /usr/lib/X11/fonts/Type1/
>  # #xset fp+ /usr/lib/X11/fonts/TTF/
>  # xset fp+ /usr/share/fonts/default/Type1/
>  # xset fp+ /usr/share/fonts/default/TTF/
>  #fi
>  xset s 600 600 s blank
139c145
< /usr/sbin/fixPuppyPin /root/Choices/ROX-Filer/PuppyPin #v1.0.7
---
> #/usr/sbin/fixPuppyPin /root/Choices/ROX-Filer/PuppyPin #v1.0.7
141,157c147
< sleep 1 # let the dust settle
< 
< case $desktop in
<  pcmanfm) pcmanfm --desktop & ;;
<  rox)
< 	if [ -f /root/Choices/ROX-Filer/PuppyPan1 ];then
< 		roxfiler -p /root/Choices/ROX-Filer/PuppyPin -r /root/Choices/ROX-Filer/PuppyPan1
< 	else
< 		roxfiler -p /root/Choices/ROX-Filer/PuppyPin
< 	fi
< 	;;
< esac
< 
< /sbin/pup_event_frontend_d & #130525 moved down.
< 
< #v2.0.0
< /usr/sbin/delayedrun &
---
> #sleep 1 # let the dust settle
158a149,158
> #case $desktop in
> # pcmanfm) pcmanfm --desktop & ;;
> # rox)
> #	if [ -f /root/Choices/ROX-Filer/PuppyPan1 ];then
> #		roxfiler -p /root/Choices/ROX-Filer/PuppyPin -r /root/Choices/ROX-Filer/PuppyPan1
> #	else
> #		roxfiler -p /root/Choices/ROX-Filer/PuppyPin
> #	fi
> #	;;
> #esac
163a164,176
> #v2.0.0
>  glib-compile-schemas /usr/share/glib-2.0/schemas &
> 
> CURRENTWM="`cat /etc/windowmanager`"
> if [ "$CURRENTWM" = "startxfce4" ];then
> # /sbin/pup_event_frontend_d & #130525
> /usr/sbin/delayedrun &  #start-buster64 &
>  exec startxfce4 
> fi
> 
> /usr/sbin/delayedrun & /sbin/pup_event_frontend_d & #130525 moved down.
> 
> 

Thanks

Last edited by nilsonmorales on Fri Apr 07, 2023 6:19 pm, edited 1 time in total.
User avatar
pp4mnklinux
Posts: 1317
Joined: Wed Aug 19, 2020 5:43 pm
Has thanked: 684 times
Been thanked: 330 times

Re: Help with .xinitrc /some sugestions.

Post by pp4mnklinux »

:thumbup2:

It's only a sugestión, there are more prepared people to give you a solution.

The .xinitrc file is a configuration file used by the X Window System on Unix and Linux systems.

It is typically located in a user's home directory (i.e., ~/) and is executed by the startx command when a user los into.

It's possible that installing the XFCE4 environment on F96 has changed the default behavior of the X Window System, causing it to ignore the startup scripts in the /root/Startup directory.

By default, when you start X using the startx command, it looks for a file called .xinitrc in the user's home directory (~/). This file contains commands that are executed when X starts up, If the .xinitrc file specifies a window manager or desktop environment to start, it may override the default behavior of X and prevent the startup scripts in /root/Startup from being executed.

Changing the .xinitrc file can be a way to work around this issue. By modifying the .xinitrc file, you can specify which window manager or desktop environment to start (XFCE) and ensure that the startup scripts in /root/Startup are executed as well, but I can't tell you the way to modify it.

It's also possible that the issue is related to permissions, so when you run chmod +x on a file, you are giving it executable permissions. However, if the file is not owned by the root user or is not in the correct location, it may still not be executed. Make sure that the startup scripts in /root/Startup are owned by the root user and are located in the correct directory.

As I told u at the beggining, that is only a sugestión, and other users can give you better answers.

Byy, @nilsonmorales Image

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Help with .xinitrc

Post by rockedge »

@nilsonmorales Since this is a xfce4 desktop, the method we used to put the /root/Startup folder in KLV-Airedale should work as well here.
Original post by fredx181 -> viewtopic.php?p=44504#p44504

How to create working Startup folder (in /root):

- Copy attached "start-up" script to /usr/local/bin (remove fake .gz and make executable)
- Create Startup folder mkdir -p /root/Startup
- Edit /root/.xinitrc, find the line 'exec xfce4-session', and before that add '/usr/local/bin/start-up &', so will look as this:

Code: Select all

/usr/local/bin/start-up &
exec xfce4-session

Add the scripts (or symlinks) that you want to start at login to the Startup folder and reboot (or logout and back in).

Attachments
start-up.gz
remove fake gz
(114 Bytes) Downloaded 29 times
User avatar
nilsonmorales
Posts: 205
Joined: Thu Dec 26, 2019 1:47 am
Location: El Salvador
Has thanked: 78 times
Been thanked: 134 times
Contact:

Re: Changing .xinitrc makes /root/Startup stop working in F96

Post by nilsonmorales »

I was reviewing the .xinitrc of F96-4 I suppose it is equal to 3 but I can't find that line exec

Code: Select all

xfce4-session

what I see is that in /etc/windowmanager I have startxfce4, I think the line that needs to be edited is in this part

Code: Select all

CURRENTWM="`cat /etc/windowmanager`"
if [ "$CURRENTWM" = "startxfce4" ];then
  /sbin/pup_event_frontend_d & #130525
/usr/local/bin/start-up &
  exec startxfce4
rox --pinboard=
fi

I'm wrong?

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Changing .xinitrc makes /root/Startup stop working in F96

Post by rockedge »

Yes that is the line. Replace startxfce4 with xfce4-session

User avatar
fredx181
Posts: 3386
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 438 times
Been thanked: 1485 times
Contact:

Re: Changing .xinitrc makes /root/Startup stop working in F96

Post by fredx181 »

The code for start-up is probably there already in /usr/sbin/delayedrun :

Code: Select all

if [ -d /root/Startup ];then
 for A in /root/Startup/* ; do
  $A 2>/dev/null & 
  sleep 0.2
 done
fi

So it seems to me that in the .xinitrc you just need to run /usr/sbin/delayedrun & before the exec startxfce4

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Changing .xinitrc makes /root/Startup stop working in F96

Post by rockedge »

I think @fredx181 is on the right fix. That's basically what happens is the code runs through the scripts in /root/Startup the same way just before starting the desktop

User avatar
nilsonmorales
Posts: 205
Joined: Thu Dec 26, 2019 1:47 am
Location: El Salvador
Has thanked: 78 times
Been thanked: 134 times
Contact:

Re: Changing .xinitrc makes /root/Startup stop working in F96

Post by nilsonmorales »

Ok I can confirm that the line suggested by user @fredx181 works, it will be included in the next delta along with other modifications and translations
thanks @fredx181 x and @rockedge

Post Reply

Return to “F96CE-XFCE-FUSILLI”