User Tools

Site Tools


linux:linux_desktop

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:linux_desktop [2023/08/29 10:43] – created - external edit 127.0.0.1linux:linux_desktop [2024/07/14 08:06] (current) – [XFCE: Multi-User] azman
Line 254: Line 254:
 StartupNotify=true StartupNotify=true
 Keywords=Text;Editor; Keywords=Text;Editor;
 +</file>
 +
 +==== Useful Desktop Files ====
 +
 +The *.desktop files provide menu entry for applications.
 +
 +<file desktop arduino-ide.desktop>
 +[Desktop Entry]
 +Type=Application
 +Version=1.0
 +Name=Arduino IDE (App-Image)
 +Comment=Arduino IDE
 +Exec=/home/share/appx/app-image/arduino-ide %F
 +#Icon=
 +Terminal=false
 +Categories=Development;IDE;
 +#MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;
 +StartupNotify=true
 +#Keywords=Text;Editor;
 +</file>
 +
 +<file desktop android-studio.desktop>
 +[Desktop Entry]
 +Version=1.0
 +Type=Application
 +Name=Android Studio
 +Comment=
 +Exec=env JAVA_HOME=/home/share/appx/android-studio/jbr /home/share/appx/android-studio/bin/studio.sh
 +Icon=/home/share/appx/android-studio/bin/studio.png
 +Path=/home/share/appx/android-studio/bin
 +Categories=Development;IDE;
 +Terminal=false
 +StartupWMClass=jetbrains-studio
 +StartupNotify=true
 +</file>
 +
 +<file desktop xfig.desktop>
 +[Desktop Entry]
 +Encoding=UTF-8
 +Version=1.0
 +Type=Application
 +NoDisplay=true
 +Exec=/usr/bin/xfig -nowrite_bak %f
 +Name=xfig -nowrite_bak
 +Comment=Custom definition for xfig -nowrite_bak
 </file> </file>
  
Line 313: Line 358:
 ===== XFCE: Remove Suspend/Hibernate Button ===== ===== XFCE: Remove Suspend/Hibernate Button =====
  
-As root, 
 <code> <code>
 xfconf-query -c xfce4-session -np '/shutdown/ShowSuspend' -t 'bool' -s 'false' xfconf-query -c xfce4-session -np '/shutdown/ShowSuspend' -t 'bool' -s 'false'
Line 319: Line 363:
 xfconf-query -c xfce4-session -np '/shutdown/ShowHybridSleep' -t 'bool' -s 'false' xfconf-query -c xfce4-session -np '/shutdown/ShowHybridSleep' -t 'bool' -s 'false'
 </code> </code>
-Also doable from 'Settings Editorin X... but, I do not like to have X stuff in my root account.+ 
 +Sometimes this is also annoying? 
 +<code> 
 +xfconf-query -c xfce4-session -np '/shutdown/ShowSwitchUser-t 'bool' -s 'false' 
 +</code>
  
 ===== XFCE: Multi-User ===== ===== XFCE: Multi-User =====
 +
 +//**Note**: Latest version should be [[https://codeberg.org/azman/my1gists/src/branch/master/shell/clone-xfceconf|here]]//
  
 Copying XFCE settings for other users: Copying XFCE settings for other users:
Line 328: Line 378:
  
 DSTUSER=$1 DSTUSER=$1
-SRCUSER=`pwd` +[ -z "$DSTUSER" ] && echo "** Missing target username!" && exit 1 
-SRCTEST=`dirname $SRCUSER`+ 
 +SRCUSER=$(pwd) 
 +SRCTEST=$(dirname $SRCUSER)
  
 while [ 1 ] ; do while [ 1 ] ; do
 [ "$SRCTEST" == "/" ] && [ "$SRCTEST" == "/" ] &&
- echo "Cannot find /home in current path!" && exit 1+ echo "** Cannot find /home in current path!" && exit 1
 [ "$SRCTEST" == "/home" ] && break; [ "$SRCTEST" == "/home" ] && break;
-SRCUSER=`basename $SRCTEST` +SRCUSER=$(basename $SRCTEST) 
-SRCTEST=`dirname $SRCTEST`+SRCTEST=$(dirname $SRCTEST)
 done done
-echo "Using user '$SRCUSER' as source!"+echo "-- Using user '$SRCUSER' as source!"
  
 DSTHOME="/home/$DSTUSER" DSTHOME="/home/$DSTUSER"
 SRCHOME="/home/$SRCUSER" SRCHOME="/home/$SRCUSER"
- 
-[ "$DSTUSER" == "" ] && 
- echo "Please provide target username!" && exit 1 
  
 [ "$DSTUSER" == "$SRCUSER" ] && [ "$DSTUSER" == "$SRCUSER" ] &&
- echo "Target ($DSTUSER) same as source ($SRCUSER)?" && exit 1+ echo "** Target ($DSTUSER) same as source ($SRCUSER)?" && exit 1
  
 [ ! -d "$DSTHOME" ] && [ ! -d "$DSTHOME" ] &&
- echo "Cannot find target user path '$DSTHOME'!" && exit 1+ echo "** Cannot find target user path '$DSTHOME'!" && exit 1
  
 [ ! -d "$SRCHOME" ] && [ ! -d "$SRCHOME" ] &&
- echo "Cannot find source user path '$SRCHOME'!" && exit 1+ echo "** Cannot find source user path '$SRCHOME'!" && exit 1
  
-[ $UID -ne 0 ] && echo -e "\nMust run as root!\n" && exit 1 +DST_GRP=$(groups $DSTUSER | sed 's/.* : \([^[:space:]]*\).*$/\1/'
- +echo "-- Target:{$DSTUSER:$DST_GRP}" 
-CHKCONF="Terminal Thunar autostart geany xfce4"+[ $UID -ne 0 ] && echo -e "\n** Must run as root!\n" && exit 1
  
 +CHKCONF="Thunar geany xfce4"
 for conf in $CHKCONF ; do for conf in $CHKCONF ; do
 + SRCCONF="$SRCHOME/.config/$conf"
 + [ ! -d "$SRCCONF" ] && continue
  DSTCONF="$DSTHOME/.config/$conf"  DSTCONF="$DSTHOME/.config/$conf"
- SRCCONF="$SRCHOME/.config/$conf+ if [ -d "$DSTCONF] ; then 
- echo -n "Deleting $DSTCONF... " + echo -n "-- Deleting $DSTCONF... " 
- rm -rf $DSTCONF + rm -rf $DSTCONF 
- echo "done." + [ $? -ne 0 ] && echo -n "**error0** " 
- echo -n "Copying $SRCCONF as $DSTCONF..." + echo "done." 
- cp -a $SRCCONF `dirname $DSTCONF` + fi 
- chown -R $DSTUSER:users $DSTCONF+ echo -n "-- Copying $SRCCONF as $DSTCONF... " 
 + cp -a $SRCCONF $(dirname $DSTCONF
 + [ $? -ne 0 ] && echo -n "**error1** " 
 + chown -R $DSTUSER:$DST_GRP $DSTCONF 
 + [ $? -ne 0 ] && echo -n "**error2** "
  echo "done."  echo "done."
 done done
linux/linux_desktop.1693276983.txt.gz · Last modified: by 127.0.0.1